All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Ashlie Martinez <ashmrtn@utexas.edu>, linux-block@vger.kernel.org
Subject: Re: RFC bio flags and ops in v4.10+
Date: Mon, 21 Jan 2019 21:04:46 -0800	[thread overview]
Message-ID: <7064d8d4-675d-8c40-5f20-b865607d3495@acm.org> (raw)
In-Reply-To: <CAFk8rvbdfzdChGf9jsTT7qPVf7bpW4VH0mys1He8_KjUD5mD2A@mail.gmail.com>

On 1/21/19 8:45 PM, Ashlie Martinez wrote:
> I was working on porting parts of a file system crash consistency
> checking tool called CrashMonkey [1] to linux kernels 4.9 and 4.14
> when I noticed an inconsistency in how the bio->bi_opf field is
> treated. According to the comments in /include/linux/blk_types.h, the
> REQ_OP should be the upper bits in bi_opf, while the request flags
> should be in the lower bits. In kernel 4.9, the accessor and setter
> methods for this field appear to be correct. However, kernels 4.10+ do
> not properly shift the REQ_OP argument up for either setting it or
> getting it from bi_opf. Is this the intended behavior or is it a
> mistake in how the code was written? Please note that I have not
> checked all the releases between 4.9 and 5.0-rc3, but I know 4.10,
> 4.14, 4.15, and 5.0-rc3 contain the same or similar code for setting
> bio->bi_opf.

Hi Ashlie,

Are you perhaps referring to commit ef295ecf090d ("block: better op and 
flags encoding")? Have you noticed that that commit modified the 
encoding such that the operation ends up in the lower 8 bits and the 
flags in the upper 24 bits? That patch namely includes the following change:

+enum req_flag_bits {
+	__REQ_FAILFAST_DEV =	/* no driver retries of device errors */
+		REQ_OP_BITS,

Bart.

  reply	other threads:[~2019-01-22  5:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22  4:45 RFC bio flags and ops in v4.10+ Ashlie Martinez
2019-01-22  5:04 ` Bart Van Assche [this message]
2019-01-22  5:12   ` Ashlie Martinez
2019-01-22 17:05     ` Bart Van Assche

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=7064d8d4-675d-8c40-5f20-b865607d3495@acm.org \
    --to=bvanassche@acm.org \
    --cc=ashmrtn@utexas.edu \
    --cc=linux-block@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.