master - debug: stack tracing corrections
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a7404b5b830479...
Commit: a7404b5b830479e9ff7dd634e015c9ebcdb9b20b
Parent: 4f39255dcae168621de9eea264dddfe831286a0d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 10:30:52 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
debug: stack tracing corrections
---
lib/metadata/mirror.c | 2 +-
tools/lvconvert.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index df99174..e84916e 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -1822,7 +1822,7 @@ static int _form_mirror(struct cmd_context *cmd, struct alloc_handle *ah,
if (dm_list_size(&lv->segments) != 1 ||
seg_type(first_seg(lv), 0) != AREA_LV)
if (!insert_layer_for_lv(cmd, lv, 0, "_mimage_%d"))
- return 0;
+ return_0;
/*
* create mirror image LVs
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index f50a551..dc32e37 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1806,7 +1806,7 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
if (!_lvconvert_mirrors_parse_params(cmd, lv, lp,
&old_mimage_count, &old_log_count,
&new_mimage_count, &new_log_count))
- return 0;
+ return_0;
if (((old_mimage_count < new_mimage_count && old_log_count > new_log_count) ||
(old_mimage_count > new_mimage_count && old_log_count < new_log_count)) &&
@@ -1827,7 +1827,9 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
if (!_lvconvert_mirrors_aux(cmd, lv, lp, NULL,
new_mimage_count, new_log_count))
- return 0;
+ return_0;
+
+ backup(lv->vg);
if (!lp->need_polling)
log_print_unless_silent("Logical volume %s converted.",
@@ -1836,8 +1838,6 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
log_print_unless_silent("Logical volume %s being converted.",
display_lvname(lv));
- backup(lv->vg);
-
return 1;
}
@@ -2028,7 +2028,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
/* Activation is required later which precludes existing supported raid4 segment */
if (!_raid4_conversion_supported(lv, lp))
- return 0;
+ return_0;
/* Activation is required later which precludes existing supported raid10 segment */
if ((seg_is_raid10(seg) || segtype_is_raid10(lp->segtype)) &&
7 years, 5 months
master - cleanup: indent changes
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4f39255dcae168...
Commit: 4f39255dcae168621de9eea264dddfe831286a0d
Parent: ae95937af46989dbce992eace2914ace3b001a4a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 10:48:33 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: indent changes
---
lib/metadata/lv_manip.c | 6 ++----
lib/metadata/mirror.c | 26 +++++++++++---------------
2 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 2a02ad2..07ba8ef 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -3668,12 +3668,10 @@ int lv_add_mirror_lvs(struct logical_volume *lv,
uint32_t num_extra_areas,
uint64_t status, uint32_t region_size)
{
- struct lv_segment *seg;
- uint32_t old_area_count, new_area_count;
uint32_t m;
+ uint32_t old_area_count, new_area_count;
struct segment_type *mirror_segtype;
-
- seg = first_seg(lv);
+ struct lv_segment *seg = first_seg(lv);
if (dm_list_size(&lv->segments) != 1 || seg_type(seg, 0) != AREA_LV) {
log_error(INTERNAL_ERROR "Mirror layer must be inserted before adding mirrors.");
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index cb1f8c8..df99174 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -866,7 +866,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
struct logical_volume *sub_lv;
struct logical_volume *detached_log_lv = NULL;
struct logical_volume *temp_layer_lv = NULL;
- struct lv_segment *pvmove_seg, *mirrored_seg = first_seg(lv);
+ struct lv_segment *seg, *pvmove_seg, *mirrored_seg = first_seg(lv);
uint32_t old_area_count = mirrored_seg->area_count;
uint32_t new_area_count = mirrored_seg->area_count;
struct lv_list *lvl;
@@ -1004,7 +1004,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
*/
if (detached_log_lv && lv_is_mirrored(detached_log_lv) &&
lv_is_partial(detached_log_lv)) {
- struct lv_segment *seg = first_seg(detached_log_lv);
+ seg = first_seg(detached_log_lv);
log_very_verbose("%s being removed due to failures.",
display_lvname(detached_log_lv));
@@ -1959,16 +1959,15 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
if (activation() && segtype->ops->target_present &&
!segtype->ops->target_present(cmd, NULL, NULL)) {
log_error("%s: Required device-mapper target(s) not "
- "detected in your kernel", segtype->name);
+ "detected in your kernel.", segtype->name);
return 0;
}
/* allocate destination extents */
- ah = allocate_extents(lv->vg, NULL, segtype,
- 0, 0, log_count - old_log_count, region_size,
- lv->le_count, allocatable_pvs,
- alloc, 0, parallel_areas);
- if (!ah) {
+ if (!(ah = allocate_extents(lv->vg, NULL, segtype,
+ 0, 0, log_count - old_log_count, region_size,
+ lv->le_count, allocatable_pvs,
+ alloc, 0, parallel_areas))) {
log_error("Unable to allocate extents for mirror log.");
return 0;
}
@@ -2029,10 +2028,9 @@ int add_mirror_images(struct cmd_context *cmd, struct logical_volume *lv,
if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_MIRROR)))
return_0;
- ah = allocate_extents(lv->vg, NULL, segtype,
- stripes, mirrors, log_count, region_size, lv->le_count,
- allocatable_pvs, alloc, 0, parallel_areas);
- if (!ah) {
+ if (!(ah = allocate_extents(lv->vg, NULL, segtype,
+ stripes, mirrors, log_count, region_size, lv->le_count,
+ allocatable_pvs, alloc, 0, parallel_areas))) {
log_error("Unable to allocate extents for mirror(s).");
return 0;
}
@@ -2165,7 +2163,6 @@ int lv_add_mirrors(struct cmd_context *cmd, struct logical_volume *lv,
int lv_split_mirror_images(struct logical_volume *lv, const char *split_name,
uint32_t split_count, struct dm_list *removable_pvs)
{
- int r;
int historical;
if (lv_name_is_used_in_vg(lv->vg, split_name, &historical)) {
@@ -2192,8 +2189,7 @@ int lv_split_mirror_images(struct logical_volume *lv, const char *split_name,
* is being implemented. For now, we force the user to
* come up with a name for their LV.
*/
- r = _split_mirror_images(lv, split_name, split_count, removable_pvs);
- if (!r)
+ if (!_split_mirror_images(lv, split_name, split_count, removable_pvs))
return_0;
return 1;
7 years, 5 months
master - cleanup: defines
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ae95937af46989...
Commit: ae95937af46989dbce992eace2914ace3b001a4a
Parent: d05668c587348461b1fe86858a7b7044ccf687b1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 10:54:06 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: defines
---
lib/metadata/mirror.c | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index baa19fa..cb1f8c8 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -793,9 +793,7 @@ static int _split_mirror_images(struct logical_volume *lv,
detached_log_lv = detach_mirror_log(mirrored_seg);
if (!remove_layer_from_lv(lv, sub_lv))
return_0;
- lv->status &= ~MIRROR;
- lv->status &= ~MIRRORED;
- lv->status &= ~LV_NOTSYNCED;
+ lv->status &= ~(MIRROR | MIRRORED | LV_NOTSYNCED);
}
/*
@@ -965,16 +963,14 @@ static int _remove_mirror_images(struct logical_volume *lv,
log_error("Failed to add mirror images.");
return 0;
}
- /*
- * No longer a mirror? Even though new_area_count was 1,
- * _merge_mirror_images may have resulted into lv being still a
- * mirror. Fix up the flags if we only have one image left.
- */
- if (lv_mirror_count(lv) == 1) {
- lv->status &= ~MIRROR;
- lv->status &= ~MIRRORED;
- lv->status &= ~LV_NOTSYNCED;
- }
+ /*
+ * No longer a mirror? Even though new_area_count was 1,
+ * _merge_mirror_images may have resulted into lv being still a
+ * mirror. Fix up the flags if we only have one image left.
+ */
+ if (lv_mirror_count(lv) == 1)
+ lv->status &= ~(MIRROR | MIRRORED | LV_NOTSYNCED);
+
mirrored_seg = first_seg(lv);
if (remove_log && !detached_log_lv)
detached_log_lv = detach_mirror_log(mirrored_seg);
@@ -988,9 +984,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
/* All mirror images are gone.
* It can happen for vgreduce --removemissing. */
detached_log_lv = detach_mirror_log(mirrored_seg);
- lv->status &= ~MIRROR;
- lv->status &= ~MIRRORED;
- lv->status &= ~LV_NOTSYNCED;
+ lv->status &= ~(MIRROR | MIRRORED | LV_NOTSYNCED);
if (!replace_lv_with_error_segment(lv))
return_0;
} else if (remove_log)
7 years, 5 months
master - cleanup: use predefined macro for tmp image name
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d05668c5873484...
Commit: d05668c587348461b1fe86858a7b7044ccf687b1
Parent: c621bc3d36ee4a9fff18e7e83c5c5ac3c1e09d4f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 10:39:59 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: use predefined macro for tmp image name
---
lib/metadata/lv_manip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 8c8888e..2a02ad2 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -6574,7 +6574,7 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
if (lv_is_active_exclusive_locally(lv_where))
exclusive = 1;
- if (lv_is_active(lv_where) && strstr(name, "_mimagetmp")) {
+ if (lv_is_active(lv_where) && strstr(name, MIRROR_SYNC_LAYER)) {
log_very_verbose("Creating transient LV %s for mirror conversion in VG %s.", name, lv_where->vg->name);
segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_ERROR);
7 years, 5 months
master - cleanup: deactivate has builtin check for active lv
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c621bc3d36ee4a...
Commit: c621bc3d36ee4a9fff18e7e83c5c5ac3c1e09d4f
Parent: 74923c213fe3c876d3532ef4251e15f946e90fb5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 10:29:42 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: deactivate has builtin check for active lv
---
tools/lvconvert.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 6165320..f50a551 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1523,10 +1523,9 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd,
MIRROR_BY_LV)) {
layer_lv = seg_lv(first_seg(lv), 0);
if (!remove_layer_from_lv(lv, layer_lv) ||
- (lv_is_active(layer_lv) &&
- !deactivate_lv(cmd, layer_lv)) ||
- !lv_remove(layer_lv) || !vg_write(lv->vg) ||
- !vg_commit(lv->vg)) {
+ !deactivate_lv(cmd, layer_lv) ||
+ !lv_remove(layer_lv) ||
+ !vg_write(lv->vg) || !vg_commit(lv->vg)) {
log_error("ABORTING: Failed to remove "
"temporary mirror layer %s.",
display_lvname(layer_lv));
7 years, 5 months
master - cleanup: add doc for raid status states
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=74923c213fe3c8...
Commit: 74923c213fe3c876d3532ef4251e15f946e90fb5
Parent: e38678be3fd3ceb610ec649f5036e77a64ee24b4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 16 15:29:09 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: add doc for raid status states
Show possible values for raid fields user may get ATM.
---
WHATS_NEW_DM | 1 +
libdm/libdevmapper.h | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 72a62cc..a8dd4f5 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.137 -
====================================
+ Document raid status values.
Version 1.02.136 - 5th November 2016
====================================
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 97c3e51..09e3fcc 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -327,7 +327,9 @@ struct dm_status_raid {
uint64_t mismatch_count;
uint32_t dev_count;
char *raid_type;
+ /* A - alive, a - alive not in-sync, D - dead/failed */
char *dev_health;
+ /* idle, frozen, resync, recover, check, repair */
char *sync_action;
};
7 years, 5 months
master - cleanup: single LVM_SYSTEM_DIR string
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e38678be3fd3ce...
Commit: e38678be3fd3ceb610ec649f5036e77a64ee24b4
Parent: cc3895623c43dbbd6976f3c988e4ad26ad9ac9c8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 21 14:54:20 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: single LVM_SYSTEM_DIR string
---
daemons/lvmpolld/lvmpolld-data-utils.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/daemons/lvmpolld/lvmpolld-data-utils.c b/daemons/lvmpolld/lvmpolld-data-utils.c
index 99883f8..8debcdd 100644
--- a/daemons/lvmpolld/lvmpolld-data-utils.c
+++ b/daemons/lvmpolld/lvmpolld-data-utils.c
@@ -19,6 +19,8 @@
#include <fcntl.h>
#include <signal.h>
+static const char LVM_SYSTEM_DIR[] = "LVM_SYSTEM_DIR=";
+
static char *_construct_full_lvname(const char *vgname, const char *lvname)
{
char *name;
@@ -52,7 +54,7 @@ static char *_construct_lvm_system_dir_env(const char *sysdir)
*env = '\0';
- if (sysdir && dm_snprintf(env, l, "LVM_SYSTEM_DIR=%s", sysdir) < 0) {
+ if (sysdir && dm_snprintf(env, l, "%s%s", LVM_SYSTEM_DIR, sysdir) < 0) {
dm_free(env);
env = NULL;
}
@@ -259,8 +261,8 @@ static void _pdlv_locked_dump(struct buffer *buff, const struct lvmpolld_lv *pdl
buffer_append(buff, tmp);
if (dm_snprintf(tmp, sizeof(tmp), "\t\tlvm_command_interval=\"%s\"\n", pdlv->sinterval ?: "<undefined>") > 0)
buffer_append(buff, tmp);
- if (dm_snprintf(tmp, sizeof(tmp), "\t\tLVM_SYSTEM_DIR=\"%s\"\n",
- (*pdlv->lvm_system_dir_env ? (pdlv->lvm_system_dir_env + strlen("LVM_SYSTEM_DIR=")) : "<undefined>")) > 0)
+ if (dm_snprintf(tmp, sizeof(tmp), "\t\t%s\"%s\"\n", LVM_SYSTEM_DIR,
+ (*pdlv->lvm_system_dir_env ? (pdlv->lvm_system_dir_env + (sizeof(LVM_SYSTEM_DIR) - 1)) : "<undefined>")) > 0)
buffer_append(buff, tmp);
if (dm_snprintf(tmp, sizeof(tmp), "\t\tlvm_command_pid=%d\n", pdlv->cmd_pid) > 0)
buffer_append(buff, tmp);
7 years, 5 months
master - cleanup: hide gcc warning
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cc3895623c43db...
Commit: cc3895623c43dbbd6976f3c988e4ad26ad9ac9c8
Parent: 8a4dfe6ce7f44e2996e48fa0dd7dfd98680cae86
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 16 15:13:36 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:55:03 2016 +0100
cleanup: hide gcc warning
---
libdm/regex/parse_rx.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libdm/regex/parse_rx.c b/libdm/regex/parse_rx.c
index f9ba65c..80e97a4 100644
--- a/libdm/regex/parse_rx.c
+++ b/libdm/regex/parse_rx.c
@@ -19,6 +19,7 @@
#ifdef DEBUG
#include <ctype.h>
+__attribute__ ((__unused__))
static void _regex_print(struct rx_node *rx, int depth, unsigned show_nodes)
{
int i, numchars;
7 years, 5 months
master - cleanup: use lv_update_and_reload
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8a4dfe6ce7f44e...
Commit: 8a4dfe6ce7f44e2996e48fa0dd7dfd98680cae86
Parent: a04b4bb89ef79ebaf44804f9230f8ee8c652eb7c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 10:57:36 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:53:44 2016 +0100
cleanup: use lv_update_and_reload
Avoid code duplication and use exiting commonly used
lv_update_and_reload() function.
There is still one place left where mirror is doing strange
double suspend call - needs there more thinking what's wrong with
that code.
---
WHATS_NEW | 1 +
lib/metadata/mirror.c | 56 ++++--------------------------------------------
2 files changed, 6 insertions(+), 51 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 40a9ef4..2f96ece 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.168 -
====================================
+ Use lv_update_and_reload() inside mirror code where it applies.
Preserve mirrored status for temporary layered mirrors.
Use transient raid check before repairing raid volume.
Implement transient status check for raid volumes.
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index f5a3676..baa19fa 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -798,36 +798,12 @@ static int _split_mirror_images(struct logical_volume *lv,
lv->status &= ~LV_NOTSYNCED;
}
- if (!vg_write(mirrored_seg->lv->vg)) {
- log_error("Intermediate VG metadata write failed.");
- return 0;
- }
-
/*
- * Suspend the mirror - this includes all the sub-LVs and
- * soon-to-be-split sub-LVs
+ * Suspend and resume the mirror - this includes all
+ * the sub-LVs and soon-to-be-split sub-LVs
*/
- if (!suspend_lv(cmd, mirrored_seg->lv)) {
- log_error("Failed to lock %s", mirrored_seg->lv->name);
- vg_revert(mirrored_seg->lv->vg);
- return 0;
- }
-
- if (!vg_commit(mirrored_seg->lv->vg)) {
- resume_lv(cmd, mirrored_seg->lv);
- return 0;
- }
-
- log_very_verbose("Updating \"%s\" in kernel", mirrored_seg->lv->name);
-
- /*
- * Resume the mirror - this also activates the visible, independent
- * soon-to-be-split sub-LVs
- */
- if (!resume_lv(cmd, mirrored_seg->lv)) {
- log_error("Problem resuming %s", mirrored_seg->lv->name);
- return 0;
- }
+ if (!lv_update_and_reload(mirrored_seg->lv))
+ return_0;
/*
* Recycle newly split LV so it is properly renamed.
@@ -1062,30 +1038,8 @@ static int _remove_mirror_images(struct logical_volume *lv,
return 0;
}
- if (!vg_write(detached_log_lv->vg)) {
- log_error("intermediate VG write failed.");
- return 0;
- }
-
- if (!suspend_lv(detached_log_lv->vg->cmd,
- detached_log_lv)) {
- log_error("Failed to suspend %s",
- detached_log_lv->name);
- return 0;
- }
-
- if (!vg_commit(detached_log_lv->vg)) {
- if (!resume_lv(detached_log_lv->vg->cmd,
- detached_log_lv))
- stack;
+ if (!lv_update_and_reload(detached_log_lv))
return_0;
- }
-
- if (!resume_lv(detached_log_lv->vg->cmd, detached_log_lv)) {
- log_error("Failed to resume %s",
- detached_log_lv->name);
- return 0;
- }
}
/*
7 years, 5 months
master - cleanup: make this error an internal error
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a04b4bb89ef79e...
Commit: a04b4bb89ef79ebaf44804f9230f8ee8c652eb7c
Parent: 5fd5cfe06143cc7323efb9b76a4d520cc9442df8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 23 17:15:10 2016 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 23 17:48:01 2016 +0100
cleanup: make this error an internal error
We shouldn't get here with wrong type.
---
lib/metadata/lv_manip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 58be1db..8c8888e 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -3676,7 +3676,7 @@ int lv_add_mirror_lvs(struct logical_volume *lv,
seg = first_seg(lv);
if (dm_list_size(&lv->segments) != 1 || seg_type(seg, 0) != AREA_LV) {
- log_error("Mirror layer must be inserted before adding mirrors.");
+ log_error(INTERNAL_ERROR "Mirror layer must be inserted before adding mirrors.");
return 0;
}
7 years, 5 months