Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: make max_integrity_io_size public

File systems that generate integrity will need this, so move it out
of the block private or blk-mq specific headers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Tested-by: Anuj Gupta <anuj20.g@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
8c56ef10 3f006268

+18 -18
-13
block/blk-settings.c
··· 123 123 return 0; 124 124 } 125 125 126 - /* 127 - * Maximum size of I/O that needs a block layer integrity buffer. Limited 128 - * by the number of intervals for which we can fit the integrity buffer into 129 - * the buffer size. Because the buffer is a single segment it is also limited 130 - * by the maximum segment size. 131 - */ 132 - static inline unsigned int max_integrity_io_size(struct queue_limits *lim) 133 - { 134 - return min_t(unsigned int, lim->max_segment_size, 135 - (BLK_INTEGRITY_MAX_SIZE / lim->integrity.metadata_size) << 136 - lim->integrity.interval_exp); 137 - } 138 - 139 126 static int blk_validate_integrity_limits(struct queue_limits *lim) 140 127 { 141 128 struct blk_integrity *bi = &lim->integrity;
-5
include/linux/blk-integrity.h
··· 8 8 9 9 struct request; 10 10 11 - /* 12 - * Maximum contiguous integrity buffer allocation. 13 - */ 14 - #define BLK_INTEGRITY_MAX_SIZE SZ_2M 15 - 16 11 enum blk_integrity_flags { 17 12 BLK_INTEGRITY_NOVERIFY = 1 << 0, 18 13 BLK_INTEGRITY_NOGENERATE = 1 << 1,
+18
include/linux/blkdev.h
··· 1881 1881 return bio_split_io_at(bio, lim, segs, max_bytes, lim->dma_alignment); 1882 1882 } 1883 1883 1884 + /* 1885 + * Maximum contiguous integrity buffer allocation. 1886 + */ 1887 + #define BLK_INTEGRITY_MAX_SIZE SZ_2M 1888 + 1889 + /* 1890 + * Maximum size of I/O that needs a block layer integrity buffer. Limited 1891 + * by the number of intervals for which we can fit the integrity buffer into 1892 + * the buffer size. Because the buffer is a single segment it is also limited 1893 + * by the maximum segment size. 1894 + */ 1895 + static inline unsigned int max_integrity_io_size(struct queue_limits *lim) 1896 + { 1897 + return min_t(unsigned int, lim->max_segment_size, 1898 + (BLK_INTEGRITY_MAX_SIZE / lim->integrity.metadata_size) << 1899 + lim->integrity.interval_exp); 1900 + } 1901 + 1884 1902 #define DEFINE_IO_COMP_BATCH(name) struct io_comp_batch name = { } 1885 1903 1886 1904 #endif /* _LINUX_BLKDEV_H */