master - cleanup: comment typo
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=678951f635616fc5489...
Commit: 678951f635616fc54896717af1183092a0556a3f
Parent: e7bd3ba22dc6736654bbfe235924a64a511bcf8d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 10 22:38:13 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Sep 10 23:55:03 2020 +0200
cleanup: comment typo
---
lib/metadata/thin_manip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c
index 0704f2bc3..588707961 100644
--- a/lib/metadata/thin_manip.c
+++ b/lib/metadata/thin_manip.c
@@ -224,7 +224,7 @@ int thin_pool_feature_supported(const struct logical_volume *lv, int feature)
int pool_metadata_min_threshold(const struct lv_segment *pool_seg)
{
/*
- * Hardcoded minimal requirment for thin pool target.
+ * Hardcoded minimal requirement for thin pool target.
*
* In the metadata LV there should be minimum from either 4MiB of free space
* or at least 25% of free space, which applies when the size of thin pool's
3 years, 8 months
master - debug: drop debug trace from regular path
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e7bd3ba22dc6736654b...
Commit: e7bd3ba22dc6736654bbfe235924a64a511bcf8d
Parent: bc0980362895ab64fb9f11811dc72937fe92c8a7
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 10 23:33:46 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Sep 10 23:55:03 2020 +0200
debug: drop debug trace from regular path
Since we query on regular code these:
lv_raid_has_integrity()
lv_has_integrity_recalculate_metadata()
without prior checking for lv_is_raid() - these 'return 0' should
not use <stacktrace> as they are expected.
---
lib/metadata/integrity_manip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/integrity_manip.c b/lib/metadata/integrity_manip.c
index ddcce9886..42e6d936e 100644
--- a/lib/metadata/integrity_manip.c
+++ b/lib/metadata/integrity_manip.c
@@ -828,7 +828,7 @@ int lv_has_integrity_recalculate_metadata(struct logical_volume *lv)
int ret = 0;
if (!lv_is_raid(lv) && !lv_is_integrity(lv))
- return_0;
+ return 0;
seg = first_seg(lv);
@@ -856,7 +856,7 @@ int lv_raid_has_integrity(struct logical_volume *lv)
uint32_t s;
if (!lv_is_raid(lv))
- return_0;
+ return 0;
seg = first_seg(lv);
3 years, 8 months
master - lv_manip: relocate check to proper function
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bc0980362895ab64fb9...
Commit: bc0980362895ab64fb9f11811dc72937fe92c8a7
Parent: e7f5acdfa674af473f31b23413afb1875cb3e078
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 10 17:39:43 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Sep 10 23:54:33 2020 +0200
lv_manip: relocate check to proper function
---
lib/metadata/lv_manip.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index ba143075d..e2c0f957b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5068,6 +5068,11 @@ static int _lvresize_check(struct logical_volume *lv,
struct volume_group *vg = lv->vg;
struct lv_segment *seg = first_seg(lv);
+ if (lv_is_writecache(lv)) {
+ log_error("Resize not yet allowed on LVs with writecache attached.");
+ return 0;
+ }
+
if (lv_is_external_origin(lv)) {
/*
* Since external-origin can be activated read-only,
@@ -5792,11 +5797,6 @@ int lv_resize(struct logical_volume *lv,
struct device *dev;
char name[PATH_MAX];
- if (lv_is_writecache(lv)) {
- log_error("Resize not yet allowed on LVs with writecache attached.");
- return 0;
- }
-
if (!_lvresize_check(lv, lp))
return_0;
3 years, 8 months
master - lvextend: improve percentage estimation
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e7f5acdfa674af473f3...
Commit: e7f5acdfa674af473f31b23413afb1875cb3e078
Parent: 6d392776b0c65c02f53435cbc1adbbb6765dfaa6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 10 22:38:34 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Sep 10 23:54:31 2020 +0200
lvextend: improve percentage estimation
Correcting rounding rules for percentage evaluation.
Validate supported range of percentage.
(although ranges are already validated earlier on code path)
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1171eb2a9..ebbeb2718 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.11 -
==================================
+ Enhance --use-policy percentage rounding.
Configure --with-vdo and --with-writecache as internal segments.
Improving VDO man page examples.
Switch code base to use flexible array syntax.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index d72c49bea..ba143075d 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4932,7 +4932,7 @@ static int _fsadm_cmd(enum fsadm_cmd_e fcmd,
static uint32_t _adjust_amount(dm_percent_t percent, int policy_threshold, int policy_amount)
{
- if (!(DM_PERCENT_0 < percent && percent <= DM_PERCENT_100) ||
+ if (!((50 * DM_PERCENT_1) < percent && percent <= DM_PERCENT_100) ||
percent <= (policy_threshold * DM_PERCENT_1))
return 0; /* nothing to do */
/*
@@ -4940,7 +4940,7 @@ static uint32_t _adjust_amount(dm_percent_t percent, int policy_threshold, int p
* Keep using DM_PERCENT_1 units for better precision.
* Round-up to needed percentage value
*/
- percent = (percent / policy_threshold + (DM_PERCENT_1 - 1) / 100) / (DM_PERCENT_1 / 100) - 100;
+ percent = ((percent + policy_threshold - 1) / policy_threshold) / (DM_PERCENT_1 / 100) - 100;
/* Use it if current policy amount is smaller */
return (policy_amount < percent) ? (uint32_t) percent : (uint32_t) policy_amount;
3 years, 8 months
master - configure: compile with vdo and writecache by default
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6d392776b0c65c02f53...
Commit: 6d392776b0c65c02f53435cbc1adbbb6765dfaa6
Parent: 1f54129c4ea4cc88571b75b7d093107985913315
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 9 15:56:06 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Sep 10 23:54:10 2020 +0200
configure: compile with vdo and writecache by default
Enable compilation of vdo and writecache support as internaly
supported segment types by default.
For disabling use:
--with-vdo=none
--with-writcache=none
---
WHATS_NEW | 1 +
configure | 4 ++--
configure.ac | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 8f33c8ae4..1171eb2a9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.11 -
==================================
+ Configure --with-vdo and --with-writecache as internal segments.
Improving VDO man page examples.
Switch code base to use flexible array syntax.
Fix 64bit math when calculation cachevol size.
diff --git a/configure b/configure
index 716ee9ca7..7fdd20206 100755
--- a/configure
+++ b/configure
@@ -9586,7 +9586,7 @@ $as_echo_n "checking whether to include vdo... " >&6; }
if test "${with_vdo+set}" = set; then :
withval=$with_vdo; VDO=$withval
else
- VDO="none"
+ VDO="internal"
fi
@@ -9746,7 +9746,7 @@ $as_echo_n "checking whether to include writecache... " >&6; }
if test "${with_writecache+set}" = set; then :
withval=$with_writecache; WRITECACHE=$withval
else
- WRITECACHE="none"
+ WRITECACHE="internal"
fi
diff --git a/configure.ac b/configure.ac
index 9a0e41a81..3e9ed25f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -607,7 +607,7 @@ AC_MSG_CHECKING(whether to include vdo)
AC_ARG_WITH(vdo,
AC_HELP_STRING([--with-vdo=TYPE],
[vdo support: internal/none [internal]]),
- VDO=$withval, VDO="none")
+ VDO=$withval, VDO="internal")
AC_MSG_RESULT($VDO)
@@ -655,7 +655,7 @@ AC_MSG_CHECKING(whether to include writecache)
AC_ARG_WITH(writecache,
AC_HELP_STRING([--with-writecache=TYPE],
[writecache support: internal/none [none]]),
- WRITECACHE=$withval, WRITECACHE="none")
+ WRITECACHE=$withval, WRITECACHE="internal")
AC_MSG_RESULT($WRITECACHE)
3 years, 8 months
master - integrity: fix segfault reporting integrity for other lvs
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1f54129c4ea4cc88571...
Commit: 1f54129c4ea4cc88571b75b7d093107985913315
Parent: 0210c7076d0db2fc835ed11a86a901c725096e6f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Sep 9 10:22:07 2020 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Sep 9 10:22:07 2020 -0500
integrity: fix segfault reporting integrity for other lvs
---
lib/report/report.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/report/report.c b/lib/report/report.c
index cd7971562..73a150a7e 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -3286,6 +3286,8 @@ static int _raidintegritymode_disp(struct dm_report *rh __attribute__((unused)),
lv_get_raid_integrity_settings(lv, &settings);
else if (lv_is_integrity(lv))
settings = &first_seg(lv)->integrity_settings;
+ else
+ goto out;
if (settings->mode[0]) {
if (settings->mode[0] == 'B')
@@ -3301,6 +3303,7 @@ static int _raidintegritymode_disp(struct dm_report *rh __attribute__((unused)),
return _field_set_value(field, repstr, NULL);
}
}
+out:
return _field_set_value(field, "", NULL);
}
3 years, 8 months
master - man: correcting vdo issues
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0210c7076d0db2fc835...
Commit: 0210c7076d0db2fc835ed11a86a901c725096e6f
Parent: 763342016c2ca408bc3505ea4a14d0d22c610839
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 9 15:14:22 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 9 15:16:34 2020 +0200
man: correcting vdo issues
Fixing reported bugs within provided examples - so examples
can be used via cut&paste.
---
WHATS_NEW | 1 +
man/lvmvdo.7_main | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1fffbb5d7..8f33c8ae4 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.11 -
==================================
+ Improving VDO man page examples.
Switch code base to use flexible array syntax.
Fix 64bit math when calculation cachevol size.
Preserve uint32_t for seqno handling.
diff --git a/man/lvmvdo.7_main b/man/lvmvdo.7_main
index ab9a27811..76a758061 100644
--- a/man/lvmvdo.7_main
+++ b/man/lvmvdo.7_main
@@ -138,14 +138,15 @@ that can keep 100% uncompressible data there.
VDO allows to set large variety of options. Lots of these settings
can be specified by lvm.conf or profile settings. User can prepare
-number of different profiles and just specify profile file name.
+number of different profiles in #DEFAULT_SYS_DIR#/profile directory
+and just specify profile file name.
Check output of \fBlvmconfig --type full\fP for detailed description
of all individual vdo settings.
.I Example
.br
.nf
-# cat <<EOF > vdo.profile
+# cat <<EOF > #DEFAULT_SYS_DIR#/profile/vdo_create.profile
allocation {
vdo_use_compression=1
vdo_use_deduplication=1
@@ -169,7 +170,7 @@ allocation {
}
EOF
-# lvcreate --vdo -L10G --metadataprofile vdo.profile vg/vdopool0
+# lvcreate --vdo -L10G --metadataprofile vdo_create vg/vdopool0
# lvcreate --vdo -L10G --config 'allocation/vdo_cpu_threads=4' vg/vdopool1
.fi
@@ -211,7 +212,7 @@ Note: \fBvdostats\fP(8) currently understands only /dev/mapper device names.
vdopool0 vg dwi-ao---- 10.00g 30.16
[vdopool0_vdata] vg Dwi-ao---- 10.00g
-# vdostats --all /dev/mapper/vg-vdopool0
+# vdostats --all /dev/mapper/vg-vdopool0-vpool
/dev/mapper/vg-vdopool0 :
version : 30
release version : 133524
@@ -306,7 +307,7 @@ resize will not work).
.I Example
.br
.nf
-# lvcreate -L 5G -V 10G -n vdo1 vg/vpool
+# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vpool
# lvcreate --type cache-pool -L 1G -n cpool vg
# lvconvert --cache --cachepool vg/cpool vg/vpool
# lvconvert --uncache vg/vpool
3 years, 8 months
master - man: correctly use configured directories
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=763342016c2ca408bc3...
Commit: 763342016c2ca408bc3505ea4a14d0d22c610839
Parent: af33a008472c5d7066a52f5c2031ce5b0d508a26
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 9 13:22:37 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 9 13:22:37 2020 +0200
man: correctly use configured directories
---
man/lvmdump.8_main | 4 ++--
man/lvmlockd.8_main | 2 +-
man/lvmthin.7_main | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/lvmdump.8_main b/man/lvmdump.8_main
index 2e80ed289..cbd5f15ef 100644
--- a/man/lvmdump.8_main
+++ b/man/lvmdump.8_main
@@ -26,7 +26,7 @@ The content of the tarball is as follows:
.br
- recent entries from /var/log/messages (containing system messages)
.br
-- complete lvm configuration and cache (content of /etc/lvm)
+- complete lvm configuration and cache (content of #DEFAULT_SYS_DIR#)
.br
- list of device nodes present under /dev
.br
@@ -97,7 +97,7 @@ database content (the output of 'udevadm info --export-db' command).
\fBLVM_BINARY\fP
The LVM2 binary to use.
Defaults to "lvm".
-Sometimes you might need to set this to "/sbin/lvm.static", for example.
+Sometimes you might need to set this to "#LVM_PATH#/lvm.static", for example.
.TP
\fBDMSETUP_BINARY\fP
The dmsetup binary to use.
diff --git a/man/lvmlockd.8_main b/man/lvmlockd.8_main
index c21f7a916..f4c504d70 100644
--- a/man/lvmlockd.8_main
+++ b/man/lvmlockd.8_main
@@ -115,7 +115,7 @@ use_lvmlockd = 1
.br
Assign each host a unique host_id in the range 1-2000 by setting
.br
-/etc/lvm/lvmlocal.conf local/host_id
+#DEFAULT_SYS_DIR#/lvmlocal.conf local/host_id
.SS 3. start lvmlockd
diff --git a/man/lvmthin.7_main b/man/lvmthin.7_main
index 84256141d..ce2343183 100644
--- a/man/lvmthin.7_main
+++ b/man/lvmthin.7_main
@@ -902,7 +902,7 @@ To change these values globally, edit
To change these values on a per-VG or per-LV basis, attach a "profile" to
the VG or LV. A profile is a collection of config settings, saved in a
local text file (using the lvm.conf format). lvm looks for profiles in
-the profile_dir directory, e.g. /etc/lvm/profile/. Once attached to a VG
+the profile_dir directory, e.g. #DEFAULT_SYS_DIR#/profile/. Once attached to a VG
or LV, lvm will process the VG or LV using the settings from the attached
profile. A profile is named and referenced by its file name.
@@ -930,9 +930,9 @@ Extend the LV using the profile settings:
.br
.nf
# lvmconfig config/profile_dir
-profile_dir="/etc/lvm/profile"
+profile_dir="#DEFAULT_SYS_DIR#/profile"
-# cat /etc/lvm/profile/pool0extend.profile
+# cat #DEFAULT_SYS_DIR#/profile/pool0extend.profile
activation {
thin_pool_autoextend_threshold=50
thin_pool_autoextend_percent=10
3 years, 8 months
master - Revert "raid: add _rimage and _rmeta as origin_only"
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=af33a008472c5d7066a...
Commit: af33a008472c5d7066a52f5c2031ce5b0d508a26
Parent: a8ea1817abccbd6acba83fb1ceb075830e747279
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 9 00:58:52 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 9 00:58:52 2020 +0200
Revert "raid: add _rimage and _rmeta as origin_only"
This reverts commit 3388e194892e9ab7a36b72e512796c2d218dae6e.
More thinking needed.
---
WHATS_NEW | 1 -
lib/activate/dev_manager.c | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index aa3960b31..1fffbb5d7 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,5 @@
Version 2.03.11 -
==================================
- Use _rmeta and _rimage as origin only devices for table loading.
Switch code base to use flexible array syntax.
Fix 64bit math when calculation cachevol size.
Preserve uint32_t for seqno handling.
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index e98cf578b..a626b000a 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -2642,11 +2642,10 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
/* origin only for cache without pending delete */
(!dm->track_pending_delete || !lv_is_cache(lv)) &&
!_add_lv_to_dtree(dm, dtree, seg_lv(seg, s),
- (lv_is_vdo_pool(seg_lv(seg, s)) ||
- lv_is_raid_image(seg_lv(seg, s))) ? 1 : 0))
+ lv_is_vdo_pool(seg_lv(seg, s)) ? 1 : 0))
return_0;
if (seg_is_raid_with_meta(seg) && seg->meta_areas && seg_metalv(seg, s) &&
- !_add_lv_to_dtree(dm, dtree, seg_metalv(seg, s), 1))
+ !_add_lv_to_dtree(dm, dtree, seg_metalv(seg, s), 0))
return_0;
}
3 years, 8 months
master - Revert "raid: do not enforce flushing of raids when it is not required"
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a8ea1817abccbd6acba...
Commit: a8ea1817abccbd6acba83fb1ceb075830e747279
Parent: bb62af5b3db82e6558afd564acd3bcc0f2b94b50
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 9 00:58:32 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 9 00:58:32 2020 +0200
Revert "raid: do not enforce flushing of raids when it is not required"
This reverts commit ce5ea07411d57a2bd276d8d29e46ce30b957f657.
More thinking needed.
---
WHATS_NEW | 1 -
lib/activate/activate.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0aa23046d..aa3960b31 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,5 @@
Version 2.03.11 -
==================================
- Allow raid extension without flushing raid LV first.
Use _rmeta and _rimage as origin only devices for table loading.
Switch code base to use flexible array syntax.
Fix 64bit math when calculation cachevol size.
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index c5adc5065..0c6bd1a9a 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -2177,7 +2177,7 @@ 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_raid(lv) && !lv_is_mirror(lv) && !lv_is_thin_pool(lv) && !lv_is_thin_volume(lv)))) {
+ (!lv_is_mirror(lv) && !lv_is_thin_pool(lv) && !lv_is_thin_volume(lv)))) {
log_debug("Requiring flush for LV %s.", display_lvname(lv));
flush_required = 1;
}
3 years, 8 months