[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH v2] dm mpath: fix race condition between multipath_dtr and pg_init_done



On 10/31/13 23:48, Mike Snitzer wrote:
> On Thu, Oct 31 2013 at  5:03am -0400,
> Junichi Nomura <j-nomura ce jp nec com> wrote:
>> how about moving this to flush_multipath_work(), which is supposed
>> to silence background activities?
>> I.e.
>>   flush_multipath_work() {
>>      <disable pg_init retry>
>>      ...
>>      <enable pg_init retry>
>>   }
>>
>> Then it not only fixes the crash you hit, it also fixes the hidden bug
>> that pg_init continues retrying while the device is suspended.
> 
> I ran with your suggestion.  Please see below.
> 
> To be clear, pg_init isn't disabled while mpath device is suspended
> (meaning m->pg_init_disabled isn't set until the device is resumed).
> But flush_multipath_work() will no longer start pg_init during suspend
> -- which could otherwise occur while the mpath device is suspended.  So
> in practice it accomplishes the stated goal.
> 
> Thanks for the suggestion Junichi.  Are you OK with this?  If so please
> provide your Ack.

Yes, that's perfect. Thank you.
Acked-by: Junichi Nomura <j-nomura ce jp nec com>

And thanks Shiva Krishna for finding/fixing this.

> 
> Shiva, can you please verify that this patch resolves the race, should
> accomplish the same: just pushes the disabling of pg_init inside
> flush_multipath_work().

-- 
Jun'ichi Nomura, NEC Corporation


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]