Re: [PATCH 6/8] xfs: make xfs_inode_item_size idempotent

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

 



On Mon, Feb 20, 2012 at 07:38:30PM -0500, Christoph Hellwig wrote:
> Move all code messing with the inode log item flags into xfs_inode_item_format
> to make sure xfs_inode_item_size really only calculates the the number of
> vectors, but doesn't modify any state of the inode item.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks ok so:

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

One minor cleanup:

>  	case XFS_DINODE_FMT_LOCAL:
> -		ASSERT(!(iip->ili_format.ilf_fields &
> -			 (XFS_ILOG_ABROOT | XFS_ILOG_AEXT)));
> -		if (iip->ili_format.ilf_fields & XFS_ILOG_ADATA) {
> +		iip->ili_format.ilf_fields &=
> +			~(XFS_ILOG_AEXT | XFS_ILOG_ABROOT);
> +
> +		if ((iip->ili_format.ilf_fields & XFS_ILOG_ADATA) &&
> +		    ip->i_afp->if_bytes > 0) {
>  			ASSERT(ip->i_afp->if_bytes > 0);

That assert can go - it's checked in the if statement now.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
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