From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>,
David Howells <dhowells@redhat.com>
Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: Is there a reason why REQ_OP_READ has to be 0?
Date: Mon, 16 Jan 2023 09:06:28 -0700 [thread overview]
Message-ID: <70e4869e-1ab8-9838-5af8-8cd41a536f2b@kernel.dk> (raw)
In-Reply-To: <Y8V1n4e/eeOd4n8/@infradead.org>
On 1/16/23 9:04?AM, Christoph Hellwig wrote:
> On Mon, Jan 16, 2023 at 04:01:50PM +0000, David Howells wrote:
>> Hi Jens, Christoph,
>>
>> Do you know if there's a reason why REQ_OP_READ has to be 0? I'm seeing a
>> circumstance where a direct I/O write on a blockdev is BUG'ing in my modified
>> iov_iter code because the iterator says it's a source iterator (correct), but
>> the bio->bi_opf == REQ_OP_READ (which should be wrong).
>>
>> I thought I'd move REQ_OP_READ to, say, 4 so that I could try and see if it's
>> just undefined but the kernel BUGs and then panics during boot.
>
> There's all kind of assumptions of that from basically day 1 of
> Linux. The most obvious one is in op_is_write, but I'm pretty sure
> there are more hidden somewhere.
I didn't get this original email...
I would not change this frivilously, as Christoph says we've used 0/1
for basic read/write data direction since basically forever. So for all
intents and purposes, yes that is basically hardwired.
--
Jens Axboe
next prev parent reply other threads:[~2023-01-16 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 16:01 Is there a reason why REQ_OP_READ has to be 0? David Howells
2023-01-16 16:04 ` Christoph Hellwig
2023-01-16 16:06 ` Jens Axboe [this message]
2023-01-16 16:17 ` David Howells
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=70e4869e-1ab8-9838-5af8-8cd41a536f2b@kernel.dk \
--to=axboe@kernel.dk \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox