Thread (23 messages) 23 messages, 2 authors, 2019-02-06

Re: [PATCH 04/18] iomap: wire up the iopoll method

flat view

From: Bart Van Assche <bvanassche@acm.org>
Date: 2019-02-01 17:00:12
Also in: linux-block

On Fri, 2019-02-01 at 08:24 -0700, Jens Axboe wrote:
quoted hunk ↗ jump to hunk
+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.

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help