]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: Drop locks and auth pins when waiting for freezingtree
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 20 Jul 2011 20:15:13 +0000 (13:15 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 20 Jul 2011 20:22:19 +0000 (13:22 -0700)
commitb2b44d47c9177fb3d1454a5f973f4f05e37d0e38
tree4bf0e39dcb8d38538b584026aa7e5a43a7d353fb
parent022c5261800ba6f9642b1f8dc7e44c91b12956eb
mds: Drop locks and auth pins when waiting for freezingtree

In most cases we don't end up in this branch because there's an escape
if you already have an auth_pin on the ref in question. But when
you've got snapshots going on, you can process the request, block on
a lock state change, commit a snapshot change to the inode, and then
try to process the request again. On this second attempt, though,
you end up with a different ref which you don't have a pin on.
Deadlock and breakage ensues!
To fix, drop all locks and auth pins when you wait -- either
you don't have any to drop anyway, or you've got them on a previous
version of the inode that isn't useful anymore.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/Server.cc