]> git.apps.os.sepia.ceph.com Git - ceph.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>
Wed, 28 May 2025 04:39:37 +0000 (10:09 +0530)
This reverts commit 3c034df67942085854f0a5a7b123282c7d9b2e8a.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 3a6a1caec2d10b1a9a9e264d0a2e56f47b3a0a83)

src/include/cephfs/types.h
src/mds/CDentry.cc
src/mds/CInode.h

index 43454f6dd4559855d776b27077b914a38b02c263..7aa3ff2d1cc297d7cf1d3068809e0445ff545405 100644 (file)
@@ -945,8 +945,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;
 };
@@ -955,7 +953,7 @@ private:
 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);
@@ -1017,7 +1015,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);
 }
 
@@ -1140,9 +1137,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);
 }
 
@@ -1223,7 +1217,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);
 }
 
 template<template<typename> class Allocator>
@@ -1283,7 +1276,6 @@ 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);
 }
 
 template<template<typename> class Allocator>
@@ -1329,8 +1321,7 @@ int inode_t<Allocator>::compare(const inode_t<Allocator> &other, bool *divergent
         !(accounted_rstat == other.accounted_rstat) ||
         file_data_version != other.file_data_version ||
         xattr_version != other.xattr_version ||
-        backtrace_version != other.backtrace_version ||
-       remote_ino != other.remote_ino) {
+        backtrace_version != other.backtrace_version) {
       *divergent = true;
     }
     return 0;
index 2165535a0a3c94baa50e97a82c5439d250465fd2..7fdb4d4a67dbf95050a3634b78abf7ec36aaa9e8 100644 (file)
@@ -310,7 +310,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();
   }
@@ -353,7 +352,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 90c55883f6495fdc8e5a8b9ee3978a540aa9c68b..730d596bc2b48ce05aab2c836382c925ac3a5e69 100644 (file)
@@ -649,10 +649,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 {
@@ -671,9 +669,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) ||