linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lukas Czerner <lczerner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3] fallocate.2: Document FALLOC_FL_ZERO_RANGE
Date: Mon, 05 May 2014 14:44:48 +0200	[thread overview]
Message-ID: <536787C0.9070204@gmail.com> (raw)
In-Reply-To: <1399291463-13683-1-git-send-email-lczerner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>


On 05/05/2014 02:04 PM, Lukas Czerner wrote:
> FALLOC_FL_ZERO_RANGE was added in Linux 3.14,
> for zeroing ranges in the allocated space in a file.
> 
> Signed-off-by: Lukas Czerner <lczerner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> v2: Rebase and update the description
> v3: Ext4 zero range on extent based files

Thank, Lukáš.

In fact I'd already merged and tweaked your previous patch into 
a branch, and the only new piece from this patch that I needed
was the piece about ext4 extent-based files.

The text now reads:

   Zeroing file space
       Specifying the FALLOC_FL_ZERO_RANGE flag (available since Linux
       3.14) in mode zeroes space in the byte range starting at offset
       and  continuing  for  len  bytes.   Within the specified range,
       blocks are preallocated for the regions that span the holes  in
       the  file.  After a successful call, subsequent reads from this
       range will return zeroes.

       Zeroing is done within the filesystem preferably by  converting
       the range into unwritten extents.  This approach means that the
       specified range will  not  be  physically  zeroed  out  on  the
       device, and I/O is required only to update file metadata.

       If  the  FALLOC_FL_KEEP_SIZE  flag is additionally specified in
       mode, the behavior of the call is similar, but  the  file  size
       will not be changed even if offset+len is greater than the file
       size.  This behaviour is the same as when  preallocating  space
       with FALLOC_FL_KEEP_SIZE specified.

       Not all filesystems support FALLOC_FL_ZERO_RANGE; if a filesys‐
       tem doesn't support the operation, an error is  returned.   The
       operation is supported on at least the following filesystems:

       *  XFS (since Linux 3.14)

       *  ext4, for extent-based files (since Linux 3.14)
   ...
   ERRORS
       EINVAL mode     is     FALLOC_FL_COLLAPSE_RANGE     or     FAL‐
              LOC_FL_ZERO_RANGE, but the file referred to by fd is not
              a regular file.

Okay?

Cheers,

Michael
-- 
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

  parent reply	other threads:[~2014-05-05 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05 12:04 [PATCH v3] fallocate.2: Document FALLOC_FL_ZERO_RANGE Lukas Czerner
     [not found] ` <1399291463-13683-1-git-send-email-lczerner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-05 12:44   ` Michael Kerrisk (man-pages) [this message]
     [not found]     ` <536787C0.9070204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-05 13:06       ` Lukáš Czerner
     [not found]         ` <alpine.LFD.2.00.1405051504210.2223-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-05-05 19:46           ` Michael Kerrisk (man-pages)
     [not found]             ` <CAKgNAkg0-za69pesggjyEzSPEwQ60TtgEbhoUoZsg6F_9qsMbQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-06  9:58               ` Lukáš Czerner
     [not found]                 ` <alpine.LFD.2.00.1405061156290.2255-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-05-06 10:45                   ` 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=536787C0.9070204@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=lczerner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).