]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: fix issuing redundant reintegrate/migrate_stray requests
authorXiubo Li <xiubli@redhat.com>
Fri, 15 Sep 2023 00:41:35 +0000 (08:41 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 23 Jan 2024 08:17:47 +0000 (16:17 +0800)
commita2b86b3ba91e1c3142ad20a922903d340678f601
treee0e3b054f17145f9d7f1f5e7eb3fddd603b86054
parent62166464640854ba91b0ffdbf92ff3b1d6c59e7e
mds: fix issuing redundant reintegrate/migrate_stray requests

Just in case a CInode's nlink is 1, and then a unlink request comes
and then early replies and submits to the MDLogs, but just before
the MDlogs are flushed a link request comes, and the link request
also succeeds and early replies to client.

Later when the unlink/link requests' MDLog events are flushed and
the callbacks are called, which will fire a stray denty reintegration.
But it will pick the new dentry, which is from the link's request
and is a remote dentry, to do the reintegration. While in the
'rename' code when traversing the path it will trigger to call the
'dn->link_remote()', which later will fire a new stray dentry
reintegration.

The problem is if the first 'rename' request is retried several
times, and in each time it will fire a new reintegration, which
makes no sense and maybe blocked for a very long time dues to some
reasons and then will be reported as slow request warning.

Fixes: https://tracker.ceph.com/issues/62702
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 53d9e657e42bdf2440cd93a8273eb3ce79d8bd33)
src/mds/CDentry.h
src/mds/StrayManager.cc
src/mds/StrayManager.h