md: move initialization and destruction of 'io_acct_set' to md.c
authorYu Kuai <yukuai3@huawei.com>
Wed, 21 Jun 2023 16:51:03 +0000 (00:51 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Wed, 7 May 2025 15:10:56 +0000 (17:10 +0200)
commitc7cf25a60c4b888521826a590c0a76d6a1c14fa7
tree71c4fc4f4dfb6b0103388f7b6a0112c0d590286b
parentcdd95ef009befc5067d179b3d58bb0e5e1e362ce
md: move initialization and destruction of 'io_acct_set' to md.c

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit?id=5bec482db5aa81d4ea8b94391f74aafbe8eceb3c
Bug-Debian: https://bugs.debian.org/1104460

commit c567c86b90d4715081adfe5eb812141a5b6b4883 upstream.

'io_acct_set' is only used for raid0 and raid456, prepare to use it for
raid1 and raid10, so that io accounting from different levels can be
consistent.

By the way, follow up patches will also use this io clone mechanism to
make sure 'active_io' represents in flight io, not io that is dispatching,
so that mddev_suspend will wait for io to be done as designed.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230621165110.1498313-2-yukuai1@huaweicloud.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name md-move-initialization-and-destruction-of-io_acct_se.patch
drivers/md/md.c
drivers/md/md.h
drivers/md/raid0.c
drivers/md/raid5.c