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>
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;