summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index d980a4d451f..df31cdbb047 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -920,6 +920,10 @@ dht_iatt_merge (xlator_t *this, struct iatt *to,
to->ia_blksize = from->ia_blksize;
to->ia_blocks += from->ia_blocks;
+ if (IA_ISDIR (from->ia_type)) {
+ to->ia_blocks = DHT_DIR_STAT_BLOCKS;
+ to->ia_size = DHT_DIR_STAT_SIZE;
+ }
set_if_greater (to->ia_uid, from->ia_uid);
set_if_greater (to->ia_gid, from->ia_gid);
@@ -2259,6 +2263,8 @@ dht_heal_full_path_done (int op_ret, call_frame_t *heal_frame, void *data)
main_frame = local->main_frame;
local->main_frame = NULL;
+ dht_set_fixed_dir_stat (&local->postparent);
+
DHT_STACK_UNWIND (lookup, main_frame, 0, 0,
local->inode, &local->stbuf, local->xattr,
&local->postparent);