Accepting request 714366 from home:ganghe:branches:openSUSE:Factory
- Fix unknown feature in status message (bsc#1135984) + bug-1135984_cache-support-no_discard_passdown.patch - Fix unknown feature in status message (bsc#1135984) + bug-1135984_cache-support-no_discard_passdown.patch - Fix unknown feature in status message (bsc#1135984) + bug-1135984_cache-support-no_discard_passdown.patch OBS-URL: https://build.opensuse.org/request/show/714366 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=244
This commit is contained in:
parent
d1d2497104
commit
600377c40b
71
bug-1135984_cache-support-no_discard_passdown.patch
Normal file
71
bug-1135984_cache-support-no_discard_passdown.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From adf9bf80a32500b45b37eb24b98fa7c2c933019e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||||
|
Date: Wed, 5 Jun 2019 14:31:34 +0200
|
||||||
|
Subject: [PATCH] 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).
|
||||||
|
---
|
||||||
|
WHATS_NEW | 1 +
|
||||||
|
WHATS_NEW_DM | 1 +
|
||||||
|
lib/metadata/lv.c | 5 +++++
|
||||||
|
libdm/libdevmapper.h | 1 +
|
||||||
|
libdm/libdm-targets.c | 2 ++
|
||||||
|
5 files changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
|
||||||
|
index 2abe42db7..538b292a2 100644
|
||||||
|
--- a/lib/metadata/lv.c
|
||||||
|
+++ b/lib/metadata/lv.c
|
||||||
|
@@ -245,6 +245,11 @@ char *lvseg_kernel_discards_dup_with_info_and_seg_status(struct dm_pool *mem, co
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
s = get_pool_discards_name(d);
|
||||||
|
+ } else if (lvdm->seg_status.type == SEG_STATUS_CACHE) {
|
||||||
|
+ if (lvdm->seg_status.cache->feature_flags &
|
||||||
|
+ DM_CACHE_FEATURE_NO_DISCARD_PASSDOWN) {
|
||||||
|
+ s = "nopassdown";
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(ret = dm_pool_strdup(mem, s))) {
|
||||||
|
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
|
||||||
|
index 19032d775..e885f52ae 100644
|
||||||
|
--- a/libdm/libdevmapper.h
|
||||||
|
+++ b/libdm/libdevmapper.h
|
||||||
|
@@ -1893,6 +1893,7 @@ int dm_tree_node_add_raid_target_with_params_v2(struct dm_tree_node *node,
|
||||||
|
#define DM_CACHE_FEATURE_WRITETHROUGH 0x00000002
|
||||||
|
#define DM_CACHE_FEATURE_PASSTHROUGH 0x00000004
|
||||||
|
#define DM_CACHE_FEATURE_METADATA2 0x00000008 /* cache v1.10 */
|
||||||
|
+#define DM_CACHE_FEATURE_NO_DISCARD_PASSDOWN 0x00000010
|
||||||
|
|
||||||
|
struct dm_config_node;
|
||||||
|
/*
|
||||||
|
diff --git a/libdm/libdm-targets.c b/libdm/libdm-targets.c
|
||||||
|
index 876678943..d0a8b4332 100644
|
||||||
|
--- a/libdm/libdm-targets.c
|
||||||
|
+++ b/libdm/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);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.12.3
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 9 10:00:05 UTC 2019 - ghe@suse.com
|
||||||
|
|
||||||
|
- Fix unknown feature in status message (bsc#1135984)
|
||||||
|
+ bug-1135984_cache-support-no_discard_passdown.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com
|
Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
Patch0001: bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch
|
Patch0001: bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch
|
||||||
Patch0002: bug-1122666_devices-drop-open-error-message.patch
|
Patch0002: bug-1122666_devices-drop-open-error-message.patch
|
||||||
Patch0003: bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch
|
Patch0003: bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch
|
||||||
|
Patch0004: bug-1135984_cache-support-no_discard_passdown.patch
|
||||||
|
|
||||||
# SUSE patches: 1000+ for LVM
|
# SUSE patches: 1000+ for LVM
|
||||||
# Never upstream
|
# Never upstream
|
||||||
@ -76,6 +77,7 @@ Programs and man pages for configuring and using the device mapper.
|
|||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
%patch0003 -p1
|
%patch0003 -p1
|
||||||
|
%patch0004 -p1
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
%patch1002 -p1
|
%patch1002 -p1
|
||||||
%patch1003 -p1
|
%patch1003 -p1
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 9 10:00:05 UTC 2019 - ghe@suse.com
|
||||||
|
|
||||||
|
- Fix unknown feature in status message (bsc#1135984)
|
||||||
|
+ bug-1135984_cache-support-no_discard_passdown.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com
|
Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ Provides: cmirrord = %{version}
|
|||||||
Patch0001: bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch
|
Patch0001: bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch
|
||||||
Patch0002: bug-1122666_devices-drop-open-error-message.patch
|
Patch0002: bug-1122666_devices-drop-open-error-message.patch
|
||||||
Patch0003: bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch
|
Patch0003: bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch
|
||||||
|
Patch0004: bug-1135984_cache-support-no_discard_passdown.patch
|
||||||
|
|
||||||
# SUSE patches: 1000+ for LVM
|
# SUSE patches: 1000+ for LVM
|
||||||
# Never upstream
|
# Never upstream
|
||||||
@ -88,6 +89,7 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
|
|||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
%patch0003 -p1
|
%patch0003 -p1
|
||||||
|
%patch0004 -p1
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
%patch1002 -p1
|
%patch1002 -p1
|
||||||
%patch1003 -p1
|
%patch1003 -p1
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 9 10:00:05 UTC 2019 - ghe@suse.com
|
||||||
|
|
||||||
|
- Fix unknown feature in status message (bsc#1135984)
|
||||||
|
+ bug-1135984_cache-support-no_discard_passdown.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com
|
Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
Patch0001: bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch
|
Patch0001: bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch
|
||||||
Patch0002: bug-1122666_devices-drop-open-error-message.patch
|
Patch0002: bug-1122666_devices-drop-open-error-message.patch
|
||||||
Patch0003: bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch
|
Patch0003: bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch
|
||||||
|
Patch0004: bug-1135984_cache-support-no_discard_passdown.patch
|
||||||
|
|
||||||
# SUSE patches: 1000+ for LVM
|
# SUSE patches: 1000+ for LVM
|
||||||
# Never upstream
|
# Never upstream
|
||||||
@ -96,6 +97,7 @@ Volume Manager.
|
|||||||
%patch0001 -p1
|
%patch0001 -p1
|
||||||
%patch0002 -p1
|
%patch0002 -p1
|
||||||
%patch0003 -p1
|
%patch0003 -p1
|
||||||
|
%patch0004 -p1
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
%patch1002 -p1
|
%patch1002 -p1
|
||||||
%patch1003 -p1
|
%patch1003 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user