LWN: Comments on "Handling the NFS change attribute" https://lwn.net/Articles/975863/ This is a special feed containing comments posted to the individual LWN article titled "Handling the NFS change attribute". en-us Sun, 05 Oct 2025 03:46:53 +0000 Sun, 05 Oct 2025 03:46:53 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Handling the NFS change attribute https://lwn.net/Articles/977323/ https://lwn.net/Articles/977323/ jlayton <div class="FormattedComment"> Yes...and it should happen before, since the writes generally happen before the close or unlock.<br> </div> Wed, 05 Jun 2024 22:08:55 +0000 Handling the NFS change attribute https://lwn.net/Articles/977244/ https://lwn.net/Articles/977244/ bfields <div class="FormattedComment"> "Moving the updates after the copy still leaves a window for incorrect information on the client, but it should resolve itself quickly."<br> <p> Also, it's good enough for race-free close-to-open semantics, if the change attribute increment that follows the write also precedes the close or unlock.<br> <p> </div> Wed, 05 Jun 2024 14:05:35 +0000 File-state gated writes https://lwn.net/Articles/977239/ https://lwn.net/Articles/977239/ jlayton <div class="FormattedComment"> Absolutely. It's essentially a cmpxchg primitive for files.<br> <p> Ceph supports what they call "assertions" in their object store protocol, so you can do something very similar there by just asserting that the version of the object hasn't changed before doing a write operation. I was able to use that to build a parallel, clustered NFS server on top of cephfs and nfs-ganesha, using a ceph object as a shared database between the nodes. This was _much_ simpler than trying to do something like that with file locking:<br> <p> <a href="https://jtlayton.wordpress.com/2018/12/">https://jtlayton.wordpress.com/2018/12/</a><br> <p> Adding a similar interface or capability via syscalls, or io_uring or whatever would be really cool, and not even that hard to do.<br> <p> Of course, we all first have to settle on semantics for the STATX_CHANGE_COOKIE across multiple filesystems, which has historically been the hard part.<br> </div> Wed, 05 Jun 2024 13:49:16 +0000 File-state gated writes https://lwn.net/Articles/977134/ https://lwn.net/Articles/977134/ CChittleborough <div class="FormattedComment"> Some important applications would benefit greatly from such a facility. Database engines are a fairly obvious example; lots of multitasking and distributed applications would become much easier to write and get right.<br> </div> Wed, 05 Jun 2024 09:14:34 +0000 Handling the NFS change attribute https://lwn.net/Articles/977100/ https://lwn.net/Articles/977100/ pj <div class="FormattedComment"> <span class="QuotedText">&gt; That would also allow a feature he has thought about for a long time: a "gated write". The idea would be to fetch the change attribute, then make some changes to the file in memory, and write the file, but only if the change attribute was the same.</span><br> <p> So... he wants etags for filesystems, along with an if-match condition on write. Seems sane.<br> </div> Wed, 05 Jun 2024 00:05:31 +0000