On Mon, Aug 18, 2025 at 09:49:47AM -0700, Trond Myklebust wrote: > > Can you remind me why we clear the writeback flag as soon as the > > WRITE > > completes instead of leaving it set until the COMMIT completes? > > It's about reducing latency. > > An unstable WRITE is typically a quick operation because it only > requires the server to cache the data. > > COMMIT requires persistence, and so it is typically slower. > Furthermore, the intention of COMMIT is to also allow the batching of > writeback on the server, so that disk wakeup and seeks are minimised. > While that is probably much less of a concern with modern SSDs vs older > hard drives, the NFS client design has to cater to both. > > So by clearing the writeback flag after the WRITE, we allow operations > that want to further modify a specific folio to proceed without having > to wait for persistence of the entire batch. Ah; NFS sets SB_I_STABLE_WRITES. Unfortunately, 6c17260ca4ae is a little light on details about why.