<< "stopped\t" << stopped << "\n";
out << "data_pools\t" << data_pools << "\n";
out << "metadata_pool\t" << metadata_pool << "\n";
+ out << "inline_data\t" << (inline_data_enabled ? "enabled" : "disabled") << "\n";
multimap< pair<unsigned,unsigned>, uint64_t > foo;
for (map<uint64_t,mds_info_t>::iterator p = mds_info.begin();
::encode(cas_pool, bl);
// kclient ignores everything from here
- __u16 ev = 6;
+ __u16 ev = 7;
::encode(ev, bl);
::encode(compat, bl);
::encode(metadata_pool, bl);
::encode(last_failure_osd_epoch, bl);
::encode(ever_allowed_snaps, bl);
::encode(explicitly_allowed_snaps, bl);
+ ::encode(inline_data_enabled, bl);
ENCODE_FINISH(bl);
}
}
ever_allowed_snaps = true;
explicitly_allowed_snaps = false;
}
+ if (ev >= 7)
+ ::decode(inline_data_enabled, p);
DECODE_FINISH(p);
}
#define MDS_FEATURE_INCOMPAT_DIRINODE CompatSet::Feature(4, "dir inode in separate object")
#define MDS_FEATURE_INCOMPAT_ENCODING CompatSet::Feature(5, "mds uses versioned encoding")
#define MDS_FEATURE_INCOMPAT_OMAPDIRFRAG CompatSet::Feature(6, "dirfrag is stored in omap")
+#define MDS_FEATURE_INCOMPAT_INLINE CompatSet::Feature(7, "mds uses inline data")
class MDSMap {
public:
bool ever_allowed_snaps; //< the cluster has ever allowed snap creation
bool explicitly_allowed_snaps; //< the user has explicitly enabled snap creation
+ bool inline_data_enabled;
+
public:
CompatSet compat;
metadata_pool(0),
max_mds(0),
ever_allowed_snaps(false),
- explicitly_allowed_snaps(false)
+ explicitly_allowed_snaps(false),
+ inline_data_enabled(false)
{ }
+ bool get_inline_data_enabled() { return inline_data_enabled; }
+ void set_inline_data_enabled(bool enabled) { inline_data_enabled = enabled; }
+
utime_t get_session_timeout() {
return utime_t(session_timeout,0);
}
r = 0;
}
+ } else if (prefix == "mds inline enable") {
+ pending_mdsmap.set_inline_data_enabled(true);
+ pending_mdsmap.compat.incompat.insert(MDS_FEATURE_INCOMPAT_INLINE);
+ r = 0;
+ } else if (prefix == "mds inline disable") {
+ pending_mdsmap.set_inline_data_enabled(false);
+ r = 0;
} else if (prefix == "mds set") {
string key;
cmd_getval(g_ceph_context, cmdmap, "key", key);
COMMAND("mds compat rm_incompat " \
"name=feature,type=CephInt,range=0", \
"remove incompatible feature", "mds", "rw", "cli,rest")
+COMMAND("mds inline enable", \
+ "enable inline data feature", \
+ "mds", "rw", "cli,rest")
+COMMAND("mds inline disable", \
+ "disable inline data feature", \
+ "mds", "rw", "cli,rest")
COMMAND("mds set " \
"name=key,type=CephChoices,strings=allow_new_snaps " \
"name=sure,type=CephString,req=false", \