Re: [PATCH v3] Add an option not to use link(src, dest) && unlink(src) when that is unreliable
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Apr 27, 2009, 16:53 UTC
- Message-ID
- <alpine.LFD.2.00.0904270952040.22156@localhost.localdomain>
- In-Reply-To
- <alpine.DEB.1.00.0904271800360.7741@intel-tinevez-2-302>
On Mon, 27 Apr 2009, Johannes Schindelin wrote:
Show 9 quoted lines
> > > The thing is, maybe people would prefer to use 'rename' over the > > link/unlink games even on some unixes, and not because of 'reliability' > > issues, but because they may have some filesystems that don't do > > hardlinks, and they'd just rather speed things up by avoiding the 'link()' > > system call that will just error out. > > We already fall back to renaming when another error than EEXIST is > returned from link(), so I think this case is covered.
You didn't read what I wrote.
"they'd just rather speed things up by avoiding the 'link()' system call that will just error out."
I know we fall back to rename(). The point is that if you know link doesn't work, why not just skip it?
Linus