]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
filestore: fix rollback safety check
authorSage Weil <sage@newdream.net>
Fri, 2 Mar 2012 17:44:04 +0000 (09:44 -0800)
committerSage Weil <sage@newdream.net>
Fri, 2 Mar 2012 17:50:11 +0000 (09:50 -0800)
commitcacf0fdec8189f90b0af81e9ef03f707d8c0d02c
tree799059fa36b961a639d14d9b39a5acc24885be6c
parent098cd92140d7571a7c49552afe9c901adc34feee
filestore: fix rollback safety check

There is a window in the old check between when current/commit_op_seq is
written and the snapshot is taken.  If ceph-osd crashes, we'll be unable to
start because we'll believe current/ was in use without proper checkpoints.

Instead, make the snapped/not snapped state of current/ explicit.

Fixes: #2118
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
Reviewed-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
src/os/FileStore.cc