Re: [PATCH 13/16] block: switch polling to be bio based

From
Christoph Hellwig <hch@lst.de>
Date
2021-06-18 14:01:53
Also in
linux-fsdevel, linux-nvme
Reply to
Ming Lei, 2021-06-16
On Wed, Jun 16, 2021 at 10:30:23AM +0800, Ming Lei wrote:
Not sure disk is valid, we only hold the disk when opening a bdev, but
the bdev can be closed during polling.
How?  On a block device the caller needs to hold the block device open
to read/write from it.  On a file systems the file systems needs to
be mounted, which also holds a bdev reference.
Also disk always holds one
reference on request queue, so if disk is valid, no need to grab queue's
refcnt in bio_poll().
But we need to avoid going into the lowlevel blk-mq polling code to not
reference the potentially freed hctxs or tags as correctly pointed by
yourself on the previous iteration.
Thread (24 messages) 24 messages, 3 authors, last reply 2021-06-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help