diff options
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 4b51054fa..91696303a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -204,6 +204,7 @@ static struct volopt_map_entry glusterd_volopt_map[] = { {"client.lk-heal", "protocol/client", "lk-heal", NULL, DOC, 0}, {"client.grace-timeout", "protocol/client", "grace-timeout", NULL, DOC, 0}, {"server.grace-timeout", "protocol/server", "grace-timeout", NULL, DOC, 0}, + {"feature.read-only", "features/read-only", "!read-only", "off", DOC, 0}, {NULL, } }; @@ -1708,6 +1709,15 @@ server_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, if (ret) return -1; + /* Check for read-only volume option, and add it to the graph */ + if (dict_get_str_boolean (set_dict, "feature.read-only", 0)) { + xl = volgen_graph_add (graph, "features/read-only", volname); + if (!xl) { + ret = -1; + goto out; + } + } + xl = volgen_graph_add_as (graph, "debug/io-stats", path); if (!xl) return -1; |