[lvm-devel] [PATCH] handle transient errors in lvconvert --repair

Petr Rockai prockai at redhat.com
Wed May 19 20:26:43 UTC 2010


Hi Taka,

Takahiro Yasui <tyasui at redhat.com> writes:

>>>> +	if (failed_mirrors) {
>>>> +		if (!lv_remove_mirrors(cmd, lv, failed_mirrors, new_log_count,
>>>> +				       _is_partial_lv, NULL, 0))
>
> +        if (failed_mirrors || failed_log) {
> +                if (!lv_remove_mirrors(cmd, lv, failed_mirrors, failed_log,
> +                                       _is_partial_lv, NULL, 0)) {
>

if (failed_mirrors || failed_log) is actually the same (well, should be)
as if (1) at this point... Anyway, if you have seen my previous mail,
the thing that actually is required to be called every time is
_reload_lv, which does metadata writing. The lv_remove_mirrors call is
only needed if failed_mirrors is true, since _lv_update_log_type should
have already dealt with log. If failed_log is true, then new_log_count
is 0 for disklog mirrors in the _lv_update_log_type call.

This is all still broken for mirrored logs, but this is not completely
easy to fix, so I'll defer that for now.

Yours,
   Petr.

PS: failed_mirrors would probably be better called failed_images...




More information about the lvm-devel mailing list