From: Andreas Dilger <adilger@dilger.ca>
To: mtk.manpages@gmail.com
Cc: Josef Bacik <josef@redhat.com>,
Eric Gouriou <egouriou@google.com>,
inux-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: Tue, 20 Sep 2011 23:25:40 -0600 [thread overview]
Message-ID: <804BB4B7-E19F-41EE-81A3-25D4389B54B9@dilger.ca> (raw)
In-Reply-To: <CAKgNAkhCptHn_UxReeZeSNaP0yNr+iWYd3fcxrD_PHohqQVxuQ@mail.gmail.com>
On 2011-09-20, at 10:11 PM, Michael Kerrisk wrote:
> 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).
>
> \b.TP
> .B EINVAL
> .I offset
> was less than 0, or
> .I len
> was less than or equal to 0.
I wasn't sure if this is a bug in the manpage or actually how it is done
in the kernel, but it seems this is a kernel implementation issue...
Does it make sense to return an error if len == 0? That just adds extra
complexity on the part of the application, and doesn't reduce complexity
in the kernel (whether the kernel checks for len == 0 and returns 0 or
-EINVAL is not any different). read() and write() and malloc() all allow
a length of zero to succeed, since applications may compute this length
and sometimes it is zero.
Cheers, Andreas
next prev parent reply other threads:[~2011-09-21 5:25 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
2011-09-21 4:11 ` Michael Kerrisk
2011-09-21 5:25 ` Andreas Dilger [this message]
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=804BB4B7-E19F-41EE-81A3-25D4389B54B9@dilger.ca \
--to=adilger@dilger.ca \
--cc=dchinner@redhat.com \
--cc=egouriou@google.com \
--cc=inux-man@vger.kernel.org \
--cc=josef@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).