From 9bb3875b1671b89a74895f3c97a27845867b3941 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 29 Jan 2012 08:48:22 -0800 Subject: [PATCH] filestore: fix rollback when current/ missing entirely This can happen when we are starting, rolling back, remove current/, and then fail before we snapshot a snap_ into place. Most of the logic was already in place for this; we tried to fix it in cd2dedd7d190a43a6be50a7f18849fe0123c72bc but missed this piece. Fixes: #1999 Signed-off-by: Sage Weil --- src/os/FileStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 2af20b1078574..ee25ace48759c 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -1597,7 +1597,7 @@ int FileStore::mount() uint64_t cp = snaps.back(); dout(10) << " most recent snap from " << snaps << " is " << cp << dendl; - if (cp != curr_seq) { + if (curr_seq && cp != curr_seq) { if (!m_osd_use_stale_snap) { derr << "ERROR: current/ volume data version is not equal to snapshotted version." << dendl; derr << "Current version " << curr_seq << ", last snap " << cp << dendl; -- 2.39.5