linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Josef Bacik <josef@redhat.com>,
	linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Lucian Adrian Grijincu <lucian.grijincu@gmail.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Dave Chinner <dchinner@redhat.com>
Subject: Re: [PATCH] fallocate.2: add FALLOC_FL_PUNCH_HOLE flag definition
Date: Mon, 19 Sep 2011 16:32:26 +1000	[thread overview]
Message-ID: <20110919063226.GI15688@dastard> (raw)
In-Reply-To: <CAKgNAkj-jPR-9hyuxrJ74uu3Kdv9bATrfCUedoty4dJOCh2GcA@mail.gmail.com>

On Mon, Sep 19, 2011 at 07:08:17AM +0200, Michael Kerrisk wrote:
> Hi Josef (Dave C, please also note comments below),
> 
> On Mon, Nov 15, 2010 at 6:07 PM, Josef Bacik <josef@redhat.com> wrote:
> > This patch adds the relevant documenation for using fallocate with the
> > FALLOC_FL_PUNCH_HOLE mode.  This information comes from the implementation of
> > FALLOC_FL_PUNCH_HOLE that I've posted along with this man page update to outline
> > the definition for hole punching.  Obviously this patch is dependant upon the
> > current implementation being accepted.  Thanks,
> >
> > Signed-off-by: Josef Bacik <josef@redhat.com>
> > ---
> >  man2/fallocate.2 |   15 ++++++++++++---
> >  1 files changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/man2/fallocate.2 b/man2/fallocate.2
> > index 42eefbd..1b28916 100644
> > --- a/man2/fallocate.2
> > +++ b/man2/fallocate.2
> > @@ -31,9 +31,8 @@ bytes.
> >
> >  The
> >  .I mode
> > -argument determines the operation to be performed on the given range.
> > -Currently only one flag is supported for
> > -.IR mode :
> > +argument determines the operation to be performed on the given range, the
> > +value can be one of the following:
> >  .TP
> >  .B FALLOC_FL_KEEP_SIZE
> >  This flag allocates and initializes to zero the disk space
> > @@ -50,6 +49,16 @@ the file size (as reported by
> >  .BR stat (2))
> >  even if it is less than
> >  .IR offset + len .
> > +.TP
> > +.B FALLOC_FL_PUNCH_HOLE
> > +This flag de-allocates the disk space within the range specified by
> > +.I offset
> > +and
> > +.IR len .
> > +This call preserves the file size (as reported by
> > +.BR stat (2)),
> > +the only change will be to the amount of space used by the file.  After a
> > +successful call, subsequent reads from this range will return 0's.
> >  .\"
> >  .\" Note from Amit Arora:
> >  .\" There were few more flags which were discussed, but none of
> > --
> > 1.6.6.1
> 
> Thanks for this patch. As noted in another mail, Lucian also sent a
> patch for FALLOC_FL_PUNCH_HOLE, and I applied his patch first, and
> then added some pieces from yours, as well as some of my own edits.
> 
> However, the addition of a second class of operation to the man page
> made it clear that some significant restructuring of the page is
> required. So I substantially reworked the page, including the
> preexisting material on the default "file allocation" operation (Dave
> C please note).
> 
> Josef, Lucian, could I ask you to check ("man -l <file>") the final
> text (below) for FALLOC_FL_PUNCH_HOLE (including the EPERM error under
> ERRORS)?
> 
> Dave, could I ask you to review my reworked text for the "Allocating
> disk space" subsection?

Looks OK to me.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2011-09-19  6:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 17:07 [PATCH] fallocate.2: add FALLOC_FL_PUNCH_HOLE flag definition Josef Bacik
2011-09-19  5:08 ` Michael Kerrisk
2011-09-19  6:32   ` Dave Chinner [this message]
2011-09-21  4:11   ` Michael Kerrisk
2011-09-21  5:25     ` Andreas Dilger
2011-09-21  5:49       ` Michael Kerrisk

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=20110919063226.GI15688@dastard \
    --to=david@fromorbit.com \
    --cc=dchinner@redhat.com \
    --cc=josef@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=lucian.grijincu@gmail.com \
    --cc=mtk.manpages@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).