[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVNprzhEpXGKze=A4T2b-y35vXRxRTOUqpywu+Et=t37Kw@mail.gmail.com>
Date: Tue, 20 May 2014 11:20:25 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Christoph Hellwig <hch@....de>
Cc: Jens Axboe <axboe@...nel.dk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
stable <stable@...r.kernel.org>
Subject: Re: [PATCH] block: mq flush: fix race between IPI handler and mq
flush worker
On Mon, May 19, 2014 at 11:18 PM, Christoph Hellwig <hch@....de> wrote:
> On Mon, May 19, 2014 at 11:05:50PM +0800, Ming Lei wrote:
>> Another simple fix is to disable ipi for flush request, but looks
>> this one should be better.
>
> I think the first thing is to bite the bullet and sort out and document
> the various unions in struct request for real.
Considered the problem can be reproduced easily and cause
data loss on kvm-guest, I hope fix can be seen in 3.15. Also
it should be backported to 3.14 because someone may
enable ctx->ipi_redirect.
Thinking it further, looks the patch is fine:
- sizeof(call_single_data) and sizeof(work_struct) is very close
and both are not small, so it is reasonable to put the two in
one union for saving request space
- the conflict on the two structures just happens with flush
requests because rq->requeue_work is only used to queue
flush requests
- in the flush sequence, the conflict won't happen on request
with data, so it only happens with completing and queueing
PREFLUSH/POSTFLUSH request.
Any comments and suggestions?
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists