linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Killable synchronous BIO submission
@ 2020-10-16 16:14 Matthew Wilcox (Oracle)
  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)
  0 siblings, 2 replies; 5+ messages in thread
From: Matthew Wilcox (Oracle) @ 2020-10-16 16:14 UTC (permalink / raw)
  To: linux-block, linux-fsdevel; +Cc: Matthew Wilcox (Oracle)

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-16 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 16:14 [PATCH 0/2] Killable synchronous BIO submission Matthew Wilcox (Oracle)
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

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).