]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: relocation: allow signal to cancel balance
authorQu Wenruo <wqu@suse.com>
Mon, 13 Jul 2020 01:03:19 +0000 (09:03 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:44 +0000 (12:55 +0200)
commit3c2ab3c3a69cd6b144c9d7e1c43efd30a5ac2770
treec9601f3f6f724df51cd69f06d2af08aae0fbbd86
parent504390b5c2f397134ad3edfaa3cd73f5a420c43e
btrfs: relocation: allow signal to cancel balance

Although btrfs balance can be canceled with "btrfs balance cancel"
command, it's still almost muscle memory to press Ctrl-C to cancel a
long running btrfs balance.

So allow btrfs balance to check signal to determine if it should exit.
The cancellation points are in known location and we're only adding one
more reason, so this should be safe.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c