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

Christoph Hellwig hch at infradead.org
Wed Jan 19 05:38:22 CST 2011


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.




More information about the xfs mailing list