From 32f5bc795046fad2fc5dcdafafcf1e8c3df7d7a3 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Thu, 8 Feb 2018 13:44:38 +0530 Subject: 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 --- xlators/cluster/dht/src/dht-common.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'xlators/cluster/dht/src/dht-common.h') diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 9671bbe1cbe..87f60cac3d9 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -167,6 +167,7 @@ typedef enum { } qdstatfs_action_t; typedef enum { + REACTION_INVALID, FAIL_ON_ANY_ERROR, IGNORE_ENOENT_ESTALE } dht_reaction_type_t; @@ -181,15 +182,16 @@ struct dht_skip_linkto_unlink { }; typedef struct { - xlator_t *xl; - loc_t loc; /* contains/points to inode to lock on. */ - short type; /* read/write lock. */ - char *domain; /* Only locks within a single domain + xlator_t *xl; + loc_t loc; /* contains/points to inode to lock on. */ + short type; /* read/write lock. */ + char *domain; /* Only locks within a single domain * contend with each other */ - char *basename; /* Required for entrylk */ - gf_lkowner_t lk_owner; - gf_boolean_t locked; + char *basename; /* Required for entrylk */ + gf_lkowner_t lk_owner; + gf_boolean_t locked; + dht_reaction_type_t do_on_failure; } dht_lock_t; /* The lock structure represents inodelk. */ -- cgit