@@ -1008,6 +1008,18 @@ static inline unsigned int blk_rq_stats_sectors(const struct request *rq)
/* Helper to convert BLK_ZONE_ZONE_XXX to its string format XXX */
const char *blk_zone_cond_str(enum blk_zone_cond zone_cond);
+static inline unsigned int bio_zone_no(struct bio *bio)
+{
+ return blk_queue_zone_no(bdev_get_queue(bio->bi_bdev),
+ bio->bi_iter.bi_sector);
+}
+
+static inline unsigned int bio_zone_is_seq(struct bio *bio)
+{
+ return blk_queue_zone_is_seq(bdev_get_queue(bio->bi_bdev),
+ bio->bi_iter.bi_sector);
+}
+
static inline unsigned int blk_rq_zone_no(struct request *rq)
{
return blk_queue_zone_no(rq->q, blk_rq_pos(rq));