diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 898f41f0e..f59bc9667 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2015,13 +2015,7 @@ dht_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (!local->xattr) { local->xattr = dict_copy_with_ref (xattr, NULL); } else { - /* first aggregate everything into xattr and then copy into - * local->xattr. This is required as we want to have - * 'local->xattr' as the proper final dictionary passed above - * distribute xlator. - */ - dht_aggregate_xattr (xattr, local->xattr); - local->xattr = dict_copy (xattr, local->xattr); + dht_aggregate_xattr (local->xattr, xattr); } out: if (is_last_call (this_call_cnt)) { @@ -2167,7 +2161,7 @@ dht_getxattr (call_frame_t *frame, xlator_t *this, * (until inode_link() happens) */ if (key && DHT_IS_DIR(layout) && - ((strcmp (key, GF_XATTR_PATHINFO_KEY) == 0) + (XATTR_IS_PATHINFO (key) || (strcmp (key, GF_XATTR_NODE_UUID_KEY) == 0))) { (void) strncpy (local->xsel, key, 256); cnt = local->call_cnt = layout->cnt; @@ -2182,7 +2176,7 @@ dht_getxattr (call_frame_t *frame, xlator_t *this, /* node-uuid or pathinfo for files */ if (key && ((strcmp (key, GF_XATTR_NODE_UUID_KEY) == 0) - || (strcmp (key, GF_XATTR_PATHINFO_KEY) == 0))) { + || XATTR_IS_PATHINFO (key))) { cached_subvol = local->cached_subvol; (void) strncpy (local->xsel, key, 256); |