[PATCH 04/12] xfs: combine grant heads into a single 64 bit integer

Christoph Hellwig hch at infradead.org
Mon Dec 20 05:40:20 CST 2010


On Mon, Dec 13, 2010 at 03:44:35PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> Prepare for switching the grant heads to atomic variables by
> combining the two 32 bit values that make up the grant head into a
> single 64 bit variable.  Provide wrapper functions to combine and
> split the grant heads appropriately for calculations and use them as
> necessary.
> 
> Signed-off-by: Dave Chinner <dchinner at redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch at lst.de>

Minor nitpick:

> +	if ((tail_cycle == head_cycle) && (head_bytes >= tail_bytes)) {
> +		free_bytes = log->l_logsize - (head_bytes - tail_bytes);
> +	} else if ((tail_cycle + 1) < head_cycle) {

Lots of superflous braces in the if statements.




More information about the xfs mailing list