]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
block-prep-work-for-batch-completion-fix-3
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 9 May 2013 23:57:54 +0000 (09:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 21 May 2013 04:18:02 +0000 (14:18 +1000)
Cc: Kent Overstreet <koverstreet@google.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/md/bcache/btree.c
drivers/md/bcache/io.c
drivers/md/bcache/journal.c
drivers/md/bcache/movinggc.c
drivers/md/bcache/request.c
drivers/md/bcache/request.h
drivers/md/bcache/super.c
drivers/md/bcache/writeback.c

index 7a5658f04e62092610b2144faab12ae5fa3976a0..36688d6bb0611095931b28bae9862dcc19b68750 100644 (file)
@@ -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);
index 48efd4dea645bde1b12cf69927e9f628fd1ae077..29f344b9e408d92a745050c88b4f5fa346fbbadf 100644 (file)
@@ -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;
 
@@ -206,7 +207,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);
index 8c8dfdcd9d4cc9bc4a3d0799b98401855b280bcc..bff194bb3e08ebfd27f73a360b533de278c19aed 100644 (file)
@@ -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;
 
index 8589512c972e3cfd1e973d53783313802b4db6ca..8bf7ae12d4b0dc7a4303e5ae00444a6fe25675c8 100644 (file)
@@ -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);
index e5ff12e52d5b277bea9cc4fa4aa5eb5bdf23540a..bc837edd52ea51aced351902e16641790308edaf 100644 (file)
@@ -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;
index 254d9ab5707cf4629e186d512d5f43e7eca3f94a..3b794625c4c17e1012798042fcf846dc68ebba9e 100644 (file)
@@ -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 *);
index f88e2b653a3fc9c82a7b308c8988cd10eda0c96b..9c57c596cff73000beb2690a6f0d157340abc5cc 100644 (file)
@@ -224,7 +224,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 */
@@ -285,7 +286,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;
 
@@ -326,7 +328,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);
@@ -490,7 +492,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;
 
index 2714ed3991d1b747518aeb22d70222d1653d5e40..657a8687a7b85517691e496e9943452746b36e38 100644 (file)
@@ -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)