From: Patrick Donnelly Date: Fri, 19 Apr 2024 23:29:44 +0000 (-0400) Subject: squid: mds: add missing policylock to test F_QUIESCE_BLOCK X-Git-Tag: testing/wip-lusov-testing-20240611.123850-squid~27^2~33 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ad9c8b073631eca7b54fae09aeb108fc935f30da;p=ceph-ci.git squid: mds: add missing policylock to test F_QUIESCE_BLOCK In order to check an inode's F_QUIESCE_BLOCK, the quiesce_inode op must acquire the policylock. Furthermore, to ensure the F_QUIESCE_BLOCK is not changed during quiesce, the lock must be held for the duration of the op's lifetime. Fixes: https://tracker.ceph.com/issues/65595 Signed-off-by: Patrick Donnelly (cherry picked from commit 50613b5562469ad24ed0fc547cafcfdeef5be604) Fixes: https://tracker.ceph.com/issues/65740 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 703962fcb7b..29af7fbc270 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13655,6 +13655,7 @@ void MDCache::dispatch_quiesce_inode(const MDRequestRef& mdr) MutationImpl::LockOpVec lov; lov.add_xlock(&in->quiescelock); /* !! */ + lov.add_rdlock(&in->policylock); /* for F_QUIESCE_BLOCK test */ if (in->is_auth()) { if (splitauth) {