[Top] [All Lists]

Re: [PATCH 7/8] xfs: use blocks for storing the desired IO size

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 7/8] xfs: use blocks for storing the desired IO size
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Fri, 30 Mar 2012 14:13:35 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1333023835-12856-8-git-send-email-david@xxxxxxxxxxxxx>
References: <1333023835-12856-1-git-send-email-david@xxxxxxxxxxxxx> <1333023835-12856-8-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 03/29/12 07:23, Dave Chinner wrote:
Now that we pass block counts everywhere, and index buffers by block
number and length in units of blocks, convert the desired IO size
into block counts rather than bytes. Convert the code to use block
counts, and those that need byte counts get converted at the time of

Rename the b_desired_count variable to something closer to it's
purpose - b_io_length - as it is only used to specify the length of
an IO for a subset of the buffer.  The only time this is used is for
log IO - both writing iclogs and during log recovery. In all other
cases, the b_io_length matches b_length, and hence a lot of code
confuses the two. e.g. the buf item code uses the io count
exclusively when it should be using the buffer length. Fix these
apprpriately as they are found.

Also, remove the XFS_BUF_{SET_}COUNT() macros that are just wrappers
around the desired IO length. They only serve to make the code
shouty loud, don't actually add any real value, and are often used

Signed-off-by: Dave Chinner<dchinner@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig<hch@xxxxxx>

Looks good.

Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>