Re: [PATCH 4/6] xfs: call xfs_flush_unmap_range from xfs_free_file_space

Christoph Hellwig
2024-08-28T04:06:36Z

On Tue, Aug 27, 2024 at 09:03:23AM -0700, Darrick J. Wong wrote:
> On Tue, Aug 27, 2024 at 08:50:48AM +0200, Christoph Hellwig wrote:
> > Call xfs_flush_unmap_range from xfs_free_file_space so that
> > xfs_file_fallocate doesn't have to predict which mode will call it.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Hmm. I /think/ it's ok to shift the xfs_flush_unmap_range after the
> file_modified and some of the other EINVAL bailouts that can happen
> before xfs_free_file_space gets called. Effectively that means that we
> can fail faster now? :)

Yes, failing faster has always been my personal benchmark :)