Re: extremely tiny race window in raid1

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

 



On Tuesday January 11, ptb@xxxxxxxxxxxxxx wrote:
>  From raid1.c in 2.6.8.1:
> 
>          * inc refcount on their rdev.  Record them by setting
>          * bios[x] to bio
>          */
> -       disks = conf->raid_disks;
>         spin_lock_irq(&conf->device_lock);
> +       disks = conf->raid_disks;
>         for (i = 0;  i < disks; i++) {
>                 if (conf->mirrors[i].rdev &&
>                     !conf->mirrors[i].rdev->faulty) {
> 
> (there are plenty of other places where small things like that happen,
> and normally I say "shucks, he'll spot it and correct it, and it's no
> biggie anyway", but my conscience is getting at me to report at least
> some of them).

Patches are always welcome (preferably against the most recent kernel,
and with headers that make it easy to apply) -- I'm sure I miss plenty
of stuff.

This one, however, is not needed.  raid_disks simply cannot change at
this point.
It is only changed by raid1_reshape, and that raises a barrier to
new requests and then waits for all current requests to complete
before changing raid_disks.

NeilBrown
-
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