OSDN Git Service

Merge remote-tracking branch 'md/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Aug 2015 02:11:45 +0000 (12:11 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Aug 2015 02:11:45 +0000 (12:11 +1000)
1  2 
drivers/md/md.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c

diff --cc drivers/md/md.c
Simple merge
@@@ -188,10 -203,9 +203,6 @@@ static int create_strip_zones(struct md
                }
                dev[j] = rdev1;
  
-               if (mddev->queue)
-                       disk_stack_limits(mddev->gendisk, rdev1->bdev,
-                                         rdev1->data_offset << 9);
 -              if (rdev1->bdev->bd_disk->queue->merge_bvec_fn)
 -                      conf->has_merge_bvec = 1;
--
                if (!smallest || (rdev1->sectors < smallest->sectors))
                        smallest = rdev1;
                cnt++;
Simple merge
Simple merge
@@@ -4670,14 -4669,43 +4670,14 @@@ static int raid5_congested(struct mdde
        return 0;
  }
  
 -/* We want read requests to align with chunks where possible,
 - * but write requests don't need to.
 - */
 -static int raid5_mergeable_bvec(struct mddev *mddev,
 -                              struct bvec_merge_data *bvm,
 -                              struct bio_vec *biovec)
 -{
 -      struct r5conf *conf = mddev->private;
 -      sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev);
 -      int max;
 -      unsigned int chunk_sectors;
 -      unsigned int bio_sectors = bvm->bi_size >> 9;
 -
 -      /*
 -       * always allow writes to be mergeable, read as well if array
 -       * is degraded as we'll go through stripe cache anyway.
 -       */
 -      if ((bvm->bi_rw & 1) == WRITE || mddev->degraded)
 -              return biovec->bv_len;
 -
 -      chunk_sectors = min(conf->chunk_sectors, conf->prev_chunk_sectors);
 -      max =  (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9;
 -      if (max < 0) max = 0;
 -      if (max <= biovec->bv_len && bio_sectors == 0)
 -              return biovec->bv_len;
 -      else
 -              return max;
 -}
 -
  static int in_chunk_boundary(struct mddev *mddev, struct bio *bio)
  {
+       struct r5conf *conf = mddev->private;
        sector_t sector = bio->bi_iter.bi_sector + get_start_sect(bio->bi_bdev);
-       unsigned int chunk_sectors = mddev->chunk_sectors;
+       unsigned int chunk_sectors;
        unsigned int bio_sectors = bio_sectors(bio);
  
-       if (mddev->new_chunk_sectors < mddev->chunk_sectors)
-               chunk_sectors = mddev->new_chunk_sectors;
+       chunk_sectors = min(conf->chunk_sectors, conf->prev_chunk_sectors);
        return  chunk_sectors >=
                ((sector & (chunk_sectors - 1)) + bio_sectors);
  }