[lvm-devel] [PATCH] Handle transient errors for mirrored log in lvconvert --repair
Takahiro Yasui
takahiro.yasui at hds.com
Wed Aug 4 16:23:19 UTC 2010
On 07/29/10 15:54, Petr Rockai wrote:
> Takahiro Yasui <takahiro.yasui at hds.com> writes:
>> Yes, this solution is acceptable to me. As a long term, we can introduce
>> a kind of logic to keep the information of a bad segment or device and
>> extend cases for 'allocate' policy.
> great. I am attaching a patch proposal that would implement the outlined
> policy. I have tucked in a warning for a good measure.
>@@ -696,6 +703,13 @@ static int _lv_update_mirrored_log(struc
>@@ -705,12 +719,9 @@ static int _lv_update_mirrored_log(struc
I believe that two changes in _lv_update_mirror_log() are not for solving
this issue, and they are already checked in. :)
>@@ -1179,14 +1201,22 @@ static int _lvconvert_mirrors_repair(str
>+ if (log_lv)
>+ lv_check_transient(log_lv);
>+
>+ partial_count += _partial_lv_count(lv->vg);
If the log LV is not a mirrored log, we don't need to check the transient status.
I see that lv_check_transient() can handle both a disk log and a mirrored log
but checking its status as below reduces code steps to be executed.
+ if (log_lv && log_lv->status & MIRRORED)
+ lv_check_transient(log_lv);
Other than that, your patch looks OK to me.
Thanks,
Taka
More information about the lvm-devel
mailing list