Support bio(REQ_POLLED) polling in the following approach:
1) only support io polling on normal READ/WRITE, and other abnormal IOs
still fallback on IRQ mode, so the target io is exactly inside the dm
io.
2) hold one refcnt on io->io_count after submitting this dm bio with
REQ_POLLED
3) support
There has been 3 users, and will be more, so add one such helper.
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Jeffle Xu
Reviewed-by: Hannes Reinecke
Signed-off-by: Ming Lei
---
block/blk-core.c | 5 ++---
block/blk-sysfs.c| 4 ++--
drivers/nvme/host/core.c | 2 +-
Prepare for supporting IO polling for bio based driver.
Add ->poll_bio callback so that bio driver can provide their own logic
for polling bio.
Signed-off-by: Ming Lei
---
block/blk-core.c | 13 +
block/genhd.c | 2 ++
include/linux/blkdev.h | 1 +
3 files changed,
Hello Guys,
Based on Christoph's bio based polling model[1], implement DM bio polling
with one very simple approach.
Patch 1 adds helper of blk_queue_poll().
Patch 2 adds .bio_poll() callback to block_device_operations, so bio
driver can implement its own logic for io polling.
Patch 3