From: Mike Snitzer <snitzer@redhat.com>
To: Josef Bacik <jbacik@fb.com>
Cc: linux-btrfs@vger.kernel.org, dm-devel@redhat.com,
david@fromorbit.com, sandeen@redhat.com, hch@infradead.org,
linux-fsdevel@vger.kernel.org, tytso@mit.edu, clm@facebook.com,
zab@redhat.com
Subject: Re: [PATCH][RFC] dm: log writes target
Date: Wed, 4 Feb 2015 18:34:02 -0500 [thread overview]
Message-ID: <20150204233402.GB1380@redhat.com> (raw)
In-Reply-To: <20150204184108.GA2801@redhat.com>
On Wed, Feb 04 2015 at 1:41pm -0500,
Mike Snitzer <snitzer@redhat.com> 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@redhat.com> wrote:
> On Wed, Feb 04 2015 at 5:43pm -0500,
> Alasdair G Kergon <agk@redhat.com> 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.
next prev parent reply other threads:[~2015-02-04 23:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 22:32 [PATCH][RFC] dm: log writes target Josef Bacik
2015-02-04 18:41 ` Mike Snitzer
2015-02-04 23:34 ` Mike Snitzer [this message]
2015-02-05 16:56 ` Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150204233402.GB1380@redhat.com \
--to=snitzer@redhat.com \
--cc=clm@facebook.com \
--cc=david@fromorbit.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
--cc=zab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).