Re: [PATCH 3/8] dm: pass 'dm_io' instance to dm_io_acct directly

Ming Lei
2022-04-13T01:43:25Z

On Tue, Apr 12, 2022 at 04:28:59PM -0400, Mike Snitzer wrote:
> On Tue, Apr 12 2022 at 4:56P -0400,
> Ming Lei <ming.lei@redhat.com> wrote:
>
> > All the other 4 parameters are retrieved from the 'dm_io' instance, so
> > not necessary to pass all four to dm_io_acct().
> >
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
>
> Yeah, commit 0ab30b4079e103 ("dm: eliminate copying of dm_io fields in
> dm_io_dec_pending") could've gone further to do what you've done here
> in this patch.
>
> But it stopped short because of the additional "games" associated with
> the late assignment of io->orig_bio that is in the dm-5.19 branch.

OK, I will rebase on dm-5.19, but IMO the idea of late assignment of
io->orig_bio isn't good, same with splitting one bio just for
accounting, things shouldn't be so tricky.

Thanks,
Ming