Linux-NVME Archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>,
	Chandan Babu R <chandanbabu@kernel.org>,
	Keith Busch <kbusch@kernel.org>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	linux-xfs@vger.kernel.org
Subject: RFCv2: fix fatal signal handling in __blkdev_issue_discard
Date: Tue, 12 Mar 2024 08:48:21 -0600	[thread overview]
Message-ID: <20240312144826.1045212-1-hch@lst.de> (raw)

[sorry for the resend, the hotel wifi just broke down]

Hi all,

this tries to address the block for-next oops Chandan reported on XFS.
I can't actually reproduce it unfortunately, but this series should
sort it out by movign the fatal_signal_pending check out of all but
the ioctl path.  The write_zeroes and secure_erase path will need
similar treatment eventually.

Tested with blktests and the xfstests discard group for xfs only.

Changes since v1:
 - open code the fatal signal logic in the ioctl handler
 - better bio-level helpers
 - drop the file system cleanups for now

Diffstat:
 block/bio.c         |   48 +++++++++++++++++++++++----
 block/blk-lib.c     |   90 +++++++++++++++-------------------------------------
 block/blk.h         |    1 
 block/ioctl.c       |   35 +++++++++++++++++---
 include/linux/bio.h |    4 ++
 5 files changed, 102 insertions(+), 76 deletions(-)


             reply	other threads:[~2024-03-12 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 14:48 Christoph Hellwig [this message]
2024-03-12 14:48 ` [PATCH 1/5] block: move discard checks into the ioctl handler Christoph Hellwig
2024-03-12 14:48 ` [PATCH 2/5] block: add a bio_chain_and_submit helper Christoph Hellwig
2024-03-12 14:48 ` [PATCH 3/5] block: add a blk_alloc_discard_bio helper Christoph Hellwig
2024-03-12 14:48 ` [PATCH 4/5] block: move await_bio_chain to bio.c Christoph Hellwig
2024-03-12 14:48 ` [PATCH 5/5] block: don't allow fatal signals to interrupt (__)blkdev_issue_discard Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2024-03-12 14:45 RFCv2: fix fatal signal handling in __blkdev_issue_discard Christoph Hellwig

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=20240312144826.1045212-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=chandanbabu@kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-xfs@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 read-only IMAP folder(s) and NNTP newsgroup(s).