xfs
[Top] [All Lists]

Re: [PATCH 4/7] xfs: kill XLOG_SECTOR_ROUND*()

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 4/7] xfs: kill XLOG_SECTOR_ROUND*()
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 20 Mar 2010 12:48:04 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <201003182254.o2IMs1jH001874@xxxxxxxxxxxxxxxxxxxxxx>
References: <201003182254.o2IMs1jH001874@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
> @@ -82,8 +77,8 @@ xlog_get_bp(
>  
>       if (log->l_sectbb_log) {
>               if (nbblks > 1)
> -                     nbblks += XLOG_SECTOR_ROUNDUP_BBCOUNT(log, 1);
> -             nbblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, nbblks);
> +                     nbblks += xlog_sectbb(log);
> +             nbblks = round_up(nbblks, xlog_sectbb(log));

This arithmetics would benefit greatly from a comment why we're
adding one log block to it and then round it up.

Anyway, patch looks good,


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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