Vincent Lefevre wrote in <20180824091156.ga20...@zira.vinc17.org>: |On 2018-08-22 15:35:16 +0200, Steffen Nurpmeso wrote: |> Vincent Lefevre wrote in <20180821230229.ga16...@zira.vinc17.org>: |>|* It is not clear whether this has ever been usuful (nothing in |>| comment or in the commit log). |> |> According to some statement on a list you are also subscribed to |> this NFS problem has been fixed "at the early 90s". | |This is quite surprising. Even the discussion at | | https://www.experts-exchange.com/questions/10078625/atomic-locking-over-\ | NFS-with-link-2-stat-2.html | |in 1998 doesn't mention this problem (it just mentions the case where |the link(2) call failed though the link was created). | |Several old documents say not to use the return value of the link(2) |call, but do not say whether this is only due to the case where |link(2) fails but the link was created, or the other way round.
Oh, wait! This was false rememberance, i referred to a message from Casper Dik of Oracle who wrote on 2015-12-31 >/* Create a unique file. O_EXCL does not really work over NFS so we follow > * the following trick (inspired by S.R. van den Berg): > * - make a mostly unique filename and try to create it > * - link the unique filename to our target > * - get the link count of the target > * - unlink the mostly unique filename > * - if the link count was 2, then we are ok; else we've failed */ The problem of not being able to create a file with O_EXCL was, I think, fixed in NFSv3 (if not, certainly in NFSv4) Casper so this was not about link but about O_EXCL. About a year later (2016-11-02) there was a pair of message in between Stèphane and Jörg about links via NFS, as in "IIRC there were issues with ln on NFS for instance." and "Could you please explain what you have in mind? I would like to understand whether there really is a NFS problem or whether there is just a NFS bug in Linux", but nothing more than that. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)