This exists using lvm with the latest 8.1 kernel as well. [root@hayes-01 ~]# lvs -a -o +devices Unknown feature in status: 8 208/3072 128 5892/65536 11836 50927 9041 21795 0 1709 0 2 writethrough no_discard_passdown 2 migration_threshold 2048 smq 0 rw - Unknown feature in status: 8 208/3072 128 5892/65536 11836 50927 9041 21795 0 1709 0 2 writethrough no_discard_passdown 2 migration_threshold 2048 smq 0 rw - LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices [block_cache] cache_sanity Cwi---C--- 4.00g 8.99 6.77 0.00 block_cache_cdata(0) [block_cache_cdata] cache_sanity Cwi-ao---- 4.00g /dev/sdh1(0) [block_cache_cmeta] cache_sanity ewi-ao---- 12.00m /dev/sdh1(1024) block_io_origin cache_sanity owi-aoC--- 15.00g [block_cache] [block_io_origin_corig] 8.99 6.77 0.00 block_io_origin_corig(0) [block_io_origin_corig] cache_sanity owi-aoC--- 15.00g /dev/sdd1(0) block_snap16 cache_sanity swi-aos--- 3.00g block_io_origin 13.24 /dev/sdd1(3843) [lvol0_pmspare] cache_sanity ewi------- 12.00m /dev/sdd1(3840) 4.18.0-87.el8.x86_64 kernel-4.18.0-87.el8 BUILT: Mon May 13 12:40:49 CDT 2019 lvm2-2.03.02-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 lvm2-libs-2.03.02-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 lvm2-dbusd-2.03.02-6.el8 BUILT: Fri Feb 22 04:50:28 CST 2019 lvm2-lockd-2.03.02-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-libs-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-event-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-event-libs-1.02.155-6.el8 BUILT: Fri Feb 22 04:47:54 CST 2019 device-mapper-persistent-data-0.7.6-1.el8 BUILT: Sun Aug 12 04:21:55 CDT 2018
Seems the kernel has been 'enhanced' with new reported feature 'no_discard_passdown' - and lvm2 doens't know about it yet. So it reports the 'unknown' feature. Patch is needed to enhance libdm API to understand (and report) this bit of info. Requires relatively 'low amount' of work to fix this - but it's not a one-liner patch. If the lvm2 should also support setting this feature - it's a further enhancement.
I assume 'no_discard_passdown' got set as a side-effect of the underlying origin device not supporting discards. As for missing the need to support this feature.. sorry: commit de7180ff908b2bc0342e832dbdaa9a5f1ecaa33a Author: Mike Snitzer <snitzer> Date: Mon Feb 25 11:07:10 2019 -0500 dm cache: add support for discard passdown to the origin device DM cache now defaults to passing discards down to the origin device. User may disable this using the "no_discard_passdown" feature when creating the cache device. If the cache's underlying origin device doesn't support discards then passdown is disabled (with warning). Similarly, if the underlying origin device's max_discard_sectors is less than a cache block discard passdown will be disabled (this is required because sizing of the cache internal discard bitset depends on it). Signed-off-by: Mike Snitzer <snitzer>
Upstream commit into stable branch enhances lvm to report new field and understand report feature: lvs -o+kernel-discards will show if no_discard_passdown is present as 'nopassdown' Associated test-case: https://www.redhat.com/archives/lvm-devel/2019-June/msg00008.html
Actually the patch reference of the fixing commit is missing in comment 4: stable branch 2.02/RH7.7: https://www.redhat.com/archives/lvm-devel/2019-June/msg00006.html Cherry-pick of upstream master commit: https://www.redhat.com/archives/lvm-devel/2019-June/msg00003.html
This is already fixed in version included in rhel-8.1