From: Alasdair Kergon Date: Tue, 20 Apr 2010 12:14:28 +0000 (+0000) Subject: Move function up file X-Git-Tag: old-v2_02_64~47 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=203d1d8371a94acf3922adb7637c0d3b5c709c07;p=lvm2.git Move function up file --- diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index e68a19b65..1f9d38e78 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -516,6 +516,21 @@ static int _move_removable_mimages_to_end(struct logical_volume *lv, return !count; } +static int _mirrored_lv_in_sync(struct logical_volume *lv) +{ + float sync_percent; + percent_range_t percent_range; + + if (!lv_mirror_percent(lv->vg->cmd, lv, 0, &sync_percent, + &percent_range, NULL)) { + log_error("Unable to determine mirror sync status of %s/%s.", + lv->vg->name, lv->name); + return 0; + } + + return (percent_range == PERCENT_100) ? 1 : 0; +} + /* * Split off 'split_count' legs from a mirror * @@ -960,21 +975,6 @@ int remove_mirror_images(struct logical_volume *lv, uint32_t num_mirrors, return 1; } -static int _mirrored_lv_in_sync(struct logical_volume *lv) -{ - float sync_percent; - percent_range_t percent_range; - - if (!lv_mirror_percent(lv->vg->cmd, lv, 0, &sync_percent, - &percent_range, NULL)) { - log_error("Unable to determine mirror sync status of %s/%s.", - lv->vg->name, lv->name); - return 0; - } - - return (percent_range == PERCENT_100) ? 1 : 0; -} - /* * Collapsing temporary mirror layers. *