]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds/rejoin: Handle referent inode on MDSCache rejoin
authorKotresh HR <khiremat@redhat.com>
Fri, 21 Feb 2025 12:34:03 +0000 (18:04 +0530)
committerKotresh HR <khiremat@redhat.com>
Tue, 4 Mar 2025 06:20:47 +0000 (11:50 +0530)
commit2ec2c1d63b994f57cf0b50744ba074026ddc39fd
tree6d93bd60a07436a38c9b4cb9dd3a730cd94a6844
parent11eddc85d5a4561f6de9098a0b2a6936245a64ad
mds/rejoin: Handle referent inode on MDSCache rejoin

The involves broadly following changes.

1. Add 'referent_ino' in the struct 'dn_strong' and required
   encoding/decoding of the same. Noticed that the
   MMDSCacheRejoin message actually isn't versioned yet.
   There is a tracker [1] open for it. For now, CEPH_MDS_PROTOCOL
   is bumped up as usual.

2. The following functions needs a change to construct the
   in-memory referent inode from the inode number.

    MDCache::rejoin_walk
      - add_strong_dentry, pass referent inode number to build dn_strong
    MDCache::handle_cache_rejoin_strong
      - Construct referent inode from inode number if not found in memory and add_remote_dentry
    MDCache::handle_cache_rejoin_ack
      - Bad linkage check!, construct referent inode
    MDCache::rejoin_send_acks
      - add_strong_dentry, pass referent inode number to build dn_strong
    MDCache::handle_cache_rejoin_weak
      - add_strong_dentry, pass referent inode number as 0 to build dn_strong as it's weak rejoin

[1] https://tracker.ceph.com/issues/48886

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