]> git.baikalelectronics.ru Git - kernel.git/commit
md: check level before create and exit io_acct_set
authorGuoqing Jiang <jgq516@gmail.com>
Thu, 3 Jun 2021 09:21:06 +0000 (17:21 +0800)
committerSong Liu <song@kernel.org>
Tue, 15 Jun 2021 05:32:07 +0000 (22:32 -0700)
commit0422096c2c8ccbdbebd95cee46923dd9c448b02d
treed5b09f67638c56454d5ad6aeca212b8d31181c85
parente0999e695a063b6c00dd40981cde13d938056002
md: check level before create and exit io_acct_set

The bio_set (io_acct_set) is used by personalities to clone bio and
trace the timestamp of bio. Some personalities such as raid1/10 don't
need the bio_set, so add check to not create it unconditionally.

Also update the comment for md_account_bio to make it more clear.

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Guoqing Jiang <jiangguoqing@kylinos.cn>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md.c