summaryrefslogtreecommitdiffstats
path: root/src/mon/FSCommands.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:44 +0000
commit17d6a993fc17d533460c5f40f3908c708e057c18 (patch)
tree1a3bd93e0ecd74fa02f93a528fe2f87e5314c4b5 /src/mon/FSCommands.cc
parentReleasing progress-linux version 18.2.2-0progress7.99u1. (diff)
downloadceph-17d6a993fc17d533460c5f40f3908c708e057c18.tar.xz
ceph-17d6a993fc17d533460c5f40f3908c708e057c18.zip
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/mon/FSCommands.cc58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc
index 65d2c356b..05d28cc4c 100644
--- a/src/mon/FSCommands.cc
+++ b/src/mon/FSCommands.cc
@@ -461,6 +461,17 @@ public:
{
fs->mds_map.set_max_filesize(n);
});
+ } else if (var == "max_xattr_size") {
+ if (interr.length()) {
+ ss << var << " requires an integer value";
+ return -EINVAL;
+ }
+ fsmap.modify_filesystem(
+ fs->fscid,
+ [n](std::shared_ptr<Filesystem> fs)
+ {
+ fs->mds_map.set_max_xattr_size(n);
+ });
} else if (var == "allow_new_snaps") {
bool enable_snaps = false;
int r = parse_bool(val, &enable_snaps, ss);
@@ -667,6 +678,21 @@ public:
}
};
fsmap.modify_filesystem(fs->fscid, std::move(f));
+ } else if (var == "balance_automate") {
+ bool allow = false;
+ int r = parse_bool(val, &allow, ss);
+ if (r != 0) {
+ return r;
+ }
+
+ auto f = [allow](auto&& fs) {
+ if (allow) {
+ fs->mds_map.set_balance_automate();
+ } else {
+ fs->mds_map.clear_balance_automate();
+ }
+ };
+ fsmap.modify_filesystem(fs->fscid, std::move(f));
} else if (var == "min_compat_client") {
auto vno = ceph_release_from_name(val.c_str());
if (!vno) {
@@ -713,6 +739,38 @@ public:
ss << "client(s) already allowed to establish new session(s)";
}
}
+ } else if (var == "refuse_standby_for_another_fs") {
+ bool refuse_standby_for_another_fs = false;
+ int r = parse_bool(val, &refuse_standby_for_another_fs, ss);
+ if (r != 0) {
+ return r;
+ }
+
+ if (refuse_standby_for_another_fs) {
+ if (!(fs->mds_map.test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS))) {
+ fsmap.modify_filesystem(
+ fs->fscid,
+ [](std::shared_ptr<Filesystem> fs)
+ {
+ fs->mds_map.set_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS);
+ });
+ ss << "set to refuse standby for another fs";
+ } else {
+ ss << "to refuse standby for another fs is already set";
+ }
+ } else {
+ if (fs->mds_map.test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS)) {
+ fsmap.modify_filesystem(
+ fs->fscid,
+ [](std::shared_ptr<Filesystem> fs)
+ {
+ fs->mds_map.clear_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS);
+ });
+ ss << "allowed to use standby for another fs";
+ } else {
+ ss << "to use standby for another fs is already allowed";
+ }
+ }
} else {
ss << "unknown variable " << var;
return -EINVAL;