Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ecc9f74988f7e18a…
Commit: ecc9f74988f7e18a24741e3bf55753383cc904b6
Parent: 06dce7d5398cf44a4502ff730987e99bc8b3b78a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Jul 26 12:47:28 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Jul 26 13:04:53 2013 +0200
filters: fix segfault on incorrect global_filter
When using a global_filter and if this filter is incorrectly
specified, we ended up with a segfault:
raw/~ $ pvs
Invalid filter pattern "r|/dev/sda".
Segmentation fault (core dumped)
In the example above a closing '|' character is missing at the end
of the regex. The segfault itself was caused by trying to destroy
the same filter twice in _init_filters fn within the error path
(the "bad" goto target):
bad:
if (f3)
f3->destroy(f3);
if (f4)
f4->destroy(f4);
Where f3 is the composite filter (sysfs + regex + type + md + mpath filter)
and f4 is the persistent filter which encompasses this composite filter
within persistent filter's 'real' field in 'struct pfilter'.
So in the end, we need to destroy the persistent filter only as
this will also destroy any 'real' filter attached to it.
---
WHATS_NEW | 1 +
lib/commands/toolcontext.c | 7 +++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3544f87..3318454 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.100 -
================================
+ Fix segfault if devices/global_filter is not specified correctly.
Version 2.02.99 - 24th July 2013
================================
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index b284ce5..48fc489 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -940,8 +940,7 @@ static int _init_filters(struct cmd_context *cmd, unsigned load_persistent_cache
if (!(f4 = persistent_filter_create(cmd->dev_types, f3, dev_cache))) {
log_verbose("Failed to create persistent device filter.");
- f3->destroy(f3);
- return_0;
+ goto bad;
}
/* Should we ever dump persistent filter state? */
@@ -977,10 +976,10 @@ static int _init_filters(struct cmd_context *cmd, unsigned load_persistent_cache
return 1;
bad:
- if (f3)
- f3->destroy(f3);
if (f4)
f4->destroy(f4);
+ else if (f3)
+ f3->destroy(f3);
if (toplevel_components[0])
toplevel_components[0]->destroy(toplevel_components[0]);
return 0;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=76e617b1587b68b7…
Commit: 76e617b1587b68b78f7ae5659e2293edcda630c3
Parent: 929d5f3563d0ca0acbbb220e8c212f9441260d68
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Jul 24 23:59:03 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Jul 24 23:59:03 2013 +0100
release 2.02.99
363 files changed, 19863 insertions(+), 9055 deletions(-)
This is a very large release - so expect bugs!
Please treat this release like a release candidate.
Changes to the external interfaces since 2.02.98 are not yet frozen.
Updated releases will follow quickly (days not weeks) as any problems
are handled.
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 4 ++--
WHATS_NEW_DM | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/VERSION b/VERSION
index f8dcbdc..a3db87f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.99(2)-git (2012-10-22)
+2.02.99(2)-git (2013-07-24)
diff --git a/VERSION_DM b/VERSION_DM
index 75d1302..748468a 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.78-git (2012-10-22)
+1.02.78-git (2013-07-24)
diff --git a/WHATS_NEW b/WHATS_NEW
index 587b53d..039ddec 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,5 @@
-Version 2.02.99 -
-===================================
+Version 2.02.99 - 24th July 2013
+================================
Do not zero init 4KB of thin snapshot for non-zeroing thin pool (2.02.94).
Issue an error msg if lvconvert --type used incorrectly with other options.
Use LOG_DEBUG/ERR msg severity instead default for lvm2-activation-generator.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index b269f55..3009427 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.78 -
-===================================
+Version 1.02.78 - 24th July 2013
+================================
Process thin messages once to active thin pool target for dm_tree.
Optimize out setting the same value or read_ahead.
Add DM_ARRAY_SIZE public macro.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d13e87b9efb07f6e…
Commit: d13e87b9efb07f6e40d9fb44b72387231d493fa2
Parent: 97df05ce107ae2bed9ef02cfcdcdde39bd2100d4
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Jul 24 22:10:37 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Jul 24 22:10:37 2013 +0100
cleanup: comments and a message
---
WHATS_NEW | 15 ++++++++-------
lib/config/config.h | 2 +-
make.tmpl.in | 1 +
tools/vgimport.c | 3 +--
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fd44fb1..587b53d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -5,7 +5,7 @@ Version 2.02.99 -
Use LOG_DEBUG/ERR msg severity instead default for lvm2-activation-generator.
Support ARG_GROUPABLE with merge_synonym (for --raidwritemostly).
Fix segfault when reporting raid_syncaction for older kernels.
- Add LV reporting fields raid_mismatch_count, raid_sync_action, raid_write_behind.
+ Add LV report fields: raid_mismatch_count/raid_sync_action/raid_write_behind.
Add LV reporting fields raid_min_recovery_rate, raid_max_recovery_rate.
Add sync_percent as alias for copy_percent LV reporting field.
Add lv_ prefix to modules reporting field.
@@ -63,6 +63,8 @@ Version 2.02.99 -
Report lvs volume type 'o' also for external origin volumes.
Report lvs target type 't' only for thin pools and thin volumes.
Fix test for active snapshot in cluster before resizing it.
+ Allow local activation to receive a locally-supplied LV struct.
+ Add vg->vg_ondisk / lv_ondisk() holding committed metadata.
Report backtrace from dump filter error path.
Do not use persistent filter with lvmetad.
Composable persistent filter functionality for global filter.
@@ -99,7 +101,6 @@ Version 2.02.99 -
Add lvcreate/lvchange --[raid]{min|max}recoveryrate for raid LVs.
Add lvchange --[raid]writemostly/writebehind support for RAID1
Add lv_change_activate() for common activation code in vg/lvchange.
- Revert change that allowed identical table reload for RAID.
Add lvchange --[raid]syncaction for scrubbing of RAID LVs.
Improve RAID kernel status retrieval to include sync_action/mismatch_cnt.
Add external origin support for lvcreate.
@@ -114,19 +115,19 @@ Version 2.02.99 -
Add --type {current|default|missing|new} and --atversion to lvm dumpconfig.
Support automatic config validation and add 'config' section to lvm.conf.
Add pvs -o pv_ba_start,pv_ba_size to report bootloader area start and size.
- Add --bootloaderareasize to pvcreate and vgconvert to create a bootloader area.
+ Add --bootloaderareasize to pvcreate and vgconvert to create bootloader area.
Add PV header extension: extension version, flags and bootloader 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.
Add _add_layer_target_to_dtree() for adding linear layer into dtree.
Extend _cached_info() to accept layer string.
- Allow identical table reload for RAID to restore transiently failed PVs.
- vgimport '--force' now allows users to import VGs with missing PVs.
+ vgimport '--force' now allows import of VGs with missing PVs.
Fix PV alignment to incorporate alignment offset if the PV has zero MDAs.
- Allow remove/replace of RAID sub-LVs that are composed of error targets.
+ Add global/raid10_segtype_default to lvm.conf.
+ Allow removal or replacement of RAID LV components that are error segments.
Make 'vgreduce --removemissing' able to handle RAID LVs with missing PVs.
- Rename lvm.conf setting 'mirror_region_size' to 'raid_region_size'.
+ Accept activation/raid_region_size in preference to mirror_region_size config.
Fix pvs -o pv_free reporting for PVs with zero PE count.
Fix missing cleanup of flags when the LV is detached from pool.
Fix check for some forbidden discards conversion of thin pools.
diff --git a/lib/config/config.h b/lib/config/config.h
index 263da4f..f57757b 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -20,7 +20,7 @@
#include "defaults.h"
/* 16 bits: 3 bits for major, 4 bits for minor, 9 bits for patchlevel */
-/* Max LVM version supported: 7.15.511. Just extend bits if ever needed. */
+/* FIXME Max LVM version supported: 7.15.511. Extend bits when needed. */
#define vsn(major, minor, patchlevel) (major << 13 | minor << 9 | patchlevel)
struct device;
diff --git a/make.tmpl.in b/make.tmpl.in
index e2c4441..6992255 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -34,6 +34,7 @@ LIBS = @LIBS@
# Extra libraries always linked with static binaries
STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS)
DEFS += @DEFS@
+# FIXME set this only where it's needed, not globally?
CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
CLDFLAGS += @CLDFLAGS@
ELDFLAGS += @ELDFLAGS@
diff --git a/tools/vgimport.c b/tools/vgimport.c
index 20cae6c..3a0798a 100644
--- a/tools/vgimport.c
+++ b/tools/vgimport.c
@@ -80,8 +80,7 @@ int vgimport(struct cmd_context *cmd, int argc, char **argv)
* where the user simply forgot to move one or more disks in
* the VG before running 'vgimport'.
*/
- log_print("'--force' supplied. Volume groups with missing PVs"
- " will be imported.");
+ log_warn("WARNING: Volume groups with missing PVs will be imported with --force.");
cmd->handles_missing_pvs = 1;
}