From: Keith Busch <kbusch@kernel.org>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: Keith Busch <kbusch@meta.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"axboe@kernel.org" <axboe@kernel.org>
Subject: Re: [PATCH] blk-lib: let user kill a zereout process
Date: Tue, 20 Feb 2024 20:16:29 -0700 [thread overview]
Message-ID: <ZdVrDbaQ2DbSKQtL@kbusch-mbp> (raw)
In-Reply-To: <132449a7-634c-41b6-b14c-863cb198133e@nvidia.com>
On Wed, Feb 21, 2024 at 03:05:30AM +0000, Chaitanya Kulkarni wrote:
> On 2/20/24 12:41, Keith Busch wrote:
> > From: Keith Busch <kbusch@kernel.org>
> > @@ -190,6 +190,8 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev,
> > break;
> > }
> > cond_resched();
> > + if (fatal_signal_pending(current))
> > + break;
> > }
> >
> > *biop = bio;
>
> We are exiting before completion of the whole I/O request, does it makes
> sense to return 0 == success if I/O is interrupted by the signal ?
> that means I/O not completed, hence it is actually an error, can we return
> the -EINTR when you are handling outstanding signal ?
I initially thought so too, but it doesn't matter. Once the process
returns to user space, the signal kills it and the exit status reflects
accordingly. That's true even before this patch, but it would just take
longer for the exit.
next prev parent reply other threads:[~2024-02-21 3:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 20:41 [PATCH] blk-lib: let user kill a zereout process Keith Busch
2024-02-21 3:05 ` Chaitanya Kulkarni
2024-02-21 3:16 ` Keith Busch [this message]
2024-02-21 3:21 ` Keith Busch
2024-02-21 5:32 ` Chaitanya Kulkarni
2024-02-21 8:54 ` Ming Lei
2024-02-21 9:45 ` Chaitanya Kulkarni
2024-02-21 8:46 ` Nilay Shroff
2024-02-21 9:46 ` Chaitanya Kulkarni
2024-02-21 16:27 ` Keith Busch
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=ZdVrDbaQ2DbSKQtL@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.org \
--cc=chaitanyak@nvidia.com \
--cc=kbusch@meta.com \
--cc=linux-block@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