[PATCH 6/6] xfs: collapse range is delalloc challenged.

Christoph Hellwig hch at infradead.org
Thu Apr 10 05:44:18 CDT 2014


> -	       *current_ext <  XFS_IFORK_NEXTENTS(ip, whichfork)) {
> +	/*
> +	 * There may be delalloc extents in the data fork before the range we
> +	 * are collapsing out, so we cannot
> +	 * use the count of real extents here. Instead we have to calculate it
> +	 * from the incore fork.
> +	 */
> +	total_extents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t);

Between the amount of times we have this calculation opencoded, and the
confusing nature of XFS_IFORK_NEXTENTS it might be time to introduce
a macro to get the proper number of incore extents.

But no need to do this now, so:

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the xfs mailing list