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

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

flat view

From: Jens Axboe <axboe@kernel.dk>
Date: 2019-02-06 20:05:06
Also in: linux-block

On 2/1/19 9:59 AM, Bart Van Assche wrote:
On Fri, 2019-02-01 at 08:24 -0700, Jens Axboe wrote:
quoted
+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?
The completion event is split from the reap, the latter being the one that
would put the file. So we're never going to call into ->iopoll() for a
kiocb where we've done the file put.

-- 
Jens Axboe

--
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