diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index d74c57150..cb7e6b7cd 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -3281,7 +3281,7 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd, log_debug("Adjusted allocation request to %" PRIu32 " logical extents. Existing size %" PRIu32 ". New size %" PRIu32 ".", total_extents, existing_extents, total_extents + existing_extents); if (ah->log_len) - log_debug("Mirror log of %" PRIu32 " extents of size %" PRIu32 "sectors needed for region size %" PRIu32 ".", + log_debug("Mirror log of %" PRIu32 " extents of size %" PRIu32 " sectors needed for region size %" PRIu32 ".", ah->log_len, extent_size, ah->region_size); if (mirrors || stripes) diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 4498f2fdc..c46802a2b 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -190,6 +190,38 @@ static void _clear_allocation_prohibited(struct dm_list *pvs) pvl->pv->status &= ~PV_ALLOCATION_PROHIBITED; } +/* FIXME Move this out */ +/* Write, commit and optionally backup metadata of vg */ +static int _vg_write_commit_backup(struct volume_group *vg) +{ + if (!vg_write(vg) || !vg_commit(vg)) { + log_error("Failed to commit VG %s metadata.", vg->name); + return 0; + } + + if (!backup(vg)) + log_warn("WARNING: Backup of VG %s metadata failed. Continuing.", vg->name); + + return 1; +} + +/* + * Deactivate and remove the LVs on removal_lvs list from vg. + */ +static int _deactivate_and_remove_lvs(struct volume_group *vg, struct dm_list *removal_lvs) +{ + struct lv_list *lvl; + + dm_list_iterate_items(lvl, removal_lvs) { + if (!deactivate_lv(vg->cmd, lvl->lv)) + return_0; + if (!lv_remove(lvl->lv)) + return_0; + } + + return 1; +} + /* * _raid_in_sync * @lv @@ -1494,21 +1526,6 @@ int lv_raid_merge(struct logical_volume *image_lv) return 1; } -/* - * Deactivate and remove the LVs on removal_lvs list from vg. - */ -static int _deactivate_and_remove_lvs(struct volume_group *vg, struct dm_list *removal_lvs) -{ - struct lv_list *lvl; - - dm_list_iterate_items(lvl, removal_lvs) - if (!deactivate_lv(vg->cmd, lvl->lv) || - !lv_remove(lvl->lv)) - return_0; - - return 1; -} - /* * Allocate metadata devs for all @new_data_devs and link them to list @new_meta_lvs */ @@ -1769,22 +1786,6 @@ static int _alloc_and_add_rmeta_devs_for_lv(struct logical_volume *lv, struct dm return 1; } - -/* FIXME Move this out */ -/* Write, commit and optionally backup metadata of vg */ -static int _vg_write_commit_backup(struct volume_group *vg) -{ - if (!vg_write(vg) || !vg_commit(vg)) { - log_error("Failed to commit VG %s metadata.", vg->name); - return 0; - } - - if (!backup(vg)) - log_warn("WARNING: Backup of VG %s metadata failed. Continuing.", vg->name); - - return 1; -} - /* * Eliminate the extracted LVs on @removal_lvs from @vg incl. vg write, commit and backup */