1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-16 23:33:16 +03:00

devices: handle partscan loop devices

Treat loop device created with 'losetup -P' as regular
partitioned device - so if it has partition table,
prevent its usage in commands like 'pvcreate'.

Before 'pvcreate /dev/loop0' could have erased and formated as PV,
after this patch, device is filtered out and cannot be used.
This commit is contained in:
Zdenek Kabelac
2016-06-01 16:39:47 +02:00
parent 3d333e5a29
commit d37a26b680
3 changed files with 45 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ struct dev_types {
int emcpower_major;
int power2_major;
int dasd_major;
int loop_major;
struct dev_type_def dev_type_array[NUMBER_OF_MAJORS];
};