aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid6main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid6main.c')
-rw-r--r--drivers/md/raid6main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index 267eb1430c83..6437a95ffc1c 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -1621,6 +1621,7 @@ static int make_request (request_queue_t *q, struct bio * bi)
1621 sector_t new_sector; 1621 sector_t new_sector;
1622 sector_t logical_sector, last_sector; 1622 sector_t logical_sector, last_sector;
1623 struct stripe_head *sh; 1623 struct stripe_head *sh;
1624 const int rw = bio_data_dir(bi);
1624 1625
1625 if (unlikely(bio_barrier(bi))) { 1626 if (unlikely(bio_barrier(bi))) {
1626 bio_endio(bi, bi->bi_size, -EOPNOTSUPP); 1627 bio_endio(bi, bi->bi_size, -EOPNOTSUPP);
@@ -1629,13 +1630,8 @@ static int make_request (request_queue_t *q, struct bio * bi)
1629 1630
1630 md_write_start(mddev, bi); 1631 md_write_start(mddev, bi);
1631 1632
1632 if (bio_data_dir(bi)==WRITE) { 1633 disk_stat_inc(mddev->gendisk, ios[rw]);
1633 disk_stat_inc(mddev->gendisk, writes); 1634 disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bi));
1634 disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi));
1635 } else {
1636 disk_stat_inc(mddev->gendisk, reads);
1637 disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bi));
1638 }
1639 1635
1640 logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); 1636 logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
1641 last_sector = bi->bi_sector + (bi->bi_size>>9); 1637 last_sector = bi->bi_sector + (bi->bi_size>>9);
@@ -1682,7 +1678,7 @@ static int make_request (request_queue_t *q, struct bio * bi)
1682 if (--bi->bi_phys_segments == 0) { 1678 if (--bi->bi_phys_segments == 0) {
1683 int bytes = bi->bi_size; 1679 int bytes = bi->bi_size;
1684 1680
1685 if ( bio_data_dir(bi) == WRITE ) 1681 if (rw == WRITE )
1686 md_write_end(mddev); 1682 md_write_end(mddev);
1687 bi->bi_size = 0; 1683 bi->bi_size = 0;
1688 bi->bi_end_io(bi, bytes, 0); 1684 bi->bi_end_io(bi, bytes, 0);