For theoretical correctness, we would need fuse to forward the open-intent flag in lookup, so that Gluster can keep the file pre-open in anticipation of the imminent arrival of open() fop - guarding against getting replaced by a different file in the mean time. However the recent upstream kernel patchset of handling ESTALE with a retry, along with fixes in Gluster to be careful of returning ESTALE vs ENOENT minimize the window of race. This may be good enough for a lot of use cases (though still possible to hit the race if you are creating temp files and renaming them to the filename of interest in a tight loop).
Extending fuse with open-intent flag and its proper usage in Gluster is the foolproof fix, but I dont think anyone is working on this yet.
Thanks
On Mon, Jan 26, 2015, 02:21 Sebastien Cote <sebas642@xxxxxxxx> wrote:
Hi,
I was wondering if there was a way to make the rename operation atomic with Gluster 3.6. I have seen older posts on this list suggesting the use of the following configuration parameter:
cluster.extra-hash-regex: "(.*)\\.tmp"
I did not see comments on the success or failure of that method, or a proposition for an alternative. So is atomic rename a dead end, even with Gluster 3.6 ?
Thank you,
Sebastien
_______________________________________________
Gluster-users mailing list
Gluster-users@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-users
_______________________________________________ Gluster-users mailing list Gluster-users@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-users