Skip to contentSkip to conversation

utils/mount/nfs.man: add noalignwrite

PATCH Superseded Dan Aloni 3 participants 4 messages Mar 10, 2025 – Mar 24, 2025

Subsystems (2)
lore
Share & tools
lore

Dan Aloni

author
#0 lore raw

PATCH 1/1 utils/mount/nfs.man: add noalignwrite

---
 utils/mount/nfs.man | 11 +++++++++++
 1 file changed, 11 insertions(+)
utils/mount/nfs.man +11 -0
index eab4692a87de..744411688641 100644
@@ -618,6 +618,17 @@ option is not specified,
 the default behavior depends on the kernel version,
 but is usually equivalent to
 .BR "xprtsec=none" .
+.TP 1.5i
+.BI noalignwrite
+This option disables the default behavior of extending write operations to full
+page boundaries.
+.IP
+Normally, the NFS client rounds non-aligned writes up to the system page size,
+which can lead to "lost writes" when multiple clients write concurrently
+to distinct non-overlapping regions. Use this option when your
+applications perform non-aligned writes and you can guarantee that file
+regions do not overlap, thus avoiding the need for file locking.
+.IP
 .SS "Options for NFS versions 2 and 3 only"
 Use these options, along with the options in the above subsection,
 for NFS versions 2 and 3 only.
Signature · 1 line
2.47.0
maintainer
#1 lore raw
Quoted 10 lines · Dan Aloni
---
 utils/mount/nfs.man | 11 +++++++++++
 1 file changed, 11 insertions(+)
utils/mount/nfs.man +0 -0
index eab4692a87de..744411688641 100644

utils/mount/nfs.man option is not specified, · line 626

Quoted 9 lines
utils/mount/nfs.man +6 -0
@@ -618,6 +618,17 @@ option is not specified,
 the default behavior depends on the kernel version,
 but is usually equivalent to
 .BR "xprtsec=none" .
+.TP 1.5i
+.BI noalignwrite
+This option disables the default behavior of extending write operations to full
+page boundaries.
+.IP
+Normally, the NFS client rounds non-aligned writes up to the system page size,

Isn't that only true for buffered writes? That should probably be made clear if so.

Quoted 8 lines
utils/mount/nfs.man +5 -0
+which can lead to "lost writes" when multiple clients write concurrently
+to distinct non-overlapping regions. Use this option when your
+applications perform non-aligned writes and you can guarantee that file
+regions do not overlap, thus avoiding the need for file locking.
+.IP
 .SS "Options for NFS versions 2 and 3 only"
 Use these options, along with the options in the above subsection,
 for NFS versions 2 and 3 only.
Signature · 1 line
Jeff Layton <[email protected]>
author
#2 lore raw

PATCH v2 1/1 utils/mount/nfs.man: add noalignwrite

---
 utils/mount/nfs.man | 11 +++++++++++
 1 file changed, 11 insertions(+)
utils/mount/nfs.man +11 -0
index eab4692a87de..b5c5913bf315 100644
@@ -618,6 +618,17 @@ option is not specified,
 the default behavior depends on the kernel version,
 but is usually equivalent to
 .BR "xprtsec=none" .
+.TP 1.5i
+.BI noalignwrite
+This option disables the default behavior of extending buffered write operations
+to full page boundaries.
+.IP
+Normally, the NFS client rounds non-aligned buffered writes up to the system
+page size, which can lead to "lost writes" when multiple clients write
+concurrently to distinct non-overlapping regions. Use this option when your
+applications perform non-aligned buffered writes and you can guarantee that file
+regions do not overlap, thus avoiding the need for file locking.
+.IP
 .SS "Options for NFS versions 2 and 3 only"
 Use these options, along with the options in the above subsection,
 for NFS versions 2 and 3 only.
Signature · 1 line
2.47.0
#3 lore raw
Quoted 1 line · Dan Aloni

Committed... (tag: nfs-utils-2-8-3-rc8)

steved

Quoted 26 lines
---
  utils/mount/nfs.man | 11 +++++++++++
  1 file changed, 11 insertions(+)
utils/mount/nfs.man +11 -0
index eab4692a87de..b5c5913bf315 100644
@@ -618,6 +618,17 @@ option is not specified,
  the default behavior depends on the kernel version,
  but is usually equivalent to
  .BR "xprtsec=none" .
+.TP 1.5i
+.BI noalignwrite
+This option disables the default behavior of extending buffered write operations
+to full page boundaries.
+.IP
+Normally, the NFS client rounds non-aligned buffered writes up to the system
+page size, which can lead to "lost writes" when multiple clients write
+concurrently to distinct non-overlapping regions. Use this option when your
+applications perform non-aligned buffered writes and you can guarantee that file
+regions do not overlap, thus avoiding the need for file locking.
+.IP
  .SS "Options for NFS versions 2 and 3 only"
  Use these options, along with the options in the above subsection,
  for NFS versions 2 and 3 only.