[dm-devel] [PATCH 2/7] A framework for holding bios until suspend
malahal at us.ibm.com
malahal at us.ibm.com
Mon Nov 30 02:55:45 UTC 2009
Takahiro Yasui [tyasui at redhat.com] wrote:
> On 11/18/09 07:11, Mikulas Patocka wrote:
> > @@ -760,6 +775,7 @@ static void do_mirror(struct work_struct
> > bio_list_init(&ms->reads);
> > bio_list_init(&ms->writes);
> > bio_list_init(&ms->failures);
> > + bio_list_init(&ms->hold);
> > spin_unlock_irqrestore(&ms->lock, flags);
>
> Initializing the hold list in do_mirror() is a problem. Some bios might
> already in it and they will never be processed. This makes device-mapper
> "stuck" when the device goes suspend. The hold list should be inizialized
> only when the mirror device is created in alloc_context().
>
> alloc_context()
> spin_lock_init(&ms->lock);
> bio_list_init(&ms->reads);
> bio_list_init(&ms->writes);
> bio_list_init(&ms->failures);
> + bio_list_init(&ms->hold);
>
> Thanks,
> Taka
Good catch!
More information about the dm-devel
mailing list