]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: Hardlink referent inode plumbing work
authorKotresh HR <khiremat@redhat.com>
Tue, 18 Feb 2025 11:17:53 +0000 (16:47 +0530)
committerKotresh HR <khiremat@redhat.com>
Tue, 4 Mar 2025 03:12:02 +0000 (08:42 +0530)
commitb9947bacdfd3cbedcf7a6b93af471c40f3a9c65b
tree4ed250817b6998c89fc58e528bdd33c17b752e74
parent1bc1c5e839b8b2d689f3e665a7a444b5d6c7b240
mds: Hardlink referent inode plumbing work

The linkage_t struct changes:
  - Add referent_ino(inodeno_t) and referent_inode(CInode *) to the
    linkage_t. These two fields becomes the core and identifies the
    linkage as referent remote.
  - Add 'is_referent_remote()' to check if it's referent remote
    and modify 'is_remote()', 'is_null()' check accordingly.
  - Add functions to access these fields.

Add the following new functions to link referent inode.
  1. CDentry::push_projected_linkage - with referent_inode
  2. CDir::link_null_referent_inode
  3. CDir::link_referent_inode

Modify the following existing functions to link/unlink referent inode
  1. CDentry::link_remote
  2. CDentry::unlink_remote
  3. CDentry::pop_projected_linakge
  4. CDentry::CDentry
  5. CDir::add_remote_dentry
  6. CDir::link_inode_work
  7. CDir::unlink_inode_work

Fixes: https://tracker.ceph.com/issues/54205
Signed-off-by: Kotresh HR <khiremat@redhat.com>
src/mds/CDentry.cc
src/mds/CDentry.h
src/mds/CDir.cc
src/mds/CDir.h
src/mds/MDCache.cc
src/mds/journal.cc