summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorShyam <srangana@redhat.com>2014-09-11 10:52:57 +0530
committerNiels de Vos <ndevos@redhat.com>2014-10-01 03:36:35 -0700
commit5f31af8527e7f1f62e2c80fdf25f6d2cf71e49f1 (patch)
tree044be6b03dbc90395ac7f2edf6cb01dc311b5c42 /api
parent58f1273c0831a0c0ac99f4bc66461ec88a112f62 (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: 1140348 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: 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> (cherry picked from commit 4ce3db8e508e715a43352b082e861fd0e729951f) Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/8728 Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions