]> git.baikalelectronics.ru Git - kernel.git/commit
dm: improve dm_io reference counting
authorMing Lei <ming.lei@redhat.com>
Tue, 12 Apr 2022 08:56:15 +0000 (16:56 +0800)
committerMike Snitzer <snitzer@kernel.org>
Thu, 5 May 2022 21:31:36 +0000 (17:31 -0400)
commitad2f1d3592b40009dd6cac3e42d1525b1bc35920
treed343453a1de1088e8f8f1b53e0b975b1c0065af0
parent07206f876dd44eaefea3ff702465e3b97b82fd42
dm: improve dm_io reference counting

Currently each dm_io's reference counter is grabbed before calling
__map_bio(), this way isn't efficient since we can move this grabbing
to initialization time inside alloc_io().

Meantime it becomes typical async io reference counter model: one is
for submission side, the other is for completion side, and the io won't
be completed until both sides are done.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm.c