!2 sync bugfix patches
Merge pull request !2 from openeuler-storage/local
This commit is contained in:
commit
01822b0625
@ -0,0 +1,27 @@
|
|||||||
|
From 4e7c9c0e627d9814f0502488fb830fc47b6a71e0 Mon Sep 17 00:00:00 2001
|
||||||
|
Date: Wed, 11 Sep 2019 01:35:09 +0800
|
||||||
|
Subject: [PATCH] lvm2: revert to use label_read in lvmetad_pvscan_single
|
||||||
|
|
||||||
|
reason: In e3e5beec74ac0037917f5e9a2693c6ccb16debac of stable-2.02
|
||||||
|
branch, it reduce scan disk.It may lead to the metadate cache
|
||||||
|
outdate when send pv_found to lvmetad.Revert it by calling
|
||||||
|
label_read in lvmetad_pvscan_single
|
||||||
|
---
|
||||||
|
lib/cache/lvmetad.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
|
||||||
|
index 4b1b095..80aee66 100644
|
||||||
|
--- a/lib/cache/lvmetad.c
|
||||||
|
+++ b/lib/cache/lvmetad.c
|
||||||
|
@@ -2256,6 +2256,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ label_read(dev);
|
||||||
|
if (!(info = lvmcache_info_from_pvid(dev->pvid, dev, 0))) {
|
||||||
|
log_print_unless_silent("No PV info found on %s for PVID %s.", dev_name(dev), dev->pvid);
|
||||||
|
if (!lvmetad_pv_gone_by_dev(dev))
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
24
6039-bcache-Fix-memory-leak.patch
Normal file
24
6039-bcache-Fix-memory-leak.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From b79f1e176f013167ca9798efb55eaf048d64e042 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marian Csontos <mcsontos@redhat.com>
|
||||||
|
Date: Thu, 4 Apr 2019 10:18:07 +0200
|
||||||
|
Subject: [PATCH] bcache: Fix memory leak
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/device/bcache.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/lib/device/bcache.c b/lib/device/bcache.c
|
||||||
|
index 7384a32..f64931f 100644
|
||||||
|
--- a/lib/device/bcache.c
|
||||||
|
+++ b/lib/device/bcache.c
|
||||||
|
@@ -411,6 +411,7 @@ static bool _sync_issue(struct io_engine *ioe, enum dir d, int fd,
|
||||||
|
(unsigned long long)offset,
|
||||||
|
(unsigned long long)nbytes,
|
||||||
|
(unsigned long long)_last_byte_offset);
|
||||||
|
+ free(io);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
29
6040-cov-release-iterator-on-error-path.patch
Normal file
29
6040-cov-release-iterator-on-error-path.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 09aafb61e31c3781530795057c87afaeb53a2bd4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||||
|
Date: Tue, 25 Jun 2019 15:37:01 +0200
|
||||||
|
Subject: [PATCH] cov: release iterator on error path
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/label/label.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/label/label.c b/lib/label/label.c
|
||||||
|
index 4f8e135..9a3f8df 100644
|
||||||
|
--- a/lib/label/label.c
|
||||||
|
+++ b/lib/label/label.c
|
||||||
|
@@ -866,8 +866,11 @@ int label_scan(struct cmd_context *cmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((dev = dev_iter_get(iter))) {
|
||||||
|
- if (!(devl = dm_zalloc(sizeof(*devl))))
|
||||||
|
+ if (!(devl = dm_zalloc(sizeof(*devl)))) {
|
||||||
|
+ log_error("Failed to allocated device list.");
|
||||||
|
+ dev_iter_destroy(iter);
|
||||||
|
return 0;
|
||||||
|
+ }
|
||||||
|
devl->dev = dev;
|
||||||
|
dm_list_add(&all_devs, &devl->list);
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
31
6041-cov-check-result-of-dev_read_bytes.patch
Normal file
31
6041-cov-check-result-of-dev_read_bytes.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 862899cc88e1697211d478de58b2ddc0eaec9cd9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||||
|
Date: Tue, 25 Jun 2019 14:50:05 +0200
|
||||||
|
Subject: [PATCH] cov: check result of dev_read_bytes
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/format_text/format-text.c | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
|
||||||
|
index 1a6c3a3..9b08e14 100644
|
||||||
|
--- a/lib/format_text/format-text.c
|
||||||
|
+++ b/lib/format_text/format-text.c
|
||||||
|
@@ -1224,8 +1224,12 @@ int read_metadata_location_summary(const struct format_type *fmt,
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(namebuf, 0, sizeof(namebuf));
|
||||||
|
- if (!dev_read_bytes(dev_area->dev, dev_area->start + rlocn->offset, NAME_LEN, namebuf))
|
||||||
|
- stack;
|
||||||
|
+ if (!dev_read_bytes(dev_area->dev, dev_area->start + rlocn->offset, NAME_LEN, namebuf)) {
|
||||||
|
+ log_error("Can't read metadata location on %s at %llu.",
|
||||||
|
+ dev_name(dev_area->dev),
|
||||||
|
+ (unsigned long long)(dev_area->start + rlocn->offset));
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
while (namebuf[len] && !isspace(namebuf[len]) && namebuf[len] != '{' &&
|
||||||
|
len < (NAME_LEN - 1))
|
||||||
|
len++;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
27
6042-cov-check-for-socket_path-being-set.patch
Normal file
27
6042-cov-check-for-socket_path-being-set.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 5cf1c61152bfd5f1eef7f49509a877090f4cc26f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||||
|
Date: Tue, 25 Jun 2019 15:11:05 +0200
|
||||||
|
Subject: [PATCH] cov: check for socket_path being set
|
||||||
|
|
||||||
|
As we check for existince on entering path
|
||||||
|
let's ensure it's there also on exit path.
|
||||||
|
---
|
||||||
|
libdaemon/server/daemon-server.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
|
||||||
|
index 79b54d0..bc58f7b 100644
|
||||||
|
--- a/libdaemon/server/daemon-server.c
|
||||||
|
+++ b/libdaemon/server/daemon-server.c
|
||||||
|
@@ -693,7 +693,7 @@ void daemon_start(daemon_state s)
|
||||||
|
out:
|
||||||
|
/* If activated by systemd, do not unlink the socket - systemd takes care of that! */
|
||||||
|
if (!_systemd_activation && s.socket_fd >= 0)
|
||||||
|
- if (unlink(s.socket_path))
|
||||||
|
+ if (s.socket_path && unlink(s.socket_path))
|
||||||
|
perror("unlink error");
|
||||||
|
|
||||||
|
if (s.socket_fd >= 0)
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
31
6043-cov-clearer-condition-check.patch
Normal file
31
6043-cov-clearer-condition-check.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 8bea252a636ff0de2266c1ce760b3a6047f0ff2f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
||||||
|
Date: Tue, 25 Jun 2019 15:08:10 +0200
|
||||||
|
Subject: [PATCH] cov: clearer condition check
|
||||||
|
|
||||||
|
Make the code more obvious.
|
||||||
|
---
|
||||||
|
lib/activate/activate.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
|
||||||
|
index b3b8a25..561a965 100644
|
||||||
|
--- a/lib/activate/activate.c
|
||||||
|
+++ b/lib/activate/activate.c
|
||||||
|
@@ -2478,7 +2478,12 @@ static int _lv_resume(struct cmd_context *cmd, const char *lvid_s,
|
||||||
|
* If vg_commit() did not happen, lvmcache_get_saved_vg_latest
|
||||||
|
* returns the old metadata which we use to resume LVs.
|
||||||
|
*/
|
||||||
|
- if (!lv && lvid_s) {
|
||||||
|
+ if (!lv) {
|
||||||
|
+ if (!lvid_s) {
|
||||||
|
+ log_error(INTERNAL_ERROR "Requested resume of unindentified resource!");
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
lvid = (const union lvid *) lvid_s;
|
||||||
|
vgid = (const char *)lvid->id[0].uuid;
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
34
lvm2.spec
34
lvm2.spec
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
Name: lvm2
|
Name: lvm2
|
||||||
Version: 2.02.181
|
Version: 2.02.181
|
||||||
Release: 4
|
Release: 5
|
||||||
Epoch: 8
|
Epoch: 8
|
||||||
Summary: Tools for logical volume management
|
Summary: Tools for logical volume management
|
||||||
License: GPLv2 and LGPLv2
|
License: GPLv2 and LGPLv2
|
||||||
@ -90,16 +90,22 @@ Patch6034: 6034-mangenerator-check-strdup-was-successfull.patch
|
|||||||
Patch6035: 6035-cov-ensure-lock_type-is-not-NULL.patch
|
Patch6035: 6035-cov-ensure-lock_type-is-not-NULL.patch
|
||||||
Patch6036: 6036-Remove-checking-for-locked-VGs.patch
|
Patch6036: 6036-Remove-checking-for-locked-VGs.patch
|
||||||
Patch6037: 6037-lvm2-default-allow-changes-with-duplicate-pvs.patch
|
Patch6037: 6037-lvm2-default-allow-changes-with-duplicate-pvs.patch
|
||||||
Patch6038: 6038-lvmetad-fix-sync-cache-to-lvmetad.patch
|
Patch6038: 6038-lvm2-revert-to-use-label_read-in-lvmetad_pvscan_sing.patch
|
||||||
Patch6039: 6039-libdaemon-use-pselect-to-avoid-condition-checking-ra.patch
|
Patch6039: 6039-bcache-Fix-memory-leak.patch
|
||||||
Patch6040: 6040-libdaemon-ensure-threads-are-reaped-before-checking-.patch
|
Patch6040: 6040-cov-release-iterator-on-error-path.patch
|
||||||
Patch6041: 6041-lvmetad-fix-timeout-on-shutdown.patch
|
Patch6041: 6041-cov-check-result-of-dev_read_bytes.patch
|
||||||
Patch6042: 6042-devs-check-for-no-dev-when-dropping-aliases.patch
|
Patch6042: 6042-cov-check-for-socket_path-being-set.patch
|
||||||
Patch6043: 6043-cov-missing-checks-of-syscalls.patch
|
Patch6043: 6043-cov-clearer-condition-check.patch
|
||||||
Patch6044: 6044-cov-ensure-read_ahead-is-available.patch
|
Patch6044: 6044-lvmetad-fix-sync-cache-to-lvmetad.patch
|
||||||
Patch6045: 6045-lvmcache-free-resource-on-error-path.patch
|
Patch6045: 6045-libdaemon-use-pselect-to-avoid-condition-checking-ra.patch
|
||||||
Patch6046: 6046-daemons-check-for-non-zero-thread_id.patch
|
Patch6046: 6046-libdaemon-ensure-threads-are-reaped-before-checking-.patch
|
||||||
Patch6047: 6047-revert-label_scan-remove-extra-label-scan-and-read-f.patch
|
Patch6047: 6047-lvmetad-fix-timeout-on-shutdown.patch
|
||||||
|
Patch6048: 6048-devs-check-for-no-dev-when-dropping-aliases.patch
|
||||||
|
Patch6049: 6049-cov-missing-checks-of-syscalls.patch
|
||||||
|
Patch6050: 6050-cov-ensure-read_ahead-is-available.patch
|
||||||
|
Patch6051: 6051-lvmcache-free-resource-on-error-path.patch
|
||||||
|
Patch6052: 6052-daemons-check-for-non-zero-thread_id.patch
|
||||||
|
Patch6053: 6053-revert-label_scan-remove-extra-label-scan-and-read-f.patch
|
||||||
|
|
||||||
Patch9000: 9000-bugfix-lvm2-add-SSD.patch
|
Patch9000: 9000-bugfix-lvm2-add-SSD.patch
|
||||||
Patch9001: 9001-bugfix-add-timeout-when-fail-to-wait-udev.patch
|
Patch9001: 9001-bugfix-add-timeout-when-fail-to-wait-udev.patch
|
||||||
@ -544,6 +550,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Dec 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 8:2.02.181-5
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:sync bugfix from community
|
||||||
|
|
||||||
* Mon Dec 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 8:2.02.181-4
|
* Mon Dec 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 8:2.02.181-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user