Re: [PATCH 6/7] block: better op and flags encoding

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

 



On Fri, Oct 28, 2016 at 2:35 AM, Christoph Hellwig <hch@xxxxxx> wrote:
>> >  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.

Got it.

Reviewed-by: Shaun Tancheff <shaun.tancheff@xxxxxxxxxxx>

Regards,
-- 
Shaun Tancheff
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux