From: Jens Axboe <axboe@suse.de>
To: Milton Miller <miltonm@bga.com>
Cc: Nathan Scott <nathans@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blktrace: readahead support
Date: Mon, 10 Jul 2006 08:24:09 +0200 [thread overview]
Message-ID: <20060710062408.GA4141@suse.de> (raw)
In-Reply-To: <200607100546.k6A5k3qU049783@sullivan.realtime.net>
On Mon, Jul 10 2006, Milton Miller wrote:
> Looking at the commit
>
> Date: Thu, 6 Jul 2006 08:03:28 +0000 (+0200)
> X-Git-Url: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=40359ccb836866435b03a0cb57345002b587d875
>
> > --- a/block/blktrace.c
> > +++ b/block/blktrace.c
> ..
> > @@ -79,6 +79,8 @@ static u32 bio_act[3] __read_mostly = {
> > (((rw) & (1 << BIO_RW_BARRIER)) >> (BIO_RW_BARRIER - 0))
> > #define trace_sync_bit(rw) \
> > (((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1))
> > +#define trace_ahead_bit(rw) \
> > + (((rw) & (1 << BIO_RW_AHEAD)) << (BIO_RW_AHEAD - 0))
> >
> > /*
> > * The worker for the various blk_add_trace*() types. Fills out a
>
>
> Than doesn't make sense, we are using the bit position in the BIO_RW_
> name space twice instead of factoring it out like the other uses.
>
> Looking at include/linux/bio.h line 147 we find
> #define BIO_RW_AHEAD 1
>
> So this is moving it from bit 1 (value 2) to bit 2 (value 4).
>
> I think the shift should be << (2 - BIO_RW_AHEAD).
You are right, it's a little nonsensical right now. I'll get it fixed
up.
--
Jens Axboe
prev parent reply other threads:[~2006-07-10 6:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 5:46 [PATCH] blktrace: readahead support Milton Miller
2006-07-10 5:53 ` Nathan Scott
2006-07-10 6:24 ` Jens Axboe [this message]
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=20060710062408.GA4141@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.com \
--cc=nathans@sgi.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 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.