]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Revert "mds: Store remote inode number in referent inode"
authorVenky Shankar <vshankar@redhat.com>
Tue, 18 Mar 2025 09:07:45 +0000 (09:07 +0000)
committerVenky Shankar <vshankar@redhat.com>
Thu, 12 Feb 2026 04:50:55 +0000 (10:20 +0530)
This reverts commit 3c034df67942085854f0a5a7b123282c7d9b2e8a.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/include/cephfs/dump.h
src/include/cephfs/json.h
src/include/cephfs/types.h
src/mds/CDentry.cc
src/mds/CInode.h

index b87a2f7af8853a672353eac7959d7b2f84d247c9..25cc51e7965451f3c1c9082b08db883d8b5890d7 100644 (file)
@@ -95,7 +95,6 @@ void inode_t<Allocator>::dump(ceph::Formatter *f) const
 
   f->dump_stream("last_scrub_stamp") << last_scrub_stamp;
   f->dump_unsigned("last_scrub_version", last_scrub_version);
-  f->dump_unsigned("remote_ino", remote_ino);
 }
 
 inline void vinodeno_t::dump(ceph::Formatter *f) const {
index b9936292ebbdcac4da2abdb25a72fc084dd6c3a3..bed6de2a6f09258766d43360cc1ec64b3a491baf 100644 (file)
@@ -75,5 +75,4 @@ void inode_t<Allocator>::decode_json(JSONObj *obj)
   JSONDecoder::decode_json("quota", quota, obj, true);
   JSONDecoder::decode_json("last_scrub_stamp", last_scrub_stamp, obj, true);
   JSONDecoder::decode_json("last_scrub_version", last_scrub_version, obj, true);
-  JSONDecoder::decode_json("remote_ino", remote_ino.val, obj, true);
 }
index de45ca2aa6ba68da5ae639015cc2b0edd25cc8ac..39c630fbdf739fa5114add53bec8ba11dd186b78 100644 (file)
@@ -968,8 +968,6 @@ struct inode_t {
 
   optmetadata_multiton<optmetadata_singleton_server_t,Allocator> optmetadata;
 
-  inodeno_t remote_ino = 0; // referent inode - remote inode link
-
 private:
   bool older_is_consistent(const inode_t &other) const;
 };
@@ -990,7 +988,7 @@ inline bool operator!=(std::vector<uint8_t,Allocator<uint8_t>> l,
 template<template<typename> class Allocator>
 void inode_t<Allocator>::encode(ceph::buffer::list &bl, uint64_t features) const
 {
-  ENCODE_START(21, 6, bl);
+  ENCODE_START(20, 6, bl);
 
   encode(ino, bl);
   encode(rdev, bl);
@@ -1052,7 +1050,6 @@ void inode_t<Allocator>::encode(ceph::buffer::list &bl, uint64_t features) const
 
   encode(optmetadata, bl, features);
 
-  encode(remote_ino, bl);
   ENCODE_FINISH(bl);
 }
 
@@ -1175,9 +1172,6 @@ void inode_t<Allocator>::decode(ceph::buffer::list::const_iterator &p)
     decode(optmetadata, p);
   }
 
-  if (struct_v >= 21) {
-    decode(remote_ino, p);
-  }
   DECODE_FINISH(p);
 }
 
@@ -1229,8 +1223,7 @@ int inode_t<Allocator>::compare(const inode_t<Allocator> &other, bool *divergent
        fscrypt_auth != other.fscrypt_auth ||
        fscrypt_file != other.fscrypt_file ||
        fscrypt_last_block != other.fscrypt_last_block ||
-       optmetadata != other.optmetadata ||
-       remote_ino != other.remote_ino) {
+       optmetadata != other.optmetadata) {
       *divergent = true;
     }
     return 0;
index c0e5c23c6bc9d24c2a7bd41785b82047ad81e2f5..0c034d80c75a49feec75eea2de080ca201a1aafc 100644 (file)
@@ -361,7 +361,6 @@ void CDentry::link_remote(CDentry::linkage_t *dnl, CInode *remote_in, CInode *re
   dnl->inode = remote_in;
 
   if (referent_in) {
-    ceph_assert(referent_in->get_remote_ino() == dnl->get_remote_ino());
     dnl->referent_inode = referent_in;
     dnl->referent_ino = referent_in->ino();
   }
@@ -404,7 +403,6 @@ void CDentry::push_projected_linkage(CInode *referent_inode, inodeno_t remote_in
   linkage_t *p = _project_linkage();
   p->referent_inode = referent_inode;
   referent_inode->push_projected_parent(this);
-  referent_inode->set_remote_ino(remote_ino);
   p->referent_ino = referent_ino;
 
   p->remote_ino = remote_ino;
index be2368819b07450a7dfed64f4fad9d078484d0d8..8cb2cfa3888dfbb59dcd09931330e5e271b3539e 100644 (file)
@@ -664,10 +664,8 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno
   // -- accessors --
 
   inodeno_t ino() const { return get_inode()->ino; }
-  inodeno_t get_remote_ino() const { return get_inode()->remote_ino; }
   vinodeno_t vino() const { return vinodeno_t(ino(), last); }
   int d_type() const { return IFTODT(get_inode()->mode); }
-  bool is_referent_remote() const { return get_remote_ino() != 0; }
   bool is_root() const { return ino() == CEPH_INO_ROOT; }
   bool is_stray() const { return MDS_INO_IS_STRAY(ino()); }
   mds_rank_t get_stray_owner() const {
@@ -686,9 +684,6 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno
 
   bool is_head() const { return last == CEPH_NOSNAP; }
 
-  // set remote inode
-  void set_remote_ino(inodeno_t ino) { _get_inode()->remote_ino = ino; }
-
   // note: this overloads MDSCacheObject
   bool is_ambiguous_auth() const {
     return state_test(STATE_AMBIGUOUSAUTH) ||