]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: only issue xlocker_caps if we are also the loner
authorSage Weil <sage@newdream.net>
Mon, 11 Jul 2011 18:35:15 +0000 (11:35 -0700)
committerSage Weil <sage@newdream.net>
Mon, 11 Jul 2011 19:15:51 +0000 (12:15 -0700)
commit844186f8ac655d56be969bdac56ac350c5a669d6
treefcb06e6dc1d5cd5f32a92beb61114fb46fb8cb81
parent48837e3c93540513d96480be50148f99ed81bcc1
mds: only issue xlocker_caps if we are also the loner

We cannot issue caps to a client purely because they have something
xlocked, because we do not revoke caps when we drop the xlock.  However,
if they are a loner AND have the object xlocked, we can; this is why the
xlock release code either moves to LOCK or EXCL state.

Remember, the goal here is to issue caps when we do operations on objects
that xlock them (e.g. setattr, mknod) and move directly to the EXCL state
afterward.  That only works (or makes sense) when we are the lone client
with caps.

Fix the get_caps_allowed_by_type() helper to do this properly.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/CInode.h