Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a3eb6ba425773224076c4…
Commit: a3eb6ba425773224076c41aabc3c490a6a016ee6
Parent: e26c21cb8d5841141dcfdfc77f46da1108a81255
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Aug 18 14:31:27 2022 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 19 14:56:57 2022 +0200
mm: remove libaio from being skipped
Since libaio is now used also in critical section,
keep the libaio locked in memory.
---
lib/mm/memlock.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index 3d1a3927c..f43bacdcd 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -105,7 +105,6 @@ 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 blkid during mlock (udev) */
"/libbz2.so.", /* not using during mlock (udev) */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e26c21cb8d5841141dcfd…
Commit: e26c21cb8d5841141dcfdfc77f46da1108a81255
Parent: 309df239e3ee474f3a5337f8fa3c0a1f7b0a89e5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Aug 19 14:48:01 2022 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 19 14:56:55 2022 +0200
vdo: extend volume and pool without flush
When the volume size is extended, there is no need to flush
IO operations (nothing can be targeting new space yet).
VDO target is supported as target that can safely work with
this condition.
Such support is also needed, when extending VDOPOOL size
while the pool is reaching its capacity - since this allows
to continue working without reaching 'out-of-space' condition
due to flushing of all in flight IO.
---
WHATS_NEW | 1 +
lib/activate/activate.c | 6 +++++-
lib/activate/dev_manager.c | 2 ++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6e9a3fa1d..fac295336 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.17 -
===============================
+ Extend VDO and VDOPOOL without flushing and locking fs.
Add --valuesonly option to lvmconfig to print only values without keys.
Updates configure with recent autoconf tooling.
Fix lvconvert --test --type vdo-pool execution.
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index db5f08b11..a92fbb8e1 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -2141,7 +2141,11 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
* TODO: Relax this limiting condition further */
if (!flush_required &&
(lv_is_pvmove(lv) || pvmove_lv ||
- (!lv_is_mirror(lv) && !lv_is_thin_pool(lv) && !lv_is_thin_volume(lv)))) {
+ (!lv_is_mirror(lv) &&
+ !lv_is_thin_volume(lv) &&
+ !lv_is_thin_pool(lv) &&
+ !lv_is_vdo(lv) &&
+ !lv_is_vdo_pool(lv)))) {
log_debug("Requiring flush for LV %s.", display_lvname(lv));
flush_required = 1;
}
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 8cb31008e..2bfd275fd 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -3908,6 +3908,8 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv,
* non 'thin pool/volume' and size increase */
else if (!lv_is_thin_volume(lv) &&
!lv_is_thin_pool(lv) &&
+ !lv_is_vdo(lv) &&
+ !lv_is_vdo_pool(lv) &&
dm_tree_node_size_changed(root))
dm->flush_required = 1;
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8a23683a59835d967eff1…
Commit: 8a23683a59835d967eff193bf1f82cc4ee5a6fdf
Parent: b4cc28c2ef72ee022c1a03819927e31775c18676
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Aug 17 10:11:05 2022 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Aug 17 10:47:43 2022 +0200
config: remove unnecessary copy of config line's space prefix before printing
When we wanted to insert '#' before a config line (to comment it out),
we used dm_pool_strndup to temporarily copy the space prefix first so
we can assemble the final line with:
"<space_prefix># <key>=<value>":
out of original:
"<space_prefix><key>=<value>".
The space_prefix copy is not necessary, we can just use fprintf's
precision modifier "%.*s" to print the exact part if we alrady
know space_prefix length.
---
lib/config/config.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index 1142ed345..db8f3c2c1 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1831,7 +1831,6 @@ static int _out_line_fn(const struct dm_config_node *cn, const char *line, void
char version[9];
int pos = 0;
int space_prefix_len;
- char *space_prefix;
const char *p;
size_t len;
@@ -1888,10 +1887,9 @@ static int _out_line_fn(const struct dm_config_node *cn, const char *line, void
(cfg_def->flags & (CFG_DEFAULT_UNDEFINED | CFG_DEFAULT_COMMENTED))) {
/* print with # at the front to comment out the line */
if (_should_print_cfg_with_undef_def_val(out, cfg_def, cn)) {
- space_prefix = ((len = strspn(line, "\t "))) ? dm_pool_strndup(out->mem, line, len) : NULL;
- fprintf(out->fp, "%s%s%s\n", space_prefix ? : "", "# ", line + len);
- if (space_prefix)
- dm_pool_free(out->mem, space_prefix);
+ space_prefix_len = strspn(line, "\t ");
+ fprintf(out->fp, "%.*s%s%s\n", space_prefix_len, line, "# ",
+ line + space_prefix_len);
}
return 1;
}