Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d56e400d448c79a269591…
Commit: d56e400d448c79a269591ac065e087bc2cc69609
Parent: f2b856c9940cf3b4cf4bb35bf1a145a8f5f76e13
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 29 17:25:38 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jul 2 10:25:35 2018 +0200
device_mapper: deactive new nodes when load fails
When node loading fails, there is not much the caller can do,
since there is 'unknown' set of devices preloaded.
Only suspend during preload knows future precommitted 'metadata',
so it's non-trivial to drop 'preloaded' entries with any later call.
However dm tree tracks newly loaded entries - so in this case it
may simplify the recovery path by dropping preloaded entries so
they are not leaked in the DM table.
---
device_mapper/libdm-deptree.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c
index bb552b6..4609796 100644
--- a/device_mapper/libdm-deptree.c
+++ b/device_mapper/libdm-deptree.c
@@ -2877,8 +2877,14 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
* insufficient to remove those - only the node
* encountering the table load failure is removed.
*/
- if (node_created && !_remove_node(child))
- return_0;
+ if (node_created) {
+ if (!_remove_node(child))
+ return_0;
+ if (!dm_udev_wait(dm_tree_get_cookie(dnode)))
+ stack;
+ dm_tree_set_cookie(dnode, 0);
+ (void) _dm_tree_revert_activated(child);
+ }
return_0;
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f2b856c9940cf3b4cf4bb…
Commit: f2b856c9940cf3b4cf4bb35bf1a145a8f5f76e13
Parent: 2bb9627d01dc138c56d0262f918462324782d3c7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 29 11:25:08 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jul 2 10:24:23 2018 +0200
lv_manip: do not check extents for any virtual target
Allow creation of any virtual segment type with just --virtualsize
specified without any real extent size give.
TODO: likely --type error,zero might be later enhanced to use -V
(along with -L) - but since those targets do not allocate real
space, supporting -V makes sense with them.
---
lib/metadata/lv_manip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index fc55c98..a382e27 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -7427,7 +7427,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
lp->extents = _round_to_stripe_boundary(vg, lp->extents, lp->stripes, 1);
- if (!lp->extents && !seg_is_thin_volume(lp)) {
+ if (!lp->extents && !seg_is_virtual(lp)) {
log_error(INTERNAL_ERROR "Unable to create new logical volume with no extents.");
return NULL;
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ed3428b7ed5386b508e76…
Commit: ed3428b7ed5386b508e76a403f2b11c5903d3d0f
Parent: 0bae9a1bffe34170569ce37bd7effbdfe0603fa1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Jun 30 11:05:14 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jul 2 10:24:20 2018 +0200
memlock: extend exception list
Amound of linked libraries grows.
Most of them we don't need to lock in, since we are not using
them in locked section, so skip locking them in memory.
---
WHATS_NEW | 1 +
lib/mm/memlock.c | 19 +++++++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index d90ff3a..4919f24 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 3.0.0
=============
+ Extend list of non-memlocked areas with newly linked libs.
Enhance vgcfgrestore to check for active LVs in restored VG.
Configure supports --disable-silent-rules for verbose builds.
Fix unmonitoring of merging snapshots.
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index 9ebf96d..aa47d66 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -105,23 +105,30 @@ static const char * const _blacklist_maps[] = {
"/LC_MESSAGES/",
"gconv/gconv-modules.cache",
"/ld-2.", /* not using dlopen,dlsym during mlock */
+ "/libaio.so.", /* not using aio during mlock */
"/libattr.so.", /* not using during mlock (udev) */
- "/libblkid.so.", /* not using lzma during mlock (selinux) */
+ "/libblkid.so.", /* not using blkid during mlock (udev) */
"/libbz2.so.", /* not using during mlock (udev) */
- "/libcap.so.", /* not using during mlock (udev) */
+ "/libcap.so.", /* not using during mlock (systemd) */
+ "/libdl-", /* not using dlopen,dlsym during mlock */
"/libdw-", /* not using during mlock (udev) */
"/libelf-", /* not using during mlock (udev) */
- "/liblzma.so.", /* not using lzma during mlock (selinux) */
+ "/libgcrypt.so.", /* not using during mlock (systemd) */
+ "/libgpg-error.so.", /* not using gpg-error during mlock (systemd) */
+ "/liblz4.so.", /* not using lz4 during mlock (systemd) */
+ "/liblzma.so.", /* not using lzma during mlock (systemd) */
+ "/libmount.so.", /* not using mount during mlock (udev) */
"/libncurses.so.", /* not using ncurses during mlock */
- "/libpcre.so.", /* not using pcre during mlock (selinux) */
+ "/libpcre.so.", /* not using pcre during mlock (selinux) */
+ "/libpcre2-", /* not using pcre during mlock (selinux) */
"/libreadline.so.", /* not using readline during mlock */
- "/libresolv-", /* not using during mlock (udev) */
+ "/libresolv-", /* not using during mlock (udev) */
"/libselinux.so.", /* not using selinux during mlock */
"/libsepol.so.", /* not using sepol during mlock */
+ "/libsystemd.so.", /* not using systemd during mlock */
"/libtinfo.so.", /* not using tinfo during mlock */
"/libudev.so.", /* not using udev during mlock */
"/libuuid.so.", /* not using uuid during mlock (blkid) */
- "/libdl-", /* not using dlopen,dlsym during mlock */
"/libz.so.", /* not using during mlock (udev) */
"/etc/selinux", /* not using selinux during mlock */
/* "/libdevmapper-event.so" */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0bae9a1bffe34170569ce…
Commit: 0bae9a1bffe34170569ce37bd7effbdfe0603fa1
Parent: b55d30956d77afec7a985132225d5b64d072b598
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Jun 30 10:35:08 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Jul 2 10:21:42 2018 +0200
locking: memory locking ONLY with suspending reason
It's important to lock memory beforo running SUSPEND ioctl - but whole
lvm preload runs in memory unlocked environment - as in this phase
memory allocation is allowed and is meant to happen.
Once all targets are preload and ready (confirmed from all targets)
we start suspending tree - and here the memory allocation (or i.e.
opening files) is no longer allowed - as it may cause kernel deadlock.
---
lib/mm/memlock.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index 65f13c4..9ebf96d 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -604,8 +604,7 @@ static void _unlock_mem_if_possible(struct cmd_context *cmd)
void critical_section_inc(struct cmd_context *cmd, const char *reason)
{
if (!_critical_section &&
- ((strcmp(reason, "suspending") == 0) ||
- (strcmp(reason, "locking for suspend") == 0))) {
+ (strcmp(reason, "suspending") == 0)) {
/*
* Profiles are loaded on-demand so make sure that before
* entering the critical section all needed profiles are