On Mon, Feb 14 2022 at 9:02P -0500, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > On Fri, Feb 11, 2022 at 04:40:53PM -0500, Mike Snitzer wrote: > > DM needs the ability to account a clone bio's IO to the original > > block_device. So add @orig_bdev argument to bio_start_io_acct_time. > > > > Rename bio_start_io_acct_time to bio_start_io_acct_remapped. > > > > Also, follow bio_end_io_acct and bio_end_io_acct_remapped pattern by > > moving bio_start_io_acct to blkdev.h and have it call > > bio_start_io_acct_remapped. > > Looks good: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > Thanks. But turns out I don't need this patch afterall. DM can't account IO to the DM device in terms of clone bios because they may not be simple remaps, the payload could change in size such that the original vs clone varies widely. Also, dmstats imposes the additional constraint that the same bio be used for the {start,end}_io_acct's calls to dm_stats_account_io().