master - scanning: skip more private devices
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1bd57b4c1d4a6d715d24ab5dc162c350b97fc613 Commit: 1bd57b4c1d4a6d715d24ab5dc162c350b97fc613 Parent: e095586d9e280877be336ed312368e657114ce14 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Mar 9 14:49:38 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Mar 13 12:57:33 2018 +0100
scanning: skip more private devices
Just like lvm2 has internal devices like _tdata which is using UUID with suffix, there is similar private type of device for crypto device where they are using CRYPT-TEMP uuid prefix.
Also ignore stratis.
--- WHATS_NEW | 1 + lib/activate/dev_manager.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.178 - ===================================== + Skip private crypto and stratis devices. Skip frozen raid devices from scanning. Activate RAID SubLVs on read_only_volume_list readwrite Offer convenience type raid5_n converting to raid10
lib/activate/dev_manager.c +13 -0
@@ -32,6 +32,8 @@#define MAX_TARGET_PARAMSIZE 50000#define LVM_UDEV_NOSCAN_FLAG DM_SUBSYSTEM_UDEV_FLAG0 +#define CRYPT_TEMP "CRYPT-TEMP" +#define STRATIS "stratis-" typedef enum { PRELOAD,
@@ -637,6 +639,17 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check) } } +if (check.check_reserved && uuid && + (!strncmp (uuid,CRYPT_TEMP ,sizeof (CRYPT_TEMP ) -1 ) || + !strncmp (uuid,STRATIS ,sizeof (STRATIS ) -1 ))) { +/* Skip private crypto devices */ +log_debug_activation ("%s: Reserved uuid %s on %s device %s not usable." , +dev_name (dev), uuid, + uuid[0 ] =='C' ?"crypto" :"stratis" , + name); + goto out; + } +/* FIXME Also check for mpath no paths */ do { next = dm_get_next_target(dmt, next, &start, &length,