]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking
authorSage Weil <sage@newdream.net>
Thu, 1 Sep 2011 23:32:24 +0000 (16:32 -0700)
committerSage Weil <sage@newdream.net>
Wed, 7 Sep 2011 15:44:59 +0000 (08:44 -0700)
commit3444e484620a9ed1ab3f6e631b244ccd0892b81c
treeffadaf645cd8f9c3ee45a6d8ff0ddfa9182ebefd
parentf9412b102d1eb634dd31ff8aa16f55156448eba6
mds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking

Unlike other lock transitions, we are moving to an _unstable_ state and
then taking our (x)lock.  That means that if we don't actually finish for
some reason (lock order changes, request is canceled, whatever) we leave
things in an unstable state--in this case, PREXLOCK, where nothing else
will touch it.

Call cancel_lock in drop_locks (or in acquire_locks when the order changes)
to clean up after an aborted lock attempt.

Original but reproduced (though not easily) by multimds collection task
fsstress_thrash_subtrees.yaml.

Fixes: #1425
Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/Locker.cc
src/mds/Locker.h