Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=17196103e018a34e…
Commit: 17196103e018a34eda016f6bdcd74395210cb114
Parent: ccfc09f79b8d7ba15798a2b6f76545bb7fa3681e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Oct 30 09:05:21 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Oct 30 09:05:21 2015 -0500
New entries for pvs related fixes.
---
WHATS_NEW | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 00e807e..415efc7 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.133 -
======================================
+ Fix missing PVs from pvs output if vgremove is run concurrently.
+ Remove unwanted error message when running pvs/vgs/lvs and vgremove at once.
Check newly created VG's metadata do not overlap in metadata ring buffer.
Check metadata area size is at least the minimum size defined for the format.
Thin pool targets uses low_water_mark from profile.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ccfc09f79b8d7ba1…
Commit: ccfc09f79b8d7ba15798a2b6f76545bb7fa3681e
Parent: 9a3b64e81ad1988f4143b5a4b4ac06eaf3035e58
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Oct 30 12:02:29 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Oct 30 12:02:34 2015 +0100
metadata: format_text: also count with calculated mda size of 0
When checking minimum mda size, make sure the mda_size after alignment
and calculation is more than 0 - if there's no place for an MDA at the
end of the disk, the _text_pv_add_metadata_area does not try to add it
there and it returns (because we already have the MDA at the start of
the disk at least).
---
lib/format_text/format-text.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 29e9bd2..d4f2c89 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -2241,13 +2241,13 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
FMTu64 ").", pv_dev_name(pv),
mda_size, limit_name, limit);
- if (mda_size < MDA_SIZE_MIN) {
- log_error("Metadata area size too small. "
- "It must be at least %u bytes.", MDA_SIZE_MIN);
- goto bad;
- }
-
if (mda_size) {
+ if (mda_size < MDA_SIZE_MIN) {
+ log_error("Metadata area size too small: %" PRIu64" bytes. "
+ "It must be at least %u bytes.", mda_size, MDA_SIZE_MIN);
+ goto bad;
+ }
+
/* Wipe metadata area with zeroes. */
if (!dev_set((struct device *) pv->dev, mda_start,
(size_t) ((mda_size > wipe_size) ?
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c2e88d1107c496d2…
Commit: c2e88d1107c496d2c1b39bbbfb9795e88b3a6b60
Parent: 406d8ff3323dde6860d88b603701aa4dace47af0
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Oct 30 08:57:34 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Oct 30 08:57:34 2015 +0100
metadata: format_text: better check for metadata overlap
Actually, we don't need extra condition as introduced in commit
00348c0a630a7e5578edf48052ec695b15de752f. We should fix the last
condition:
(mdac->rlocn.size >= mdah->size)
...which should be:
(MDA_HEADER_SIZE + (rlocn ? rlocn->size : 0) + mdac->rlocn.size >= mdah->size))
Where the "mdac" is new metadata, the "rlocn" is old metadata.
So the main problem with the previous condition was that it
didn't count in MDA_HEADER_SIZE properly (and possible existing
metadata - the "rlocn"). This could have caused the error state
where metadata in ring buffer overlap to not be hit.
Replace the new condition introduced in 00348c0a630a7e5578edf48052ec695b15de752f
with the improved one for the condition that existed there
already but it was just incomplete.
---
lib/format_text/format-text.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 84d0947..29e9bd2 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -654,8 +654,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
if ((new_wrap && old_wrap) ||
(rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset)) ||
- (!rlocn && new_wrap && (new_end > mdac->rlocn.offset)) ||
- (mdac->rlocn.size >= mdah->size)) {
+ (MDA_HEADER_SIZE + (rlocn ? rlocn->size : 0) + mdac->rlocn.size >= mdah->size)) {
log_error("VG %s metadata too large for circular buffer",
vg->name);
goto out;