aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 24e4045788e2..e49cf7dd2e92 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -53,7 +53,7 @@ struct biovec_slab {
53 */ 53 */
54 54
55#define BV(x) { .nr_vecs = x, .name = "biovec-"__stringify(x) } 55#define BV(x) { .nr_vecs = x, .name = "biovec-"__stringify(x) }
56static struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] = { 56static struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly = {
57 BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES), 57 BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES),
58}; 58};
59#undef BV 59#undef BV
@@ -249,19 +249,16 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src)
249{ 249{
250 request_queue_t *q = bdev_get_queue(bio_src->bi_bdev); 250 request_queue_t *q = bdev_get_queue(bio_src->bi_bdev);
251 251
252 memcpy(bio->bi_io_vec, bio_src->bi_io_vec, bio_src->bi_max_vecs * sizeof(struct bio_vec)); 252 memcpy(bio->bi_io_vec, bio_src->bi_io_vec,
253 bio_src->bi_max_vecs * sizeof(struct bio_vec));
253 254
254 bio->bi_sector = bio_src->bi_sector; 255 bio->bi_sector = bio_src->bi_sector;
255 bio->bi_bdev = bio_src->bi_bdev; 256 bio->bi_bdev = bio_src->bi_bdev;
256 bio->bi_flags |= 1 << BIO_CLONED; 257 bio->bi_flags |= 1 << BIO_CLONED;
257 bio->bi_rw = bio_src->bi_rw; 258 bio->bi_rw = bio_src->bi_rw;
258
259 /*
260 * notes -- maybe just leave bi_idx alone. assume identical mapping
261 * for the clone
262 */
263 bio->bi_vcnt = bio_src->bi_vcnt; 259 bio->bi_vcnt = bio_src->bi_vcnt;
264 bio->bi_size = bio_src->bi_size; 260 bio->bi_size = bio_src->bi_size;
261 bio->bi_idx = bio_src->bi_idx;
265 bio_phys_segments(q, bio); 262 bio_phys_segments(q, bio);
266 bio_hw_segments(q, bio); 263 bio_hw_segments(q, bio);
267} 264}