mdadm: ioctl(GET_DISK_INFO) question

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

 



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.

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?

Thanks,
  Alex.
--
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