Re: [PATCH 2/4] xfs: kill b_file_offset

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

 



Looks good.

Reviewed-by: Christoph Hellwig <hch@xxxxxx>


Minor comments below:

On Wed, Mar 28, 2012 at 04:19:16PM +1100, Dave Chinner wrote:
> -	end = bp->b_file_offset + bp->b_buffer_length;
> -	page_count = xfs_buf_btoc(end) - xfs_buf_btoct(bp->b_file_offset);
> +	end = BBTOB(bp->b_bn) + bp->b_buffer_length;
> +	page_count = xfs_buf_btoc(end) - xfs_buf_btoct(BBTOB(bp->b_bn));

Btw, xfs_buf_btoc and xfs_buf_btoct are more remoal candidates,
they actually make the code harder to read compared to using the
opencoded arithmetics..

>  	numbytes = numblks << BBSHIFT;
>  
>  	/* Check for IOs smaller than the sector size / not sector aligned */
>  	ASSERT(!(numbytes < (1 << btp->bt_sshift)));
> -	ASSERT(!(offset & (xfs_off_t)btp->bt_smask));
> +	ASSERT(!(BBTOB(blkno) & (xfs_off_t)btp->bt_smask));

I don't think it makes sense to keep this assert, given that the
return value from BBTOB is aligned by defintion.

_______________________________________________
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