diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2018-02-08 13:44:38 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2018-02-23 03:19:58 +0000 |
commit | 32f5bc795046fad2fc5dcdafafcf1e8c3df7d7a3 (patch) | |
tree | 85284f2ef9e4917890ff84fe2bd35ba84c5ec025 /xlators/cluster/dht/src/dht-selfheal.c | |
parent | cfbc524239b1d3bc417849e68379c81e83fd56d9 (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-selfheal.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index b3ca4c2c281..d14020fabd0 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -592,7 +592,8 @@ dht_selfheal_layout_lock (call_frame_t *frame, dht_layout_t *layout, conf->subvolumes[i], &local->loc, F_WRLCK, DHT_LAYOUT_HEAL_DOMAIN, - NULL); + NULL, + FAIL_ON_ANY_ERROR); if (lk_array[i] == NULL) { gf_uuid_unparse (local->stbuf.ia_gfid, gfid); gf_msg (THIS->name, GF_LOG_ERROR, ENOMEM, @@ -617,7 +618,8 @@ dht_selfheal_layout_lock (call_frame_t *frame, dht_layout_t *layout, lk_array[0] = dht_lock_new (frame->this, local->hashed_subvol, &local->loc, F_WRLCK, - DHT_LAYOUT_HEAL_DOMAIN, NULL); + DHT_LAYOUT_HEAL_DOMAIN, NULL, + FAIL_ON_ANY_ERROR); if (lk_array[0] == NULL) { gf_uuid_unparse (local->stbuf.ia_gfid, gfid); gf_msg (THIS->name, GF_LOG_ERROR, ENOMEM, @@ -631,7 +633,7 @@ dht_selfheal_layout_lock (call_frame_t *frame, dht_layout_t *layout, local->lock[0].layout.my_layout.locks = lk_array; local->lock[0].layout.my_layout.lk_count = count; - ret = dht_blocking_inodelk (frame, lk_array, count, FAIL_ON_ANY_ERROR, + ret = dht_blocking_inodelk (frame, lk_array, count, dht_selfheal_layout_lock_cbk); if (ret < 0) { local->lock[0].layout.my_layout.locks = NULL; @@ -2949,7 +2951,8 @@ dht_update_commit_hash_for_layout (call_frame_t *frame) lk_array[i] = dht_lock_new (frame->this, conf->local_subvols[i], &local->loc, F_WRLCK, - DHT_LAYOUT_HEAL_DOMAIN, NULL); + DHT_LAYOUT_HEAL_DOMAIN, NULL, + FAIL_ON_ANY_ERROR); if (lk_array[i] == NULL) goto err; } @@ -2957,7 +2960,7 @@ dht_update_commit_hash_for_layout (call_frame_t *frame) local->lock[0].layout.my_layout.locks = lk_array; local->lock[0].layout.my_layout.lk_count = count; - ret = dht_blocking_inodelk (frame, lk_array, count, FAIL_ON_ANY_ERROR, + ret = dht_blocking_inodelk (frame, lk_array, count, dht_update_commit_hash_for_layout_resume); if (ret < 0) { local->lock[0].layout.my_layout.locks = NULL; |