public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Josef Bacik <josef@redhat.com>,
	xfs@oss.sgi.com
Subject: Re: [PATCH] xfsprogs: add fpunch command for hole punching via fallocate
Date: Wed, 19 Jan 2011 06:38:22 -0500	[thread overview]
Message-ID: <20110119113822.GA12941@infradead.org> (raw)
In-Reply-To: <20110118212303.GV28803@dastard>

On Wed, Jan 19, 2011 at 08:23:03AM +1100, Dave Chinner wrote:
> 	a) it is consistent with other xfs_io allocation manipulation
> 	   command structures such as resvsp/unresvsp

These are all different ioctls.

> 	b) "punch" is less to type than "fallocate -p"
> 	c) self documenting in scripts e.g. -c "punch 4k 4k" is much
> 	   more obvious than -c "fallocate -p 4k 4k" and saves a man
> 	   page lookup when reading the script.
> 	d) punch as a top level command will show up in the "xfs_io
> 	   -c help", not require you to know it is a suboption of the
> 	   "falloc" command to find out how to use it.
> 	e) the xfs_io command does not have to have the same name
> 	   and structure as the underlying API that implements the
> 	   functionality the commands execute.

I still don't like this as a reason to duplicate the code, and not
having the different arguments for fallocate exposed similar to the
syscall level.

What do you think about introducing a concept of aliases in xfs_io
so that we can have a toplevel punch command that just gets aliased
to fallocate -p without having to reimplement it?

I'd take Josef's older falocate -p implementation and will add the alias
support myself.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2011-01-19 11:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 12:52 [PATCH] xfsprogs: add fpunch command for hole punching via fallocate Josef Bacik
2011-01-18 12:51 ` Christoph Hellwig
2011-01-18 13:06   ` Josef Bacik
2011-01-18 13:12     ` Christoph Hellwig
2011-01-18 21:23       ` Dave Chinner
2011-01-19 11:38         ` Christoph Hellwig [this message]

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=20110119113822.GA12941@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=josef@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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