[PATCH 16/29] mds: don't defer processing caps if inode is auth pinned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>

We should not defer processing caps if the inode is auth pinned by MDRequest,
because the MDRequest may change lock state of the inode later and wait for
the deferred caps.

Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
---
 src/mds/Locker.cc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index ee2d4cc..dbf4452 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -2199,12 +2199,11 @@ bool Locker::should_defer_client_cap_frozen(CInode *in)
    * Currently, a request wait if anything locked is freezing (can't
    * auth_pin), which would avoid any deadlock with cap release.  Thus @in
    * _MUST_ be in the lock/auth_pin set.
+   *
+   * auth_pins==0 implies no unstable lock and not auth pinnned by
+   * client request, otherwise continue even it's freezing.
    */
-  return (in->is_freezing() && (in->filelock.is_stable() &&
-				in->authlock.is_stable() &&
-				in->xattrlock.is_stable() &&
-				in->linklock.is_stable())) ||  // continue if freezing and lock is unstable
-    in->is_frozen();
+  return (in->is_freezing() && in->get_num_auth_pins() == 0) || in->is_frozen();
 }
 
 /*
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux