You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
md: move io accounting out of personalities into md_make_request
While I generally prefer letting personalities do as much as possible, given that we have a central md_make_request anyway we may as well use it to simplify code. Also this centralises knowledge of ->gendisk which will help later. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
@@ -795,7 +795,6 @@ static int make_request(struct request_queue *q, struct bio * bio)
|
||||
mirror_info_t *mirror;
|
||||
r10bio_t *r10_bio;
|
||||
struct bio *read_bio;
|
||||
int cpu;
|
||||
int i;
|
||||
int chunk_sects = conf->chunk_mask + 1;
|
||||
const int rw = bio_data_dir(bio);
|
||||
@@ -850,12 +849,6 @@ static int make_request(struct request_queue *q, struct bio * bio)
|
||||
*/
|
||||
wait_barrier(conf);
|
||||
|
||||
cpu = part_stat_lock();
|
||||
part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
|
||||
part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw],
|
||||
bio_sectors(bio));
|
||||
part_stat_unlock();
|
||||
|
||||
r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO);
|
||||
|
||||
r10_bio->master_bio = bio;
|
||||
|
||||
Reference in New Issue
Block a user