mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
block: simplify BIOVEC_PHYS_MERGEABLE
Turn the macro into an inline, move it to blk.h and simplify the arch hooks a bit. Also rename the function to biovec_phys_mergeable as there is no need to shout. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
27ca1d4ed0
commit
6a9f5f240a
8 changed files with 28 additions and 30 deletions
|
@ -140,19 +140,6 @@ static inline bool bio_full(struct bio *bio)
|
|||
/*
|
||||
* merge helpers etc
|
||||
*/
|
||||
|
||||
/* Default implementation of BIOVEC_PHYS_MERGEABLE */
|
||||
#define __BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
|
||||
((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
|
||||
|
||||
/*
|
||||
* allow arch override, for eg virtualized architectures (put in asm/io.h)
|
||||
*/
|
||||
#ifndef BIOVEC_PHYS_MERGEABLE
|
||||
#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
|
||||
__BIOVEC_PHYS_MERGEABLE(vec1, vec2)
|
||||
#endif
|
||||
|
||||
#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
|
||||
(((addr1) | (mask)) == (((addr2) - 1) | (mask)))
|
||||
#define BIOVEC_SEG_BOUNDARY(q, b1, b2) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue