Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6c81cd26ccb03f34…
Commit: 6c81cd26ccb03f3452fedca651c876f2709ff0b8
Parent: a9d0e25627f751026b2c486cec97c61ecf2af309
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Feb 27 13:47:57 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Feb 27 13:47:57 2013 +0100
config: fix config node lookup inside empty sections to not return the section itself
When a section was empty in a configuration tree (no children - this is
allowed) and we were looking for a config node inside that section, the
_find_config_node function incorrectly returned the section itself if
the node inside that section was not found.
For example the configuration below:
The config:
abc {
}
And a function call to get the "def" node inside "abc" section:
_find_config_node(..., "abc/def")
...returned the "abc" node instead of NULL ("def" not found).
This in turn caused segfaults in the code using lookups in such
a configuration tree as we (correctly) expected that the node
returned was always the one we were looking for or NULL if not
found. But if incorrect node was returned instead, we processed
that as if this was the node we were looking for and so we
processed its value as well. But sections don't have values => segfault.
---
WHATS_NEW_DM | 1 +
libdm/libdm-config.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 0052e5a..9d9c53d 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.78 -
===================================
+ Fix config node lookup inside empty sections to not return the section itself.
Extend support for status info of thin pool target.
Fix segfault for truncated string token in config file after the first '"'.
Close open dmeventd FIFO file descriptors on exec (FD_CLOEXEC).
diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c
index cc726ae..bd29d32 100644
--- a/libdm/libdm-config.c
+++ b/libdm/libdm-config.c
@@ -752,12 +752,12 @@ static const struct dm_config_node *_find_config_node(const void *start,
if (cn_found && *e)
cn = cn_found->child;
else
- break; /* don't move into the last node */
+ return cn_found;
path = e;
}
- return cn_found;
+ return NULL;
}
static const struct dm_config_node *_find_first_config_node(const void *start, const char *path)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a9d0e25627f75102…
Commit: a9d0e25627f751026b2c486cec97c61ecf2af309
Parent: 9d5a3c16dd4f5ea64ba3d89ead049a116f728d64
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Feb 27 10:47:24 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Feb 27 10:47:24 2013 +0100
cleanup: remove struct pv_header_extension reference from struct pv_header
Just to prevent accidental and improper use when reading the layout
from disk because of the already existing disk_areas_xl[0] lists
that are variable in size. We can read pv_header_extension only
after we know exactly where the lists end...
---
lib/format_text/layout.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/lib/format_text/layout.h b/lib/format_text/layout.h
index 92dc582..14f9930 100644
--- a/lib/format_text/layout.h
+++ b/lib/format_text/layout.h
@@ -43,9 +43,6 @@ struct pv_header {
/* NULL-terminated list of data areas followed by */
/* NULL-terminated list of metadata area headers */
struct disk_locn disk_areas_xl[0]; /* Two lists */
-
- /* PV header extension */
- struct pv_header_extension ext;
} __attribute__ ((packed));
/*
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b3776468fa07a0bc…
Commit: b3776468fa07a0bc173dd01152a4f6010c4d174d
Parent: 28a5f6bc3833ad2f84e6d00745fc103d508708a6
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Feb 26 15:50:43 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Feb 26 15:50:43 2013 +0100
WHATS_NEW: add lines for embedding area support
---
WHATS_NEW | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index dc4fc8f..3a837aa 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,8 @@
Version 2.02.99 -
===================================
+ Add pvs -o ea_start,ea_size to report embedding area start and size.
+ Add --embeddingareasize to pvcreate and vgconvert to create an embedding area.
+ Add PV header extension: extension version, flags and embedding areas.
Initial support for lvconvert of thin external origin.
Add _lv_remove_segs_using_this_lv() for removal of dependent lvs.
Improve activation code for better support of stacked devices.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=28a5f6bc3833ad2f…
Commit: 28a5f6bc3833ad2f84e6d00745fc103d508708a6
Parent: ea69cda4b089f96b89c178bcef3ed44df86cf825
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Feb 26 14:10:11 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Feb 26 14:46:42 2013 +0100
man: update pvcreate/pvs/vgconvert man page to cover embedding area support
---
man/pvcreate.8.in | 13 +++++++++++++
man/pvs.8.in | 6 +++---
man/vgconvert.8.in | 2 ++
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
index 3fec8dc..1fda0ad 100644
--- a/man/pvcreate.8.in
+++ b/man/pvcreate.8.in
@@ -12,6 +12,8 @@ pvcreate \- initialize a disk or partition for use by LVM
.RB [ \-\-force ]]
.RB [ \-y | \-\-yes ]
.RB [ \-\-labelsector ]
+.RB [ \-\-embeddingareasize
+.IR size ]
.RB [ \-M | \-\-metadatatype
.IR type ]
.RB [ \-\- [ pv ] metadatacopies
@@ -163,6 +165,17 @@ sector (sector 1). This lets you use a different sector near the
start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care.
.TP
+.B \-\-embeddingareasize \fIsize
+Create a separate embedding area of specified size besides PV's data
+area. The embedding area is an area of reserved space on the PV from
+which LVM2 will not allocate any extents and it's kept untouched for
+use with external tools to embed their own data or metadata. The start
+of the embedding area is always aligned, see also \fB--dataalignment\fP
+and \fB--dataalignmentoffset\fP. The embedding area size may eventually
+end up increased due to the alignment, but it's never less than the
+size that is requested. To see the embedding area start and size of
+an existing Physical Volume use \fBpvs -o +ea_start,ea_size\fP.
+.TP
.B \-\-setphysicalvolumesize \fIsize
Overrides the automatically-detected size of the PV. Use with care.
.SH Examples
diff --git a/man/pvs.8.in b/man/pvs.8.in
index 4bdfa12..7fff4fd 100644
--- a/man/pvs.8.in
+++ b/man/pvs.8.in
@@ -63,9 +63,9 @@ and \fB-o pvseg_all\fP to select all Physical Volume segment columns.
Use \fB-o help\fP to view the full list of columns available.
.IP
Column names include: pv_fmt, pv_uuid, dev_size, pv_name, pv_mda_free,
-pv_mda_size, pe_start, pv_size, pv_free, pv_used, pv_attr, pv_pe_count,
-pv_pe_alloc_count, pv_tags, pv_mda_count, pv_mda_used_count,
-pvseg_start, and pvseg_size.
+pv_mda_size, ea_start, ea_size, pe_start, pv_size, pv_free, pv_used,
+pv_attr, pv_pe_count, pv_pe_alloc_count, pv_tags, pv_mda_count,
+pv_mda_used_count, pvseg_start, and pvseg_size
.IP
With \fB\-\-segments\fP, any "pvseg_" prefixes are optional; otherwise any
"pv_" prefixes are optional. Columns mentioned in \fBvgs\fP(8) can also
diff --git a/man/vgconvert.8.in b/man/vgconvert.8.in
index 95ea41c..6567a9e 100644
--- a/man/vgconvert.8.in
+++ b/man/vgconvert.8.in
@@ -8,6 +8,8 @@ vgconvert \- convert volume group metadata format
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.RB [ \-\-labelsector ]
+.RB [ \-\-embeddingareasize
+.IR size ]
.RB [ \-M | \-\-metadatatype
.IR type ]
.RB [ \-\-pvmetadatacopies