Re: [PATCH 002 of 2] md: Improve the is_mddev_idle test

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

 



On Thu, 10 May 2007 16:22:31 +1000 NeilBrown <neilb@xxxxxxx> wrote:

> The test currently looks for any (non-fuzz) difference, either
> positive or negative.  This clearly is not needed.  Any non-sync
> activity will cause the total sectors to grow faster than the sync_io
> count (never slower) so we only need to look for a positive differences.
> 
> ...
>
> --- .prev/drivers/md/md.c	2007-05-10 15:51:54.000000000 +1000
> +++ ./drivers/md/md.c	2007-05-10 16:05:10.000000000 +1000
> @@ -5095,7 +5095,7 @@ static int is_mddev_idle(mddev_t *mddev)
>  		 *
>  		 * Note: the following is an unsigned comparison.
>  		 */
> -		if ((curr_events - rdev->last_events + 4096) > 8192) {
> +		if ((long)curr_events - (long)rdev->last_events > 4096) {
>  			rdev->last_events = curr_events;
>  			idle = 0;

In which case would unsigned counters be more appropriate?
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux