dout(10) << "create_initial" << dendl;
// Initial state is a disable MDS map
- assert(mdsmap.enabled != true);
+ assert(mdsmap.get_enabled() == false);
}
version_t seq = m->get_seq();
// Ignore beacons if filesystem is disabled
- if (!mdsmap.enabled) {
+ if (!mdsmap.get_enabled()) {
return false;
}
if (f) {
f->open_array_section("filesystems");
{
- if (pending_mdsmap.enabled) {
+ if (pending_mdsmap.get_enabled()) {
f->open_object_section("filesystem");
{
f->dump_string("name", pending_mdsmap.fs_name);
f->close_section();
f->flush(ds);
} else {
- if (pending_mdsmap.enabled) {
+ if (pending_mdsmap.get_enabled()) {
const char *md_pool_name = mon->osdmon()->osdmap.get_pool_name(pending_mdsmap.metadata_pool);
assert(md_pool_name != NULL);
/* Execute filesystem add/remove, or pass through to filesystem_command */
bool const handled = management_command(prefix, cmdmap, ss, r);
if (!handled) {
- if (!pending_mdsmap.enabled) {
+ if (!pending_mdsmap.get_enabled()) {
ss << "No filesystem configured: use `ceph fs new` to create a filesystem";
r = -ENOENT;
} else {
string sure;
cmd_getval(g_ceph_context, cmdmap, "sure", sure);
- if (pending_mdsmap.enabled && sure != "--yes-i-really-mean-it") {
+ if (pending_mdsmap.get_enabled() && sure != "--yes-i-really-mean-it") {
ss << "this is DANGEROUS and will wipe out the mdsmap's fs, and may clobber data in the new pools you specify. add --yes-i-really-mean-it if you do.";
r = -EPERM;
return -EINVAL;
}
- if (pending_mdsmap.enabled == true
+ if (pending_mdsmap.get_enabled()
&& pending_mdsmap.fs_name == fs_name
&& *(pending_mdsmap.data_pools.begin()) == data
&& pending_mdsmap.metadata_pool == metadata) {
return true;
}
- if (pending_mdsmap.enabled) {
+ if (pending_mdsmap.get_enabled()) {
/* We currently only support one filesystem, so cannot create a second */
ss << "A filesystem already exists, use `ceph fs rm` if you wish to delete it";
r = -EINVAL;
// syntax should apply to multi-FS future)
string fs_name;
cmd_getval(g_ceph_context, cmdmap, "fs_name", fs_name);
- if (!pending_mdsmap.enabled || fs_name != pending_mdsmap.fs_name) {
+ if (!pending_mdsmap.get_enabled() || fs_name != pending_mdsmap.fs_name) {
// Consider absence success to make deletes idempotent
ss << "filesystem '" << fs_name << "' does not exist";
return 0;
newmap.inc = pending_mdsmap.inc;
pending_mdsmap = newmap;
pending_mdsmap.epoch = mdsmap.epoch + 1;
- assert(pending_mdsmap.enabled == false);
+ assert(pending_mdsmap.get_enabled() == false);
pending_mdsmap.metadata_pool = -1;
pending_mdsmap.cas_pool = -1;
pending_mdsmap.created = ceph_clock_now(g_ceph_context);
if (!is_active()) return;
// Do nothing if the filesystem is disabled
- if (!mdsmap.enabled) return;
+ if (!mdsmap.get_enabled()) return;
dout(10) << mdsmap << dendl;