[dm-devel] [PATCH 7/7] dm-mpath: Fix a race condition in __multipath_map()
Mike Snitzer
snitzer at redhat.com
Wed Nov 16 01:01:17 UTC 2016
On Tue, Nov 15 2016 at 7:40pm -0500,
Bart Van Assche <bart.vanassche at sandisk.com> wrote:
> On 11/15/2016 04:37 PM, Mike Snitzer wrote:
> >On Tue, Nov 15 2016 at 6:35pm -0500,
> >Bart Van Assche <bart.vanassche at sandisk.com> wrote:
> >>If a single-queue dm device is stacked on top of multi-queue block
> >>devices and map_tio_request() is called while there are no paths then
> >>the request will be prepared for a single-queue path. If a path is
> >>added after a request was prepared and before __multipath_map() is
> >>called return DM_MAPIO_REQUEUE such that it gets unprepared and
> >>reprepared as a blk-mq request.
> >
> >This patch makes little sense to me. There isn't a scenario that I'm
> >aware of that would allow the request_queue to transition between old
> >.request_fn and new blk-mq.
> >
> >The dm-table code should prevent this.
>
> Hello Mike,
>
> Are you aware that dm_table_determine_type() sets "all_blk_mq" to
> false if there are no paths, even if the dm device is in blk-mq
> mode?
That shouldn't matter. Once the type is established, it is used to
initialize the DM device's request_queue, the type cannot change across
different table loads.
More information about the dm-devel
mailing list