From: Sage Weil Date: Sun, 29 Jan 2012 16:48:22 +0000 (-0800) Subject: filestore: fix rollback when current/ missing entirely X-Git-Tag: v0.44~114 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9bb3875b1671b89a74895f3c97a27845867b3941;p=ceph.git 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 --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 2af20b107857..ee25ace48759 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;