]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: always make getattr wait for xlock to be released by the previous client
authorXiubo Li <xiubli@redhat.com>
Mon, 11 Mar 2024 05:09:14 +0000 (13:09 +0800)
committerVenky Shankar <vshankar@redhat.com>
Mon, 11 Nov 2024 10:46:28 +0000 (16:16 +0530)
commitc6ce4c1f379fddb2ae3bdadb0bbc0b3dccace6a3
treeca79708d636234cd379efec86c00af41f32fde26
parentbc1a0ebb55bcbeb20ebefd2a76106f030b68e2bd
mds: always make getattr wait for xlock to be released by the previous client

When the previous client's setattr request is still holding the xlock
for the linklock/authlock/xattrlock/filelock locks, if the same client
send a getattr request it will use the projected inode to fill the
reply, while for other clients the getattr requests will use the
non-projected inode to fill replies. This causes inconsistent file
mode across multiple clients.

This will just skip batching the ops when any of the xlock is held.

Fixes: https://tracker.ceph.com/issues/63906
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit b1ea37c5a6cc7b2dad417128990a6403de9cb170)
src/mds/Server.cc