]> git.baikalelectronics.ru Git - kernel.git/commit
md: add io accounting for raid0 and raid5
authorGuoqing Jiang <jgq516@gmail.com>
Tue, 25 May 2021 09:46:17 +0000 (17:46 +0800)
committerSong Liu <song@kernel.org>
Tue, 15 Jun 2021 05:32:06 +0000 (22:32 -0700)
commitbdbf2669f32a30c27fe8dbb41bc6f4faf5fe3d2e
tree37221b5d812dc01a4132c5860446adec6aaf2e58
parent189c1be8aaa251d006a8456a65a2c8417d8a5ce4
md: add io accounting for raid0 and raid5

We introduce a new bioset (io_acct_set) for raid0 and raid5 since they
don't own clone infrastructure to accounting io. And the bioset is added
to mddev instead of to raid0 and raid5 layer, because with this way, we
can put common functions to md.h and reuse them in raid0 and raid5.

Also struct md_io_acct is added accordingly which includes io start_time,
the origin bio and cloned bio. Then we can call bio_{start,end}_io_acct
to get related io status.

Signed-off-by: Guoqing Jiang <jiangguoqing@kylinos.cn>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md.c
drivers/md/md.h
drivers/md/raid0.c
drivers/md/raid5.c