OSDN Git Service

block: introduce bio zone helpers
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 25 May 2021 21:24:52 +0000 (06:24 +0900)
committerMike Snitzer <snitzer@redhat.com>
Fri, 4 Jun 2021 16:07:35 +0000 (12:07 -0400)
commitd0ea6bde141df9311bc36e7b07ad37b449f2c4f5
tree16c7e97b17b31aeefa7032ad4148cb3fd9c4dedb
parent1ee533eca70bb8867ad1e6f5ef8a86c8897d67d7
block: introduce bio zone helpers

Introduce the helper functions bio_zone_no() and bio_zone_is_seq().
Both are the BIO counterparts of the request helpers blk_rq_zone_no()
and blk_rq_zone_is_seq(), respectively returning the number of the
target zone of a bio and true if the BIO target zone is sequential.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
include/linux/blkdev.h