summaryrefslogtreecommitdiffstats
path: root/src/mds/MDSMap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds/MDSMap.cc')
-rw-r--r--src/mds/MDSMap.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc
index 6433d08c5..aed591d95 100644
--- a/src/mds/MDSMap.cc
+++ b/src/mds/MDSMap.cc
@@ -177,6 +177,7 @@ void MDSMap::dump(Formatter *f) const
cephfs_dump_features(f, required_client_features);
f->close_section();
f->dump_int("max_file_size", max_file_size);
+ f->dump_int("max_xattr_size", max_xattr_size);
f->dump_int("last_failure", last_failure);
f->dump_int("last_failure_osd_epoch", last_failure_osd_epoch);
f->open_object_section("compat");
@@ -235,6 +236,8 @@ void MDSMap::dump_flags_state(Formatter *f) const
f->dump_bool(flag_display.at(CEPH_MDSMAP_ALLOW_MULTIMDS_SNAPS), allows_multimds_snaps());
f->dump_bool(flag_display.at(CEPH_MDSMAP_ALLOW_STANDBY_REPLAY), allows_standby_replay());
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->close_section();
}
@@ -268,6 +271,7 @@ void MDSMap::print(ostream& out) const
out << "session_timeout\t" << session_timeout << "\n"
<< "session_autoclose\t" << session_autoclose << "\n";
out << "max_file_size\t" << max_file_size << "\n";
+ out << "max_xattr_size\t" << max_xattr_size << "\n";
out << "required_client_features\t" << cephfs_stringify_features(required_client_features) << "\n";
out << "last_failure\t" << last_failure << "\n"
<< "last_failure_osd_epoch\t" << last_failure_osd_epoch << "\n";
@@ -376,6 +380,10 @@ void MDSMap::print_flags(std::ostream& out) const {
out << " " << flag_display.at(CEPH_MDSMAP_ALLOW_STANDBY_REPLAY);
if (test_flag(CEPH_MDSMAP_REFUSE_CLIENT_SESSION))
out << " " << flag_display.at(CEPH_MDSMAP_REFUSE_CLIENT_SESSION);
+ if (test_flag(CEPH_MDSMAP_REFUSE_STANDBY_FOR_ANOTHER_FS))
+ 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);
}
void MDSMap::get_health(list<pair<health_status_t,string> >& summary,
@@ -763,7 +771,7 @@ void MDSMap::encode(bufferlist& bl, uint64_t features) const
encode(data_pools, bl);
encode(cas_pool, bl);
- __u16 ev = 17;
+ __u16 ev = 18;
encode(ev, bl);
encode(compat, bl);
encode(metadata_pool, bl);
@@ -791,6 +799,7 @@ void MDSMap::encode(bufferlist& bl, uint64_t features) const
}
encode(required_client_features, bl);
encode(bal_rank_mask, bl);
+ encode(max_xattr_size, bl);
ENCODE_FINISH(bl);
}
@@ -842,7 +851,8 @@ void MDSMap::decode(bufferlist::const_iterator& p)
decode(cas_pool, p);
}
- // kclient ignores everything from here
+ // kclient skips most of what's below
+ // see fs/ceph/mdsmap.c for current decoding
__u16 ev = 1;
if (struct_v >= 2)
decode(ev, p);
@@ -942,6 +952,10 @@ void MDSMap::decode(bufferlist::const_iterator& p)
decode(bal_rank_mask, p);
}
+ if (ev >= 18) {
+ decode(max_xattr_size, p);
+ }
+
/* All MDS since at least v14.0.0 understand INLINE */
/* TODO: remove after R is released */
compat.incompat.insert(MDS_FEATURE_INCOMPAT_INLINE);