diff options
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f8b7664fa8b..c89b809b49f 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -330,8 +330,12 @@ dht_lookup_root_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } local->op_ret = 0; - if (local->xattr == NULL) + if (local->xattr == NULL) { local->xattr = dict_ref (xattr); + } else { + dht_aggregate_xattr (local->xattr, xattr); + } + if (local->inode == NULL) local->inode = inode_ref (inode); @@ -393,6 +397,11 @@ dht_do_fresh_lookup_on_root (xlator_t *this, call_frame_t *frame) local->layout = NULL; } + if (local->xattr != NULL) { + dict_unref (local->xattr); + local->xattr = NULL; + } + ret = dict_set_uint32 (local->xattr_req, "trusted.glusterfs.dht", 4 * 4); if (ret) @@ -953,6 +962,11 @@ dht_lookup_directory (call_frame_t *frame, xlator_t *this, loc_t *loc) goto unwind; } + if (local->xattr != NULL) { + dict_unref (local->xattr); + local->xattr = NULL; + } + for (i = 0; i < call_cnt; i++) { STACK_WIND (frame, dht_lookup_dir_cbk, conf->subvolumes[i], |