mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
raid: restore mirror handling in _raid_in_sync
Function is not having the best name since it does check no just raid LVs to be in sync. Restore the mirror percentage checking - although without retries, since only raid target is currently known to need it - for other types it would be ATM a bug to get inconsistent result.
This commit is contained in:
parent
edcc410835
commit
05920e3818
@ -398,7 +398,14 @@ static int _raid_in_sync(const struct logical_volume *lv)
|
||||
if (seg_is_striped(first_seg(lv)))
|
||||
return 1;
|
||||
|
||||
do {
|
||||
if (!lv_is_raid(lv)) {
|
||||
/* For non raid - fallback to mirror percentage */
|
||||
if (!lv_mirror_percent(lv->vg->cmd, lv, 0, &sync_percent, NULL)) {
|
||||
log_error("Cannot determine sync percentage of %s.",
|
||||
display_lvname(lv));
|
||||
return 0;
|
||||
}
|
||||
} else do {
|
||||
/*
|
||||
* FIXME We repeat the status read here to workaround an
|
||||
* unresolved kernel bug when we see 0 even though the
|
||||
|
Loading…
Reference in New Issue
Block a user