raid1.c (b7e56edba4b02f2079042c326a8cd72a44635817) raid1.c (086fa5ff0854c676ec333760f4c0154b3b242616)
1/*
2 * raid1.c : Multiple Devices driver for Linux
3 *
4 * Copyright (C) 1999, 2000, 2001 Ingo Molnar, Red Hat
5 *
6 * Copyright (C) 1996, 1997, 1998 Ingo Molnar, Miguel de Icaza, Gadi Oxman
7 *
8 * RAID-1 management functions.

--- 1144 unchanged lines hidden (view full) ---

1153 disk_stack_limits(mddev->gendisk, rdev->bdev,
1154 rdev->data_offset << 9);
1155 /* as we don't honour merge_bvec_fn, we must never risk
1156 * violating it, so limit ->max_sector to one PAGE, as
1157 * a one page request is never in violation.
1158 */
1159 if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
1160 queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
1/*
2 * raid1.c : Multiple Devices driver for Linux
3 *
4 * Copyright (C) 1999, 2000, 2001 Ingo Molnar, Red Hat
5 *
6 * Copyright (C) 1996, 1997, 1998 Ingo Molnar, Miguel de Icaza, Gadi Oxman
7 *
8 * RAID-1 management functions.

--- 1144 unchanged lines hidden (view full) ---

1153 disk_stack_limits(mddev->gendisk, rdev->bdev,
1154 rdev->data_offset << 9);
1155 /* as we don't honour merge_bvec_fn, we must never risk
1156 * violating it, so limit ->max_sector to one PAGE, as
1157 * a one page request is never in violation.
1158 */
1159 if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
1160 queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
1161 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
1161 blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9);
1162
1163 p->head_position = 0;
1164 rdev->raid_disk = mirror;
1165 err = 0;
1166 /* As all devices are equivalent, we don't need a full recovery
1167 * if this was recently any drive of the array
1168 */
1169 if (rdev->saved_raid_disk < 0)

--- 928 unchanged lines hidden (view full) ---

2098 disk_stack_limits(mddev->gendisk, rdev->bdev,
2099 rdev->data_offset << 9);
2100 /* as we don't honour merge_bvec_fn, we must never risk
2101 * violating it, so limit ->max_sector to one PAGE, as
2102 * a one page request is never in violation.
2103 */
2104 if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
2105 queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
1162
1163 p->head_position = 0;
1164 rdev->raid_disk = mirror;
1165 err = 0;
1166 /* As all devices are equivalent, we don't need a full recovery
1167 * if this was recently any drive of the array
1168 */
1169 if (rdev->saved_raid_disk < 0)

--- 928 unchanged lines hidden (view full) ---

2098 disk_stack_limits(mddev->gendisk, rdev->bdev,
2099 rdev->data_offset << 9);
2100 /* as we don't honour merge_bvec_fn, we must never risk
2101 * violating it, so limit ->max_sector to one PAGE, as
2102 * a one page request is never in violation.
2103 */
2104 if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
2105 queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9))
2106 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
2106 blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9);
2107 }
2108
2109 mddev->degraded = 0;
2110 for (i=0; i < conf->raid_disks; i++)
2111 if (conf->mirrors[i].rdev == NULL ||
2112 !test_bit(In_sync, &conf->mirrors[i].rdev->flags) ||
2113 test_bit(Faulty, &conf->mirrors[i].rdev->flags))
2114 mddev->degraded++;

--- 268 unchanged lines hidden ---
2107 }
2108
2109 mddev->degraded = 0;
2110 for (i=0; i < conf->raid_disks; i++)
2111 if (conf->mirrors[i].rdev == NULL ||
2112 !test_bit(In_sync, &conf->mirrors[i].rdev->flags) ||
2113 test_bit(Faulty, &conf->mirrors[i].rdev->flags))
2114 mddev->degraded++;

--- 268 unchanged lines hidden ---