summaryrefslogtreecommitdiff
path: root/device_mapper/libdm-targets.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2019-06-05 14:31:34 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2019-06-05 15:48:41 +0200
commite3c4ab0cc788b0190ab58446189c2d6b07a27b98 (patch)
treecf22baba14683aaa770557eccd8842564ca9e286 /device_mapper/libdm-targets.c
parentd18e491f6890e15a677e8189de0699ccc7412f16 (diff)
downloadlvm2-e3c4ab0cc788b0190ab58446189c2d6b07a27b98.tar.gz
cache: support no_discard_passdown
Recent kernel version from kernel commit: de7180ff908b2bc0342e832dbdaa9a5f1ecaa33a started to report in cache status line new flag: no_discard_passdown Whenever lvm spots unknown status it reports: Unknown feature in status: So add reconginzing this feature flag and also report this with 'lvs -o+kernel_discards' When no_discard_passdown is found in status 'nopassdown' gets reported for this field (roughly matching what we report for thin-pools).
Diffstat (limited to 'device_mapper/libdm-targets.c')
-rw-r--r--device_mapper/libdm-targets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/device_mapper/libdm-targets.c b/device_mapper/libdm-targets.c
index 607f429e9..d82e28b13 100644
--- a/device_mapper/libdm-targets.c
+++ b/device_mapper/libdm-targets.c
@@ -296,6 +296,8 @@ int dm_get_status_cache(struct dm_pool *mem, const char *params,
s->feature_flags |= DM_CACHE_FEATURE_PASSTHROUGH;
else if (!strncmp(p, "metadata2 ", 10))
s->feature_flags |= DM_CACHE_FEATURE_METADATA2;
+ else if (!strncmp(p, "no_discard_passdown ", 20))
+ s->feature_flags |= DM_CACHE_FEATURE_NO_DISCARD_PASSDOWN;
else
log_error("Unknown feature in status: %s", params);