]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-3.2/core' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Nov 2011 00:06:58 +0000 (17:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Nov 2011 00:06:58 +0000 (17:06 -0700)
* 'for-3.2/core' of git://git.kernel.dk/linux-block: (29 commits)
  block: don't call blk_drain_queue() if elevator is not up
  blk-throttle: use queue_is_locked() instead of lockdep_is_held()
  blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
  blk-throttle: Free up policy node associated with deleted rule
  block: warn if tag is greater than real_max_depth.
  block: make gendisk hold a reference to its queue
  blk-flush: move the queue kick into
  blk-flush: fix invalid BUG_ON in blk_insert_flush
  block: Remove the control of complete cpu from bio.
  block: fix a typo in the blk-cgroup.h file
  block: initialize the bounce pool if high memory may be added later
  block: fix request_queue lifetime handling by making blk_queue_cleanup() properly shutdown
  block: drop @tsk from attempt_plug_merge() and explain sync rules
  block: make get_request[_wait]() fail if queue is dead
  block: reorganize throtl_get_tg() and blk_throtl_bio()
  block: reorganize queue draining
  block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg()
  block: pass around REQ_* flags instead of broken down booleans during request alloc/free
  block: move blk_throtl prototypes to block/blk.h
  block: fix genhd refcounting in blkio_policy_parse_and_set()
  ...

Fix up trivial conflicts due to "mddev_t" -> "struct mddev" conversion
and making the request functions be of type "void" instead of "int" in
 - drivers/md/{faulty.c,linear.c,md.c,md.h,multipath.c,raid0.c,raid1.c,raid10.c,raid5.c}
 - drivers/staging/zram/zram_drv.c

13 files changed:
1  2 
block/genhd.c
drivers/block/drbd/drbd_int.h
drivers/md/dm.c
drivers/md/faulty.c
drivers/md/linear.c
drivers/md/md.c
drivers/md/md.h
drivers/md/multipath.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/staging/zram/zram_drv.c

diff --cc block/genhd.c
Simple merge
Simple merge
diff --cc drivers/md/dm.c
Simple merge
index 60816b132c2ee11923c10130901591d8bac79840,5ef304d4341c170b5d343a1c52ca5061df4a33ea..918fb8ac6607b41690d25d50688aea96f680bae6
@@@ -169,9 -169,9 +169,9 @@@ static void add_sector(struct faulty_co
                conf->nfaults = n+1;
  }
  
- static int make_request(struct mddev *mddev, struct bio *bio)
 -static void make_request(mddev_t *mddev, struct bio *bio)
++static void make_request(struct mddev *mddev, struct bio *bio)
  {
 -      conf_t *conf = mddev->private;
 +      struct faulty_conf *conf = mddev->private;
        int failit = 0;
  
        if (bio_data_dir(bio) == WRITE) {
                b->bi_bdev = conf->rdev->bdev;
                b->bi_private = bio;
                b->bi_end_io = faulty_fail;
-               generic_make_request(b);
-               return 0;
-       } else {
+               bio = b;
+       } else
                bio->bi_bdev = conf->rdev->bdev;
-               return 1;
-       }
+       generic_make_request(bio);
  }
  
 -static void status(struct seq_file *seq, mddev_t *mddev)
 +static void status(struct seq_file *seq, struct mddev *mddev)
  {
 -      conf_t *conf = mddev->private;
 +      struct faulty_conf *conf = mddev->private;
        int n;
  
        if ((n=atomic_read(&conf->counters[WriteTransient])) != 0)
index 10c5844460cbbb5cb43311ca274fdbe2bd2c5b8d,c6ee491d98e781a57a8051ea8465baa4c07e89cc..a82035867519c944b7e6b93f6aca110d5354a3ff
@@@ -264,9 -264,9 +264,9 @@@ static int linear_stop (struct mddev *m
        return 0;
  }
  
- static int linear_make_request (struct mddev *mddev, struct bio *bio)
 -static void linear_make_request (mddev_t *mddev, struct bio *bio)
++static void linear_make_request(struct mddev *mddev, struct bio *bio)
  {
 -      dev_info_t *tmp_dev;
 +      struct dev_info *tmp_dev;
        sector_t start_sector;
  
        if (unlikely(bio->bi_rw & REQ_FLUSH)) {
        bio->bi_sector = bio->bi_sector - start_sector
                + tmp_dev->rdev->data_offset;
        rcu_read_unlock();
-       return 1;
+       generic_make_request(bio);
  }
  
 -static void linear_status (struct seq_file *seq, mddev_t *mddev)
 +static void linear_status (struct seq_file *seq, struct mddev *mddev)
  {
  
        seq_printf(seq, " %dk rounding", mddev->chunk_sectors / 2);
diff --cc drivers/md/md.c
index 266e82ebaf110892f749c8d9c6ae22211426ae31,8f52d4eb78a0ad26c7af97e39809b76ac15ce580..2acb32827fde46361e156ee629a6c51cb5edc371
@@@ -332,11 -335,10 +332,10 @@@ static DEFINE_SPINLOCK(all_mddevs_lock)
   * call has finished, the bio has been linked into some internal structure
   * and so is visible to ->quiesce(), so we don't need the refcount any more.
   */
- static int md_make_request(struct request_queue *q, struct bio *bio)
+ static void md_make_request(struct request_queue *q, struct bio *bio)
  {
        const int rw = bio_data_dir(bio);
 -      mddev_t *mddev = q->queuedata;
 +      struct mddev *mddev = q->queuedata;
-       int rv;
        int cpu;
        unsigned int sectors;
  
diff --cc drivers/md/md.h
index 51c1d91557e0406400409808b551a0992e6774ef,1509a3eb9ae15dcfbcf33e1e130df96e961fc8f9..cf742d9306ecc52de68052c9dd0a4164924c2c63
@@@ -419,10 -424,10 +419,10 @@@ struct md_personalit
        int level;
        struct list_head list;
        struct module *owner;
-       int (*make_request)(struct mddev *mddev, struct bio *bio);
 -      void (*make_request)(mddev_t *mddev, struct bio *bio);
 -      int (*run)(mddev_t *mddev);
 -      int (*stop)(mddev_t *mddev);
 -      void (*status)(struct seq_file *seq, mddev_t *mddev);
++      void (*make_request)(struct mddev *mddev, struct bio *bio);
 +      int (*run)(struct mddev *mddev);
 +      int (*stop)(struct mddev *mddev);
 +      void (*status)(struct seq_file *seq, struct mddev *mddev);
        /* error_handler must set ->faulty and clear ->in_sync
         * if appropriate, and should abort recovery if needed 
         */
index d32c785e17d48d91ba230ec779797a2c75f9dbc8,618dd9e225132bf279aec8954e71cf9651dc5bae..ad20a28fbf2aeee9a2df68a41113510fee604686
@@@ -106,9 -106,9 +106,9 @@@ static void multipath_end_request(struc
        rdev_dec_pending(rdev, conf->mddev);
  }
  
- static int multipath_make_request(struct mddev *mddev, struct bio * bio)
 -static void multipath_make_request(mddev_t *mddev, struct bio * bio)
++static void multipath_make_request(struct mddev *mddev, struct bio * bio)
  {
 -      multipath_conf_t *conf = mddev->private;
 +      struct mpconf *conf = mddev->private;
        struct multipath_bh * mp_bh;
        struct multipath_info *multipath;
  
        mp_bh->bio.bi_end_io = multipath_end_request;
        mp_bh->bio.bi_private = mp_bh;
        generic_make_request(&mp_bh->bio);
-       return 0;
+       return;
  }
  
 -static void multipath_status (struct seq_file *seq, mddev_t *mddev)
 +static void multipath_status (struct seq_file *seq, struct mddev *mddev)
  {
 -      multipath_conf_t *conf = mddev->private;
 +      struct mpconf *conf = mddev->private;
        int i;
        
        seq_printf (seq, " [%d/%d] [", conf->raid_disks,
index 0eb08a4df75938d9d6ec12fe6f3ef4a3ae4d3bdb,4066615d61af9c504ca93bd6e397069ef0f9d581..27e19e2b51d46ca2f30a283128a99ddf9dd944bd
@@@ -468,7 -466,7 +468,7 @@@ static inline int is_io_in_chunk_bounda
        }
  }
  
- static int raid0_make_request(struct mddev *mddev, struct bio *bio)
 -static void raid0_make_request(mddev_t *mddev, struct bio *bio)
++static void raid0_make_request(struct mddev *mddev, struct bio *bio)
  {
        unsigned int chunk_sects;
        sector_t sector_offset;
@@@ -525,11 -519,38 +521,11 @@@ bad_map
               (unsigned long long)bio->bi_sector, bio->bi_size >> 10);
  
        bio_io_error(bio);
-       return 0;
+       return;
  }
  
 -static void raid0_status(struct seq_file *seq, mddev_t *mddev)
 +static void raid0_status(struct seq_file *seq, struct mddev *mddev)
  {
 -#undef MD_DEBUG
 -#ifdef MD_DEBUG
 -      int j, k, h;
 -      char b[BDEVNAME_SIZE];
 -      raid0_conf_t *conf = mddev->private;
 -      int raid_disks = conf->strip_zone[0].nb_dev;
 -
 -      sector_t zone_size;
 -      sector_t zone_start = 0;
 -      h = 0;
 -
 -      for (j = 0; j < conf->nr_strip_zones; j++) {
 -              seq_printf(seq, "      z%d", j);
 -              seq_printf(seq, "=[");
 -              for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
 -                      seq_printf(seq, "%s/", bdevname(
 -                              conf->devlist[j*raid_disks + k]
 -                                              ->bdev, b));
 -
 -              zone_size  = conf->strip_zone[j].zone_end - zone_start;
 -              seq_printf(seq, "] ze=%lld ds=%lld s=%lld\n",
 -                      (unsigned long long)zone_start>>1,
 -                      (unsigned long long)conf->strip_zone[j].dev_start>>1,
 -                      (unsigned long long)zone_size>>1);
 -              zone_start = conf->strip_zone[j].zone_end;
 -      }
 -#endif
        seq_printf(seq, " %dk chunks", mddev->chunk_sectors / 2);
        return;
  }
index 4602fc57c961fd16edc5d558a050493a878fd50e,2948a520f7ba354dc5c0e0305152127257443a45..cae874646d9e965719b964b9e7b0539442dbe822
@@@ -804,14 -782,14 +804,14 @@@ do_sync_io
                if (bvecs[i].bv_page)
                        put_page(bvecs[i].bv_page);
        kfree(bvecs);
 -      PRINTK("%dB behind alloc failed, doing sync I/O\n", bio->bi_size);
 +      pr_debug("%dB behind alloc failed, doing sync I/O\n", bio->bi_size);
  }
  
- static int make_request(struct mddev *mddev, struct bio * bio)
 -static void make_request(mddev_t *mddev, struct bio * bio)
++static void make_request(struct mddev *mddev, struct bio * bio)
  {
 -      conf_t *conf = mddev->private;
 -      mirror_info_t *mirror;
 -      r1bio_t *r1_bio;
 +      struct r1conf *conf = mddev->private;
 +      struct mirror_info *mirror;
 +      struct r1bio *r1_bio;
        struct bio *read_bio;
        int i, disks;
        struct bitmap *bitmap;
@@@ -1151,13 -1123,11 +1151,11 @@@ read_again
  
        if (do_sync || !bitmap || !plugged)
                md_wakeup_thread(mddev->thread);
-       return 0;
  }
  
 -static void status(struct seq_file *seq, mddev_t *mddev)
 +static void status(struct seq_file *seq, struct mddev *mddev)
  {
 -      conf_t *conf = mddev->private;
 +      struct r1conf *conf = mddev->private;
        int i;
  
        seq_printf(seq, " [%d/%d] [", conf->raid_disks,
index c025a8276dc18b5844e7a6870b42236ac45bd86c,ea5fc0b6a84c34af405654ce70209c0e976cccc7..dde6dd4b47ec23fb65350904b44a33b59e577b46
@@@ -842,11 -830,11 +842,11 @@@ static void unfreeze_array(struct r10co
        spin_unlock_irq(&conf->resync_lock);
  }
  
- static int make_request(struct mddev *mddev, struct bio * bio)
 -static void make_request(mddev_t *mddev, struct bio * bio)
++static void make_request(struct mddev *mddev, struct bio * bio)
  {
 -      conf_t *conf = mddev->private;
 -      mirror_info_t *mirror;
 -      r10bio_t *r10_bio;
 +      struct r10conf *conf = mddev->private;
 +      struct mirror_info *mirror;
 +      struct r10bio *r10_bio;
        struct bio *read_bio;
        int i;
        int chunk_sects = conf->chunk_mask + 1;
@@@ -1176,12 -1156,11 +1174,11 @@@ retry_write
  
        if (do_sync || !mddev->bitmap || !plugged)
                md_wakeup_thread(mddev->thread);
-       return 0;
  }
  
 -static void status(struct seq_file *seq, mddev_t *mddev)
 +static void status(struct seq_file *seq, struct mddev *mddev)
  {
 -      conf_t *conf = mddev->private;
 +      struct r10conf *conf = mddev->private;
        int i;
  
        if (conf->near_copies < conf->raid_disks)
index f6fe053a5bed305c7de1744a6ace0af15e1e78ae,83f2c44e170fa31cb6aa882c67c7b3c8b922df99..bb1b46143fb6477fcbf4b4acac8abb243cd68a81
@@@ -3688,9 -3695,9 +3688,9 @@@ static struct stripe_head *__get_priori
        return sh;
  }
  
- static int make_request(struct mddev *mddev, struct bio * bi)
 -static void make_request(mddev_t *mddev, struct bio * bi)
++static void make_request(struct mddev *mddev, struct bio * bi)
  {
 -      raid5_conf_t *conf = mddev->private;
 +      struct r5conf *conf = mddev->private;
        int dd_idx;
        sector_t new_sector;
        sector_t logical_sector, last_sector;
  
                bio_endio(bi, 0);
        }
-       return 0;
  }
  
 -static sector_t raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks);
 +static sector_t raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks);
  
 -static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped)
 +static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, int *skipped)
  {
        /* reshaping is quite different to recovery/resync so it is
         * handled quite separately ... here.
index b9926ee0052c37bc5d6f68cada276f010ea6bad9,02589cab67109c871cda806f191914d7a8adf774..09de99fbb7e0e5e5874b2d5f662ad6b51408e8c3
@@@ -573,18 -572,9 +573,17 @@@ static void zram_make_request(struct re
        }
  
        __zram_make_request(zram, bio, bio_data_dir(bio));
-       return 0;
 +      up_read(&zram->init_lock);
 +
-       return 0;
++      return;
 +
 +error_unlock:
 +      up_read(&zram->init_lock);
 +error:
 +      bio_io_error(bio);
  }
  
 -void zram_reset_device(struct zram *zram)
 +void __zram_reset_device(struct zram *zram)
  {
        size_t index;