On Wed, Jun 13, 2012 at 08:13:29AM +0200, Paolo Bonzini wrote: > Il 13/06/2012 05:30, Dave Chinner ha scritto: > >> > > >> > Also, a minor nit, but you should credit where this code has > >> > originated from in the commit messages, and describe the use case > >> > for requiring it. i.e. based on: > >> > > >> > http://permalink.gmane.org/gmane.linux.file-systems/62449 > > Interesting, I didn't know this---I wrote the code from scratch. > > I took the description from the man pages ("This operation is a fast > method of overwriting any from the range specified with zeros without > removing any blocks or having to write zeros to disk"), so perhaps those > will have to be patched as well. The first line of the man page description is the important one: $ man 3 xfsctl ..... XFS_IOC_ZERO_RANGE This command is used to convert a range of a file to zeros without issuing data IO. .... The rest of the description is details about the implementation in XFS, so users have some idea what to expect in terms or behaviour. The line that you quoted: This operation is a fast method of overwriting any from the range specified with zeros without removing any blocks or having to write zeros to disk. describes how the implementation is different from hole punching (i.e XFS_IOC_UNRESVSP). All the stuff about unwritten extents is copied directly from the about XFS_IOC_RESVSP preallocation description to provide consistent information in the man page. The XFS_IOC_ZERO_RANGE man page is not a requirements specification - it's user-level documentation. Yes, it describes the implementation, but does not convey any of the reasons that the functionality was implemented that way. Hence using that as the requirements spec for equivalent fallocate functionality will miss the mark... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html