diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2024-04-08 10:41:05 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-04-17 08:44:02 -0600 |
commit | dd850ff3eee428b4e1276bd51263dd937643ba19 (patch) | |
tree | 68e581921034a14db86aa044341fb813969a5579 /block/blk-merge.c | |
parent | b85a3c1b7978f942fa5bf8cfe22b6a6aaa49d3b7 (diff) | |
download | lwn-dd850ff3eee428b4e1276bd51263dd937643ba19.tar.gz lwn-dd850ff3eee428b4e1276bd51263dd937643ba19.zip |
block: Allow using bio_attempt_back_merge() internally
Remove "static" from the definition of bio_attempt_back_merge() and
declare this function in block/blk.h to allow using it internally from
other block layer files. The definition of enum bio_merge_status is
also moved to block/blk.h.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Hans Holmberg <hans.holmberg@wdc.com>
Tested-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20240408014128.205141-6-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 4e3483a16b75..3363b1321908 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -972,13 +972,7 @@ static void blk_account_io_merge_bio(struct request *req) part_stat_unlock(); } -enum bio_merge_status { - BIO_MERGE_OK, - BIO_MERGE_NONE, - BIO_MERGE_FAILED, -}; - -static enum bio_merge_status bio_attempt_back_merge(struct request *req, +enum bio_merge_status bio_attempt_back_merge(struct request *req, struct bio *bio, unsigned int nr_segs) { const blk_opf_t ff = bio_failfast(bio); |