summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2018-02-08 13:44:38 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-02-23 03:19:58 +0000
commit32f5bc795046fad2fc5dcdafafcf1e8c3df7d7a3 (patch)
tree85284f2ef9e4917890ff84fe2bd35ba84c5ec025 /xlators/cluster/dht/src/dht-common.c
parentcfbc524239b1d3bc417849e68379c81e83fd56d9 (diff)
cluster/dht: store the 'reaction' on failures per lock
Currently its passed in dht_blocking_inode(entry)lk, which would be a global value for all the locks passed in the argument. This would be a limitation for cases where we want to ignore failures on only few locks and fail for others. Change-Id: I02cfbcaafb593ad8140c0e5af725c866b630fb6b BUG: 1543279 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index b106d4e4e1a..378377f05ee 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -7298,7 +7298,8 @@ dht_mknod_lock (call_frame_t *frame, xlator_t *subvol)
goto err;
lk_array[0] = dht_lock_new (frame->this, subvol, &local->loc, F_RDLCK,
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
+ IGNORE_ENOENT_ESTALE);
if (lk_array[0] == NULL)
goto err;
@@ -7306,8 +7307,7 @@ dht_mknod_lock (call_frame_t *frame, xlator_t *subvol)
local->lock[0].layout.parent_layout.locks = lk_array;
local->lock[0].layout.parent_layout.lk_count = count;
- ret = dht_blocking_inodelk (frame, lk_array, count,
- IGNORE_ENOENT_ESTALE, dht_mknod_lock_cbk);
+ ret = dht_blocking_inodelk (frame, lk_array, count, dht_mknod_lock_cbk);
if (ret < 0) {
local->lock[0].layout.parent_layout.locks = NULL;
@@ -8442,7 +8442,8 @@ dht_create_lock (call_frame_t *frame, xlator_t *subvol)
goto err;
lk_array[0] = dht_lock_new (frame->this, subvol, &local->loc, F_RDLCK,
- DHT_LAYOUT_HEAL_DOMAIN, NULL);
+ DHT_LAYOUT_HEAL_DOMAIN, NULL,
+ IGNORE_ENOENT_ESTALE);
if (lk_array[0] == NULL)
goto err;
@@ -8451,7 +8452,7 @@ dht_create_lock (call_frame_t *frame, xlator_t *subvol)
local->lock[0].layout.parent_layout.lk_count = count;
ret = dht_blocking_inodelk (frame, lk_array, count,
- IGNORE_ENOENT_ESTALE, dht_create_lock_cbk);
+ dht_create_lock_cbk);
if (ret < 0) {
local->lock[0].layout.parent_layout.locks = NULL;