Signed-off-by: Yan, Zheng <zyan@redhat.com>
command_flush_path(f, path);
} else if (command == "flush journal") {
command_flush_journal(f);
+ } else if (command == "force_readonly") {
+ mds_lock.Lock();
+ mdcache->force_readonly();
+ mds_lock.Unlock();
}
f->flush(ss);
delete f;
asok_hook,
"Flush the journal to the backing store");
assert(0 == r);
+ r = admin_socket->register_command("force_readonly",
+ "force_readonly",
+ asok_hook,
+ "Force MDS to read-only mode");
+ assert(0 == r);
}
void MDS::clean_up_admin_socket()