diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-04 21:39:31 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-04 21:39:31 -0500 |
commit | c2cc87ca9561ddfe744d446789cc10f507e87db9 (patch) | |
tree | d505fc0110eb1a3d8750ba2f67648c131f0d9aca /drivers/md/raid5.c | |
parent | ce1eeb95fc4eb25109c00bea3e83a87eeff6b07d (diff) | |
parent | 7015faa7df829876a0f931cd18aa6d7c24a1b581 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4683ca24c046..6497295ebfb9 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1462,6 +1462,7 @@ static int make_request (request_queue_t *q, struct bio * bi) | |||
1462 | sector_t new_sector; | 1462 | sector_t new_sector; |
1463 | sector_t logical_sector, last_sector; | 1463 | sector_t logical_sector, last_sector; |
1464 | struct stripe_head *sh; | 1464 | struct stripe_head *sh; |
1465 | const int rw = bio_data_dir(bi); | ||
1465 | 1466 | ||
1466 | if (unlikely(bio_barrier(bi))) { | 1467 | if (unlikely(bio_barrier(bi))) { |
1467 | bio_endio(bi, bi->bi_size, -EOPNOTSUPP); | 1468 | bio_endio(bi, bi->bi_size, -EOPNOTSUPP); |
@@ -1470,13 +1471,8 @@ static int make_request (request_queue_t *q, struct bio * bi) | |||
1470 | 1471 | ||
1471 | md_write_start(mddev, bi); | 1472 | md_write_start(mddev, bi); |
1472 | 1473 | ||
1473 | if (bio_data_dir(bi)==WRITE) { | 1474 | disk_stat_inc(mddev->gendisk, ios[rw]); |
1474 | disk_stat_inc(mddev->gendisk, writes); | 1475 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bi)); |
1475 | disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi)); | ||
1476 | } else { | ||
1477 | disk_stat_inc(mddev->gendisk, reads); | ||
1478 | disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bi)); | ||
1479 | } | ||
1480 | 1476 | ||
1481 | logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); | 1477 | logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); |
1482 | last_sector = bi->bi_sector + (bi->bi_size>>9); | 1478 | last_sector = bi->bi_sector + (bi->bi_size>>9); |