]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: Fix the linkmerge assert check 52725/head
authorKotresh HR <khiremat@redhat.com>
Tue, 6 Jun 2023 07:39:00 +0000 (13:09 +0530)
committerKotresh HR <khiremat@redhat.com>
Tue, 1 Aug 2023 06:32:33 +0000 (12:02 +0530)
commit03825f262a57eefc9bcf5c3484848ad2d438630d
treec1d30fe9312a81c9e0d694c6a3ae5b8ade1b5d4e
parenta185a2e2933b21246ce41dd13f03fd6f8f84f03d
mds: Fix the linkmerge assert check

Let's say there is a hardlink created as below.

touch file1
ln file1 hl_file1

In this case 'file1' holds the primary inode and 'hl_file' holds
the remote inode (holds primary inode number and other required info).
Now, if the 'file1' is deleted first, it's moved to a stray directory
and can't be deleted because the hardlink 'hl_file1' still exists
which requires primary inode. So on straydn eval, this primary
inode is linked to 'hl_file1 and remote inode is removed. This is called
the linkmerge/stray reintegration. So in the linkmerge case, the srcdnl
is primary straydn and the destdnl is the remote.

Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/61879
(cherry picked from commit 85279ac657832fd643ee2cc5f1f6a27f98e099f6)
src/mds/Server.cc