On Thu, Aug 03, 2017 at 07:28:17PM -0700, Dan Williams wrote: > diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c > index fe0f8f7f4bb7..46d8eb9e19fc 100644 > --- a/fs/xfs/xfs_bmap_util.c > +++ b/fs/xfs/xfs_bmap_util.c > @@ -1393,6 +1393,107 @@ xfs_zero_file_space( > > } > > +/* Return 1 if hole detected, 0 if not, and < 0 if fail to determine */ > +STATIC int > +xfs_file_has_holes( > + struct xfs_inode *ip) > +{ Why do we need this function? We've just run xfs_alloc_file_space() across the entire range we are sealing, so we've already guaranteed that it won't have holes in it. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx