diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2018-10-12 13:08:47 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-10-25 20:17:40 +0300 |
commit | a2d6b3a2d39005ab4d4a83481a7db092ebf0e9d6 (patch) | |
tree | d099578f43e9d1136c792485f4231a7fe1dc71b3 /block/blk.h | |
parent | 65e4e3eee83d7a4ad7e8c5175b2a0ddfd3b5685f (diff) | |
download | linux-a2d6b3a2d39005ab4d4a83481a7db092ebf0e9d6.tar.xz |
block: Improve zone reset execution
There is no need to synchronously execute all REQ_OP_ZONE_RESET BIOs
necessary to reset a range of zones. Similarly to what is done for
discard BIOs in blk-lib.c, all zone reset BIOs can be chained and
executed asynchronously and a synchronous call done only for the last
BIO of the chain.
Modify blkdev_reset_zones() to operate similarly to
blkdev_issue_discard() using the next_bio() helper for chaining BIOs. To
avoid code duplication of that function in blk_zoned.c, rename
next_bio() into blk_next_bio() and declare it as a block internal
function in blk.h.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h index 3d2aecba96a4..93574baaa6b8 100644 --- a/block/blk.h +++ b/block/blk.h @@ -488,4 +488,6 @@ extern int blk_iolatency_init(struct request_queue *q); static inline int blk_iolatency_init(struct request_queue *q) { return 0; } #endif +struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp); + #endif /* BLK_INTERNAL_H */ |