All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH] fallocate.2: clarify the zeroing behavior
Date: Wed, 6 Nov 2013 05:52:31 -0800	[thread overview]
Message-ID: <20131106135231.GA3882@infradead.org> (raw)

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

Signed-off-by: Christoph Hellwig <hch@lst.de>

diff --git a/man2/fallocate.2 b/man2/fallocate.2
index f5c395d..f577ba8 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -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,

             reply	other threads:[~2013-11-06 13:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 13:52 Christoph Hellwig [this message]
     [not found] ` <20131106135231.GA3882-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-11-07 17:03   ` [PATCH] fallocate.2: clarify the zeroing behavior Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131106135231.GA3882@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.