From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 0/2] Killable synchronous BIO submission
Date: Fri, 16 Oct 2020 17:14:24 +0100 [thread overview]
Message-ID: <20201016161426.21715-1-willy@infradead.org> (raw)
It would be nice to be able to report the actual errors from block devices
instead of the default -EIO. In order to do that, we need to execute the
BIO synchronously as the only way to get the error back to the caller is
by returning it from readpage() -- we can't store it in the struct page.
But we need to be able to respond to a fatal signal, as we do today with
lock_page_killable(). This turns out to be quite hard. The solution
I settled on is that the caller must pass in an alternate end_io to be
called asynchronously if a fatal signal arrives.
I believe the synchronize_rcu() call to be sufficient to ensure that the
old bi_end_io() will not be called. If there are callers of bi_end_io()
from BH-enabled regions, it may not be! Perhaps we could put a warning
in bio_endio() to make sure that's true?
Matthew Wilcox (Oracle) (2):
block: Add submit_bio_killable
fs: Make mpage_readpage synchronous
block/bio.c | 87 +++++++++++++++++++++++++++++---------
fs/mpage.c | 25 +++++++++--
include/linux/bio.h | 1 +
include/linux/completion.h | 1 +
kernel/sched/completion.c | 9 ++--
5 files changed, 97 insertions(+), 26 deletions(-)
--
2.28.0
next reply other threads:[~2020-10-16 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 16:14 Matthew Wilcox (Oracle) [this message]
2020-10-16 16:14 ` [PATCH 1/2] block: Add submit_bio_killable Matthew Wilcox (Oracle)
2020-10-16 16:14 ` [PATCH 2/2] fs: Make mpage_readpage synchronous Matthew Wilcox (Oracle)
2020-10-16 16:56 ` Keith Busch
2020-10-16 16:59 ` Matthew Wilcox
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=20201016161426.21715-1-willy@infradead.org \
--to=willy@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).