Lines Matching refs:size
86 static struct bio_slab *create_bio_slab(unsigned int size)
93 snprintf(bslab->name, sizeof(bslab->name), "bio-%d", size);
94 bslab->slab = kmem_cache_create(bslab->name, size,
101 bslab->slab_size = size;
103 if (!xa_err(xa_store(&bio_slabs, size, bslab, GFP_KERNEL)))
120 unsigned int size = bs_bio_slab_size(bs);
124 bslab = xa_load(&bio_slabs, size);
128 bslab = create_bio_slab(size);
620 * bio_truncate - truncate the bio to small size of @new_size
622 * @new_size: new size for truncating the bio
625 * Truncate the bio to new size of @new_size. If bio_op(bio) is
674 * block size is some multiple of the physical sector size.
676 * We'll just truncate the bio to the size of the device, and clear the end of
934 * size limit. This is not for normal read/write bios, but for passthrough
1171 size_t size = iov_iter_count(iter);
1179 size = min(size, max_sectors << SECTOR_SHIFT);
1185 bio->bi_iter.bi_size = size;
1242 ssize_t size, left;
1259 * Each segment in the iov is required to be a block size multiple.
1262 * result to ensure the bio's total size is correct. The remainder of
1265 size = iov_iter_extract_pages(iter, &pages,
1268 if (unlikely(size <= 0))
1269 return size ? size : -EFAULT;
1271 nr_pages = DIV_ROUND_UP(offset + size, PAGE_SIZE);
1274 size_t trim = size & (bdev_logical_block_size(bio->bi_bdev) - 1);
1276 size -= trim;
1279 if (unlikely(!size)) {
1284 for (left = size, i = 0; left > 0; left -= len, i++) {
1658 * @size: size we want to trim @bio to, in sectors
1663 void bio_trim(struct bio *bio, sector_t offset, sector_t size)
1665 if (WARN_ON_ONCE(offset > BIO_MAX_SECTORS || size > BIO_MAX_SECTORS ||
1666 offset + size > bio_sectors(bio)))
1669 size <<= 9;
1670 if (offset == 0 && size == bio->bi_iter.bi_size)
1674 bio->bi_iter.bi_size = size;