[dm-devel] [PATCH v2] dm thin: Fix bug wrt FUA request completion

Mike Snitzer snitzer at redhat.com
Fri Feb 15 15:16:55 UTC 2019


On Fri, Feb 15 2019 at  9:33am -0500,
Nikos Tsironis <ntsironis at arrikto.com> wrote:

> On 2/15/19 3:54 PM, Joe Thornber wrote:
> > Ack.
> > 
> > Thanks for this I was under the mistaken impression that FUA requests got split 
> > by core dm into separate payload and PREFLUSH requests.
> > 
> > I've audited dm-cache and that looks ok.
> > 
> > How did you test this patch?  That missing bio_list_init() in V1 must
> > have caused memory corruption?
> > 
> > - Joe
> 
> Hi Joe,
> 
> bio_list_init() initializes the bio list's head and tail pointers to
> NULL and pool_create() allocates the struct pool structure using
> kzalloc() so the bio list was implicitly correctly initialized and no
> memory corruption occurred.

Yes, exactly right.  v1 tested fine for me, so when I saw v2 I reasoned
through why the bio_list_init() wasn't an issue and it is like you've
said (kzalloc() saved us).

Can you help us understand how you identified this issue?  Did you have
corruption after crash/powerfail and got to looking closer?

Thanks,
Mike




More information about the dm-devel mailing list