cluster/tier: Do not delete linkto file on demotion
authorN Balachandran <nbalacha@redhat.com>
Mon, 9 Nov 2015 10:19:50 +0000 (15:49 +0530)
committerDan Lambright <dlambrig@redhat.com>
Wed, 18 Nov 2015 15:16:12 +0000 (07:16 -0800)
commita1e4be4d277c8150657f7b9fd4b72dcdd639523d
tree068b9e1924b2138cbc37175b219e94ded90ae4be
parentcb76371a56eb90a6f2ac126c876d7a2dc203e16c
cluster/tier: Do not delete linkto file on demotion

The current DHT migration code will always delete the
src linkto file after migration as dht always moves
 files to the hashed subvol. This is not the case in tiering.
The lack of linkto files causes rename to fail leaving 2 files
 with the same name but different gfids on the volume.
Modified to leave the linkto file behind if the source
 volume is the hashed subvolume.

Change-Id: I2b99f7d34b4b719aee6232dc40c6a8f8ba88225d
BUG: 1279376
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/12551
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
tests/bugs/tier/bug-1279376-rename-demoted-file.t [new file with mode: 0755]
xlators/cluster/dht/src/dht-rebalance.c
xlators/cluster/dht/src/tier.h