]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: xlocker_caps are supplemental to caps
authorSage Weil <sage@newdream.net>
Fri, 19 Aug 2011 23:16:26 +0000 (16:16 -0700)
committerSage Weil <sage@newdream.net>
Fri, 19 Aug 2011 23:16:35 +0000 (16:16 -0700)
Like loner_caps, xlocker_caps are additional caps to the any caps.

In practical terms, this only affects (currently) the LOCK_XLOCKDONE state
for the filelock, where it's less work than making sure what is in the any
column is also |'d onto the xlocker column.  Easier to read :)

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

index 4e11204f1cff0e735f55819ca41ea92c621e85f3..5ea2d4b7f50ab41f574fb2720030aae3ba4b7fb1 100644 (file)
@@ -588,7 +588,7 @@ public:
     if (s < 0) s = state;
     if (parent->is_auth()) {
       if (get_xlock_by_client() >= 0 && who == CAP_XLOCKER)
-       return get_sm()->states[s].xlocker_caps;
+       return get_sm()->states[s].xlocker_caps | get_sm()->states[s].caps; // xlocker always gets more
       else if (is_loner_mode() && who == CAP_ANY)
        return get_sm()->states[s].caps;
       else