Skip to contentSkip to conversation

MD: Fix up backport of MD io stats revert

stable-5.10 Jack Wang 2 participants 2 messages Jan 26, 2022

Subsystems (2)
lore
Share & tools
lore

Jack Wang

author
#0 lore raw

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 <[email protected]>
Cc Song Liu <[email protected]>
Cc Guillaume Morin <[email protected]>
---
 drivers/md/md.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/md/md.c +0 -10
index cc3876500c4b..887f07beed1b 100644
@@ -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;
 }
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Jack Wang <[email protected]> 于2022年1月26日周三 22:14写道:

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.

Please ignore this, the backport in 5.10.92 is correct

Quoted 38 lines
Cc Guoqing Jiang <[email protected]>
Cc Song Liu <[email protected]>
Cc Guillaume Morin <[email protected]>
---
 drivers/md/md.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/md/md.c +0 -11
index cc3876500c4b..887f07beed1b 100644
@@ -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