]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: drop locks and retry when lock set changes 53243/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:35:18 +0000 (08:35 -0400)
commit919bb50289a16d19573fa555007d04f7c2a7c035
tree3aa36884c8438f4c7ca20b91762c91ce8f84b351
parent800a62ff609d8d15b2d03c52788379d9192d7ea1
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