[Top] [All Lists]

Re: [PATCH] xfsprogs: add fpunch command for hole punching via fallocate

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: add fpunch command for hole punching via fallocate
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 19 Jan 2011 06:38:22 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20110118212303.GV28803@dastard>
References: <1295009545-17839-1-git-send-email-josef@xxxxxxxxxx> <20110118125112.GB21440@xxxxxxxxxxxxx> <20110118130603.GA23491@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20110118131203.GA4349@xxxxxxxxxxxxx> <20110118212303.GV28803@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
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.

<Prev in Thread] Current Thread [Next in Thread>