kib at freebsd.org
Mon Mar 5 16:15:57 UTC 2018
On Mon, Mar 05, 2018 at 07:55:50AM -0800, Christoph Hellwig wrote:
> With my Linux hat I'd much prefer using the AT_EMPTY_PATH flag that
> Linux already supports for a few *at calls to operate on the dirfd
> fd. But it seems like neither FreeBSD nor anyone else picked up that
> flag, so it might be a bit of a hard sell.
> FreeBSD bugzilla related to AT_EMPTY_PATH and the lack of it for
> unlinkat even in Linux:
> Linux bugzilla:
> If you are interested in bringing this to FreeBSD that might be reason
> enough for me into looking into a Linux implementation as well.
It is not clear from the FreeBSD PR, how unlinkat() is supposed to work.
Do you mean that unlinkat(AT_EMPTY_PATH) removes the name entry for
given fd, which was used for open(2) ? If yes, this is not possible to
implement in the current FreeBSD VFS.
Also, does linkat(AT_EMPTY_PATH) supposed to link the inode referenced
only by the file descriptor ? I believe this feature is objected to.
More information about the freebsd-hackers