summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-04-29 16:09:59 +1000
committerNeilBrown <neilb@suse.de>2010-04-29 16:09:59 +1000
commit691c6ee1b6bb77bc44a5474d856771b0aec9882d (patch)
tree64b9b56a0662289302e13307ad6dc1d1289941b2 /super-intel.c
parent4eb269706f403d2424166683688f0a41d893c1c3 (diff)
downloadmdadm-691c6ee1b6bb77bc44a5474d856771b0aec9882d.tar.gz
mdadm-691c6ee1b6bb77bc44a5474d856771b0aec9882d.tar.xz
mdadm-691c6ee1b6bb77bc44a5474d856771b0aec9882d.zip
IMSM/DDF: don't recognised these metadata on partitions.
These metadata are not expected on partitions, and they have no way of differentiation whether which is correct if they are found both on the device and on the last partition. So if the device is a partition, refuse to read the metadata. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c
index 677396c..bdd7a96 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2798,6 +2798,10 @@ static int load_super_imsm(struct supertype *st, int fd, char *devname)
return 0;
#endif
+ if (test_partition(fd))
+ /* IMSM not allowed on partitions */
+ return 1;
+
free_super_imsm(st);
super = alloc_super();