Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fc9d4dd11f2331e0…
Commit: fc9d4dd11f2331e056f0b56274877c8a4b4b1570
Parent: 79991aa7699587b40946d029787b38ae67405336
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 25 13:44:46 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 28 12:42:44 2013 +0100
config: use int for type
Since the type is used for 'or' operation of enumerated bit fields,
it doesn't not have type cfg_def_type_t - use proper int type for
bitmask.
---
lib/config/config.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/config/config.h b/lib/config/config.h
index f57757b..0769c40 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -88,7 +88,7 @@ typedef struct cfg_def_item {
int id; /* ID of this item */
int parent; /* ID of parent item */
const char *name; /* name of the item in configuration tree */
- cfg_def_type_t type; /* configuration item type */
+ int type; /* configuration item type (bits of cfg_def_type_t) */
cfg_def_value_t default_value; /* default value (only for settings) */
uint16_t flags; /* configuration item definition flags */
uint16_t since_version; /* version this item appeared in */
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=01c438a96c82bf31…
Commit: 01c438a96c82bf31ccda0721707fc90afa01a07e
Parent: 5a4137c804b0ba579c5f368fe91942c465815f66
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Nov 24 19:00:53 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 28 12:42:39 2013 +0100
format-text: ensure aligment is not 0
Make sure this path of code is not used for alignment == 0,
to prevent division by 0.
---
WHATS_NEW | 1 +
lib/format_text/format-text.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 55b17c0..cd63144 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
Add configure --enable-blkid_wiping to use libblkid to detect signatures.
Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 275d16f..eb5c9e9 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -2083,7 +2083,7 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
* alignment since it would be useless.
* Check first whether we can apply that!
*/
- if (!pe_start_locked &&
+ if (!pe_start_locked && alignment &&
((limit - mda_start) > alignment * 2)) {
mda_size = limit - mda_start - alignment * 2;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5968f07fd5ccb2b7…
Commit: 5968f07fd5ccb2b7d4e407cd8fec86b0b1f80f3a
Parent: eaa23d32732c9bc3dd4f948781b5764cf21d84ba
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Nov 27 15:20:12 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Nov 27 15:49:15 2013 +0100
man: lvcreate -W/--wipesignatures
---
man/lvcreate.8.in | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index 4a29720..a34c4ae 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -75,6 +75,7 @@ lvcreate \- create a logical volume in an existing volume group
.RB [ \-\-type
.IR SegmentType ]
.RB [ \-v | \-\-verbose ]
+.RB [ \-W | \-\-wipesignatures ]
.RB [ \-Z | \-\-zero
.RI { y | n }]
.IR VolumeGroup { Name | Path }[/ ThinPoolLogicalVolumeName ]
@@ -135,8 +136,9 @@ If autoactivation option is used (\fB\-a\fIay\fR), the logical volume is
activated only if it matches an item in the
.B activation/auto_activation_volume_list
set in \fBlvm.conf\fP(5).
-For autoactivated logical volumes, \fB\-\-zero\fP \fIn\fP is always assumed
-and it can't be overridden. If the clustered locking is enabled,
+For autoactivated logical volumes, \fB\-\-zero\fP \fIn\fP and
+\fB\-\-wipesignatures\fP \fIn\fP is always assumed and it can't
+be overridden. If the clustered locking is enabled,
\fB\-a\fIey\fR will activate exclusively on one node and
.IR \fB\-a { a | l } y
will activate only on the local node.
@@ -399,6 +401,21 @@ requested size using the zero target. A suffix of _vorigin is used for
this device. Note: using sparse snapshots is not efficient for larger
device sizes (GiB), thin provisioning should be used for this case.
.TP
+.BR \-W ", " \-\-wipesignatures " {" \fIy | \fIn }
+Controls wiping of detected signatures on newly created Logical Volume.
+If this option is not specified, then by default signature wiping is done
+each time the zeroing (\fB\-Z\fP/\fB\-\-zero\fP) is done. This default behaviour
+can be controlled by \fBallocation/wipe_signatures_on_new_logical_volumes_when_zeroing\fP
+setting found in \fBlvm.conf\fP(5).
+.br
+If blkid wiping is used (\fBallocation/use_blkid_wiping setting\fP in \fBlvm.conf\fP(5))
+and LVM2 is compiled with blkid wiping support, then \fBblkid\fP(8) library is used
+to detect the signatures (use \fBblkid -k\fP command to list the signatures that are recognized).
+Otherwise, native LVM2 code is used to detect signatures (MD RAID, swap and LUKS
+signatures are detected only in this case).
+.br
+Logical Volume is not wiped if the read only flag is set.
+.TP
.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
Controls zeroing of the first KiB of data in the new logical volume.
.br
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ab2f858af7a72448…
Commit: ab2f858af7a72448b6c015a5984c73f5cdaf3664
Parent: 9bfc0be493192958f5dbffea4eb7dda968062261
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Nov 27 13:52:15 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Nov 27 15:49:14 2013 +0100
conf: add allocation/use_blkid_wiping
Add allocation/use_blkid_wiping setting to lvm.conf to select between
LVM2 native code to detect signatures to wipe or blkid library code.
---
WHATS_NEW | 1 +
conf/example.conf.in | 15 +++++++++++++++
lib/config/config_settings.h | 1 +
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 9823cd1..55b17c0 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
Add configure --enable-blkid_wiping to use libblkid to detect signatures.
Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
Add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing to lvm.conf.
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 0ac53ef..b7ad3d1 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -272,6 +272,21 @@ allocation {
# algorithm.
maximise_cling = 1
+ # Whether to use blkid library instead of native LVM2 code to detect
+ # any existing signatures while creating new Physical Volumes and
+ # Logical Volumes. LVM2 needs to be compiled with blkid wiping support
+ # for this setting to take effect.
+ #
+ # LVM2 native detection code is currently able to recognize these signatures:
+ # - MD device signature
+ # - swap signature
+ # - LUKS signature
+ # To see the list of signatures recognized by blkid, check the output
+ # of 'blkid -k' command. The blkid can recognize more signatures than
+ # LVM2 native detection code, but due to this higher number of signatures
+ # to be recognized, it can take more time to complete the signature scan.
+ use_blkid_wiping = 1
+
# Whether do wipe any signatures found on newly created Logical Volumes
# automatically in addition to zeroing of the first KB on the LV
# (-Z/--zero y option) when running the LVM command without specifying
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 7a7e8e5..929e907 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -104,6 +104,7 @@ cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TY
cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTION, 0, CFG_TYPE_STRING, NULL, vsn(2, 2, 77), NULL)
cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MAXIMISE_CLING, vsn(2, 2, 85), NULL)
+cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL)
cfg(allocation_wipe_signatures_on_new_logical_volumes_when_zeroing_CFG, "wipe_signatures_on_new_logical_volumes_when_zeroing", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL)
cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 85), NULL)
cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL)