From: Theodore Ts'o Date: Thu, 4 Jul 2019 15:39:45 +0000 (-0400) Subject: e2scrub_all: correctly handle the case where LUKS is stacked on an LV X-Git-Tag: v1.45.3~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73c74fe26eed7ddd6341c71c47b068cd480684a4;p=thirdparty%2Fe2fsprogs.git e2scrub_all: correctly handle the case where LUKS is stacked on an LV We handle the case where an LVM's PV is stacked on top of a dm-crypt device, but not the case where it's the other way around, where a LVM LV contains a LUKS encrypted file system. Fix this oversight. Addresses-Debian-Bug: #931387 Reported-by: Marc Haber Signed-off-by: Theodore Ts'o --- diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in index cdc37ced4..24b2c6810 100644 --- a/scrub/e2scrub_all.in +++ b/scrub/e2scrub_all.in @@ -102,8 +102,9 @@ ls_scan_targets() { if [ -z "$devices" ]; then return 0; fi - lsblk -o NAME,MOUNTPOINT,FSTYPE -P -n -p $devices | \ - grep FSTYPE=\"ext\[234\]\" | while read vars ; do + lsblk -o NAME,MOUNTPOINT,FSTYPE,TYPE -P -n -p $devices | \ + grep FSTYPE=\"ext\[234\]\" | grep TYPE=\"lvm\" | \ + while read vars ; do eval "${vars}" if [ "${scrub_all}" -eq 1 ] || [ -n "${MOUNTPOINT}" ]; then