From: Christoph Hellwig <hch@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@infradead.org>,
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 08:04:47 -0800 [thread overview]
Message-ID: <Y8V1n4e/eeOd4n8/@infradead.org> (raw)
In-Reply-To: <2117829.1673884910@warthog.procyon.org.uk>
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.
next prev parent reply other threads:[~2023-01-16 16:07 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 [this message]
2023-01-16 16:06 ` Jens Axboe
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=Y8V1n4e/eeOd4n8/@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=dhowells@redhat.com \
--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