summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-inode-read.c
diff options
context:
space:
mode:
authorSunil Kumar Acharya <sheggodu@redhat.com>2017-06-21 16:37:09 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-06-26 10:32:31 +0000
commit91c44b41654ae10a2278ee8c494910a46196077a (patch)
treebfcc93e642f3a56e70c82c2f59edcc0ecde86228 /xlators/cluster/ec/src/ec-inode-read.c
parent63be8940a73cc92b54e8cee20df5df19bdb9daee (diff)
cluster/ec: Node uuid xattr support update for EC
Backport of https://review.gluster.org/17594 Problem: The change in EC to return list of node uuids for GF_XATTR_NODE_UUID_KEY was causing problems with geo-rep. Fix: This patch will allow to get the single node uuid as it was doing before with the key "GF_XATTR_NODE_UUID_KEY", and will also allow to get the list of node uuids by using a new key "GF_XATTR_LIST_NODE_UUIDS_KEY". This will solve the problem with geo-rep and any other features which were depending on this. BUG: 1463250 Change-Id: I2d9214a9658d4a41a3d6de08600884d2bda5f3eb Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com> Reviewed-on: https://review.gluster.org/17615 Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-inode-read.c')
-rw-r--r--xlators/cluster/ec/src/ec-inode-read.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c
index ddae9bd99f1..d03b4483a67 100644
--- a/xlators/cluster/ec/src/ec-inode-read.c
+++ b/xlators/cluster/ec/src/ec-inode-read.c
@@ -487,7 +487,14 @@ ec_getxattr (call_frame_t *frame, xlator_t *this, uintptr_t target,
}
}
if (name != NULL) {
- fop->str[0] = gf_strdup(name);
+ /* In case of list-node-uuids xattr, set flag to indicate
+ * the same and use node-uuid xattr for winding fop */
+ if (XATTR_IS_NODE_UUID_LIST(name)) {
+ fop->int32 = 1;
+ fop->str[0] = gf_strdup(GF_XATTR_NODE_UUID_KEY);
+ } else {
+ fop->str[0] = gf_strdup(name);
+ }
if (fop->str[0] == NULL) {
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
EC_MSG_NO_MEMORY,