Re: [PATCH 1/2] xfs: move shutdown out of xfs_trans_ail_delete_bulk

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

 



>  	spin_lock(&ailp->xa_lock);
> -	xfs_trans_ail_delete(ailp, (xfs_log_item_t *)qfs);
> +	error = xfs_trans_ail_delete(ailp, (struct xfs_log_item *)qfs);

please make this a:

	error = xfs_trans_ail_delete(ailp, &qfs->qli_item);

while you're at it.

>  		if (lip->li_flags & XFS_LI_IN_AIL) {
>  			spin_lock(&ailp->xa_lock);
> -			if (lip->li_flags & XFS_LI_IN_AIL)
> -				xfs_trans_ail_delete(ailp, lip);
> -			else
> +			if (lip->li_flags & XFS_LI_IN_AIL) {
> +				int	error = xfs_trans_ail_delete(ailp, lip);
> +				if (error == EFSCORRUPTED)
> +					xfs_force_shutdown(ailp->xa_mount,
> +							SHUTDOWN_CORRUPT_INCORE);
> +			} else

Given that we already have two checks for XFS_LI_IN_AIL around the
call to xfs_trans_ail_delete I don't think we need to handle the error
here.

> @@ -887,8 +892,13 @@ xfs_iflush_abort(
>  		if (iip->ili_item.li_flags & XFS_LI_IN_AIL) {
>  			spin_lock(&ailp->xa_lock);
>  			if (iip->ili_item.li_flags & XFS_LI_IN_AIL) {
> +				int	error;
>  				/* xfs_trans_ail_delete() drops the AIL lock. */
> -				xfs_trans_ail_delete(ailp, (xfs_log_item_t *)iip);
> +				error = xfs_trans_ail_delete(ailp,
> +							(xfs_log_item_t *)iip);
> +				if (error == EFSCORRUPTED)
> +					xfs_force_shutdown(ailp->xa_mount,
> +							SHUTDOWN_CORRUPT_INCORE);

Same argument here.

Also please pass in &iip->>ili_item instead of the cast here.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux