Re: [PATCH 1/2] man2/fallocate.2: document behavior with shared blocks

From
Michael Kerrisk (man-pages) <hidden>
Date
2016-10-18 06:06:14
Also in
linux-btrfs, linux-fsdevel, linux-man, linux-xfs
Reply to
Darrick J. Wong, 2016-10-18
Hi Darrick,

On 10/18/2016 03:54 AM, Darrick J. Wong wrote:
Add a blurb to the fallocate manpage explaining that the fallocate
command with the UNSHARE mode flag may use CoW to unshare blocks to
guarantee that a disk write won't fail with ENOSPC.
Thanks! Applied.

Cheers,

Michael

quoted hunk ↗ jump to hunk
Signed-off-by: Darrick J. Wong <redacted>
---
 man2/fallocate.2 |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/man2/fallocate.2 b/man2/fallocate.2
index 54d6340..3ed1460 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -79,6 +79,16 @@ but the file size will not be changed even if
 is greater than the file size.
 Preallocating zeroed blocks beyond the end of the file in this manner
 is useful for optimizing append workloads.
+
+If the
+.B FALLOC_FL_UNSHARE
+flag is specified in
+.IR mode ,
+shared file data extents will be made private to the file to guarantee
+that a subsequent write will not fail due to lack of space.
+Typically, this will be done by performing a copy-on-write operation on
+all shared data in the file.
+This flag may not be supported by all filesystems.
 .PP
 Because allocation is done in block size chunks,
 .BR fallocate ()

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (4 messages) 4 messages, 2 authors, last reply 2016-10-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help