master - metadata: cleanup comments and formatting
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=aaa9a68b2fc8a25377f4649b89b59a9893179633 Commit: aaa9a68b2fc8a25377f4649b89b59a9893179633 Parent: 934616d4c759cd1dfe2b359fc83632999daf1ce8 Author: Alasdair G Kergon <[email protected]> AuthorDate: Tue Jul 9 12:34:48 2013 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Tue Jul 9 12:34:48 2013 +0100
metadata: cleanup comments and formatting
--- lib/metadata/lv_manip.c | 5 ++- lib/metadata/metadata.c | 65 +++++++++++++++++++++++++-------------------- lib/metadata/thin_manip.c | 6 ++-- liblvm/lvm_base.c | 4 +- 4 files changed, 44 insertions(+), 36 deletions(-)
lib/metadata/lv_manip.c +3 -2
@@ -340,8 +340,9 @@ percent_t copy_percent(const struct logical_volume *lv) dm_list_iterate_items(seg, &lv->segments) { denominator += seg->area_len; -if ((seg_is_raid (seg) ||seg_is_mirrored (seg)) - && (seg->area_count >1 )) +/* FIXME Generalise name of 'extents_copied' field */ +if ((seg_is_raid (seg) ||seg_is_mirrored (seg)) && + (seg->area_count >1 )) numerator += seg->extents_copied;else numerator += seg->area_len;
lib/metadata/metadata.c +36 -29
108 lines not on this page · raw message
lib/metadata/thin_manip.c +3 -3
@@ -79,7 +79,7 @@ int detach_pool_lv(struct lv_segment *seg)int no_update =0 ;if (!seg->pool_lv || !lv_is_thin_pool (seg->pool_lv)) { -log_error (INTERNAL_ERROR "LV %s is not a thin volume" , +log_error (INTERNAL_ERROR "Cannot detach pool from non-thin LV %s" , seg->lv->name);return 0 ; }
@@ -154,7 +154,7 @@ int attach_pool_message(struct lv_segment *pool_seg, dm_thin_message_t type,struct lv_thin_message *tmsg;if (!seg_is_thin_pool (pool_seg)) { -log_error (INTERNAL_ERROR "LV %s is not pool." , pool_seg->lv->name); +log_error (INTERNAL_ERROR "Cannot attach message to non-pool LV %s." , pool_seg->lv->name);return 0 ; }
@@ -289,7 +289,7 @@ int pool_is_active(const struct logical_volume *lv)const struct seg_list *sl;if (!lv_is_thin_pool (lv)) { -log_error (INTERNAL_ERROR "LV %s is not pool." , lv->name); +log_error (INTERNAL_ERROR "pool_is_active called with non-pool LV %s." , lv->name);return 0 ; }
liblvm/lvm_base.c +2 -2
@@ -67,8 +67,8 @@ lvm_t lvm_init(const char *system_dir) cmd->cmd_line ="liblvm" ;/* -* Turn off writing to stderr etc., not sure if there is a better way -* to do this? +* Turn off writing to stdout/stderr. +* FIXME Fix lib/ to support a non-interactive mode instead. */ log_suppress (1 );