Re: [PATCH 5/6] NFSD: leverage DIO alignment to selectively issue O_DIRECT reads and writes

Christoph Hellwig
2025-06-12T07:25:56Z

On Wed, Jun 11, 2025 at 11:07:20AM -0400, Jeff Layton wrote:
> > write data at least until the client sends a COMMIT. Otherwise the
> > server will have to convert all UNSTABLE writes to FILE_SYNC writes,
> > and that can have performance implications.
> >
>
> If we're doing synchronous, direct I/O writes then why not just respond
> with FILE_SYNC? The write should be on the platter by the time it
> returns.

Only if you do O_DSYNC writes. Which are painfully slow for lots of
configurations. Otherwise you still need to issue an fdatasync.

But can you help me refreshing why UNSTABLE semantics require having
the data in the page cache?