Skip to content

Killable synchronous BIO submission

Matthew Wilcox (Oracle) linux-block linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2block: Add submit_bio_killableblock/bio.c include/linux/bio.h include/linux/completion.h +1 more+75 -230 replies
2/2fs: Make mpage_readpage synchronousfs/mpage.c+22 -32 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Killable synchronous BIO submission

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(-)
Signature · 1 line
2.28.0