The bdev->bd_disk, !bdev_get_queue and q->make_request_fn checks
are all things you don't need, any blkdev_issue_flush should not
either, although I'll need to look into the weird loop workaround
again, which doesn't make much sense to me.
I tried to confirm q->make_request_fn and got lost,
On Thu, May 18, 2017 at 05:31:32PM +0800, Anand Jain wrote:
> You mean at btrfs: write_dev_flush()
>OR
> block: blkdev_issue_flush() ?
> Where I find
> q = bdev_get_queue(bdev);
> if (!q)
> return -ENXIO
> isn't needed as anyway generic_make_request_checks()
On 05/16/2017 07:56 PM, Christoph Hellwig wrote:
On Tue, May 16, 2017 at 05:39:13PM +0800, Anand Jain wrote:
blkdev_issue_flush() is a blocking function and returns only after
the flush bio is completed, so a module handling more than one
device can't issue flush for all the devices unless it
blkdev_issue_flush() is a blocking function and returns only after
the flush bio is completed, so a module handling more than one
device can't issue flush for all the devices unless it uses worker
thread.
This patch adds a new function blkdev_issue_flush_no_wait(), which
uses submit_bio() instead