Re: [PATCH][RFC] dm: log writes target

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

 



On Wed, Feb 04 2015 at  1:41pm -0500,
Mike Snitzer <snitzer@xxxxxxxxxx> wrote:

> @@ -527,9 +522,10 @@ static void normal_map_bio(struct dm_target *ti, struct bio *bio)
>  	struct log_writes_c *lc = ti->private;
>  
>  	bio->bi_bdev = lc->dev->bdev;
> +	// FIXME: why would bi_sector ever need to be changed?
> +	// if you just copied dm-linear then it is misplaced since there isn't an offset
>  	if (bio_sectors(bio))
> -		bio->bi_iter.bi_sector =
> -			dm_target_offset(ti, bio->bi_iter.bi_sector);
> +		bio->bi_iter.bi_sector = dm_target_offset(ti, bio->bi_iter.bi_sector);
>  }

In above FIXME: s/misplaced/incomplete/

FYI sharing this quick private exchange I had with Alasdair just to make
sure I'm clear on what the above FIXME was trying to convey:

On Wed, Feb 04 2015 at  6:28pm -0500,
Mike Snitzer <snitzer@xxxxxxxxxx> wrote:

> On Wed, Feb 04 2015 at  5:43pm -0500,
> Alasdair G Kergon <agk@xxxxxxxxxx> wrote:
>
> > On Wed, Feb 04, 2015 at 01:41:09PM -0500, Mike Snitzer wrote:
> > > + // FIXME: why would bi_sector ever need to be changed?
> > > + // if you just copied dm-linear then it is misplaced since there isn't an offset
> >
> > Why shouldn't we use this target on the 2nd or later line of a
> table?
>
> Wasn't saying it shouldn't.  Just was saying that Josef's target didn't
> go as far as say dm-linear with its 'start' offset.  Without it then
> this dm-log-writes target implicitly assumes every logical address
> space, be it 2nd or later, identity maps to exact same offset on the
> backing the data disk.
>
> My FIXME was too cryptic.  I can follow-up on this point.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.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