raid0.c (e2b06d71bd3f50ac7098b3f2492ea95470b713db) raid0.c (dc3b17cc8bf21307c7e076e7c778d5db756f7871)
1/*
2 raid0.c : Multiple Devices driver for Linux
3 Copyright (C) 1994-96 Marc ZYNGIER
4 <zyngier@ufr-info-p7.ibp.fr> or
5 <maz@gloups.fdn.fr>
6 Copyright (C) 1999, 2000 Ingo Molnar, Red Hat
7
8 RAID-0 management functions.

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

36 struct r0conf *conf = mddev->private;
37 struct md_rdev **devlist = conf->devlist;
38 int raid_disks = conf->strip_zone[0].nb_dev;
39 int i, ret = 0;
40
41 for (i = 0; i < raid_disks && !ret ; i++) {
42 struct request_queue *q = bdev_get_queue(devlist[i]->bdev);
43
1/*
2 raid0.c : Multiple Devices driver for Linux
3 Copyright (C) 1994-96 Marc ZYNGIER
4 <zyngier@ufr-info-p7.ibp.fr> or
5 <maz@gloups.fdn.fr>
6 Copyright (C) 1999, 2000 Ingo Molnar, Red Hat
7
8 RAID-0 management functions.

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

36 struct r0conf *conf = mddev->private;
37 struct md_rdev **devlist = conf->devlist;
38 int raid_disks = conf->strip_zone[0].nb_dev;
39 int i, ret = 0;
40
41 for (i = 0; i < raid_disks && !ret ; i++) {
42 struct request_queue *q = bdev_get_queue(devlist[i]->bdev);
43
44 ret |= bdi_congested(&q->backing_dev_info, bits);
44 ret |= bdi_congested(q->backing_dev_info, bits);
45 }
46 return ret;
47}
48
49/*
50 * inform the user of the raid configuration
51*/
52static void dump_zones(struct mddev *mddev)

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

415 * multiplied by chunk size times 2.
416 * If an individual device has an ra_pages greater than the
417 * chunk size, then we will not drive that device as hard as it
418 * wants. We consider this a configuration error: a larger
419 * chunksize should be used in that case.
420 */
421 int stripe = mddev->raid_disks *
422 (mddev->chunk_sectors << 9) / PAGE_SIZE;
45 }
46 return ret;
47}
48
49/*
50 * inform the user of the raid configuration
51*/
52static void dump_zones(struct mddev *mddev)

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

415 * multiplied by chunk size times 2.
416 * If an individual device has an ra_pages greater than the
417 * chunk size, then we will not drive that device as hard as it
418 * wants. We consider this a configuration error: a larger
419 * chunksize should be used in that case.
420 */
421 int stripe = mddev->raid_disks *
422 (mddev->chunk_sectors << 9) / PAGE_SIZE;
423 if (mddev->queue->backing_dev_info.ra_pages < 2* stripe)
424 mddev->queue->backing_dev_info.ra_pages = 2* stripe;
423 if (mddev->queue->backing_dev_info->ra_pages < 2* stripe)
424 mddev->queue->backing_dev_info->ra_pages = 2* stripe;
425 }
426
427 dump_zones(mddev);
428
429 ret = md_integrity_register(mddev);
430
431 return ret;
432}

--- 279 unchanged lines hidden ---
425 }
426
427 dump_zones(mddev);
428
429 ret = md_integrity_register(mddev);
430
431 return ret;
432}

--- 279 unchanged lines hidden ---