mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
rename lv_remap_error
This commit is contained in:
parent
58a63ae973
commit
db24ceca33
@ -461,7 +461,7 @@ int lv_empty(struct logical_volume *lv)
|
||||
/*
|
||||
* Empty an LV and add error segment.
|
||||
*/
|
||||
int lv_remap_error(struct logical_volume *lv)
|
||||
int replace_lv_with_error_segment(struct logical_volume *lv)
|
||||
{
|
||||
uint32_t len = lv->le_count;
|
||||
|
||||
|
@ -379,7 +379,7 @@ int lv_reduce(struct logical_volume *lv, uint32_t extents);
|
||||
int lv_empty(struct logical_volume *lv);
|
||||
|
||||
/* Empty an LV and add error segment */
|
||||
int lv_remap_error(struct logical_volume *lv);
|
||||
int replace_lv_with_error_segment(struct logical_volume *lv);
|
||||
|
||||
/* Entry point for all LV extent allocations */
|
||||
int lv_extend(struct logical_volume *lv,
|
||||
|
@ -521,7 +521,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
|
||||
_remove_mirror_log(mirrored_seg);
|
||||
lv->status &= ~MIRRORED;
|
||||
lv->status &= ~MIRROR_NOTSYNCED;
|
||||
if (!lv_remap_error(lv))
|
||||
if (!replace_lv_with_error_segment(lv))
|
||||
return_0;
|
||||
remove_log = 1;
|
||||
} else if (remove_log)
|
||||
@ -616,7 +616,7 @@ int remove_mirror_images(struct logical_volume *lv, uint32_t num_mirrors,
|
||||
/* Some mirrors are removed from the temporary mirror,
|
||||
* but the temporary layer still exists.
|
||||
* Down the stack and retry for remainder. */
|
||||
next_lv = find_tmp_mirror(next_lv);
|
||||
next_lv = find_temporary_mirror(next_lv);
|
||||
}
|
||||
|
||||
num_removed -= r;
|
||||
|
@ -54,7 +54,6 @@ static int _remove_lv(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
struct list *snh, *snht;
|
||||
struct logical_volume *cow;
|
||||
struct lv_list *lvl;
|
||||
uint32_t extents;
|
||||
struct lvinfo info;
|
||||
int first = 1;
|
||||
|
||||
@ -116,19 +115,10 @@ static int _remove_lv(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
* the mirrored LV also should be cleaned up.
|
||||
* Clean-up is currently done by caller (_make_vg_consistent()).
|
||||
*/
|
||||
if ((lv_info(cmd, lv, &info, 0, 0) && info.exists)
|
||||
|| find_mirror_seg(first_seg(lv))) {
|
||||
extents = lv->le_count;
|
||||
if (!lv_empty(lv)) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
if (!lv_add_virtual_segment(lv, 0, extents,
|
||||
get_segtype_from_string(cmd,
|
||||
"error"))) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
if ((lv_info(cmd, lv, &info, 0, 0) && info.exists) ||
|
||||
find_mirror_seg(first_seg(lv))) {
|
||||
if (!replace_lv_with_error_segment(lv))
|
||||
return_0;
|
||||
|
||||
if (!(lvl = dm_pool_alloc(cmd->mem, sizeof(*lvl)))) {
|
||||
log_error("lv_list alloc failed");
|
||||
|
Loading…
Reference in New Issue
Block a user