summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec.c
diff options
context:
space:
mode:
authorXavier Hernandez <jahernan@redhat.com>2017-10-16 13:57:59 +0200
committerShyamsundar Ranganathan <srangana@redhat.com>2017-11-16 14:48:45 +0000
commitb4684468c19e0fb447ba3762750044452a452a32 (patch)
tree7eccdf258942ba651000b9d3d548bf087a1b57a1 /xlators/cluster/ec/src/ec.c
parent22e14d7f8eb40838a0af8486abfbbd54364e9154 (diff)
cluster/ec: create eager-lock option for non-regular files
A new option is added to allow independent configuration of eager locking for regular files and non-regular files. >Change-Id: I8f80e46d36d8551011132b15c0fac549b7fb1c60 >BUG: 1502610 >Signed-off-by: Xavier Hernandez <jahernan@redhat.com> Change-Id: I8f80e46d36d8551011132b15c0fac549b7fb1c60 BUG: 1512460 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec.c')
-rw-r--r--xlators/cluster/ec/src/ec.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index 09c5fa8..9f361a5 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -276,6 +276,8 @@ reconfigure (xlator_t *this, dict_t *options)
bool, failed);
GF_OPTION_RECONF ("eager-lock", ec->eager_lock, options,
bool, failed);
+ GF_OPTION_RECONF ("other-eager-lock", ec->other_eager_lock, options,
+ bool, failed);
GF_OPTION_RECONF ("background-heals", background_heals, options,
uint32, failed);
GF_OPTION_RECONF ("heal-wait-qlength", heal_wait_qlen, options,
@@ -654,6 +656,7 @@ init (xlator_t *this)
GF_OPTION_INIT ("self-heal-daemon", ec->shd.enabled, bool, failed);
GF_OPTION_INIT ("iam-self-heal-daemon", ec->shd.iamshd, bool, failed);
GF_OPTION_INIT ("eager-lock", ec->eager_lock, bool, failed);
+ GF_OPTION_INIT ("other-eager-lock", ec->other_eager_lock, bool, failed);
GF_OPTION_INIT ("background-heals", ec->background_heals, uint32, failed);
GF_OPTION_INIT ("heal-wait-qlength", ec->heal_wait_qlen, uint32, failed);
GF_OPTION_INIT ("self-heal-window-size", ec->self_heal_window_size, uint32,
@@ -1397,18 +1400,28 @@ struct volume_options options[] =
{ .key = {"eager-lock"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "on",
- .description = "Enable/Disable eager lock for disperse volume. "
- "If a fop takes a lock and completes its operation, "
- "it waits for next 1 second before releasing the lock, "
- "to see if the lock can be reused for next fop from "
- "the same client. If ec finds any lock contention within "
- "1 second it releases the lock immediately before time "
- "expires. This improves the performance of file operations."
- "However, as it takes lock on first brick, for few operations "
- "like read, discovery of lock contention might take long time "
- "and can actually degrade the performance. "
- "If eager lock is disabled, lock will be released as soon as fop "
- "completes. "
+ .description = "Enable/Disable eager lock for regular files on a "
+ "disperse volume. If a fop takes a lock and completes "
+ "its operation, it waits for next 1 second before "
+ "releasing the lock, to see if the lock can be reused "
+ "for next fop from the same client. If ec finds any lock "
+ "contention within 1 second it releases the lock "
+ "immediately before time expires. This improves the "
+ "performance of file operations. However, as it takes "
+ "lock on first brick, for few operations like read, "
+ "discovery of lock contention might take long time and "
+ "can actually degrade the performance. If eager lock is "
+ "disabled, lock will be released as soon as fop "
+ "completes."
+ },
+ { .key = {"other-eager-lock"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "on",
+ .op_version = { GD_OP_VERSION_3_12_3 },
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
+ .tags = { "disperse" },
+ .description = "It's equivalent to the eager-lock option but for non "
+ "regular files."
},
{ .key = {"background-heals"},
.type = GF_OPTION_TYPE_INT,