@@ -826,6 +826,7 @@ int bio_add_hw_page(struct request_queue *q, struct bio *bio,
bio->bi_iter.bi_size += len;
return len;
}
+EXPORT_SYMBOL(bio_add_hw_page);
/**
* bio_add_pc_page - attempt to add page to passthrough bio
@@ -428,8 +428,4 @@ static inline void part_nr_sects_write(struct hd_struct *part, sector_t size)
#endif
}
-int bio_add_hw_page(struct request_queue *q, struct bio *bio,
- struct page *page, unsigned int len, unsigned int offset,
- unsigned int max_sectors, bool *same_page);
-
#endif /* BLK_INTERNAL_H */
@@ -2023,4 +2023,8 @@ int fsync_bdev(struct block_device *bdev);
struct super_block *freeze_bdev(struct block_device *bdev);
int thaw_bdev(struct block_device *bdev, struct super_block *sb);
+int bio_add_hw_page(struct request_queue *q, struct bio *bio,
+ struct page *page, unsigned int len, unsigned int offset,
+ unsigned int max_sectors, bool *same_page);
+
#endif /* _LINUX_BLKDEV_H */
To implement the NVMe Zone Append command on the NVMeOF target side for generic Zoned Block Devices with NVMe Zoned Namespaces interface, we need to build the bios with hardware limitations, i.e. we use bio_add_hw_page() with queue_max_zone_append_sectors() instead of bio_add_page(). Without this API being exported NVMeOF target will require to use bio_add_hw_page() caller bio_iov_iter_get_pages(). That results in extra work which is inefficient. Export the API so that NVMeOF ZBD over ZNS backend can use it to build Zone Append bios. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> --- block/bio.c | 1 + block/blk.h | 4 ---- include/linux/blkdev.h | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-)