[PATCH v2] xfs: improve xfs_iext_destroy() by freeing extent indirection array directly
Dave Chinner
david at fromorbit.com
Tue Sep 24 18:45:37 CDT 2013
On Tue, Sep 24, 2013 at 10:06:03PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu at oracle.com>
>
> To free the incore file extents stores at an indirection array, we
> call the common routine xfs_iext_irec_remove() to remove a record
> from the array one at a time in reverse order, which will resize an
> extent indirection array repeatedly according to the array size.
>
> This is inefficient for dealing with a file with thousands of incore
> extent records stores at indirection arrays.
>
> This patch improve this kind of things by freeing the extent records
> from the indirection array directly so that we can get benefits for
> reducing the overhead of alloc/free buffers which is depending on the
> number of extents records.
>
> Signed-off-by: Jie Liu <jeff.liu at oracle.com>
Looks good.
Reviewed-by: Dave Chinner <dchinner at redhat.com>
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list