On Fri, Oct 11, 2019 at 05:29:54PM -0700, Darrick J. Wong wrote: > On Fri, Oct 11, 2019 at 03:03:15PM +0200, Christoph Hellwig wrote: > > If we always have to write out of place preallocating blocks is > > pointless. We already check for this in the normal falloc path, but > > the check was missig in the legacy ALLOCSP path. > > This function handles other things than preallocation, such as > XFS_IOC_ZERO_RANGE and XFS_IOC_UNRESVSP, which call xfs_zero_file_space > and xfs_free_file_space, respectively. We don't prohibit fallocate > from calling those two functions on an always_cow inode, so why do that > here? True. I actually have a patch in my tree that switches those to be handled in the core so that they enter XFS through ->fallocate. It didn't make any sense to send this patch before that other change, sorry.