summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorShyam <srangana@redhat.com>2014-09-04 14:21:10 -0400
committerVijay Bellur <vbellur@redhat.com>2014-09-16 21:23:00 -0700
commita6123ebfdb67e71eab859f94fb14660e9e3701c6 (patch)
treeeea51893cef38a6e092cbebabce5b18a00c5306d /xlators/features
parentb224dd14b75fb993eec4f44ecf11edce8a6fc42f (diff)
cluster/dht: Rename should not fail post hardlink creation
In the rename path, we wind the creation of newname hardlink and linkto file in dst hashed a the same time. If the linkto creation fails, but the link creation succeeds, we enter the failure code and cleanup the created newname hardlink. In the interim if another client looks up newname and finds it as a hardlink from FUSE, it could send an unlink for oldname instead of a rename. This combined with the above cleanup code could end up losing all the files copies, and thereby losing data. This fix separates these steps into 2 parts, creating the linkto first and then the link file, so that post link file creation no failures would cleanup the newname file. If linkto fails then link is not attempted, thereby not polluting the name space with newname. Change-Id: I61da8e906060da16a31ea1076eec2f01fd617f44 BUG: 1138395 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on-master: http://review.gluster.org/8570 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8615
Diffstat (limited to 'xlators/features')
0 files changed, 0 insertions, 0 deletions