[stable-5.10] MD: Fix up backport of MD io stats revert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The backport to 5.10.92:
commit c39d68ab3836 ("md: revert io stats accounting") is slightly
different with upstream, remove unrelated change to be in sync
with upstream.

Cc: Guoqing Jiang <guoqing.jiang@xxxxxxxxx>
Cc: Song Liu <song@xxxxxxxxxx>
Cc: Guillaume Morin <guillaume@xxxxxxxxxxx>
Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxx>
---
 drivers/md/md.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index cc3876500c4b..887f07beed1b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -485,21 +485,11 @@ static blk_qc_t md_submit_bio(struct bio *bio)
 		return BLK_QC_T_NONE;
 	}
 
-	/*
-	 * save the sectors now since our bio can
-	 * go away inside make_request
-	 */
-	sectors = bio_sectors(bio);
 	/* bio could be mergeable after passing to underlayer */
 	bio->bi_opf &= ~REQ_NOMERGE;
 
 	md_handle_request(mddev, bio);
 
-	part_stat_lock();
-	part_stat_inc(&mddev->gendisk->part0, ios[sgrp]);
-	part_stat_add(&mddev->gendisk->part0, sectors[sgrp], sectors);
-	part_stat_unlock();
-
 	return BLK_QC_T_NONE;
 }
 
-- 
2.25.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux