From: Kent Overstreet <kmo@daterainc.com>
To: Chris Mason <clm@fb.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"eab@gmx.ch" <eab@gmx.ch>,
"linux-bcache@vger.kernel.org" <linux-bcache@vger.kernel.org>,
"fmpfeifer@gmail.com" <fmpfeifer@gmail.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: btrfs on bcache
Date: Wed, 8 Jan 2014 13:13:07 -0800 [thread overview]
Message-ID: <20140108211307.GB7291@kmo-pixel> (raw)
In-Reply-To: <1389209759.23310.27.camel@ret.masoncoding.com>
On Wed, Jan 08, 2014 at 07:35:32PM +0000, Chris Mason wrote:
> On Mon, 2014-01-06 at 15:37 -0800, Kent Overstreet wrote:
> > Ok, I looked again at the relevant btrfs code, I guess I can see how this printk
> > isn't normally triggered. But Chris, _what on earth_ is btrfs trying to check
> > for here? And why is it using bv_offset and bv_len further down in
> > end_bio_extent_readpage()?
>
> After the IO is done, we're recording the specific logical byte range
> that covered the IO. In practice its always the full page, we can
> switch to just trusting PAGE_CACHE_SIZE.
Yeah, the code already assumes it was doing PAGE_CACHE_SIZE reads; what
you're effectively checking is that the driver did the bvec all at once,
and that it didn't process half a bvec, update it, then process the rest
- which is a completely fine thing to do.
So for now - yeah, the correct thing to do is to just ignore
bv_offset/bv_len and go by PAGE_CACHE_SIZE. But - after immutable
biovecs is in, _then_ you'll be able to depend on bv_offset/bv_len
remaining unchanged (and you can get rid of your dependency on
PAGE_CACHE_SIZE bvecs).
next prev parent reply other threads:[~2014-01-08 21:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 17:17 btrfs on bcache eb
2013-12-19 19:04 ` Fábio Pfeifer
2013-12-19 19:05 ` Fábio Pfeifer
2013-12-20 22:26 ` Henry de Valence
2013-12-19 19:59 ` Chris Mason
2013-12-20 12:36 ` eb
2013-12-20 12:42 ` Fábio Pfeifer
2013-12-20 15:46 ` Chris Mason
2013-12-24 16:44 ` Fábio Pfeifer
2013-12-24 16:44 ` Fábio Pfeifer
2014-01-06 23:37 ` Kent Overstreet
2014-01-08 19:35 ` Chris Mason
2014-01-08 21:13 ` Kent Overstreet [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-30 18:16 Felix Homann
2014-05-01 11:33 ` Austin S Hemmelgarn
2014-07-30 22:04 dptrash
2014-07-30 23:01 ` Larkin Lowrey
2014-08-04 12:57 ` Fábio Pfeifer
[not found] <1731942750.1162128.1406757898913.JavaMail.ngmail@webmail06.arcor-online.net>
2014-07-31 15:35 ` dptrash
2014-08-01 1:55 ` Duncan
2014-08-20 20:17 raphead
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=20140108211307.GB7291@kmo-pixel \
--to=kmo@daterainc.com \
--cc=axboe@kernel.dk \
--cc=clm@fb.com \
--cc=eab@gmx.ch \
--cc=fmpfeifer@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.