Skip to content

Add a mount option to support eager writes

[email protected] linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3NFS: 'flags' field should be unsigned in struct nfs_serverinclude/linux/nfs_fs_sb.h+1 -10 replies
2/3NFS: Add support for eager writesfs/nfs/file.c fs/nfs/write.c include/linux/nfs_fs_sb.h+31 -70 replies
3/3NFS: Add mount options supporting eager writesfs/nfs/fs_context.c+33 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Add a mount option to support eager writes

From: Trond Myklebust <[email protected]>

The following patch series sets up a new mount option 'writes=lazy/eager/wait'. The mount option basically controls how the write() system call works.
- writes=lazy is the default, and keeps the current behaviour
- writes=eager means we send off the write immediately as an unstable write to the server.
- writes=wait means we send off the write as an unstable write, and then wait for the reply.

The main motivator for this behaviour is that some applications expect write() to return ENOSPC. Setting writes=wait should satisfy those applications without taking the full overhead of a synchronous write.

writes=eager, on the other hand, can be useful for applications such as re-exporting NFS, since it would allow knfsd on the proxying server to immediately forward the writes to the original server.

Trond Myklebust (3):
NFS: 'flags' field should be unsigned in struct nfs_server
NFS: Add support for eager writes
NFS: Add mount options supporting eager writes

 fs/nfs/file.c             | 19 +++++++++++++++++--
 fs/nfs/fs_context.c       | 33 +++++++++++++++++++++++++++++++++
 fs/nfs/write.c            | 17 ++++++++++++-----
 include/linux/nfs_fs_sb.h |  4 +++-
 4 files changed, 65 insertions(+), 8 deletions(-)
Signature · 1 line
2.29.2