On Wed, Jan 22, 2020 at 02:10:03PM -0800, Omar Sandoval wrote: > > Sorry for not reading all the thread again, some API questions: > > - We intend to allow AT_REPLACE only with O_TMPFILE src. Right? > > I wasn't planning on having that restriction. It's not too much effort > for filesystems to support it for normal files, so I wouldn't want to > place an artificial restriction on a useful primitive. I'm not sure; that's how we ended up with the unspeakable APIs like rename(2), after all... Said that, in this particular case I would suggest allowing it for any source - what matters is not the _origin_ of that thing, but the current state. And linkat() (including the already existing variant) can change that at any time...