From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs-progs: make 'btrfs replace' signal-handling works.
Date: Wed, 3 Sep 2014 09:17:22 +0800 [thread overview]
Message-ID: <54066C22.6070307@cn.fujitsu.com> (raw)
In-Reply-To: <20140902112518.GD5888@twin.jikos.cz>
-------- Original Message --------
Subject: Re: [PATCH] btrfs-progs: make 'btrfs replace' signal-handling
works.
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2014年09月02日 19:25
> On Wed, Aug 06, 2014 at 09:17:07AM +0800, Qu Wenruo wrote:
>> Current BTRFS_IOC_DEV_REPLACE ioctl is synchronous, and during the ioctl
>> program is fallen into kernel and unable to handle signal, the original
>> signal function will never be executed until the dev replace is done.
>> This is very annoying for someone who wants to stop dev replace by
>> Ctrl-c (we have to admit that's the most users will do when replacing
>> dev with nodatacow/nodatasum mount option).
>>
>> This patch will create a thread to do the ioctl things, making the main
>> thread able to handle signal correctly.
> As described under the kernel patch, I'd like to use the respective
> cancel ioctls instead of signals.
I think I didn't describe it clear in the patch, the patch still uses
cancel ioctl to cancel the dev-replace,
it just makes the original dev_replace_handle_sigint() function get
called correctly.
(Before the patch, it will only be called after the ioctl is done, not
when Ctrl-C is pressed, as explained in patch)
If you mean 'dev-replace cancel' is correct way Ctrl-C should not be
used, then I can only agree with the first half.
Ctrl-C is almost a conditioned response for most people if they want to
stop some program,
due to the principle of least astonishment, I think the SIGINT handling
is still useful for most sysadmin.
Thanks,
Qu
prev parent reply other threads:[~2014-09-03 1:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 1:17 [PATCH] btrfs-progs: make 'btrfs replace' signal-handling works Qu Wenruo
2014-09-02 11:25 ` David Sterba
2014-09-03 1:17 ` Qu Wenruo [this message]
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=54066C22.6070307@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.