master - thin: check for active lv
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=75a5de1462c30f...
Commit: 75a5de1462c30f364c7d478a4f74f355ce559ae9
Parent: ef6508e9a4ca7e9e2827b59c3e22f6442dcc72d0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Sep 15 13:42:43 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Sep 15 13:51:19 2014 +0200
thin: check for active lv
Before calling deactivate, check the lv is actually active,
as we may reach this 'bad' error path with pool_lv inactive.
---
WHATS_NEW | 1 +
lib/metadata/pool_manip.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index ac9d9a5..c48b979 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.112 -
=====================================
+ Avoid leaving linear logical volume when thin pool creation fails.
Demote an error to a warning when devices known to lvmetad are filtered out.
Re-order filter evaluation, making component filters global.
Don't leak alloc_handle on raid target error path.
diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c
index 0ed5d64..0c66c77 100644
--- a/lib/metadata/pool_manip.c
+++ b/lib/metadata/pool_manip.c
@@ -450,7 +450,8 @@ int create_pool(struct logical_volume *pool_lv,
bad:
if (activation()) {
- if (deactivate_lv_local(pool_lv->vg->cmd, pool_lv)) {
+ if (lv_is_active_locally(pool_lv) &&
+ deactivate_lv_local(pool_lv->vg->cmd, pool_lv)) {
log_error("Aborting. Could not deactivate pool %s.",
pool_lv->name);
return 0;
9 years
master - WHATS_NEW for filter-related changes
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ef6508e9a4ca7e...
Commit: ef6508e9a4ca7e9e2827b59c3e22f6442dcc72d0
Parent: 30e0c0d863ed64b0ec74af6b4c0c0bfac39fccf4
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Sat Sep 13 17:34:13 2014 +0200
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Sat Sep 13 17:34:13 2014 +0200
WHATS_NEW for filter-related changes
---
WHATS_NEW | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index f127d7d..ac9d9a5 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.112 -
=====================================
+ Demote an error to a warning when devices known to lvmetad are filtered out.
+ Re-order filter evaluation, making component filters global.
Don't leak alloc_handle on raid target error path.
Properly validate raid leg names.
Archive metadata before starting their modification in raid target.
9 years
master - libdm: finish the comment
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=30e0c0d863ed64...
Commit: 30e0c0d863ed64b0ec74af6b4c0c0bfac39fccf4
Parent: 5895657b5941f78969ab0c1a97cade5084c95166
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Sep 12 15:35:57 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Sep 12 15:35:57 2014 +0200
libdm: finish the comment
---
libdm/ioctl/libdm-iface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index fb9bafd..c308fd2 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -306,7 +306,7 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor)
/*
* If require_module_loaded=0, caller is responsible to check
* whether _dm_device_major or _dm_bitset is really set. If
- * it's not, it means
+ * it's not, it means the module is not loaded.
*/
static int _create_dm_bitset(int require_module_loaded)
{
9 years
master - libdm: fix dm_is_dm_major to not issue error about missing /proc lines for dm module.
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5895657b5941f7...
Commit: 5895657b5941f78969ab0c1a97cade5084c95166
Parent: 25ae9383bbdec063257f67ac2dee8defd24aa2cf
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Sep 12 15:17:57 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Sep 12 15:28:51 2014 +0200
libdm: fix dm_is_dm_major to not issue error about missing /proc lines for dm module.
This is probably better approach than 3880ca5ecad1761bd13a190c58f8f85fdd7cd0e1.
If dm module is not loaded during dm_is_dm_major call, there are no
lines for dm in /proc/devices, of course. Normally, dm_is_dm_major
is called to check existing devices, hence if module is not loaded,
we can expect there's no DM device present at the same time so we
can directly return 0 here (meaning the major number being inspected
is not dm device's one).
See also https://bugzilla.redhat.com/show_bug.cgi?id=1059711.
---
WHATS_NEW_DM | 1 +
libdm/ioctl/libdm-iface.c | 52 +++++++++++++++++++++++++++++++++-----------
2 files changed, 40 insertions(+), 13 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 4effe09..d60b35f 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.91 -
====================================
+ Fix dm_is_dm_major to not issue error about missing /proc lines for dm module.
Version 1.02.90 - 1st September 2014
====================================
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index 7d50f3a..fb9bafd 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -165,9 +165,13 @@ static int _uname(void)
/*
* Set number to NULL to populate _dm_bitset - otherwise first
* match is returned.
+ * Returns:
+ * 0 - error
+ * 1 - success - number found
+ * 2 - success - number not found (only if require_module_loaded=0)
*/
static int _get_proc_number(const char *file, const char *name,
- uint32_t *number)
+ uint32_t *number, int require_module_loaded)
{
FILE *fl;
char nm[256];
@@ -199,8 +203,11 @@ static int _get_proc_number(const char *file, const char *name,
free(line);
if (number) {
- log_error("%s: No entry for %s found", file, name);
- return 0;
+ if (require_module_loaded) {
+ log_error("%s: No entry for %s found", file, name);
+ return 0;
+ } else
+ return 2;
}
return 1;
@@ -208,8 +215,8 @@ static int _get_proc_number(const char *file, const char *name,
static int _control_device_number(uint32_t *major, uint32_t *minor)
{
- if (!_get_proc_number(PROC_DEVICES, MISC_NAME, major) ||
- !_get_proc_number(PROC_MISC, DM_NAME, minor)) {
+ if (!_get_proc_number(PROC_DEVICES, MISC_NAME, major, 1) ||
+ !_get_proc_number(PROC_MISC, DM_NAME, minor, 1)) {
*major = 0;
return 0;
}
@@ -296,8 +303,15 @@ static int _create_control(const char *control, uint32_t major, uint32_t minor)
/*
* FIXME Update bitset in long-running process if dm claims new major numbers.
*/
-static int _create_dm_bitset(void)
+/*
+ * If require_module_loaded=0, caller is responsible to check
+ * whether _dm_device_major or _dm_bitset is really set. If
+ * it's not, it means
+ */
+static int _create_dm_bitset(int require_module_loaded)
{
+ int r;
+
#ifdef DM_IOCTLS
if (_dm_bitset || _dm_device_major)
return 1;
@@ -315,7 +329,8 @@ static int _create_dm_bitset(void)
_dm_multiple_major_support = 0;
if (!_dm_multiple_major_support) {
- if (!_get_proc_number(PROC_DEVICES, DM_NAME, &_dm_device_major))
+ if (!_get_proc_number(PROC_DEVICES, DM_NAME, &_dm_device_major,
+ require_module_loaded))
return 0;
return 1;
}
@@ -324,10 +339,15 @@ static int _create_dm_bitset(void)
if (!(_dm_bitset = dm_bitset_create(NULL, NUMBER_OF_MAJORS)))
return 0;
- if (!_get_proc_number(PROC_DEVICES, DM_NAME, NULL)) {
+ r = _get_proc_number(PROC_DEVICES, DM_NAME, NULL, require_module_loaded);
+ if (!r || r == 2) {
dm_bitset_destroy(_dm_bitset);
_dm_bitset = NULL;
- return 0;
+ /*
+ * It's not an error if we didn't find anything and we
+ * didn't require module to be loaded at the same time.
+ */
+ return r == 2;
}
return 1;
@@ -338,13 +358,19 @@ static int _create_dm_bitset(void)
int dm_is_dm_major(uint32_t major)
{
- if (!_create_dm_bitset())
+ if (!_create_dm_bitset(0))
return 0;
- if (_dm_multiple_major_support)
+ if (_dm_multiple_major_support) {
+ if (!_dm_bitset)
+ return 0;
return dm_bit(_dm_bitset, major) ? 1 : 0;
- else
+ }
+ else {
+ if (!_dm_device_major)
+ return 0;
return (major == _dm_device_major) ? 1 : 0;
+ }
}
static void _close_control_fd(void)
@@ -406,7 +432,7 @@ static int _open_control(void)
if (!_open_and_assign_control_fd(control))
goto_bad;
- if (!_create_dm_bitset()) {
+ if (!_create_dm_bitset(1)) {
log_error("Failed to set up list of device-mapper major numbers");
return 0;
}
9 years
master - revert: commit 3880ca5ecad1761bd13a190c58f8f85fdd7cd0e1
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=25ae9383bbdec0...
Commit: 25ae9383bbdec063257f67ac2dee8defd24aa2cf
Parent: ae08a3a2945b277af81a4cff42c6dcfb26f12fae
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Sep 12 15:16:08 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Sep 12 15:28:51 2014 +0200
revert: commit 3880ca5ecad1761bd13a190c58f8f85fdd7cd0e1
There's a better solution to this...
---
WHATS_NEW_DM | 1 -
libdm/ioctl/libdm-iface.c | 40 +++++++++++-----------------------------
2 files changed, 11 insertions(+), 30 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 1374934..4effe09 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,6 +1,5 @@
Version 1.02.91 -
====================================
- Use dm-mod autoloading during dm_is_dm_major call if needed (kernels>=2.6.36).
Version 1.02.90 - 1st September 2014
====================================
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index 9350912..7d50f3a 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -336,6 +336,17 @@ static int _create_dm_bitset(void)
#endif
}
+int dm_is_dm_major(uint32_t major)
+{
+ if (!_create_dm_bitset())
+ return 0;
+
+ if (_dm_multiple_major_support)
+ return dm_bit(_dm_bitset, major) ? 1 : 0;
+ else
+ return (major == _dm_device_major) ? 1 : 0;
+}
+
static void _close_control_fd(void)
{
if (_control_fd != -1) {
@@ -412,35 +423,6 @@ bad:
#endif
}
-int dm_is_dm_major(uint32_t major)
-{
- /*
- * If dm-mod module is not loaded yet during this call, we
- * can make it to load automatically in kernels >= 2.6.36
- * just by opening the dm control device. However, in older
- * kernels, there's nothing else we can do here - dm_is_dm_major
- * will fail as it can't determine this without the module
- * being loaded first - there's an error message issued for
- * this scenario deeper in this code.
- */
- if (!_uname())
- return 0;
-
- if (KERNEL_VERSION(_kernel_major, _kernel_minor, _kernel_release) >=
- KERNEL_VERSION(2, 6, 36)) {
- if (_control_fd == -1 && !_open_control())
- return 0;
- }
-
- if (!_create_dm_bitset())
- return 0;
-
- if (_dm_multiple_major_support)
- return dm_bit(_dm_bitset, major) ? 1 : 0;
- else
- return (major == _dm_device_major) ? 1 : 0;
-}
-
static void _dm_zfree_string(char *string)
{
if (string) {
9 years
master - cleanup: skip unused assign
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ae08a3a2945b27...
Commit: ae08a3a2945b277af81a4cff42c6dcfb26f12fae
Parent: 07b3e6cd746ed7633c6ce2540c675797c04a34b9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Sep 12 11:39:31 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 12 13:51:31 2014 +0200
cleanup: skip unused assign
Reset of tmp_names is only needed in else{} path.
---
lib/metadata/raid_manip.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index b72b839..c9ac405 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1712,9 +1712,7 @@ try_again:
*/
for (s = 0; s < raid_seg->area_count; s++) {
- tmp_names[s] = NULL;
sd = s + raid_seg->area_count;
- tmp_names[sd] = NULL;
if ((seg_type(raid_seg, s) == AREA_UNASSIGNED) &&
(seg_metatype(raid_seg, s) == AREA_UNASSIGNED)) {
@@ -1745,7 +1743,8 @@ try_again:
return 0;
}
lv_set_hidden(lvl->lv);
- }
+ } else
+ tmp_names[s] = tmp_names[sd] = NULL;
}
if (!lv_update_and_reload_origin(lv))
9 years
master - cleanup: avoid strlen() we know max size
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=07b3e6cd746ed7...
Commit: 07b3e6cd746ed7633c6ce2540c675797c04a34b9
Parent: ab7977de7b0c3d4586c40eca0179fbae24bc23ba
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Sep 12 11:35:51 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 12 13:51:31 2014 +0200
cleanup: avoid strlen() we know max size
Just use max NAME_LEN size buffer and copy the name.
---
lib/metadata/raid_manip.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 6883a68..b72b839 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -492,7 +492,7 @@ static int _alloc_rmeta_for_lv(struct logical_volume *data_lv,
struct dm_list allocatable_pvs;
struct alloc_handle *ah;
struct lv_segment *seg = first_seg(data_lv);
- char *p, base_name[strlen(data_lv->name) + 1];
+ char *p, base_name[NAME_LEN];
dm_list_init(&allocatable_pvs);
@@ -502,7 +502,7 @@ static int _alloc_rmeta_for_lv(struct logical_volume *data_lv,
return 0;
}
- sprintf(base_name, "%s", data_lv->name);
+ (void) dm_strncpy(base_name, data_lv->name, sizeof(base_name));
if ((p = strstr(base_name, "_mimage_")))
*p = '\0';
9 years
master - cleanup: simplify _extract_image_components
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ab7977de7b0c3d...
Commit: ab7977de7b0c3d4586c40eca0179fbae24bc23ba
Parent: 68981310916114e8659bb7754c5847a178aaea5d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 11 22:55:12 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 12 13:51:31 2014 +0200
cleanup: simplify _extract_image_components
Reorder test - first check for writable flag and then allocate.
---
lib/metadata/raid_manip.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 0c96fd0..6883a68 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1261,8 +1261,13 @@ int lv_raid_merge(struct logical_volume *image_lv)
struct lv_segment *seg;
struct volume_group *vg = image_lv->vg;
- lv_name = dm_pool_strdup(vg->vgmem, image_lv->name);
- if (!lv_name)
+ if (image_lv->status & LVM_WRITE) {
+ log_error("%s is not read-only - refusing to merge.",
+ display_lvname(image_lv));
+ return 0;
+ }
+
+ if (!(lv_name = dm_pool_strdup(vg->vgmem, image_lv->name)))
return_0;
if (!(p = strstr(lv_name, "_rimage_"))) {
@@ -1272,12 +1277,6 @@ int lv_raid_merge(struct logical_volume *image_lv)
}
*p = '\0'; /* lv_name is now that of top-level RAID */
- if (image_lv->status & LVM_WRITE) {
- log_error("%s/%s is not read-only - refusing to merge",
- vg->name, image_lv->name);
- return 0;
- }
-
if (!(lvl = find_lv_in_vg(vg, lv_name))) {
log_error("Unable to find containing RAID array for %s.",
display_lvname(image_lv));
9 years
master - cleanup: missing error message
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=68981310916114...
Commit: 68981310916114e8659bb7754c5847a178aaea5d
Parent: 3e57143abd49682a90a96a95514b781289bf43f4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 11 23:32:54 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 12 13:51:31 2014 +0200
cleanup: missing error message
---
lib/metadata/raid_manip.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 92ea177..0c96fd0 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1290,8 +1290,12 @@ int lv_raid_merge(struct logical_volume *image_lv)
if (seg_lv(seg, s) == image_lv)
meta_lv = seg_metalv(seg, s);
- if (!meta_lv)
- return_0;
+ if (!meta_lv) {
+ log_error("Failed to find meta for %s in RAID array %s.",
+ display_lvname(image_lv),
+ display_lvname(lv));
+ return 0;
+ }
if (!deactivate_lv(vg->cmd, meta_lv)) {
log_error("Failed to deactivate %s before merging.",
@@ -1632,8 +1636,10 @@ int lv_raid_replace(struct logical_volume *lv,
try_again:
if (!_alloc_image_components(lv, allocate_pvs, match_count,
&new_meta_lvs, &new_data_lvs)) {
- if (!(lv->status & PARTIAL_LV))
+ if (!(lv->status & PARTIAL_LV)) {
+ log_error("LV %s in not partial.", display_lvname(lv));
return 0;
+ }
/* This is a repair, so try to do better than all-or-nothing */
match_count--;
9 years
master - cleanup: better error messages
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3e57143abd4968...
Commit: 3e57143abd49682a90a96a95514b781289bf43f4
Parent: 08914ed7c1df18dc2a16c6f896ae388ac5e7c299
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 11 23:32:37 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 12 13:51:30 2014 +0200
cleanup: better error messages
---
lib/metadata/raid_manip.c | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 58bc09b..92ea177 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -874,15 +874,17 @@ static int _raid_extract_images(struct logical_volume *lv, uint32_t new_count,
* must come first.
*/
log_error("%s has components with error targets"
- " that must be removed first: %s",
- lv->name, seg_lv(seg, s)->name);
+ " that must be removed first: %s.",
+ display_lvname(lv),
+ display_lvname(seg_lv(seg, s)));
log_error("Try removing the PV list and rerun"
" the command.");
return 0;
}
log_debug("LVs with error segments to be removed: %s %s",
- seg_metalv(seg, s)->name, seg_lv(seg, s)->name);
+ display_lvname(seg_metalv(seg, s)),
+ display_lvname(seg_lv(seg, s)));
} else {
/* Conditions for second pass */
if (!target_pvs || !lv_is_on_pvs(seg_lv(seg, s), target_pvs) ||
@@ -1264,8 +1266,8 @@ int lv_raid_merge(struct logical_volume *image_lv)
return_0;
if (!(p = strstr(lv_name, "_rimage_"))) {
- log_error("Unable to merge non-mirror image %s/%s",
- vg->name, image_lv->name);
+ log_error("Unable to merge non-mirror image %s.",
+ display_lvname(image_lv));
return 0;
}
*p = '\0'; /* lv_name is now that of top-level RAID */
@@ -1277,8 +1279,8 @@ int lv_raid_merge(struct logical_volume *image_lv)
}
if (!(lvl = find_lv_in_vg(vg, lv_name))) {
- log_error("Unable to find containing RAID array for %s/%s",
- vg->name, image_lv->name);
+ log_error("Unable to find containing RAID array for %s.",
+ display_lvname(image_lv));
return 0;
}
@@ -1292,13 +1294,14 @@ int lv_raid_merge(struct logical_volume *image_lv)
return_0;
if (!deactivate_lv(vg->cmd, meta_lv)) {
- log_error("Failed to deactivate %s", meta_lv->name);
+ log_error("Failed to deactivate %s before merging.",
+ display_lvname(meta_lv));
return 0;
}
if (!deactivate_lv(vg->cmd, image_lv)) {
- log_error("Failed to deactivate %s/%s before merging",
- vg->name, image_lv->name);
+ log_error("Failed to deactivate %s before merging.",
+ display_lvname(image_lv));
return 0;
}
lv_set_hidden(image_lv);
@@ -1796,15 +1799,13 @@ int lv_raid_remove_missing(struct logical_volume *lv)
log_debug("Replacing %s and %s segments with error target",
seg_lv(seg, s)->name, seg_metalv(seg, s)->name);
if (!replace_lv_with_error_segment(seg_lv(seg, s))) {
- log_error("Failed to replace %s/%s's extents"
- " with error target", lv->vg->name,
- seg_lv(seg, s)->name);
+ log_error("Failed to replace %s's extents with error target.",
+ display_lvname(seg_lv(seg, s)));
return 0;
}
if (!replace_lv_with_error_segment(seg_metalv(seg, s))) {
- log_error("Failed to replace %s/%s's extents"
- " with error target", lv->vg->name,
- seg_metalv(seg, s)->name);
+ log_error("Failed to replace %s's extents with error target.",
+ display_lvname(seg_metalv(seg, s)));
return 0;
}
}
9 years