Re: NFSv4.1 COMMIT of all changed areas only on flush? Re: [PATCH 06/10] NFSD: Enable return of an updated stable_how to NFS clients

From: Jeff Layton

Date: Sat May 30 2026 - 06:24:58 EST


On Sat, 2026-05-30 at 09:58 +0200, Cedric Blancher wrote:
> On Fri, 29 May 2026 at 00:03, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> >
> > From: Chuck Lever <chuck.lever@xxxxxxxxxx>
> >
> > In a subsequent patch, nfsd_vfs_write() will promote an UNSTABLE
> > WRITE to be a FILE_SYNC WRITE. This indicates that the client does
> > not need a subsequent COMMIT operation, saving a round trip and
> > allowing the client to dispense with cached dirty data as soon as
> > it receives the server's WRITE response.
> >
> > This patch refactors nfsd_vfs_write() to return a possibly modified
> > stable_how value to its callers. No behavior change is expected.
>
> Question: Could the NFS client just record the write position and
> length, and only ask for a COMMIT when a flush is explicitly issued?
>

I'm planning to drop this patch, fwiw...

If I understand your question though: the client is more or less
expected to keep track of what UNSTABLE writes are still outstanding
and eventually issue one or more COMMIT calls to sync them out to disk.
--
Jeff Layton <jlayton@xxxxxxxxxx>