xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 6/6] xfs: collapse range is delalloc challenged.
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 10 Apr 2014 03:44:18 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1397106053-7489-7-git-send-email-david@xxxxxxxxxxxxx>
References: <1397106053-7489-1-git-send-email-david@xxxxxxxxxxxxx> <1397106053-7489-7-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
> -            *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@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>