summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-01-29 08:48:22 -0800
committerSage Weil <sage@newdream.net>2012-01-29 08:48:22 -0800
commit9bb3875b1671b89a74895f3c97a27845867b3941 (patch)
tree34bfb1d12ec6cf3d9cc8bba5e069c0fe4d9a0468
parent5e16974c291e78f5a7cdc3c4f680e7817cff3cca (diff)
downloadceph-9bb3875b1671b89a74895f3c97a27845867b3941.tar.gz
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 <sage@newdream.net>
-rw-r--r--src/os/FileStore.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 2af20b10785..ee25ace4875 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;