]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ceph: flush the mdlog for filesystem sync
authorXiubo Li <xiubli@redhat.com>
Tue, 19 Apr 2022 00:58:49 +0000 (08:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:37 +0000 (18:41 +0200)
commit3e25051763603c3d70f23472bb1ee51d7d26b7be
tree0f34f3657363f702e054eff4dafc0755e5f6cad9
parent7e195336c1080bf951070079a7ea9f93020d6465
ceph: flush the mdlog for filesystem sync

[ Upstream commit 1b2ba3c5616e17ff951359e25c658a1c3f146f1e ]

Before waiting for a request's safe reply, we will send the mdlog flush
request to the relevant MDS. And this will also flush the mdlog for all
the other unsafe requests in the same session, so we can record the last
session and no need to flush mdlog again in the next loop. But there
still have cases that it may send the mdlog flush requst twice or more,
but that should be not often.

Rename wait_unsafe_requests() to
flush_mdlog_and_wait_mdsc_unsafe_requests() to make it more
descriptive.

[xiubli: fold in MDS request refcount leak fix from Jeff]

URL: https://tracker.ceph.com/issues/55284
URL: https://tracker.ceph.com/issues/55411
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/mds_client.c