summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/shard/src/shard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index 4284ad679ef..8c9f9f8978e 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -3400,7 +3400,9 @@ shard_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (IA_ISDIR (entry->d_stat.ia_type))
continue;
- shard_modify_size_and_block_count (&entry->d_stat, entry->dict);
+ if (dict_get (entry->dict, GF_XATTR_SHARD_FILE_SIZE))
+ shard_modify_size_and_block_count (&entry->d_stat,
+ entry->dict);
}
local->op_ret = op_ret;