blk-merge.c (a85b36375b05f70301f15cafb9030cae7c789f76) | blk-merge.c (b6dc6198ebe855d70e6f68d279c4015fe5d73e7b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Functions related to segment and merge handling 4 */ 5#include <linux/kernel.h> 6#include <linux/module.h> 7#include <linux/bio.h> 8#include <linux/blkdev.h> --- 81 unchanged lines hidden (view full) --- 90 return bio_will_gap(req->q, req, req->biotail, bio); 91} 92 93static inline bool req_gap_front_merge(struct request *req, struct bio *bio) 94{ 95 return bio_will_gap(req->q, NULL, bio, req->bio); 96} 97 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Functions related to segment and merge handling 4 */ 5#include <linux/kernel.h> 6#include <linux/module.h> 7#include <linux/bio.h> 8#include <linux/blkdev.h> --- 81 unchanged lines hidden (view full) --- 90 return bio_will_gap(req->q, req, req->biotail, bio); 91} 92 93static inline bool req_gap_front_merge(struct request *req, struct bio *bio) 94{ 95 return bio_will_gap(req->q, NULL, bio, req->bio); 96} 97 |
98/* 99 * The max size one bio can handle is UINT_MAX becasue bvec_iter.bi_size 100 * is defined as 'unsigned int', meantime it has to be aligned to with the 101 * logical block size, which is the minimum accepted unit by hardware. 102 */ 103static unsigned int bio_allowed_max_sectors(struct request_queue *q) 104{ 105 return round_down(UINT_MAX, queue_logical_block_size(q)) >> 9; 106} 107 |
|
98static struct bio *bio_split_discard(struct bio *bio, struct request_queue *q, 99 unsigned *nsegs, struct bio_set *bs) 100{ 101 unsigned int max_discard_sectors, granularity; 102 int alignment; 103 sector_t tmp; 104 unsigned split_sectors; 105 --- 1033 unchanged lines hidden --- | 108static struct bio *bio_split_discard(struct bio *bio, struct request_queue *q, 109 unsigned *nsegs, struct bio_set *bs) 110{ 111 unsigned int max_discard_sectors, granularity; 112 int alignment; 113 sector_t tmp; 114 unsigned split_sectors; 115 --- 1033 unchanged lines hidden --- |