From: Christoph Hellwig <hch@lst.de>
To: Shaun Tancheff <shaun.tancheff@seagate.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@fb.com>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 6/7] block: better op and flags encoding
Date: Fri, 28 Oct 2016 09:35:58 +0200 [thread overview]
Message-ID: <20161028073558.GA11804@lst.de> (raw)
In-Reply-To: <CAJVOszBmN+=PD7MBEgkhO-jo3_R7rJ+5V1LGbWqDW8U+D=Dbgw@mail.gmail.com>
> > void init_request_from_bio(struct request *req, struct bio *bio)
> > {
> > req->cmd_type = REQ_TYPE_FS;
> > -
> > - req->cmd_flags |= bio->bi_opf & REQ_COMMON_MASK;
>
> Don't we still have to init cmd_flags from bi_opf at some point in the
> non-mq path?
We now pass all of bi_opf to get_request -> __get_request, so cmd_flags
is initialized to the right value from the very beginning.
> > --- a/block/blk-map.c
> > +++ b/block/blk-map.c
> > @@ -16,6 +16,8 @@
> > int blk_rq_append_bio(struct request *rq, struct bio *bio)
> > {
> > if (!rq->bio) {
> > + rq->cmd_flags &= REQ_OP_MASK;
> > + rq->cmd_flags |= (bio->bi_opf & REQ_OP_MASK);
> > blk_rq_bio_prep(rq->q, rq, bio);
>
> Should this be "&= ~REQ_OP_MASK" ?
No - blk_rq_bio_prep previous initialized just the op, and not the
flags, and this keeps the behavior. In the long run we should stop
setting the op here as well, though.
next prev parent reply other threads:[~2016-10-28 7:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 13:12 clean up block ops defintions Christoph Hellwig
2016-10-20 13:12 ` [PATCH 1/7] block: remove bio_is_rw Christoph Hellwig
2016-10-20 13:12 ` [PATCH 2/7] block: REQ_NOMERGE is common to the bio and request Christoph Hellwig
2016-10-20 13:12 ` [PATCH 3/7] block: move REQ_RAHEAD to common flags Christoph Hellwig
2016-10-20 13:12 ` [PATCH 4/7] block: replace REQ_THROTTLED with a bio flag Christoph Hellwig
2016-10-20 13:12 ` [PATCH 5/7] block: split out request-only flags into a new namespace Christoph Hellwig
2016-10-20 13:12 ` [PATCH 6/7] block: better op and flags encoding Christoph Hellwig
[not found] ` <CAJVOszBmN+=PD7MBEgkhO-jo3_R7rJ+5V1LGbWqDW8U+D=Dbgw@mail.gmail.com>
2016-10-28 7:35 ` Christoph Hellwig [this message]
2016-10-20 13:12 ` [PATCH 7/7] block: add a proper block layer data direction encoding Christoph Hellwig
2016-10-25 12:01 ` clean up block ops defintions Christoph Hellwig
2016-10-28 14:40 ` Jens Axboe
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=20161028073558.GA11804@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=shaun.tancheff@seagate.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.