• Guoqing Jiang's avatar
    md: add io accounting for raid0 and raid5 · 10764815
    Guoqing Jiang authored
    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: default avatarGuoqing Jiang <jiangguoqing@kylinos.cn>
    Signed-off-by: default avatarSong Liu <song@kernel.org>
    10764815
raid0.c 20.2 KB