master - cleanup: use display_lvname and msg cleanup
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5fd5cfe06143cc7323efb9b76a4d520cc9442df8 Commit: 5fd5cfe06143cc7323efb9b76a4d520cc9442df8 Parent: 0ad95b77d0f3eb38bc678bf15ecb899e109287cc Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Nov 16 15:11:07 2016 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Nov 23 17:48:01 2016 +0100
cleanup: use display_lvname and msg cleanup
Use display_lvname in tracing messages.
Add some missing 'dots' to messages.
--- daemons/dmeventd/plugins/raid/dmeventd_raid.c | 2 +- lib/metadata/lv_manip.c | 21 ++-- lib/metadata/mirror.c | 212 +++++++++++++------------ lib/metadata/raid_manip.c | 4 +- tools/lvconvert.c | 8 +- 5 files changed, 126 insertions(+), 121 deletions(-)
daemons/dmeventd/plugins/raid/dmeventd_raid.c +1 -1
@@ -61,7 +61,7 @@ static int _process_raid_event(struct dso_state *state, char *params, const charif (status->insync_regions < status->total_regions) {if (!state->warned)log_warn ("WARNING: waiting for resynchronization to finish " -"before initiating repair on RAID device %s" , device); +"before initiating repair on RAID device %s." , device); state->warned =1 ; goto out;/* Not yet done syncing with accessible devices */
lib/metadata/lv_manip.c +11 -10
@@ -1132,14 +1132,15 @@ int set_lv_segment_area_lv(struct lv_segment *seg, uint32_t area_num, struct logical_volume *lv, uint32_t le, uint64_t status) { - log_very_verbose("Stack %s:%" PRIu32 "[%" PRIu32 "] on LV %s:%" PRIu32, - seg->lv->name, seg->le, area_num, lv->name, le); + log_very_verbose("Stack %s:" FMTu32 "[" FMTu32 "] on LV %s:" FMTu32 ".", + display_lvname(seg->lv), seg->le, area_num, +display_lvname (lv ),le );if (status &RAID_META ) { seg->meta_areas[area_num].type =AREA_LV ;seg_metalv (seg, area_num) = lv;if (le) { -log_error (INTERNAL_ERROR "Meta le != 0" ); +log_error (INTERNAL_ERROR "Meta le != 0." );return 0 ; }seg_metale (seg, area_num) =0 ;
@@ -3617,16 +3618,16 @@ int lv_add_mirror_areas(struct alloc_handle *ah, dm_list_iterate_items(aa, &ah->alloced_areas[0]) {if (!(seg =find_seg_by_le (lv, current_le))) { -log_error ("Failed to find segment for %s extent %" - PRIu32, lv->name, current_le); +log_error ("Failed to find segment for %s extent " FMTu32"." , +display_lvname (lv), current_le);return 0 ; }/* Allocator assures aa[0].len <= seg->area_len */ if (aa[0 ].len < seg->area_len) {if (!lv_split_segment (lv, seg->le + aa[0 ].len)) { -log_error ("Failed to split segment at %s " -"extent %" PRIu32, lv->name, le); +log_error ("Failed to split segment at %s extent " FMTu32"." , +display_lvname (lv), le);return 0 ; } }
@@ -3675,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 ("Mirror layer must be inserted before adding mirrors." );return 0 ; }
@@ -3685,7 +3686,7 @@ int lv_add_mirror_lvs(struct logical_volume *lv, return_0;if (region_size && region_size != seg->region_size) { -log_error ("Conflicting region_size" ); +log_error ("Conflicting region_size." );return 0 ; }
@@ -3694,7 +3695,7 @@ int lv_add_mirror_lvs(struct logical_volume *lv,if (!_lv_segment_add_areas (lv, seg, new_area_count)) {log_error ("Failed to allocate widened LV segment for %s." , - lv->name); +display_lvname (lv));return 0 ; }
lib/metadata/mirror.c +108 -104
563 lines not on this page · raw message
lib/metadata/raid_manip.c +2 -2
@@ -283,8 +283,8 @@ static int _raid_in_sync(struct logical_volume *lv)* https://bugzilla.redhat.com/1210637 */ if (!lv_raid_percent (lv, &sync_percent)) { -log_error ("Unable to determine sync status of %s/%s." , - lv->vg->name, lv->name); +log_error ("Unable to determine sync status of %s." , +display_lvname (lv));return 0 ; }if (sync_percent >DM_PERCENT_0 )
tools/lvconvert.c +4 -4
@@ -1484,7 +1484,8 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd,*/ if (lv_is_origin (lv)) {log_error ("Can't add additional mirror images to " -"mirrors that are under snapshots," ); +"mirror %s which is under snapshots." , +display_lvname (lv));return 0 ; }
@@ -1767,13 +1768,12 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,uint32_t new_log_count;if ((lp->corelog || lp->mirrorlog) && *lp->type_str &&strcmp (lp->type_str,SEG_TYPE_NAME_MIRROR )) { -log_error ("--corelog and --mirrorlog are only compatible with mirror devices" ); +log_error ("--corelog and --mirrorlog are only compatible with mirror devices." );return 0 ; }if (lp->merge_mirror) { -log_error ("Unable to merge mirror images" -"of segment type 'mirror'." ); +log_error ("Unable to merge mirror images of segment type 'mirror'." );return 0 ; }