diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2013-04-26 10:58:44 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-04-26 17:33:08 +1000 |
commit | 6c0db018cf348cea28412f800ffe6383ec58368a (patch) | |
tree | e680b6071b381873ef87692f18af417dc226ac65 | |
parent | f9007a0d3fe543d4f2bfe037e9b0448531aee0fa (diff) |
block-prep-work-for-batch-completion-fix-3
Cc: Kent Overstreet <koverstreet@google.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | drivers/md/bcache/btree.c | 3 | ||||
-rw-r--r-- | drivers/md/bcache/io.c | 6 | ||||
-rw-r--r-- | drivers/md/bcache/journal.c | 9 | ||||
-rw-r--r-- | drivers/md/bcache/movinggc.c | 3 | ||||
-rw-r--r-- | drivers/md/bcache/request.c | 9 | ||||
-rw-r--r-- | drivers/md/bcache/request.h | 3 | ||||
-rw-r--r-- | drivers/md/bcache/super.c | 11 | ||||
-rw-r--r-- | drivers/md/bcache/writeback.c | 8 |
8 files changed, 33 insertions, 19 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 852340793777..03e44c1a3bb4 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -134,7 +134,8 @@ static uint64_t btree_csum_set(struct btree *b, struct bset *i) return crc ^ 0xffffffffffffffffULL; } -static void btree_bio_endio(struct bio *bio, int error) +static void btree_bio_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct closure *cl = bio->bi_private; struct btree *b = container_of(cl, struct btree, io.cl); diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c index f565512f6fac..8bb275901fb8 100644 --- a/drivers/md/bcache/io.c +++ b/drivers/md/bcache/io.c @@ -9,7 +9,8 @@ #include "bset.h" #include "debug.h" -static void bch_bi_idx_hack_endio(struct bio *bio, int error) +static void bch_bi_idx_hack_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct bio *p = bio->bi_private; @@ -199,7 +200,8 @@ static void bch_bio_submit_split_done(struct closure *cl) mempool_free(s, s->p->bio_split_hook); } -static void bch_bio_submit_split_endio(struct bio *bio, int error) +static void bch_bio_submit_split_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct closure *cl = bio->bi_private; struct bio_split_hook *s = container_of(cl, struct bio_split_hook, cl); diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 8c8dfdcd9d4c..bff194bb3e08 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -22,7 +22,8 @@ * bit. */ -static void journal_read_endio(struct bio *bio, int error) +static void journal_read_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct closure *cl = bio->bi_private; closure_put(cl); @@ -390,7 +391,8 @@ found: #define last_seq(j) ((j)->seq - fifo_used(&(j)->pin) + 1) -static void journal_discard_endio(struct bio *bio, int error) +static void journal_discard_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct journal_device *ja = container_of(bio, struct journal_device, discard_bio); @@ -535,7 +537,8 @@ void bch_journal_next(struct journal *j) pr_debug("journal_pin full (%zu)", fifo_used(&j->pin)); } -static void journal_write_endio(struct bio *bio, int error) +static void journal_write_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct journal_write *w = bio->bi_private; diff --git a/drivers/md/bcache/movinggc.c b/drivers/md/bcache/movinggc.c index 8589512c972e..8bf7ae12d4b0 100644 --- a/drivers/md/bcache/movinggc.c +++ b/drivers/md/bcache/movinggc.c @@ -61,7 +61,8 @@ static void write_moving_finish(struct closure *cl) closure_return_with_destructor(cl, moving_io_destructor); } -static void read_moving_endio(struct bio *bio, int error) +static void read_moving_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct moving_io *io = container_of(bio->bi_private, struct moving_io, s.cl); diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 83731dc36f34..478f487fa87a 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -456,7 +456,8 @@ static void bch_insert_data_error(struct closure *cl) bch_journal(cl); } -static void bch_insert_data_endio(struct bio *bio, int error) +static void bch_insert_data_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct closure *cl = bio->bi_private; struct btree_op *op = container_of(cl, struct btree_op, cl); @@ -621,7 +622,8 @@ void bch_btree_insert_async(struct closure *cl) /* Common code for the make_request functions */ -static void request_endio(struct bio *bio, int error) +static void request_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct closure *cl = bio->bi_private; @@ -636,7 +638,8 @@ static void request_endio(struct bio *bio, int error) closure_put(cl); } -void bch_cache_read_endio(struct bio *bio, int error) +void bch_cache_read_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct bbio *b = container_of(bio, struct bbio, bio); struct closure *cl = bio->bi_private; diff --git a/drivers/md/bcache/request.h b/drivers/md/bcache/request.h index 254d9ab5707c..3b794625c4c1 100644 --- a/drivers/md/bcache/request.h +++ b/drivers/md/bcache/request.h @@ -29,11 +29,10 @@ struct search { struct btree_op op; }; -void bch_cache_read_endio(struct bio *, int); +void bch_cache_read_endio(struct bio *, int, struct batch_complete *batch); int bch_get_congested(struct cache_set *); void bch_insert_data(struct closure *cl); void bch_btree_insert_async(struct closure *); -void bch_cache_read_endio(struct bio *, int); void bch_open_buckets_free(struct cache_set *); int bch_open_buckets_alloc(struct cache_set *); diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 5fa3cd2d9ff0..f3bf310187c7 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -204,7 +204,8 @@ err: return err; } -static void write_bdev_super_endio(struct bio *bio, int error) +static void write_bdev_super_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct cached_dev *dc = bio->bi_private; /* XXX: error checking */ @@ -265,7 +266,8 @@ void bch_write_bdev_super(struct cached_dev *dc, struct closure *parent) closure_return(cl); } -static void write_super_endio(struct bio *bio, int error) +static void write_super_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct cache *ca = bio->bi_private; @@ -306,7 +308,7 @@ void bcache_write_super(struct cache_set *c) /* UUID io */ -static void uuid_endio(struct bio *bio, int error) +static void uuid_endio(struct bio *bio, int error, struct batch_complete *batch) { struct closure *cl = bio->bi_private; struct cache_set *c = container_of(cl, struct cache_set, uuid_write.cl); @@ -470,7 +472,8 @@ static struct uuid_entry *uuid_find_empty(struct cache_set *c) * disk. */ -static void prio_endio(struct bio *bio, int error) +static void prio_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct cache *ca = bio->bi_private; diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c index 93e7e31a4bd3..daf9347833be 100644 --- a/drivers/md/bcache/writeback.c +++ b/drivers/md/bcache/writeback.c @@ -253,7 +253,8 @@ static void write_dirty_finish(struct closure *cl) closure_return_with_destructor(cl, dirty_io_destructor); } -static void dirty_endio(struct bio *bio, int error) +static void dirty_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct keybuf_key *w = bio->bi_private; struct dirty_io *io = w->private; @@ -281,7 +282,8 @@ static void write_dirty(struct closure *cl) continue_at(cl, write_dirty_finish, dirty_wq); } -static void read_dirty_endio(struct bio *bio, int error) +static void read_dirty_endio(struct bio *bio, int error, + struct batch_complete *batch) { struct keybuf_key *w = bio->bi_private; struct dirty_io *io = w->private; @@ -289,7 +291,7 @@ static void read_dirty_endio(struct bio *bio, int error) bch_count_io_errors(PTR_CACHE(io->dc->disk.c, &w->key, 0), error, "reading dirty data from cache"); - dirty_endio(bio, error); + dirty_endio(bio, error, NULL); } static void read_dirty_submit(struct closure *cl) |