io.c (712cba5d87a6c0e980ee5fad45734e189c4d7151) io.c (3a83f4677539bce8eaa2bca9ee9c20e172d7ab04)
1/*
2 * Some low level IO code, and hacks for various block layer limitations
3 *
4 * Copyright 2010, 2011 Kent Overstreet <kent.overstreet@gmail.com>
5 * Copyright 2012 Google, Inc.
6 */
7
8#include "bcache.h"

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

19 mempool_free(b, c->bio_meta);
20}
21
22struct bio *bch_bbio_alloc(struct cache_set *c)
23{
24 struct bbio *b = mempool_alloc(c->bio_meta, GFP_NOIO);
25 struct bio *bio = &b->bio;
26
1/*
2 * Some low level IO code, and hacks for various block layer limitations
3 *
4 * Copyright 2010, 2011 Kent Overstreet <kent.overstreet@gmail.com>
5 * Copyright 2012 Google, Inc.
6 */
7
8#include "bcache.h"

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

19 mempool_free(b, c->bio_meta);
20}
21
22struct bio *bch_bbio_alloc(struct cache_set *c)
23{
24 struct bbio *b = mempool_alloc(c->bio_meta, GFP_NOIO);
25 struct bio *bio = &b->bio;
26
27 bio_init(bio);
28 bio->bi_max_vecs = bucket_pages(c);
29 bio->bi_io_vec = bio->bi_inline_vecs;
27 bio_init(bio, bio->bi_inline_vecs, bucket_pages(c));
30
31 return bio;
32}
33
34void __bch_submit_bbio(struct bio *bio, struct cache_set *c)
35{
36 struct bbio *b = container_of(bio, struct bbio, bio);
37

--- 107 unchanged lines hidden ---
28
29 return bio;
30}
31
32void __bch_submit_bbio(struct bio *bio, struct cache_set *c)
33{
34 struct bbio *b = container_of(bio, struct bbio, bio);
35

--- 107 unchanged lines hidden ---