From: Venky Shankar Date: Tue, 18 Mar 2025 09:07:23 +0000 (+0000) Subject: Revert "mds: Make referent inodes a optional feature" X-Git-Tag: testing/wip-vshankar-testing-20260223.155722^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d3ef7833d560462db45baee29382ebe19e8679c6;p=ceph-ci.git Revert "mds: Make referent inodes a optional feature" This reverts commit 72613db034c8e58b825c343e26ed615c3508e7b9. Signed-off-by: Venky Shankar --- diff --git a/src/include/ceph_fs.h b/src/include/ceph_fs.h index e0e91a0554e..9c0b67004cc 100644 --- a/src/include/ceph_fs.h +++ b/src/include/ceph_fs.h @@ -292,7 +292,6 @@ struct ceph_mon_subscribe_ack { #define CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS (1<<7) /* fs is forbidden to use standby for another fs */ #define CEPH_MDSMAP_BALANCE_AUTOMATE (1<<8) /* automate metadata balancing */ -#define CEPH_MDSMAP_REFERENT_INODES (1<<9) /* create referent inode for hardlinks to store backtrace */ #define CEPH_MDSMAP_DEFAULTS (CEPH_MDSMAP_ALLOW_SNAPS | \ CEPH_MDSMAP_ALLOW_MULTIMDS_SNAPS) diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc index f9535157d56..5ba4fcb5641 100644 --- a/src/mds/MDSMap.cc +++ b/src/mds/MDSMap.cc @@ -48,8 +48,7 @@ const std::map MDSMap::flag_display = { {CEPH_MDSMAP_ALLOW_STANDBY_REPLAY, "allow_standby_replay"}, {CEPH_MDSMAP_REFUSE_CLIENT_SESSION, "refuse_client_session"}, {CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS, "refuse_standby_for_another_fs"}, - {CEPH_MDSMAP_BALANCE_AUTOMATE, "balance_automate"}, - {CEPH_MDSMAP_REFERENT_INODES, "allow_referent_inodes"} + {CEPH_MDSMAP_BALANCE_AUTOMATE, "balance_automate"} }; MDSMap::MDSMap() noexcept = default; @@ -275,7 +274,6 @@ void MDSMap::dump_flags_state(Formatter *f) const f->dump_bool(flag_display.at(CEPH_MDSMAP_REFUSE_CLIENT_SESSION), test_flag(CEPH_MDSMAP_REFUSE_CLIENT_SESSION)); f->dump_bool(flag_display.at(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS), test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS)); f->dump_bool(flag_display.at(CEPH_MDSMAP_BALANCE_AUTOMATE), test_flag(CEPH_MDSMAP_BALANCE_AUTOMATE)); - f->dump_bool(flag_display.at(CEPH_MDSMAP_REFERENT_INODES), allow_referent_inodes()); f->close_section(); } @@ -426,8 +424,6 @@ void MDSMap::print_flags(std::ostream& out) const { out << " " << flag_display.at(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS); if (test_flag(CEPH_MDSMAP_BALANCE_AUTOMATE)) out << " " << flag_display.at(CEPH_MDSMAP_BALANCE_AUTOMATE); - if (allow_referent_inodes()) - out << " " << flag_display.at(CEPH_MDSMAP_REFERENT_INODES); } void MDSMap::get_health(list >& summary, diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index bd1f8ede2fc..1a04f5f7898 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -239,15 +239,6 @@ public: bool allows_snaps() const { return test_flag(CEPH_MDSMAP_ALLOW_SNAPS); } bool was_snaps_ever_allowed() const { return ever_allowed_features & CEPH_MDSMAP_ALLOW_SNAPS; } - void set_referent_inodes() { - set_flag(CEPH_MDSMAP_REFERENT_INODES); - ever_allowed_features |= CEPH_MDSMAP_REFERENT_INODES; - explicitly_allowed_features |= CEPH_MDSMAP_REFERENT_INODES; - } - void clear_referent_inodes() { clear_flag(CEPH_MDSMAP_REFERENT_INODES); } - bool allow_referent_inodes() const { return test_flag(CEPH_MDSMAP_REFERENT_INODES); } - bool was_referent_inodes_ever_used() const { return ever_allowed_features & CEPH_MDSMAP_REFERENT_INODES; } - void set_standby_replay_allowed() { set_flag(CEPH_MDSMAP_ALLOW_STANDBY_REPLAY); ever_allowed_features |= CEPH_MDSMAP_ALLOW_STANDBY_REPLAY; diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 3ed78746e31..5faee5f814b 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -602,28 +602,6 @@ int FileSystemCommandHandler::set_val(Monitor *mon, FSMap& fsmap, MonOpRequestRe fs.get_mds_map().clear_multimds_snaps_allowed(); }); } - } else if (var == "allow_referent_inodes") { - bool allow_referent_inodes = false; - int r = parse_bool(val, &allow_referent_inodes, ss); - if (r != 0) { - return r; - } - - if (!allow_referent_inodes) { - modify_filesystem(fsmap, fsv, - [](auto&& fs) - { - fs.get_mds_map().clear_referent_inodes(); - }); - ss << "Disabled creation of referent inodes for hardlinks to store backtrace"; - } else { - modify_filesystem(fsmap, fsv, - [](auto&& fs) - { - fs.get_mds_map().set_referent_inodes(); - }); - ss << "Enabled creation of referent inodes for hardlinks to store backtrace"; - } } else if (var == "allow_dirfrags") { ss << "Directory fragmentation is now permanently enabled." << " This command is DEPRECATED and will be REMOVED from future releases."; diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index ca9907c51e6..4003df40815 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -408,7 +408,6 @@ COMMAND("fs set " "|session_autoclose" "|session_timeout" "|standby_count_wanted" - "|allow_referent_inodes" " " "name=val,type=CephString " "name=yes_i_really_mean_it,type=CephBool,req=false "