]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
filestore: set guard on collection_move
authorSage Weil <sage.weil@dreamhost.com>
Fri, 30 Mar 2012 16:51:45 +0000 (09:51 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 30 Mar 2012 16:52:09 +0000 (09:52 -0700)
commit41f84fac1ae4b4c72bf9bfe07614c4066c916fd1
treebe3417e261d46b91543801c187fcb063460c6cb8
parentc89b7f22c8599eb974e75a2f7a5f855358199dee
filestore: set guard on collection_move

During recovery we submit transactions like:

 - delete a/foo
 - move tmp/foo to a/foo

This prevents the EEXIST check in collection_move from doing any good,
since the destination never exists.  We need to do that remove at least
sometimes, because we may be overwriting an existing/older version of the
object.

So,
 - set the guard after we do the move, so that
 - the delete won't be repated, and
 - the EEXIST check will work

Also check the guard for good measure (although that doesn't do anything
specifically useful in this scenario).

Fixes: #2164
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
src/os/FileStore.cc
src/os/FileStore.h