diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-09-13 16:03:23 +0300 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2018-12-17 11:39:14 +0000 |
commit | 403c69d35827b6cbb430e97a797c318cca81e86e (patch) | |
tree | cd994bb5b8f133a1d8b1aa56d5c17deb3e91fae0 /xlators/cluster/afr/src/afr-self-heal.h | |
parent | f0c46df09fe542d6a365adc0c544ba460598501c (diff) |
AFR xlator: use dict_{setn|getn|deln|get_int32n|set_int32n|set_strn}
In a previous patch (https://review.gluster.org/20769) we've
added the key length to be passed to dict_* funcs, to remove the need
to strlen() it. This patch moves some xlators to use it.
- In some cases, moved strlen() of the key length outside of locks,
which is usually a good thing. Please verify it's safe to do so.
- In some cases, created a prefix for the keys, replacing something like
"%d-%d" with a "%s" in snprintf(). Not sure it adds value, but improves
readability.
Please review carefully.
Compile-tested only!
Change-Id: I04f2a1eb2ecfc3283d849d150d10d088ae7aa7f1
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal.h')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal.h b/xlators/cluster/afr/src/afr-self-heal.h index 41adbe05dc8..6555ec55771 100644 --- a/xlators/cluster/afr/src/afr-self-heal.h +++ b/xlators/cluster/afr/src/afr-self-heal.h @@ -97,6 +97,27 @@ #define SBRAIN_HEAL_NO_GO_MSG \ "Failed to obtain replies from all bricks of " \ "the replica (are they up?). Cannot resolve split-brain." +#define SFILE_NOT_IN_SPLIT_BRAIN "File not in split-brain" +#define SNO_BIGGER_FILE "No bigger file" +#define SNO_DIFF_IN_MTIME "No difference in mtime" +#define SUSE_SOURCE_BRICK_TO_HEAL \ + "Use source-brick option to heal metadata" \ + " split-brain" +#define SINVALID_BRICK_NAME "Invalid brick name" +#define SBRICK_IS_NOT_UP "Brick is not up" +#define SBRICK_NOT_CONNECTED "Brick is not connected" +#define SLESS_THAN2_BRICKS_in_REP "< 2 bricks in replica are up" +#define SBRICK_IS_REMOTE "Brick is remote" +#define SSTARTED_SELF_HEAL "Started self-heal" +#define SOP_NOT_SUPPORTED "Operation Not Supported" +#define SFILE_NOT_UNDER_DATA \ + "The file is not under data or metadata " \ + "split-brain" +#define SFILE_NOT_IN_SPLIT_BRAIN "File not in split-brain" +#define SALL_BRICKS_UP_TO_RESOLVE \ + "All the bricks should be up to resolve the" \ + " gfid split brain" +#define SERROR_GETTING_SRC_BRICK "Error getting the source brick" int afr_selfheal(xlator_t *this, uuid_t gfid); |