Skip to contentSkip to conversation

fallocate.2: clarify the zeroing behavior

PATCH In review Christoph Hellwig 2 participants 2 messages Nov 6, 2013 – Nov 7, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fallocate.2: clarify the zeroing behavior

Fallocate only zeroes space that did not previously contain data, but leaves existing data untouched.

man2/fallocate.2 +6 -2
index f5c395d..f577ba8 100644
@@ -44,8 +44,7 @@ The default operation (i.e.,
 .I mode
 is zero) of
 .BR fallocate ()
-allocates and initializes to zero the disk space
-within the range specified by
+allocates the disk space within the range specified by
 .I offset
 and
 .IR len .
@@ -54,6 +53,11 @@ The file size (as reported by
 will be changed if
 .IR offset + len
 is greater than the file size.
+Any subregion withing the range specified by
+.I offset
+and
+.IR len .
+that did not contain data before the call will be initialized to zero.
 This default behavior closely resembles the behavior of the
 .BR posix_fallocate (3)
 library function,

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 2 lines · Christoph Hellwig

Fallocate only zeroes space that did not previously contain data, but leaves existing data untouched.

Thanks, Christoph. APplied

Cheers

Michael

Quoted 33 lines
man2/fallocate.2 +6 -3
index f5c395d..f577ba8 100644
@@ -44,8 +44,7 @@ The default operation (i.e.,
 .I mode
 is zero) of
 .BR fallocate ()
-allocates and initializes to zero the disk space
-within the range specified by
+allocates the disk space within the range specified by
 .I offset
 and
 .IR len .
@@ -54,6 +53,11 @@ The file size (as reported by
 will be changed if
 .IR offset + len
 is greater than the file size.
+Any subregion withing the range specified by
+.I offset
+and
+.IR len .
+that did not contain data before the call will be initialized to zero.
 This default behavior closely resembles the behavior of the
 .BR posix_fallocate (3)
 library function,
--

To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html