master - style: Miscellaneous tidying up of metadata/lv*
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=192d9ad97769f2...
Commit: 192d9ad97769f2c16f3ebe67e51cfb287e67f67c
Parent: cb82919b0d77ebeeb7d35d39b9c8584e806433bf
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Sep 23 14:37:52 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Sep 23 14:37:52 2015 +0100
style: Miscellaneous tidying up of metadata/lv*
---
lib/metadata/lv.c | 1 +
lib/metadata/lv.h | 4 +-
lib/metadata/lv_manip.c | 48 ++++++++++++++++++++++++----------------------
3 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 8f3500c..e0080b1 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -648,6 +648,7 @@ int lv_raid_image_in_sync(const struct logical_volume *lv)
if ((seg = first_seg(lv)))
raid_seg = get_only_segment_using_this_lv(seg->lv);
+
if (!raid_seg) {
log_error("Failed to find RAID segment for %s", lv->name);
return 0;
diff --git a/lib/metadata/lv.h b/lib/metadata/lv.h
index efd2a90..a839489 100644
--- a/lib/metadata/lv.h
+++ b/lib/metadata/lv.h
@@ -35,8 +35,8 @@ struct logical_volume {
int32_t major;
int32_t minor;
- uint64_t size; /* Sectors */
- uint32_t le_count;
+ uint64_t size; /* Sectors visible */
+ uint32_t le_count; /* Logical extents visible */
uint32_t origin_count;
uint32_t external_count;
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 7e8301b..808b630 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -780,7 +780,7 @@ int get_default_region_size(struct cmd_context *cmd)
if (region_size & (region_size - 1)) {
region_size = _round_down_pow2(region_size);
- log_verbose("Reducing mirror region size to %u kiB (power of 2).",
+ log_verbose("Reducing region size to %u kiB (power of 2).",
region_size / 2);
}
@@ -930,7 +930,7 @@ dm_percent_t copy_percent(const struct logical_volume *lv)
dm_list_iterate_items(seg, &lv->segments) {
denominator += seg->area_len;
- /* FIXME Generalise name of 'extents_copied' field */
+ /* FIXME Generalise name of 'extents_copied' field */
if ((seg_is_raid(seg) || seg_is_mirrored(seg)) &&
(seg->area_count > 1))
numerator += seg->extents_copied;
@@ -938,7 +938,7 @@ dm_percent_t copy_percent(const struct logical_volume *lv)
numerator += seg->area_len;
}
- return denominator ? dm_make_percent( numerator, denominator ) : 100.0;
+ return denominator ? dm_make_percent(numerator, denominator) : 100.0;
}
/*
@@ -1037,6 +1037,7 @@ static int _release_and_discard_lv_segment_area(struct lv_segment *seg, uint32_t
uint32_t area_reduction, int with_discard)
{
struct lv_segment *cache_seg;
+ struct logical_volume *lv = seg_lv(seg, s);
if (seg_type(seg, s) == AREA_UNASSIGNED)
return 1;
@@ -1054,10 +1055,10 @@ static int _release_and_discard_lv_segment_area(struct lv_segment *seg, uint32_t
return 1;
}
- if (lv_is_mirror_image(seg_lv(seg, s)) ||
- lv_is_thin_pool_data(seg_lv(seg, s)) ||
- lv_is_cache_pool_data(seg_lv(seg, s))) {
- if (!lv_reduce(seg_lv(seg, s), area_reduction))
+ if (lv_is_mirror_image(lv) ||
+ lv_is_thin_pool_data(lv) ||
+ lv_is_cache_pool_data(lv)) {
+ if (!lv_reduce(lv, area_reduction))
return_0; /* FIXME: any upper level reporting */
return 1;
}
@@ -1071,20 +1072,20 @@ static int _release_and_discard_lv_segment_area(struct lv_segment *seg, uint32_t
return_0;
}
- if (lv_is_raid_image(seg_lv(seg, s))) {
+ if (lv_is_raid_image(lv)) {
/*
* FIXME: Use lv_reduce not lv_remove
* We use lv_remove for now, because I haven't figured out
* why lv_reduce won't remove the LV.
- lv_reduce(seg_lv(seg, s), area_reduction);
+ lv_reduce(lv, area_reduction);
*/
if (area_reduction != seg->area_len) {
log_error("Unable to reduce RAID LV - operation not implemented.");
return_0;
} else {
- if (!lv_remove(seg_lv(seg, s))) {
+ if (!lv_remove(lv)) {
log_error("Failed to remove RAID image %s",
- seg_lv(seg, s)->name);
+ lv->name);
return 0;
}
}
@@ -1105,9 +1106,9 @@ static int _release_and_discard_lv_segment_area(struct lv_segment *seg, uint32_t
log_very_verbose("Remove %s:%" PRIu32 "[%" PRIu32 "] from "
"the top of LV %s:%" PRIu32,
seg->lv->name, seg->le, s,
- seg_lv(seg, s)->name, seg_le(seg, s));
+ lv->name, seg_le(seg, s));
- if (!remove_seg_from_segs_using_this_lv(seg_lv(seg, s), seg))
+ if (!remove_seg_from_segs_using_this_lv(lv, seg))
return_0;
seg_lv(seg, s) = NULL;
seg_le(seg, s) = 0;
@@ -1460,10 +1461,10 @@ struct alloc_handle {
struct dm_pool *mem;
alloc_policy_t alloc; /* Overall policy */
- int approx_alloc; /* get as much as possible up to new_extents */
+ int approx_alloc; /* get as much as possible up to new_extents */
uint32_t new_extents; /* Number of new extents required */
uint32_t area_count; /* Number of parallel areas */
- uint32_t parity_count; /* Adds to area_count, but not area_multiple */
+ uint32_t parity_count; /* Adds to area_count, but not area_multiple */
uint32_t area_multiple; /* seg->len = area_len * area_multiple */
uint32_t log_area_count; /* Number of parallel logs */
uint32_t metadata_area_count; /* Number of parallel metadata areas */
@@ -1519,6 +1520,7 @@ static uint32_t _calc_area_multiple(const struct segment_type *segtype,
*/
if (area_count <= segtype->parity_devs)
return 1;
+
return area_count - segtype->parity_devs;
}
@@ -1744,7 +1746,7 @@ static int _setup_alloced_segment(struct logical_volume *lv, uint64_t status,
extents = aa[0].len * area_multiple;
lv->le_count += extents;
- lv->size += (uint64_t) extents *lv->vg->extent_size;
+ lv->size += (uint64_t) extents * lv->vg->extent_size;
return 1;
}
@@ -1910,7 +1912,7 @@ static int _for_each_pv(struct cmd_context *cmd, struct logical_volume *lv,
*max_seg_len = remaining_seg_len;
area_multiple = _calc_area_multiple(seg->segtype, seg->area_count, 0);
- area_len = remaining_seg_len / area_multiple ? : 1;
+ area_len = remaining_seg_len / (area_multiple ? : 1);
/* For striped mirrors, all the areas are counted, through the mirror layer */
if (top_level_area_index == -1)
@@ -2956,7 +2958,7 @@ static int _allocate(struct alloc_handle *ah,
if (ah->area_multiple > 1 &&
(ah->new_extents - alloc_state.allocated) % ah->area_multiple) {
- log_error("Number of extents requested (%d) needs to be divisible by %d.",
+ log_error("Number of extents requested (" FMTu32 ") needs to be divisible by " FMTu32 ".",
ah->new_extents - alloc_state.allocated,
ah->area_multiple);
return 0;
@@ -3765,23 +3767,23 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
{
const struct segment_type *segtype;
struct logical_volume *sub_lv, *meta_lv;
- struct lv_segment *seg;
+ struct lv_segment *seg = first_seg(lv);
uint32_t fa, s;
int clear_metadata = 0;
- segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED);
+ if (!(segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
+ return_0;
/*
* The component devices of a "striped" LV all go in the same
* LV. However, RAID has an LV for each device - making the
* 'stripes' and 'stripe_size' parameters meaningless.
*/
- if (seg_is_raid(first_seg(lv))) {
+ if (seg_is_raid(seg)) {
stripes = 1;
stripe_size = 0;
}
- seg = first_seg(lv);
for (fa = first_area, s = 0; s < seg->area_count; s++) {
if (is_temporary_mirror_layer(seg_lv(seg, s))) {
if (!_lv_extend_layered_lv(ah, seg_lv(seg, s), extents,
@@ -5173,7 +5175,7 @@ static struct logical_volume *_lvresize_volume(struct cmd_context *cmd,
log_error("Filesystem check failed.");
return NULL;
}
- /* some filesystems supports online resize */
+ /* some filesystems support online resize */
}
/* FIXME forks here */
8 years, 6 months
master - systemd: use {local, remote}-fs-pre.target instead of {local, remote}-fs.target
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cb82919b0d77eb...
Commit: cb82919b0d77ebeeb7d35d39b9c8584e806433bf
Parent: 28aff5d240bd73ad0501504ed596819f2d4f058a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Sep 23 13:17:12 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Sep 23 13:30:51 2015 +0200
systemd: use {local,remote}-fs-pre.target instead of {local,remote}-fs.target
We want most of our units to be started before any local/remote mount
points are mounted - we used {local,remote}-fs.target for this purpose
before, but it was not 100% correct as there's even {local,remote}-fs-pre.target
special systemd unit reserved for this exact purpose.
See also man 7 systemd.special and "local-fs-pre.target"/"remote-fs-pre.target"
description.
---
WHATS_NEW | 1 +
WHATS_NEW_DM | 1 +
man/lvm2-activation-generator.8.in | 4 ++--
scripts/dm_event_systemd_red_hat.service.in | 2 +-
.../lvm2_activation_generator_systemd_red_hat.c | 8 ++++----
scripts/lvm2_clvmd_systemd_red_hat.service.in | 2 +-
scripts/lvm2_cmirrord_systemd_red_hat.service.in | 2 +-
scripts/lvm2_monitoring_systemd_red_hat.service.in | 2 +-
8 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6a97dc4..d693ab8 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.133 -
======================================
+ Fix lvm2-{activation,clvmd,cmirrord,monitor} service to exec before mounting.
Version 2.02.132 - 22nd September 2015
======================================
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 51e1be6..f198a50 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.110 -
======================================
+ Fix dm-event systemd service to make sure it is executed before mounting.
Version 1.02.109 - 22nd September 2016
======================================
diff --git a/man/lvm2-activation-generator.8.in b/man/lvm2-activation-generator.8.in
index 0f6d838..e1be5e1 100644
--- a/man/lvm2-activation-generator.8.in
+++ b/man/lvm2-activation-generator.8.in
@@ -28,8 +28,8 @@ layered on top of encrypted devices.
\fIlvm2-activation-net.service\fP
used for activation of LVM2 volumes that is ordered after systemd's
-special \fBremote-fs.target\fP to support LVM2 volumes which are layered
-on attached remote devices.
+special \fBremote-fs-pre.target\fP to support LVM2 volumes which are
+layered on attached remote devices.
Note that all the underlying devices (Physical Volumes) need to be present
when the service is run. If the there are any devices presented in the system
diff --git a/scripts/dm_event_systemd_red_hat.service.in b/scripts/dm_event_systemd_red_hat.service.in
index 3791618..7c607aa 100644
--- a/scripts/dm_event_systemd_red_hat.service.in
+++ b/scripts/dm_event_systemd_red_hat.service.in
@@ -3,7 +3,7 @@ Description=Device-mapper event daemon
Documentation=man:dmeventd(8)
Requires=dm-event.socket
After=dm-event.socket
-Before=local-fs.target
+Before=local-fs-pre.target
DefaultDependencies=no
[Service]
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
index cd71b9c..8a1b173 100644
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -28,8 +28,8 @@
#define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
#define LVM_CONF_USE_LVMPOLLD "global/use_lvmpolld"
-#define UNIT_TARGET_LOCAL_FS "local-fs.target"
-#define UNIT_TARGET_REMOTE_FS "remote-fs.target"
+#define UNIT_TARGET_LOCAL_FS "local-fs-pre.target"
+#define UNIT_TARGET_REMOTE_FS "remote-fs-pre.target"
static char unit_path[PATH_MAX];
static char target_path[PATH_MAX];
@@ -135,7 +135,7 @@ static int generate_unit(const char *dir, int unit, int sysinit_needed)
if (unit == UNIT_NET) {
fprintf(f, "After=%s iscsi.service fcoe.service\n"
- "Before=remote-fs.target shutdown.target\n\n"
+ "Before=remote-fs-pre.target shutdown.target\n\n"
"[Service]\n"
"ExecStartPre=/usr/bin/udevadm settle\n", unit_names[UNIT_MAIN]);
} else {
@@ -145,7 +145,7 @@ static int generate_unit(const char *dir, int unit, int sysinit_needed)
} else
fprintf(f, "After= %s cryptsetup.target\n", unit_names[UNIT_EARLY]);
- fputs("Before=local-fs.target shutdown.target\n"
+ fputs("Before=local-fs-pre.target shutdown.target\n"
"Wants=systemd-udev-settle.service\n\n"
"[Service]\n", f);
}
diff --git a/scripts/lvm2_clvmd_systemd_red_hat.service.in b/scripts/lvm2_clvmd_systemd_red_hat.service.in
index 2978d21..f506fa8 100644
--- a/scripts/lvm2_clvmd_systemd_red_hat.service.in
+++ b/scripts/lvm2_clvmd_systemd_red_hat.service.in
@@ -2,7 +2,7 @@
Description=Clustered LVM daemon
Documentation=man:clvmd(8)
After=dlm.service corosync.service
-Before=remote-fs.target
+Before=remote-fs-pre.target
Requires=network.target dlm.service corosync.service
RefuseManualStart=true
RefuseManualStop=true
diff --git a/scripts/lvm2_cmirrord_systemd_red_hat.service.in b/scripts/lvm2_cmirrord_systemd_red_hat.service.in
index 16d38ce..2dfc2a4 100644
--- a/scripts/lvm2_cmirrord_systemd_red_hat.service.in
+++ b/scripts/lvm2_cmirrord_systemd_red_hat.service.in
@@ -3,7 +3,7 @@ Description=Clustered LVM mirror log daemon
Documentation=man:cmirrord(8)
Requires=corosync.service
After=corosync.service
-Before=remote-fs.target
+Before=remote-fs-pre.target
DefaultDependencies=no
Conflicts=shutdown.target
diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
index 6aacdc2..22238b7 100644
--- a/scripts/lvm2_monitoring_systemd_red_hat.service.in
+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
@@ -3,7 +3,7 @@ Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progres
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
Requires=dm-event.socket lvm2-lvmetad.socket
After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service
-Before=local-fs.target
+Before=local-fs-pre.target
DefaultDependencies=no
Conflicts=shutdown.target
8 years, 6 months
master - segtypes: Make constants ULL.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=28aff5d240bd73...
Commit: 28aff5d240bd73ad0501504ed596819f2d4f058a
Parent: 532b2d2d4e6817b8971665c2fe30821c7ec7dadd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Sep 22 21:10:46 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Sep 22 21:10:46 2015 +0100
segtypes: Make constants ULL.
---
lib/metadata/segtype.h | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index 010c8db..aa18224 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -28,25 +28,25 @@ struct dm_config_node;
struct dev_manager;
/* Feature flags */
-#define SEG_CAN_SPLIT 0x0000000000000001U
-#define SEG_AREAS_STRIPED 0x0000000000000002U
-#define SEG_AREAS_MIRRORED 0x0000000000000004U
-#define SEG_SNAPSHOT 0x0000000000000008U
-#define SEG_FORMAT1_SUPPORT 0x0000000000000010U
-#define SEG_VIRTUAL 0x0000000000000020U
-#define SEG_CANNOT_BE_ZEROED 0x0000000000000040U
-#define SEG_MONITORED 0x0000000000000080U
-#define SEG_REPLICATOR 0x0000000000000100U
-#define SEG_REPLICATOR_DEV 0x0000000000000200U
-#define SEG_RAID 0x0000000000000400U
-#define SEG_THIN_POOL 0x0000000000000800U
-#define SEG_THIN_VOLUME 0x0000000000001000U
-#define SEG_CACHE 0x0000000000002000U
-#define SEG_CACHE_POOL 0x0000000000004000U
-#define SEG_MIRROR 0x0000000000008000U
-#define SEG_ONLY_EXCLUSIVE 0x0000000000010000U /* In cluster only exlusive activation */
-#define SEG_CAN_ERROR_WHEN_FULL 0x0000000000020000U
-#define SEG_UNKNOWN 0x8000000000000000U
+#define SEG_CAN_SPLIT 0x0000000000000001ULL
+#define SEG_AREAS_STRIPED 0x0000000000000002ULL
+#define SEG_AREAS_MIRRORED 0x0000000000000004ULL
+#define SEG_SNAPSHOT 0x0000000000000008ULL
+#define SEG_FORMAT1_SUPPORT 0x0000000000000010ULL
+#define SEG_VIRTUAL 0x0000000000000020ULL
+#define SEG_CANNOT_BE_ZEROED 0x0000000000000040ULL
+#define SEG_MONITORED 0x0000000000000080ULL
+#define SEG_REPLICATOR 0x0000000000000100ULL
+#define SEG_REPLICATOR_DEV 0x0000000000000200ULL
+#define SEG_RAID 0x0000000000000400ULL
+#define SEG_THIN_POOL 0x0000000000000800ULL
+#define SEG_THIN_VOLUME 0x0000000000001000ULL
+#define SEG_CACHE 0x0000000000002000ULL
+#define SEG_CACHE_POOL 0x0000000000004000ULL
+#define SEG_MIRROR 0x0000000000008000ULL
+#define SEG_ONLY_EXCLUSIVE 0x0000000000010000ULL /* In cluster only exlusive activation */
+#define SEG_CAN_ERROR_WHEN_FULL 0x0000000000020000ULL
+#define SEG_UNKNOWN 0x8000000000000000ULL
#define SEG_TYPE_NAME_LINEAR "linear"
#define SEG_TYPE_NAME_STRIPED "striped"
8 years, 6 months
master - man lvmthin: use --poolmetadatasize option
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=532b2d2d4e6817...
Commit: 532b2d2d4e6817b8971665c2fe30821c7ec7dadd
Parent: 214e2cddf639e4b5a610e34ac24dbe2fd4618fb6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Sep 22 13:44:09 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Sep 22 13:44:09 2015 -0500
man lvmthin: use --poolmetadatasize option
when extending a pool metadata lv, rather than
referencing the _tmeta device.
---
man/lvmthin.7.in | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index eb791f0..c142f56 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -583,7 +583,7 @@ with the lvs \-o+metadata_percent command.
Command to extend thin pool metadata space:
.br
-.B lvextend \-L Size VG/ThinPoolLV_tmeta
+.B lvextend \-\-poolmetadatasize Size VG/ThinPoolLV
.I Example
.br
@@ -605,7 +605,7 @@ Command to extend thin pool metadata space:
3. Double the amount of physical space in the thin metadata LV.
.nf
-# lvextend \-L+12M vg/pool0_tmeta
+# lvextend \-\-poolmetadatasize +12M vg/pool0
.fi
4. The percentage of used metadata blocks is half the previous value.
@@ -873,7 +873,7 @@ repair.
.br
See "Metadata check and repair".
-3. Extend pool metadata space with lvextend VG/ThinPoolLV_tmeta.
+3. Extend pool metadata space with lvextend \-\-poolmetadatasize.
.br
See "Manually manage free metadata space of a thin pool LV".
8 years, 6 months
master - segtypes: Use SEG_TYPE_NAME_ string constants.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=214e2cddf639e4...
Commit: 214e2cddf639e4b5a610e34ac24dbe2fd4618fb6
Parent: 0ce150280ed703aad27f8d5c37db02dfa63da382
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Sep 22 19:04:12 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Sep 22 19:04:12 2015 +0100
segtypes: Use SEG_TYPE_NAME_ string constants.
---
lib/activate/dev_manager.c | 10 +++++-----
lib/cache_segtype/cache.c | 4 ++--
lib/error/errseg.c | 2 +-
lib/format1/import-extents.c | 4 ++--
lib/format_pool/import_export.c | 5 ++---
lib/format_text/import_vsn1.c | 2 +-
lib/freeseg/freeseg.c | 2 +-
lib/locking/lvmlockd.c | 2 +-
lib/metadata/cache_manip.c | 6 +++---
lib/metadata/lv_manip.c | 34 +++++++++++++++++-----------------
lib/metadata/mirror.c | 18 ++++++++----------
lib/metadata/pool_manip.c | 6 +++---
lib/metadata/raid_manip.c | 6 +++---
lib/metadata/segtype.h | 9 +++++++++
lib/metadata/snapshot_manip.c | 2 +-
lib/mirror/mirrored.c | 2 +-
lib/snapshot/snapshot.c | 2 +-
lib/striped/striped.c | 4 ++--
lib/zero/zero.c | 2 +-
liblvm/lvm_lv.c | 10 +++++-----
tools/lvconvert.c | 8 ++++----
tools/lvcreate.c | 14 +++++++-------
tools/lvmcmdline.c | 2 +-
tools/pvmove.c | 2 +-
24 files changed, 82 insertions(+), 76 deletions(-)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index c8e9589..5a1e18b 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -143,23 +143,23 @@ static int _get_segment_status_from_target_params(const char *target_name,
return 0;
}
- if (!strcmp(segtype->name, "cache")) {
+ if (!strcmp(segtype->name, SEG_TYPE_NAME_CACHE)) {
if (!dm_get_status_cache(seg_status->mem, params, &(seg_status->cache)))
return_0;
seg_status->type = SEG_STATUS_CACHE;
- } else if (!strcmp(segtype->name, "raid")) {
+ } else if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID)) {
if (!dm_get_status_raid(seg_status->mem, params, &seg_status->raid))
return_0;
seg_status->type = SEG_STATUS_RAID;
- } else if (!strcmp(segtype->name, "thin")) {
+ } else if (!strcmp(segtype->name, SEG_TYPE_NAME_THIN)) {
if (!dm_get_status_thin(seg_status->mem, params, &seg_status->thin))
return_0;
seg_status->type = SEG_STATUS_THIN;
- } else if (!strcmp(segtype->name, "thin-pool")) {
+ } else if (!strcmp(segtype->name, SEG_TYPE_NAME_THIN_POOL)) {
if (!dm_get_status_thin_pool(seg_status->mem, params, &seg_status->thin_pool))
return_0;
seg_status->type = SEG_STATUS_THIN_POOL;
- } else if (!strcmp(segtype->name, "snapshot")) {
+ } else if (!strcmp(segtype->name, SEG_TYPE_NAME_SNAPSHOT)) {
if (!dm_get_status_snapshot(seg_status->mem, params, &seg_status->snapshot))
return_0;
seg_status->type = SEG_STATUS_SNAPSHOT;
diff --git a/lib/cache_segtype/cache.c b/lib/cache_segtype/cache.c
index 85cba18..733c330 100644
--- a/lib/cache_segtype/cache.c
+++ b/lib/cache_segtype/cache.c
@@ -420,7 +420,7 @@ int init_cache_segtypes(struct cmd_context *cmd,
return 0;
}
- segtype->name = "cache-pool";
+ segtype->name = SEG_TYPE_NAME_CACHE_POOL;
segtype->flags = SEG_CACHE_POOL | SEG_CANNOT_BE_ZEROED | SEG_ONLY_EXCLUSIVE;
segtype->ops = &_cache_pool_ops;
@@ -434,7 +434,7 @@ int init_cache_segtypes(struct cmd_context *cmd,
return 0;
}
- segtype->name = "cache";
+ segtype->name = SEG_TYPE_NAME_CACHE;
segtype->flags = SEG_CACHE | SEG_ONLY_EXCLUSIVE;
segtype->ops = &_cache_ops;
diff --git a/lib/error/errseg.c b/lib/error/errseg.c
index fa0b9c0..26b07d8 100644
--- a/lib/error/errseg.c
+++ b/lib/error/errseg.c
@@ -95,7 +95,7 @@ struct segment_type *init_error_segtype(struct cmd_context *cmd)
return_NULL;
segtype->ops = &_error_ops;
- segtype->name = "error";
+ segtype->name = SEG_TYPE_NAME_ERROR;
segtype->flags = SEG_CAN_SPLIT | SEG_VIRTUAL | SEG_CANNOT_BE_ZEROED;
log_very_verbose("Initialised segtype: %s", segtype->name);
diff --git a/lib/format1/import-extents.c b/lib/format1/import-extents.c
index bfcf0de..992edc3 100644
--- a/lib/format1/import-extents.c
+++ b/lib/format1/import-extents.c
@@ -219,7 +219,7 @@ static int _read_linear(struct cmd_context *cmd, struct lv_map *lvm)
struct lv_segment *seg;
struct segment_type *segtype;
- if (!(segtype = get_segtype_from_string(cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
while (le < lvm->lv->le_count) {
@@ -281,7 +281,7 @@ static int _read_stripes(struct cmd_context *cmd, struct lv_map *lvm)
total_area_len = lvm->lv->le_count / lvm->stripes;
- if (!(segtype = get_segtype_from_string(cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
while (first_area_le < total_area_len) {
diff --git a/lib/format_pool/import_export.c b/lib/format_pool/import_export.c
index 1aeabe2..99155ce 100644
--- a/lib/format_pool/import_export.c
+++ b/lib/format_pool/import_export.c
@@ -188,8 +188,7 @@ static int _add_stripe_seg(struct dm_pool *mem,
area_len = (usp->devs[0].blocks) / POOL_PE_SIZE;
- if (!(segtype = get_segtype_from_string(lv->vg->cmd,
- "striped")))
+ if (!(segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
if (!(seg = alloc_lv_segment(segtype, lv, *le_cur,
@@ -226,7 +225,7 @@ static int _add_linear_seg(struct dm_pool *mem,
unsigned j;
uint32_t area_len;
- if (!(segtype = get_segtype_from_string(lv->vg->cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
for (j = 0; j < usp->num_devs; j++) {
diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c
index 7888695..d63192e 100644
--- a/lib/format_text/import_vsn1.c
+++ b/lib/format_text/import_vsn1.c
@@ -375,7 +375,7 @@ static int _read_segment(struct logical_volume *lv, const struct dm_config_node
return 0;
}
- segtype_str = "striped";
+ segtype_str = SEG_TYPE_NAME_STRIPED;
if (!dm_config_get_str(sn_child, "type", &segtype_str)) {
log_error("Segment type must be a string.");
diff --git a/lib/freeseg/freeseg.c b/lib/freeseg/freeseg.c
index 71d7f8c..5afdcac 100644
--- a/lib/freeseg/freeseg.c
+++ b/lib/freeseg/freeseg.c
@@ -33,7 +33,7 @@ struct segment_type *init_free_segtype(struct cmd_context *cmd)
return_NULL;
segtype->ops = &_freeseg_ops;
- segtype->name = "free";
+ segtype->name = SEG_TYPE_NAME_FREE;
segtype->flags = SEG_VIRTUAL | SEG_CANNOT_BE_ZEROED;
log_very_verbose("Initialised segtype: %s", segtype->name);
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index 728dd99..e20920c 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -337,7 +337,7 @@ static int _create_sanlock_lv(struct cmd_context *cmd, struct volume_group *vg,
dm_list_init(&lp.tags);
- if (!(lp.segtype = get_segtype_from_string(vg->cmd, "striped")))
+ if (!(lp.segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
lv = lv_create_single(vg, &lp);
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index 04b8308..12b6d66 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -261,7 +261,7 @@ struct logical_volume *lv_cache_create(struct logical_volume *pool_lv,
if (lv_is_thin_pool(cache_lv))
cache_lv = seg_lv(first_seg(cache_lv), 0); /* cache _tdata */
- if (!(segtype = get_segtype_from_string(cmd, "cache")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_CACHE)))
return_NULL;
if (!insert_layer_for_lv(cmd, cache_lv, CACHE, "_corig"))
@@ -407,7 +407,7 @@ int lv_cache_remove(struct logical_volume *cache_lv)
/* Replace 'error' with 'cache' segtype */
cache_seg = first_seg(corigin_lv);
- if (!(cache_seg->segtype = get_segtype_from_string(corigin_lv->vg->cmd, "cache")))
+ if (!(cache_seg->segtype = get_segtype_from_string(corigin_lv->vg->cmd, SEG_TYPE_NAME_CACHE)))
return_0;
if (!(cache_seg->areas = dm_pool_zalloc(cache_lv->vg->vgmem, sizeof(*cache_seg->areas))))
@@ -453,7 +453,7 @@ int lv_is_cache_origin(const struct logical_volume *lv)
static const char *_get_default_cache_policy(struct cmd_context *cmd)
{
- const struct segment_type *segtype = get_segtype_from_string(cmd, "cache");
+ const struct segment_type *segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_CACHE);
unsigned attr = ~0;
const char *def = NULL;
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 46213fe..7e8301b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -1013,7 +1013,7 @@ struct lv_segment *alloc_snapshot_seg(struct logical_volume *lv,
struct lv_segment *seg;
const struct segment_type *segtype;
- segtype = get_segtype_from_string(lv->vg->cmd, "snapshot");
+ segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_SNAPSHOT);
if (!segtype) {
log_error("Failed to find snapshot segtype");
return NULL;
@@ -1393,7 +1393,7 @@ int replace_lv_with_error_segment(struct logical_volume *lv)
/* FIXME Check for any attached LVs that will become orphans e.g. mirror logs */
- if (!lv_add_virtual_segment(lv, 0, len, get_segtype_from_string(lv->vg->cmd, "error")))
+ if (!lv_add_virtual_segment(lv, 0, len, get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_ERROR)))
return_0;
return 1;
@@ -3401,7 +3401,7 @@ static struct lv_segment *_convert_seg_to_mirror(struct lv_segment *seg,
return NULL;
}
- if (!(newseg = alloc_lv_segment(get_segtype_from_string(seg->lv->vg->cmd, "mirror"),
+ if (!(newseg = alloc_lv_segment(get_segtype_from_string(seg->lv->vg->cmd, SEG_TYPE_NAME_MIRROR),
seg->lv, seg->le, seg->len,
seg->status, seg->stripe_size,
log_lv,
@@ -3494,7 +3494,7 @@ int lv_add_segmented_mirror_image(struct alloc_handle *ah,
if (!lv_add_mirror_lvs(lv, ©_lv, 1, MIRROR_IMAGE, region_size))
return_0;
- if (!(segtype = get_segtype_from_string(lv->vg->cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
dm_list_iterate_items(aa, &ah->alloced_areas[0]) {
@@ -3608,7 +3608,7 @@ int lv_add_mirror_lvs(struct logical_volume *lv,
return 0;
}
- mirror_segtype = get_segtype_from_string(lv->vg->cmd, "mirror");
+ mirror_segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_MIRROR);
if (seg->segtype != mirror_segtype)
if (!(seg = _convert_seg_to_mirror(seg, region_size, NULL)))
return_0;
@@ -3668,7 +3668,7 @@ int lv_add_log_segment(struct alloc_handle *ah, uint32_t first_area,
return lv_add_segment(ah, ah->area_count + first_area, 1, log_lv,
get_segtype_from_string(log_lv->vg->cmd,
- "striped"),
+ SEG_TYPE_NAME_STRIPED),
0, status, 0);
}
@@ -3769,7 +3769,7 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
uint32_t fa, s;
int clear_metadata = 0;
- segtype = get_segtype_from_string(lv->vg->cmd, "striped");
+ segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED);
/*
* The component devices of a "striped" LV all go in the same
@@ -6209,7 +6209,7 @@ int remove_layers_for_segments(struct cmd_context *cmd,
/* Replace mirror with error segment */
if (!(lseg->segtype =
- get_segtype_from_string(lv->vg->cmd, "error"))) {
+ get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_ERROR))) {
log_error("Missing error segtype");
return 0;
}
@@ -6343,7 +6343,7 @@ int remove_layer_from_lv(struct logical_volume *lv,
return_0;
/* Replace the empty layer with error segment */
- if (!(segtype = get_segtype_from_string(lv->vg->cmd, "error")))
+ if (!(segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_ERROR)))
return_0;
if (!lv_add_virtual_segment(layer_lv, 0, parent_lv->le_count, segtype))
return_0;
@@ -6407,7 +6407,7 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
if (lv_is_active(lv_where) && strstr(name, "_mimagetmp")) {
log_very_verbose("Creating transient LV %s for mirror conversion in VG %s.", name, lv_where->vg->name);
- segtype = get_segtype_from_string(cmd, "error");
+ segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_ERROR);
if (!lv_add_virtual_segment(layer_lv, 0, lv_where->le_count, segtype)) {
log_error("Creation of transient LV %s for mirror conversion in VG %s failed.", name, lv_where->vg->name);
@@ -6455,7 +6455,7 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
if (!move_lv_segments(layer_lv, lv_where, 0, 0))
return_NULL;
- if (!(segtype = get_segtype_from_string(cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
return_NULL;
/* allocate a new linear segment */
@@ -6505,7 +6505,7 @@ static int _extend_layer_lv_for_segment(struct logical_volume *layer_lv,
if (seg_type(seg, s) != AREA_PV && seg_type(seg, s) != AREA_LV)
return_0;
- if (!(segtype = get_segtype_from_string(layer_lv->vg->cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(layer_lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
/* FIXME Incomplete message? Needs more context */
@@ -6778,7 +6778,7 @@ static struct logical_volume *_create_virtual_origin(struct cmd_context *cmd,
char vorigin_name[NAME_LEN];
struct logical_volume *lv;
- if (!(segtype = get_segtype_from_string(cmd, "zero"))) {
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_ZERO))) {
log_error("Zero segment type for virtual origin not found");
return NULL;
}
@@ -7113,7 +7113,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
}
/* Create cache origin for cache pool */
/* FIXME Eventually support raid/mirrors with -m */
- if (!(create_segtype = get_segtype_from_string(vg->cmd, "striped")))
+ if (!(create_segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
} else if (seg_is_mirrored(lp) || seg_is_raid(lp)) {
if (is_change_activating(lp->activate) && (lp->activate != CHANGE_AEY) &&
@@ -7229,7 +7229,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
return_NULL;
/* The snapshot segment gets created later */
- if (!(create_segtype = get_segtype_from_string(cmd, "striped")))
+ if (!(create_segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
return_NULL;
/* Must zero cow */
@@ -7626,7 +7626,7 @@ struct logical_volume *lv_create_single(struct volume_group *vg,
if (lp->create_pool && !seg_is_pool(lp)) {
segtype = lp->segtype;
if (seg_is_thin_volume(lp)) {
- if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin-pool")))
+ if (!(lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN_POOL)))
return_NULL;
if (!(lv = _lv_create_an_lv(vg, lp, lp->pool_name)))
@@ -7638,7 +7638,7 @@ struct logical_volume *lv_create_single(struct volume_group *vg,
return NULL;
}
/* origin_name is defined -> creates cache LV with new cache pool */
- if (!(lp->segtype = get_segtype_from_string(vg->cmd, "cache-pool")))
+ if (!(lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_CACHE_POOL)))
return_NULL;
if (!(lv = _lv_create_an_lv(vg, lp, lp->pool_name)))
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index f0d8f00..d4d2104 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -83,7 +83,7 @@ int cluster_mirror_is_available(struct cmd_context *cmd)
unsigned attr = 0;
const struct segment_type *segtype;
- if (!(segtype = get_segtype_from_string(cmd, "mirror")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_MIRROR)))
return_0;
if (!segtype->ops->target_present)
@@ -112,7 +112,7 @@ uint32_t lv_mirror_count(const struct logical_volume *lv)
seg = first_seg(lv);
/* FIXME: RAID10 only supports 2 copies right now */
- if (!strcmp(seg->segtype->name, "raid10"))
+ if (!strcmp(seg->segtype->name, SEG_TYPE_NAME_RAID10))
return 2;
if (lv_is_pvmove(lv))
@@ -1493,8 +1493,7 @@ static int _create_mimage_lvs(struct alloc_handle *ah,
}
} else {
if (!lv_add_segment(ah, m * stripes, stripes, img_lvs[m],
- get_segtype_from_string(lv->vg->cmd,
- "striped"),
+ get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED),
stripe_size, 0, 0)) {
log_error("Aborting. Failed to add mirror image segment "
"to %s. Remove new LV and retry.",
@@ -1547,8 +1546,7 @@ int remove_mirrors_from_segments(struct logical_volume *lv,
seg->area_count = new_mirrors + 1;
if (!new_mirrors)
- seg->segtype = get_segtype_from_string(lv->vg->cmd,
- "striped");
+ seg->segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED);
}
return 1;
@@ -1720,7 +1718,7 @@ int fixup_imported_mirrors(struct volume_group *vg)
dm_list_iterate_items(lvl, &vg->lvs) {
dm_list_iterate_items(seg, &lvl->lv->segments) {
if (seg->segtype !=
- get_segtype_from_string(vg->cmd, "mirror"))
+ get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_MIRROR))
continue;
if (seg->log_lv && !add_seg_to_segs_using_this_lv(seg->log_lv, seg))
@@ -1748,7 +1746,7 @@ static int _add_mirrors_that_preserve_segments(struct logical_volume *lv,
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 1, 0)))
return_0;
- if (!(segtype = get_segtype_from_string(cmd, "mirror")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_MIRROR)))
return_0;
adjusted_region_size = adjusted_mirror_region_size(lv->vg->extent_size,
@@ -2033,7 +2031,7 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
return_0;
- if (!(segtype = get_segtype_from_string(cmd, "mirror")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_MIRROR)))
return_0;
if (activation() && segtype->ops->target_present &&
@@ -2106,7 +2104,7 @@ int add_mirror_images(struct cmd_context *cmd, struct logical_volume *lv,
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
return_0;
- if (!(segtype = get_segtype_from_string(cmd, "mirror")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_MIRROR)))
return_0;
ah = allocate_extents(lv->vg, NULL, segtype,
diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c
index 95b5867..a57d90e 100644
--- a/lib/metadata/pool_manip.c
+++ b/lib/metadata/pool_manip.c
@@ -438,7 +438,7 @@ int create_pool(struct logical_volume *pool_lv,
}
/* LV is not yet a pool, so it's extension from lvcreate */
- if (!(striped = get_segtype_from_string(pool_lv->vg->cmd, "striped")))
+ if (!(striped = get_segtype_from_string(pool_lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
if (activation() && striped->ops->target_present &&
@@ -561,7 +561,7 @@ struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
.zero = 1,
};
- if (!(lvc.segtype = get_segtype_from_string(pool_lv->vg->cmd, "striped")))
+ if (!(lvc.segtype = get_segtype_from_string(pool_lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
/* FIXME: allocate properly space for metadata_lv */
@@ -597,7 +597,7 @@ static struct logical_volume *_alloc_pool_metadata_spare(struct volume_group *vg
.zero = 1,
};
- if (!(lp.segtype = get_segtype_from_string(vg->cmd, "striped")))
+ if (!(lp.segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
/* FIXME: Maybe using silent mode ? */
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 118bd06..87e6c8c 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -408,7 +408,7 @@ static struct logical_volume *_alloc_image_component(struct logical_volume *lv,
return 0;
}
- if (!(segtype = get_segtype_from_string(lv->vg->cmd, "striped")))
+ if (!(segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
if (!lv_add_segment(ah, first_area, 1, tmp_lv, segtype, 0, status, 0)) {
@@ -867,7 +867,7 @@ static int _raid_extract_images(struct logical_volume *lv, uint32_t new_count,
sizeof(*lvl_array) * extract * 2)))
return_0;
- if (!(error_segtype = get_segtype_from_string(lv->vg->cmd, "error")))
+ if (!(error_segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_ERROR)))
return_0;
/*
@@ -1475,7 +1475,7 @@ int lv_raid_reshape(struct logical_volume *lv,
return 0;
}
- if (!strcmp(seg->segtype->name, "mirror") &&
+ if (!strcmp(seg->segtype->name, SEG_TYPE_NAME_MIRROR) &&
(!strcmp(new_segtype->name, SEG_TYPE_NAME_RAID1)))
return _convert_mirror_to_raid1(lv, new_segtype);
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index 7a5195c..010c8db 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -51,6 +51,15 @@ struct dev_manager;
#define SEG_TYPE_NAME_LINEAR "linear"
#define SEG_TYPE_NAME_STRIPED "striped"
#define SEG_TYPE_NAME_MIRROR "mirror"
+#define SEG_TYPE_NAME_SNAPSHOT "snapshot"
+#define SEG_TYPE_NAME_THIN "thin"
+#define SEG_TYPE_NAME_THIN_POOL "thin-pool"
+#define SEG_TYPE_NAME_CACHE "cache"
+#define SEG_TYPE_NAME_CACHE_POOL "cache-pool"
+#define SEG_TYPE_NAME_ERROR "error"
+#define SEG_TYPE_NAME_FREE "free"
+#define SEG_TYPE_NAME_ZERO "zero"
+#define SEG_TYPE_NAME_RAID "raid"
#define SEG_TYPE_NAME_RAID1 "raid1"
#define SEG_TYPE_NAME_RAID10 "raid10"
#define SEG_TYPE_NAME_RAID4 "raid4"
diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c
index e6a420f..8245619 100644
--- a/lib/metadata/snapshot_manip.c
+++ b/lib/metadata/snapshot_manip.c
@@ -44,7 +44,7 @@ static uint64_t _cow_extra_chunks(struct cmd_context *cmd, uint64_t n_chunks)
unsigned attrs = 0;
if (activation() &&
- (segtype = get_segtype_from_string(cmd, "snapshot")) &&
+ (segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_SNAPSHOT)) &&
segtype->ops->target_present &&
segtype->ops->target_present(cmd, NULL, &attrs) &&
(attrs & SNAPSHOT_FEATURE_FIXED_LEAK))
diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c
index 2156165..6e189b2 100644
--- a/lib/mirror/mirrored.c
+++ b/lib/mirror/mirrored.c
@@ -620,7 +620,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd)
return_NULL;
segtype->ops = &_mirrored_ops;
- segtype->name = "mirror";
+ segtype->name = SEG_TYPE_NAME_MIRROR;
segtype->flags = SEG_MIRROR | SEG_AREAS_MIRRORED;
#ifdef DEVMAPPER_SUPPORT
diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c
index 0886206..4a8f005 100644
--- a/lib/snapshot/snapshot.c
+++ b/lib/snapshot/snapshot.c
@@ -259,7 +259,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd)
return_NULL;
segtype->ops = &_snapshot_ops;
- segtype->name = "snapshot";
+ segtype->name = SEG_TYPE_NAME_SNAPSHOT;
segtype->flags = SEG_SNAPSHOT | SEG_CANNOT_BE_ZEROED | SEG_ONLY_EXCLUSIVE;
#ifdef DEVMAPPER_SUPPORT
diff --git a/lib/striped/striped.c b/lib/striped/striped.c
index 1803077..edf1ae2 100644
--- a/lib/striped/striped.c
+++ b/lib/striped/striped.c
@@ -29,7 +29,7 @@
static const char *_striped_name(const struct lv_segment *seg)
{
- return (seg->area_count == 1) ? "linear" : seg->segtype->name;
+ return (seg->area_count == 1) ? SEG_TYPE_NAME_LINEAR : seg->segtype->name;
}
static void _striped_display(const struct lv_segment *seg)
@@ -229,7 +229,7 @@ struct segment_type *init_striped_segtype(struct cmd_context *cmd)
return_NULL;
segtype->ops = &_striped_ops;
- segtype->name = "striped";
+ segtype->name = SEG_TYPE_NAME_STRIPED;
segtype->flags =
SEG_CAN_SPLIT | SEG_AREAS_STRIPED | SEG_FORMAT1_SUPPORT;
diff --git a/lib/zero/zero.c b/lib/zero/zero.c
index 4efa0ce..33ae9d3 100644
--- a/lib/zero/zero.c
+++ b/lib/zero/zero.c
@@ -89,7 +89,7 @@ struct segment_type *init_zero_segtype(struct cmd_context *cmd)
return_NULL;
segtype->ops = &_zero_ops;
- segtype->name = "zero";
+ segtype->name = SEG_TYPE_NAME_ZERO;
segtype->flags = SEG_CAN_SPLIT | SEG_VIRTUAL | SEG_CANNOT_BE_ZEROED;
log_very_verbose("Initialised segtype: %s", segtype->name);
diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c
index 95d8492..fb9d19f 100644
--- a/liblvm/lvm_lv.c
+++ b/liblvm/lvm_lv.c
@@ -205,7 +205,7 @@ static void _lv_set_default_params(struct lvcreate_params *lp,
}
static struct segment_type * _get_segtype(struct cmd_context *cmd) {
- struct segment_type *rc = get_segtype_from_string(cmd, "striped");
+ struct segment_type *rc = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED);
if (!rc) {
log_error(INTERNAL_ERROR "Segtype striped not found.");
}
@@ -503,7 +503,7 @@ static int _lv_set_pool_params(struct lvcreate_params *lp,
_lv_set_default_params(lp, vg, pool_name, extents);
lp->create_pool = 1;
- lp->segtype = get_segtype_from_string(vg->cmd, "thin-pool");
+ lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN_POOL);
lp->stripes = 1;
if (!meta_size) {
@@ -611,7 +611,7 @@ static int _lv_set_thin_params(struct lvcreate_params *lp,
_lv_set_default_params(lp, vg, lvname, 0);
lp->pool_name = pool_name;
- lp->segtype = get_segtype_from_string(vg->cmd, "thin");
+ lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN);
lp->virtual_extents = extents;
lp->stripes = 1;
@@ -655,14 +655,14 @@ static lv_create_params_t _lvm_lv_params_create_snapshot(const lv_t lv,
_lv_set_default_params(&lvcp->lvp, lv->vg, snap_name, extents);
if (size) {
- if (!(lvcp->lvp.segtype = get_segtype_from_string(lv->vg->cmd, "snapshot"))) {
+ if (!(lvcp->lvp.segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_SNAPSHOT))) {
log_error("Segtype snapshot not found.");
return NULL;
}
lvcp->lvp.chunk_size = 8;
lvcp->lvp.snapshot = 1;
} else {
- if (!(lvcp->lvp.segtype = get_segtype_from_string(lv->vg->cmd, "thin"))) {
+ if (!(lvcp->lvp.segtype = get_segtype_from_string(lv->vg->cmd, SEG_TYPE_NAME_THIN))) {
log_error("Segtype thin not found.");
return NULL;
}
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index b5658f2..0e06160 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -550,7 +550,7 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
-1))
return_0;
- if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot")))
+ if (!(lp->segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_SNAPSHOT)))
return_0;
} else if (lp->splitsnapshot) /* Destroy snapshot retaining cow as separate LV */
;
@@ -587,7 +587,7 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
}
log_verbose("Setting chunk size to %s.", display_size(cmd, lp->chunk_size));
- if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot")))
+ if (!(lp->segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_SNAPSHOT)))
return_0;
lp->zero = (lp->segtype->flags & SEG_CANNOT_BE_ZEROED)
@@ -675,7 +675,7 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
if (arg_count(cmd, mirrors_ARG) && !lp->mirrors) {
/* down-converting to linear/stripe? */
if (!(lp->segtype =
- get_segtype_from_string(cmd, "striped")))
+ get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
return_0;
} else if (arg_count(cmd, type_ARG)) {
/* changing mirror type? */
@@ -2575,7 +2575,7 @@ static int _lvconvert_thin(struct cmd_context *cmd,
if (!pool_supports_external_origin(first_seg(pool_lv), lv))
return_0;
- if (!(lvc.segtype = get_segtype_from_string(cmd, "thin")))
+ if (!(lvc.segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_THIN)))
return_0;
if (!archive(vg))
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index 7bba761..e19ae01 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -661,14 +661,14 @@ static int _lvcreate_params(struct cmd_context *cmd,
(arg_is_set(cmd, virtualoriginsize_ARG) ||
!arg_is_set(cmd, virtualsize_ARG)))
/* Snapshot has higher priority then thin */
- segtype_str = "snapshot"; /* --thinpool makes thin volume */
+ segtype_str = SEG_TYPE_NAME_SNAPSHOT; /* --thinpool makes thin volume */
else if (arg_is_set(cmd, cache_ARG) || arg_is_set(cmd, cachepool_ARG))
- segtype_str = "cache";
+ segtype_str = SEG_TYPE_NAME_CACHE;
else if (arg_is_set(cmd, thin_ARG) || arg_is_set(cmd, thinpool_ARG))
- segtype_str = "thin";
+ segtype_str = SEG_TYPE_NAME_THIN;
else if (arg_is_set(cmd, virtualsize_ARG)) {
if (arg_is_set(cmd, virtualoriginsize_ARG))
- segtype_str = "snapshot"; /* --virtualoriginsize incompatible with pools */
+ segtype_str = SEG_TYPE_NAME_SNAPSHOT; /* --virtualoriginsize incompatible with pools */
else
segtype_str = find_config_tree_str(cmd, global_sparse_segtype_default_CFG, NULL);
} else if (arg_uint_value(cmd, mirrors_ARG, 0)) {
@@ -677,7 +677,7 @@ static int _lvcreate_params(struct cmd_context *cmd,
? global_raid10_segtype_default_CFG : global_mirror_segtype_default_CFG;
segtype_str = find_config_tree_str(cmd, mirror_default_cfg, NULL);
} else
- segtype_str = "striped";
+ segtype_str = SEG_TYPE_NAME_STRIPED;
if (!(lp->segtype = get_segtype_from_string(cmd, segtype_str)))
return_0;
@@ -906,7 +906,7 @@ static int _lvcreate_params(struct cmd_context *cmd,
}
log_debug_metadata("Switching from thin to thin pool segment type.");
- if (!(lp->segtype = get_segtype_from_string(cmd, "thin-pool")))
+ if (!(lp->segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_THIN_POOL)))
return_0;
} else /* Parse free arg as snapshot origin */
lp->snapshot = 1;
@@ -1183,7 +1183,7 @@ static int _determine_snapshot_type(struct volume_group *vg,
}
log_debug_metadata("Switching from snapshot to thin segment type.");
- if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin")))
+ if (!(lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN)))
return_0;
lp->snapshot = 0;
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index d3bace7..6577977 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -643,7 +643,7 @@ int locktype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_val
int segtype_arg(struct cmd_context *cmd, struct arg_values *av)
{
struct segment_type *segtype;
- const char *str = (!strcmp(av->value, "linear")) ? "striped" : av->value;
+ const char *str = (!strcmp(av->value, SEG_TYPE_NAME_LINEAR)) ? SEG_TYPE_NAME_STRIPED : av->value;
if (!(segtype = get_segtype_from_string(cmd, str)))
return_0;
diff --git a/tools/pvmove.c b/tools/pvmove.c
index d6403ad..a7943fa 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -32,7 +32,7 @@ static int _pvmove_target_present(struct cmd_context *cmd, int clustered)
if (clustered && _clustered_found >= 0)
return _clustered_found;
- if (!(segtype = get_segtype_from_string(cmd, "mirror")))
+ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_MIRROR)))
return_0;
if (activation() && segtype->ops->target_present &&
8 years, 6 months
master - segtypes: Extend flags to 64 bits.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0ce150280ed703...
Commit: 0ce150280ed703aad27f8d5c37db02dfa63da382
Parent: 3a8a37187d65e2c84f98d39e06bdee7000e34875
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Tue Sep 22 18:03:33 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Sep 22 18:03:33 2015 +0100
segtypes: Extend flags to 64 bits.
---
lib/metadata/segtype.h | 74 +++++++++++++++++++++++++----------------------
lib/raid/raid.c | 6 ++--
2 files changed, 42 insertions(+), 38 deletions(-)
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index a80d5ed..7a5195c 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -28,26 +28,43 @@ struct dm_config_node;
struct dev_manager;
/* Feature flags */
-#define SEG_CAN_SPLIT 0x00000001U
-#define SEG_AREAS_STRIPED 0x00000002U
-#define SEG_AREAS_MIRRORED 0x00000004U
-#define SEG_SNAPSHOT 0x00000008U
-#define SEG_FORMAT1_SUPPORT 0x00000010U
-#define SEG_VIRTUAL 0x00000020U
-#define SEG_CANNOT_BE_ZEROED 0x00000040U
-#define SEG_MONITORED 0x00000080U
-#define SEG_REPLICATOR 0x00000100U
-#define SEG_REPLICATOR_DEV 0x00000200U
-#define SEG_RAID 0x00000400U
-#define SEG_THIN_POOL 0x00000800U
-#define SEG_THIN_VOLUME 0x00001000U
-#define SEG_CACHE 0x00002000U
-#define SEG_CACHE_POOL 0x00004000U
-#define SEG_MIRROR 0x00008000U
-#define SEG_ONLY_EXCLUSIVE 0x00010000U /* In cluster only exlusive activation */
-#define SEG_CAN_ERROR_WHEN_FULL 0x00020000U
-#define SEG_UNKNOWN 0x80000000U
-
+#define SEG_CAN_SPLIT 0x0000000000000001U
+#define SEG_AREAS_STRIPED 0x0000000000000002U
+#define SEG_AREAS_MIRRORED 0x0000000000000004U
+#define SEG_SNAPSHOT 0x0000000000000008U
+#define SEG_FORMAT1_SUPPORT 0x0000000000000010U
+#define SEG_VIRTUAL 0x0000000000000020U
+#define SEG_CANNOT_BE_ZEROED 0x0000000000000040U
+#define SEG_MONITORED 0x0000000000000080U
+#define SEG_REPLICATOR 0x0000000000000100U
+#define SEG_REPLICATOR_DEV 0x0000000000000200U
+#define SEG_RAID 0x0000000000000400U
+#define SEG_THIN_POOL 0x0000000000000800U
+#define SEG_THIN_VOLUME 0x0000000000001000U
+#define SEG_CACHE 0x0000000000002000U
+#define SEG_CACHE_POOL 0x0000000000004000U
+#define SEG_MIRROR 0x0000000000008000U
+#define SEG_ONLY_EXCLUSIVE 0x0000000000010000U /* In cluster only exlusive activation */
+#define SEG_CAN_ERROR_WHEN_FULL 0x0000000000020000U
+#define SEG_UNKNOWN 0x8000000000000000U
+
+#define SEG_TYPE_NAME_LINEAR "linear"
+#define SEG_TYPE_NAME_STRIPED "striped"
+#define SEG_TYPE_NAME_MIRROR "mirror"
+#define SEG_TYPE_NAME_RAID1 "raid1"
+#define SEG_TYPE_NAME_RAID10 "raid10"
+#define SEG_TYPE_NAME_RAID4 "raid4"
+#define SEG_TYPE_NAME_RAID5 "raid5"
+#define SEG_TYPE_NAME_RAID5_LA "raid5_la"
+#define SEG_TYPE_NAME_RAID5_LS "raid5_ls"
+#define SEG_TYPE_NAME_RAID5_RA "raid5_ra"
+#define SEG_TYPE_NAME_RAID5_RS "raid5_rs"
+#define SEG_TYPE_NAME_RAID6 "raid6"
+#define SEG_TYPE_NAME_RAID6_NC "raid6_nc"
+#define SEG_TYPE_NAME_RAID6_NR "raid6_nr"
+#define SEG_TYPE_NAME_RAID6_ZR "raid6_zr"
+
+#define segtype_is_linear(segtype) (!strcmp(segtype->name, SEG_TYPE_NAME_LINEAR))
#define segtype_is_cache(segtype) ((segtype)->flags & SEG_CACHE ? 1 : 0)
#define segtype_is_cache_pool(segtype) ((segtype)->flags & SEG_CACHE_POOL ? 1 : 0)
#define segtype_is_mirrored(segtype) ((segtype)->flags & SEG_AREAS_MIRRORED ? 1 : 0)
@@ -86,7 +103,7 @@ struct dev_manager;
struct segment_type {
struct dm_list list; /* Internal */
- uint32_t flags;
+ uint64_t flags;
uint32_t parity_devs; /* Parity drives required by segtype */
struct segtype_handler *ops;
@@ -157,19 +174,6 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
#endif
-#define SEG_TYPE_NAME_RAID1 "raid1"
-#define SEG_TYPE_NAME_RAID10 "raid10"
-#define SEG_TYPE_NAME_RAID4 "raid4"
-#define SEG_TYPE_NAME_RAID5 "raid5"
-#define SEG_TYPE_NAME_RAID5_LA "raid5_la"
-#define SEG_TYPE_NAME_RAID5_LS "raid5_ls"
-#define SEG_TYPE_NAME_RAID5_RA "raid5_ra"
-#define SEG_TYPE_NAME_RAID5_RS "raid5_rs"
-#define SEG_TYPE_NAME_RAID6 "raid6"
-#define SEG_TYPE_NAME_RAID6_NC "raid6_nc"
-#define SEG_TYPE_NAME_RAID6_NR "raid6_nr"
-#define SEG_TYPE_NAME_RAID6_ZR "raid6_zr"
-
#ifdef REPLICATOR_INTERNAL
int init_replicator_segtype(struct cmd_context *cmd, struct segtype_library *seglib);
#endif
diff --git a/lib/raid/raid.c b/lib/raid/raid.c
index ae70cdd..290a590 100644
--- a/lib/raid/raid.c
+++ b/lib/raid/raid.c
@@ -434,7 +434,7 @@ static struct segtype_handler _raid_ops = {
static const struct raid_type {
const char name[12];
unsigned parity;
- int extra_flags;
+ uint64_t extra_flags;
} _raid_types[] = {
{ SEG_TYPE_NAME_RAID1, 0, SEG_AREAS_MIRRORED },
{ SEG_TYPE_NAME_RAID10, 0, SEG_AREAS_MIRRORED },
@@ -452,7 +452,7 @@ static const struct raid_type {
static struct segment_type *_init_raid_segtype(struct cmd_context *cmd,
const struct raid_type *rt,
- int monitored)
+ uint64_t monitored)
{
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
@@ -482,7 +482,7 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl
{
struct segment_type *segtype;
unsigned i;
- int monitored = 0;
+ uint64_t monitored = 0;
#ifdef DEVMAPPER_SUPPORT
# ifdef DMEVENTD
8 years, 6 months
v2_02_132 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=49eab66208d21c...
Commit: 49eab66208d21cb7718f56ac72fd58632251482e
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2015-09-22 15:00 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2015-09-22 15:00 +0000
annotated tag: v2_02_132 has been created
at 49eab66208d21cb7718f56ac72fd58632251482e (tag)
tagging 629398d0f275e6ee5abf7929bc80e671e9f141c7 (commit)
replaces v2_02_131
Release 2.02.132.
38 files changed, 1191 insertions(+), 629 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlYBbSAACgkQIoGRwVZ+LBd3FACfWkD5EI1nvmWmgYJCofFmDddw
GXsAnRICDM2H7tyDEl965wgBo0aT+8fc
=BcQY
-----END PGP SIGNATURE-----
Alasdair G Kergon (3):
post-release
lvmcache: Remove verbose msg when rescanning dev.
pre-release
David Teigland (1):
lvmlockd: unlock lv if command fails before lock completes
Heinz Mauelshagen (1):
uuid: Report invalid character.
Peter Rajnoha (19):
format-text: label: fix missing dev assignment for struct label in _text_pv_write
libdm: report: make it possible to use blank value as selection for string list report field
libdm: dev_node: use lstat instead of stat while removing and renaming nodes
libdm: file: add proper checks for directory components in dm_create_dir
WHATS_NEW: commit 6c0b4a2769067048fa144814e298a3272564c475
cleanup: report: reuse existing _uuid_disp fn to report pv_uuid field
lv: add 'mem' arg for lv_uuid_dup
report: add lv_pool_lv_uuid field
report: add lv_origin_uuid field
report: add lv_metadata_lv_uuid field
report: add lv_data_lv_uuid field
report: add lv_mirror_log_uuid field
pv: add 'mem' arg for pv_uuid_dup and pv_name_dup
report: add lv_move_pv_uuid field
report: add lv_convert_lv_uuid field
WHATS_NEW: commits cb8f29d1473d993d890387fe24331c9b9fe4713c - a54b4bba3578e371bb36ddb3b040a71825a62814
wiping: warn if use_blkid_wiping=1 is set and LVM not compiled with blkid_wiping support
lvmconf: set locking_type=2 if external library is requested
man: drop superfluous '--' in lvmconf man page for --enable/disable-halvm
Zdenek Kabelac (12):
libdm: parse Overflow string from snapshot status
dmsetup: use noflush with force removal
dmsetup: improve help text
man: enhance dmsetup/dmstats
man: use PD/HP for compressed lines
tests: use remount-ro for extfs
tests: check dmsetup remove --force
clvmd: update help test
man: update man pages
lvchange: update help text
tests: check for block device
tests: update removal test
8 years, 6 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3a8a37187d65e2...
Commit: 3a8a37187d65e2c84f98d39e06bdee7000e34875
Parent: 629398d0f275e6ee5abf7929bc80e671e9f141c7
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Sep 22 16:06:07 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Sep 22 16:06:07 2015 +0100
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 407d6c3..3d59279 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.132(2)-git (2015-09-22)
+2.02.133(2)-git (2015-09-22)
diff --git a/VERSION_DM b/VERSION_DM
index 60f6390..0cc8062 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.109-git (2015-09-22)
+1.02.110-git (2015-09-22)
diff --git a/WHATS_NEW b/WHATS_NEW
index 53940a3..6a97dc4 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.133 -
+======================================
+
Version 2.02.132 - 22nd September 2015
======================================
Fix lvmconf to set locking_type=2 if external locking library is requested.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 83cfdff..51e1be6 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.110 -
+======================================
+
Version 1.02.109 - 22nd September 2016
======================================
Update man pages for dmsetup and dmstats.
8 years, 6 months
master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=629398d0f275e6...
Commit: 629398d0f275e6ee5abf7929bc80e671e9f141c7
Parent: fd773dffb2ba2bf421441065f87562070e67dfd6
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Sep 22 16:00:10 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Sep 22 16:00:10 2015 +0100
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 2 +-
WHATS_NEW_DM | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/VERSION b/VERSION
index a57faee..407d6c3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.132(2)-git (2015-09-15)
+2.02.132(2)-git (2015-09-22)
diff --git a/VERSION_DM b/VERSION_DM
index bb84883..60f6390 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.109-git (2015-09-15)
+1.02.109-git (2015-09-22)
diff --git a/WHATS_NEW b/WHATS_NEW
index ae40c0b..53940a3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,4 +1,4 @@
-Version 2.02.132 -
+Version 2.02.132 - 22nd September 2015
======================================
Fix lvmconf to set locking_type=2 if external locking library is requested.
Remove verbose message when rescanning an unchanged device. (2.02.119)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 55f5f0f..83cfdff 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,4 +1,4 @@
-Version 1.02.109 -
+Version 1.02.109 - 22nd September 2016
======================================
Update man pages for dmsetup and dmstats.
Improve help text for dmsetup.
8 years, 6 months
master - man: drop superfluous '--' in lvmconf man page for --enable/disable-halvm
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fd773dffb2ba2b...
Commit: fd773dffb2ba2bf421441065f87562070e67dfd6
Parent: 001f747963d66e4cff8e827afb710961193b9f03
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Sep 22 14:27:40 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Sep 22 14:28:31 2015 +0200
man: drop superfluous '--' in lvmconf man page for --enable/disable-halvm
---
man/lvmconf.8.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvmconf.8.in b/man/lvmconf.8.in
index 1ce7061..44cb52b 100644
--- a/man/lvmconf.8.in
+++ b/man/lvmconf.8.in
@@ -6,8 +6,8 @@ lvmconf \(em LVM configuration modifier
.B lvmconf
.RB [ \-\-disable-cluster ]
.RB [ \-\-enable-cluster ]
-.RB [ \-\---enable-halvm ]
-.RB [ \-\---disable-halvm ]
+.RB [ \-\-enable-halvm ]
+.RB [ \-\-disable-halvm ]
.RB [ \-\-file
.RI < configfile >]
.RB [ \-\-lockinglib
8 years, 6 months