Re: [PATCH v9 11/24] xfs: Pull up xfs_attr_rmtval_invalidate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 30, 2020 at 03:50:03PM -0700, Allison Collins wrote:
> This patch pulls xfs_attr_rmtval_invalidate out of
> xfs_attr_rmtval_remove and into the calling functions.  Eventually
> __xfs_attr_rmtval_remove will replace xfs_attr_rmtval_remove when we
> introduce delayed attributes.  These functions are exepcted to return
> -EAGAIN when they need a new transaction.  Because the invalidate does
> not need a new transaction, we need to separate it from the rest of the
> function that does.  This will enable __xfs_attr_rmtval_remove to
> smoothly replace xfs_attr_rmtval_remove later.
> 
> Signed-off-by: Allison Collins <allison.henderson@xxxxxxxxxx>

Looks good to me,
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/libxfs/xfs_attr.c        | 12 ++++++++++++
>  fs/xfs/libxfs/xfs_attr_remote.c |  3 ---
>  2 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index 0fc6436..4fdfab9 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -669,6 +669,10 @@ xfs_attr_leaf_addname(
>  		args->rmtblkcnt = args->rmtblkcnt2;
>  		args->rmtvaluelen = args->rmtvaluelen2;
>  		if (args->rmtblkno) {
> +			error = xfs_attr_rmtval_invalidate(args);
> +			if (error)
> +				return error;
> +
>  			error = xfs_attr_rmtval_remove(args);
>  			if (error)
>  				return error;
> @@ -1027,6 +1031,10 @@ xfs_attr_node_addname(
>  		args->rmtblkcnt = args->rmtblkcnt2;
>  		args->rmtvaluelen = args->rmtvaluelen2;
>  		if (args->rmtblkno) {
> +			error = xfs_attr_rmtval_invalidate(args);
> +			if (error)
> +				return error;
> +
>  			error = xfs_attr_rmtval_remove(args);
>  			if (error)
>  				return error;
> @@ -1152,6 +1160,10 @@ xfs_attr_node_removename(
>  		if (error)
>  			goto out;
>  
> +		error = xfs_attr_rmtval_invalidate(args);
> +		if (error)
> +			return error;
> +
>  		error = xfs_attr_rmtval_remove(args);
>  		if (error)
>  			goto out;
> diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
> index 02d1a44..f770159 100644
> --- a/fs/xfs/libxfs/xfs_attr_remote.c
> +++ b/fs/xfs/libxfs/xfs_attr_remote.c
> @@ -685,9 +685,6 @@ xfs_attr_rmtval_remove(
>  
>  	trace_xfs_attr_rmtval_remove(args);
>  
> -	error = xfs_attr_rmtval_invalidate(args);
> -	if (error)
> -		return error;
>  	/*
>  	 * Keep de-allocating extents until the remote-value region is gone.
>  	 */
> -- 
> 2.7.4
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux