diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
| -rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 6471d54cdfe..69c64816909 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1331,6 +1331,15 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to, } } + /* store size of previous migrated file */ + if (defrag->tier_conf.is_tier) { + if (from == conf->subvolumes[0]) { + defrag->tier_conf.st_last_promoted_size = stbuf.ia_size; + } else { + defrag->tier_conf.st_last_demoted_size = stbuf.ia_size; + } + } + /* The src file is being unlinked after this so we don't need to clean it up */ clean_src = _gf_false; |
