summaryrefslogtreecommitdiffstats
path: root/extras/Makefile.am
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2015-09-04 05:14:05 -0400
committerRaghavendra G <rgowdapp@redhat.com>2015-09-09 23:46:37 -0700
commit22cad7b522f223b47d87df6724f34273306ab7cd (patch)
tree519ed61880924a7fec35e7f6f556f93979765d79 /extras/Makefile.am
parentb1f851709c30505cac2b63bc49234ae818559d2d (diff)
dht/remove-brick: Avoid data loss for hard link migration
Problem: If the hashed subvol of a file has reached cluster.min-free-disk, for a create opertaion a linkto file will be created on the hashed and the data file will be created on some other brick. For creation of the linkfile we populate the dictionary with linkto key and value as the cached subvol. After successful linkto file creation, the linkto-key-value pair is not deleted form the dictionary and hence, the data file will also have linkto xattr which points to itself.This looks something like this. client-0 client-1 -------T file rwx------file linkto.xattr=client-1 linkto.xattr=client-1 Now coming to the data loss part. Hardlink migration highly depend on this linkto xattr on the data file. This value should be the new hashed subvol of the first hardlink encountered post fix-layout. But when it tries to read the linkto xattr it gets the same target as where it is sitting. Now the source and destination are same for migration. At the end of migration the source file is truncated and deleted, which in this case is the destination and also the only data file it self resulting in data loss. Change-Id: I36b1d105752bd9467757ecf3f103b45c666783d6 BUG: 1260051 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12105 Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'extras/Makefile.am')
0 files changed, 0 insertions, 0 deletions