]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix rollback when current/ missing entirely
authorSage Weil <sage@newdream.net>
Sun, 29 Jan 2012 16:48:22 +0000 (08:48 -0800)
committerSage Weil <sage@newdream.net>
Sun, 29 Jan 2012 16:48:22 +0000 (08:48 -0800)
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 <sage@newdream.net>
src/os/FileStore.cc

index 2af20b1078574d0177320bc7f90fa1f2a1955035..ee25ace48759c9d11a75c32376cff9ecaea30120 100644 (file)
@@ -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;