IMSM metadata really should be ignored when found on partitions.
commit b31df43682
changed load_super_imsm to not insist on finding a partition if
ignore_hw_compat was set.
Unfortunately this is set for '--assemble' so arrays could get
assembled badly.
The comment says this was to allow e.g. --examine of image files.
A better fixes for this is to change test_partitions to not report
a regular file as being a partition.
The errors from the BLKPG ioctl are:
ENOTTY : not a block device.
EINVAL : not a whole device (probably a partition)
ENXIO : partition doesn't exist (so not a partition)
Reported-by: "David F." <df7729@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
be4a3188f6
commit
357ac10678
|
@ -4423,7 +4423,7 @@ static int load_super_imsm(struct supertype *st, int fd, char *devname)
|
|||
struct intel_super *super;
|
||||
int rv;
|
||||
|
||||
if (!st->ignore_hw_compat && test_partition(fd))
|
||||
if (test_partition(fd))
|
||||
/* IMSM not allowed on partitions */
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue