From 0161b393c61608cb4ecdf20daff3a1490b3e8ff9 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Thu, 31 Aug 2017 15:03:50 +0530 Subject: barrier: redefine the options With https://review.gluster.org/18059 introducing new fields into the volume_option structure, this change takes care of the changes required at the barrier side. Updates #302 Change-Id: If991df10b130c762a44883668a00e49943a508f8 Signed-off-by: Atin Mukherjee --- xlators/features/barrier/src/barrier.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c index ce3a255d93e..4401e3459a9 100644 --- a/xlators/features/barrier/src/barrier.c +++ b/xlators/features/barrier/src/barrier.c @@ -780,8 +780,10 @@ struct xlator_cbks cbks; struct volume_options options[] = { { .key = {"barrier"}, .type = GF_OPTION_TYPE_BOOL, - .default_value = "off", - .description = "When \"on\", blocks acknowledgements to application " + .default_value = "disable", + .op_version = {GD_OP_VERSION_3_6_0}, + .flags = OPT_FLAG_SETTABLE, + .description = "When \"enabled\", blocks acknowledgements to application " "for file operations such as rmdir, rename, unlink, " "removexattr, fremovexattr, truncate, ftruncate, " "write (with O_SYNC), fsync. It is turned \"off\" by " @@ -790,6 +792,8 @@ struct volume_options options[] = { { .key = {"barrier-timeout"}, .type = GF_OPTION_TYPE_TIME, .default_value = BARRIER_TIMEOUT, + .op_version = {GD_OP_VERSION_3_6_0}, + .flags = OPT_FLAG_SETTABLE, .description = "After 'timeout' seconds since the time 'barrier' " "option was set to \"on\", acknowledgements to file " "operations are no longer blocked and previously " -- cgit