Something wrong with __prep_thunderdome in super-intel.c

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

 



Hi Dan,

 I think you were the original author of imsm_thunderdome and
 __prep_thunderdome - yes?

 I found a case (thank to the test suite) where it isn't working correctly,

 If I have a container with 2 devices, and the second one is failed, then
 imsm_thunderdome returns NULL.

 __prep_thunderdome sees the first and adds it to the table of superblocks.
 Then it sees the second notices the family_num and checksum are the same, and
 so replaces the first with the second in the table.

 Then in imsm_thunderdome, d->serial is full of 'nul', so disk_list_get
 doesn't find anything so the super_table becomes empty and nothing works.

 So it could be:
    load_and_parse_mpb is wrong for putting the nul serial in there
    __prep_thunderdome is wrong for thinking the two are equivalent
    imsm_thunderdome is wrong for giving up when just one device isn't found

 and I really don't know which.

You can easily reproduce with

  ./mdadm -CR /dev/md/imsm -e imsm -n 2 /dev/loop[01]
  ./mdadm -CR /dev/md/r1 -l1 -n2 /dev/md/imsm
  ./mdadm /dev/md/r1 -f /dev/loop1
  ./mdadm -E /dev/md/imsm

and notice that nothing gets printed.
If you fail loop0 instead, it works properly.

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