All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Cc: "util-linux@vger.kernel.org" <util-linux@vger.kernel.org>
Subject: Re: fallocate: --punch option parsing error diagnostics irritating
Date: Thu, 26 Jun 2014 12:10:09 +0200	[thread overview]
Message-ID: <20140626101009.GD30418@x2.net.home> (raw)
In-Reply-To: <53AB2E36.5060405@bernhard-voelker.de>

On Wed, Jun 25, 2014 at 10:16:54PM +0200, Bernhard Voelker wrote:
>   $ ./fallocate -p -l 10000 /tmp/x
>   fallocate: only -n mode can be used with --zero-range
> 
> Huh? I didn't specify neither -n nor -z.

		case 'p':
			mode |= FALLOC_FL_PUNCH_HOLE;
			/* fall through */
		case 'n':
			mode |= FALLOC_FL_KEEP_SIZE;
			break;


unfortunately there is nothing about it in man page and usage(). It's
described in fallocate(2) syscall man page only.

Anyway, the code is wrong, it assumes that KEEP_SIZE is possible to use
only with ZERO_RANGE. 

Fixed in git tree, man page massively modified to be readable for
humans (original text in the man page was from FS devels:-)

> Finally, please add some examples to the man page.

I think the new version of the man page is good enough without examples, but 
if someone has something nice we can add EXAMPLES section.

Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  parent reply	other threads:[~2014-06-26 10:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 20:16 fallocate: --punch option parsing error diagnostics irritating Bernhard Voelker
2014-06-25 20:35 ` Dale R. Worley
2014-06-26 10:10 ` Karel Zak [this message]
2014-06-26 10:52   ` Pádraig Brady
2014-06-26 11:07     ` Karel Zak
2014-06-26 12:14       ` Bernhard Voelker
2014-06-26 12:49         ` Karel Zak

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=20140626101009.GD30418@x2.net.home \
    --to=kzak@redhat.com \
    --cc=mail@bernhard-voelker.de \
    --cc=util-linux@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.