Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=406d8ff3323dde68…
Commit: 406d8ff3323dde6860d88b603701aa4dace47af0
Parent: 00348c0a630a7e5578edf48052ec695b15de752f
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Oct 29 16:50:09 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Oct 29 16:50:09 2015 +0100
WHATS_NEW: recent commits
---
WHATS_NEW | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 03c70d6..00e807e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,7 @@
Version 2.02.133 -
======================================
- Check metadata area size is at least minimum size of 8 * memory page size.
+ 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.
Dropping 'yet' from error of unsupported thick snapshot of snapshots.
Do not support unpartitioned DASD devices with CDL formatted with pvcreate.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=00348c0a630a7e55…
Commit: 00348c0a630a7e5578edf48052ec695b15de752f
Parent: ccb8da404d00288b7d49c7a28006ec5d4687bb55
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Oct 29 16:33:06 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Oct 29 16:46:41 2015 +0100
metadata: format_text: check VG metadata do not overlap themselves
We're already checking whether old and new meta do not overlap in
ring buffer (as we need to keep both old and new meta during vg_write
up until vg_commit).
We also need to check whether the new metadata do not overlap
themselves in case we don't have old metadata yet (...because
we're in vgcreate). This could happen if we're creating a VG so
that the very first metadata written are long enough that it wraps
themselves in metadata ring buffer.
Although we limited the minimum metadata area size better with the
previous commit ccb8da404d00288b7d49c7a28006ec5d4687bb55 which
makes the initial VG metadata overlap in ring buffer to be less
probable, the risk of hitting this overlap condition is still there
if we still manage to generate big enough metadata somehow.
For example, users can provide many and/or long VG tags during vgcreate
so that the VG metadata is long enough to start to wrap in the ring
buffer again...
---
lib/format_text/format-text.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 6c653ca..84d0947 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -654,6 +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)) {
log_error("VG %s metadata too large for circular buffer",
vg->name);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ccb8da404d00288b…
Commit: ccb8da404d00288b7d49c7a28006ec5d4687bb55
Parent: 28e54032c092ed4a5592575ac716fe698ce75d22
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Oct 29 15:59:29 2015 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Oct 29 16:00:32 2015 +0100
metadata: format_text: check metadata area size is at least MDA_SIZE_MIN
---
WHATS_NEW | 1 +
lib/format_text/format-text.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index f453604..03c70d6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.133 -
======================================
+ Check metadata area size is at least minimum size of 8 * memory page size.
Thin pool targets uses low_water_mark from profile.
Dropping 'yet' from error of unsupported thick snapshot of snapshots.
Do not support unpartitioned DASD devices with CDL formatted with pvcreate.
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index e0ec8ed..6c653ca 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -2146,7 +2146,6 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
goto bad;
}
/* Otherwise, give up and take any usable space. */
- /* FIXME: We should probably check for some minimum MDA size here. */
else
mda_size = limit - mda_start;
@@ -2242,6 +2241,12 @@ 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) {
/* Wipe metadata area with zeroes. */
if (!dev_set((struct device *) pv->dev, mda_start,
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f58c63410327c2bc…
Commit: f58c63410327c2bc49b671df4538dee9e90e577d
Parent: 175119fdcd1a8eb23011e4c25d0df5899dfc42ea
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Oct 29 12:18:40 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Oct 29 12:38:59 2015 +0100
cleanup: error is not a WARNING
Drop 'WARNING' from error message.
It's plain error message leading to command failure.
---
lib/cache/lvmetad.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index c7f6ecb..683c87c 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -1331,7 +1331,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
log_warn("WARNING: Ignoring obsolete format of metadata (%s) on device %s when using lvmetad",
baton.fid->fmt->name, dev_name(dev));
else
- log_error("WARNING: Ignoring obsolete format of metadata (%s) on device %s when using lvmetad",
+ log_error("Ignoring obsolete format of metadata (%s) on device %s when using lvmetad.",
baton.fid->fmt->name, dev_name(dev));
lvmcache_fmt(info)->ops->destroy_instance(baton.fid);