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-common.h | |
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-common.h')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 16 |
1 files changed, 9 insertions, 7 deletions
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. */ |