]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: drop locks and retry when lock set changes 53241/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 17 Jul 2023 20:10:59 +0000 (16:10 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 31 Aug 2023 12:33:58 +0000 (08:33 -0400)
commite610179a6a59c463eb3d85e87152ed3268c808ff
tree34052d8aeae357b51dda1e97483df511884bdab2
parentd8ba1ed912e050a5466a56a8610c7ac82fd0700c
mds: drop locks and retry when lock set changes

An optimization was added to avoid an unnecessary gather on the inode
filelock when the client can safely get the file size without also
getting issued the requested caps. However, if a retry of getattr
is necessary, this conditional inclusion of the inode filelock
can cause lock-order violations resulting in deadlock.

So, if we've already acquired some of the inode's locks then we must
drop locks and retry.

Fixes: https://tracker.ceph.com/issues/62052
Fixes: c822b3e2573578c288d170d1031672b74e02dced
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b5719ac32fe6431131842d62ffaf7101c03e9bac)
src/mds/Server.cc