md/raid5: activate raid6 rmw feature
[deliverable/linux.git] / drivers / md / raid10.c
index b8d76b1fba6457dd722410d8d82d752c67f84bba..e793ab6b35705e0ed1ad6904ebe9353b6dbf6fd6 100644 (file)
@@ -2572,7 +2572,8 @@ static int narrow_write_error(struct r10bio *r10_bio, int i)
        if (rdev->badblocks.shift < 0)
                return 0;
 
-       block_sectors = 1 << rdev->badblocks.shift;
+       block_sectors = roundup(1 << rdev->badblocks.shift,
+                               bdev_logical_block_size(rdev->bdev) >> 9);
        sector = r10_bio->sector;
        sectors = ((r10_bio->sector + block_sectors)
                   & ~(sector_t)(block_sectors - 1))
@@ -2888,7 +2889,7 @@ static int init_resync(struct r10conf *conf)
  */
 
 static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
-                            int *skipped, int go_faster)
+                            int *skipped)
 {
        struct r10conf *conf = mddev->private;
        struct r10bio *r10_bio;
@@ -2993,12 +2994,6 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
        if (conf->geo.near_copies < conf->geo.raid_disks &&
            max_sector > (sector_nr | chunk_mask))
                max_sector = (sector_nr | chunk_mask) + 1;
-       /*
-        * If there is non-resync activity waiting for us then
-        * put in a delay to throttle resync.
-        */
-       if (!go_faster && conf->nr_waiting)
-               msleep_interruptible(1000);
 
        /* Again, very different code for resync and recovery.
         * Both must result in an r10bio with a list of bios that
This page took 0.028629 seconds and 5 git commands to generate.