]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: notify auth MDS when cap_wanted changes
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 6 May 2013 01:17:01 +0000 (09:17 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Tue, 28 May 2013 05:57:21 +0000 (13:57 +0800)
So the auth MDS can choose locks' states base on our cap_wanted.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Locker.cc

index 63862f89abbd0b5d3f4318be9d9c254c553c6c71..781704c86f8348fb36857a1d951410dca94cc88c 100644 (file)
@@ -2200,8 +2200,11 @@ void Locker::adjust_cap_wanted(Capability *cap, int wanted, int issue_seq)
   }
 
   CInode *cur = cap->get_inode();
-  if (!cur->is_auth())
+  if (!cur->is_auth()) {
+    request_inode_file_caps(cur);
     return;
+  }
+
   if (cap->wanted() == 0) {
     if (cur->item_open_file.is_on_list() &&
        !cur->is_any_caps_wanted()) {
@@ -2220,7 +2223,6 @@ void Locker::adjust_cap_wanted(Capability *cap, int wanted, int issue_seq)
       mds->mdlog->submit_entry(le);
     }
   }
-
 }