util.h (e700ac213a0f793fb4f83098413303e3dd080892) util.h (cda25b82c47496f2da0785af5a0aa72a8990cec2)
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef _BCACHE_UTIL_H
4#define _BCACHE_UTIL_H
5
6#include <linux/blkdev.h>
7#include <linux/errno.h>
8#include <linux/kernel.h>

--- 570 unchanged lines hidden (view full) ---

579 x >>= fract_bits; /* The exponent */
580 /* Largest intermediate value 0x7f0000 */
581 return mantissa << x >> fract_bits;
582}
583
584void bch_bio_map(struct bio *bio, void *base);
585int bch_bio_alloc_pages(struct bio *bio, gfp_t gfp_mask);
586
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef _BCACHE_UTIL_H
4#define _BCACHE_UTIL_H
5
6#include <linux/blkdev.h>
7#include <linux/errno.h>
8#include <linux/kernel.h>

--- 570 unchanged lines hidden (view full) ---

579 x >>= fract_bits; /* The exponent */
580 /* Largest intermediate value 0x7f0000 */
581 return mantissa << x >> fract_bits;
582}
583
584void bch_bio_map(struct bio *bio, void *base);
585int bch_bio_alloc_pages(struct bio *bio, gfp_t gfp_mask);
586
587static inline sector_t bdev_sectors(struct block_device *bdev)
588{
589 return bdev->bd_inode->i_size >> 9;
590}
591#endif /* _BCACHE_UTIL_H */
587#endif /* _BCACHE_UTIL_H */