Re: [PATCH] dm rq: clear cloned bio ->bi_bdev to fix I/O accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 18, 2022 at 08:30:16AM +0800, Ming Lei wrote:
> On Sun, Jan 16, 2022 at 11:51:17PM -0800, Christoph Hellwig wrote:
> > So I actually noticed this during code inspection a while ago, but I
> > think we need to use the actual underlying device instead of NULL here
> > to keep our block layer gurantees.  See the patch in my queue below.
> > 
> > ---
> > From 1e330b8e57fc0d6c6fb07c0ec2915dca5d7a585a Mon Sep 17 00:00:00 2001
> > From: Christoph Hellwig <hch@xxxxxx>
> > Date: Thu, 13 Jan 2022 10:53:59 +0100
> > Subject: block: assign bi_bdev for cloned bios in blk_rq_prep_clone
> > 
> > The cloned bios for the cloned request in blk_rq_prep_clone currently
> > still point to the original bi_bdev.  This is harmless because dm-mpath
> 
> It breaks io accounting, so not harmless, but the code in this patch is
> fine:

That's what I thought at the time.  Based on the patch from
Benjamin that is obviously not true, so I'll reword the commit message
and add a Fixes tag.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux