On Fri, 27 Apr 2012 17:14:28 +0300 Alexander Lyakas <alex.bolshoy@xxxxxxxxx> wrote: > Hello, > > what is the reason that in some places (like Detail()), the code tests > for all desc_nrs possible (value read from superblock or MaxDisks > macro): > for (d = 0; d < max_disks; d++) { > disc.number = d; > ioctl(fd, GET_DISK_INFO, &disk) > > and in other places (like Monitor()), the loop goes only up to : > array.raid_disks + array.nr_disks. Bug. > > After all, disk.number (which is rdev->desc_nr in kernel) is merely a > position of the disk entry in the dev_roles[] array in the superblock, > and has no relation to the raid slot of the disk. Shouldn't the code > always check max_disks possible? Yes. Thanks, NeilBrown
Attachment:
signature.asc
Description: PGP signature