On Fri, 2019-02-01 at 08:24 -0700, Jens Axboe wrote:
> +int iomap_dio_iopoll(struct kiocb *kiocb, bool spin)
> +{
> + struct request_queue *q = READ_ONCE(kiocb->private);
> +
> + if (!q)
> + return 0;
> + return blk_poll(q, READ_ONCE(kiocb->ki_cookie), spin);
> +}
> +EXPORT_SYMBOL_GPL(iomap_dio_iopoll);
How does this interact with block device removal? My understanding is that this
function can get called after a request has completed. Which mechanism, if any,
prevents that request queue 'q' is removed after kiocb->private has been read
and before blk_poll() is called?
Thanks,
Bart.