All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Support resize and device delete cancel ops
@ 2021-05-21 12:06 David Sterba
  2021-05-21 12:06 ` [PATCH 1/6] btrfs: protect exclusive_operation by super_lock David Sterba
                   ` (8 more replies)
  0 siblings, 9 replies; 29+ messages in thread
From: David Sterba @ 2021-05-21 12:06 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

We don't have a nice interface to cancel the resize or device deletion
from a command. Since recently, both commands can be interrupted by a
signal, which also means Ctrl-C from terminal, but given the long
history of absence of the commands I think this is not yet well known.

Examples:

  $ btrfs fi resize -10G /mnt
  ...
  $ btrfs fi resize cancel /mnt

  $ btrfs device delete /dev/sdx /mnt
  ...
  $ btrfs device delete cancel /mnt

The cancel request returns once the resize/delete command finishes
processing of the currently relocated chunk. The btrfs-progs needs to be
updated as well to skip checks of the sysfs exclusive_operation file
added in 5.10 (raw ioctl would work).

David Sterba (6):
  btrfs: protect exclusive_operation by super_lock
  btrfs: add cancelable chunk relocation support
  btrfs: introduce try-lock semantics for exclusive op start
  btrfs: add wrapper for conditional start of exclusive operation
  btrfs: add cancelation to resize
  btrfs: add device delete cancel

 fs/btrfs/ctree.h      |  16 +++-
 fs/btrfs/disk-io.c    |   1 +
 fs/btrfs/ioctl.c      | 174 ++++++++++++++++++++++++++++++++----------
 fs/btrfs/relocation.c |  60 ++++++++++++++-
 4 files changed, 207 insertions(+), 44 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-12-15 15:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 12:06 [PATCH 0/6] Support resize and device delete cancel ops David Sterba
2021-05-21 12:06 ` [PATCH 1/6] btrfs: protect exclusive_operation by super_lock David Sterba
2021-05-21 13:37   ` Josef Bacik
2021-05-21 12:06 ` [PATCH 2/6] btrfs: add cancelable chunk relocation support David Sterba
2021-05-21 13:21   ` Josef Bacik
2021-05-26 22:56     ` David Sterba
2021-06-16 13:54   ` Filipe Manana
2021-06-16 13:55     ` Filipe Manana
2021-06-16 15:53       ` David Sterba
2021-06-16 15:58       ` [PATCH v2] btrfs: add cancellable " David Sterba
2021-06-17  9:18         ` Filipe Manana
2021-05-21 12:06 ` [PATCH 3/6] btrfs: introduce try-lock semantics for exclusive op start David Sterba
2021-05-21 13:38   ` Josef Bacik
2021-05-27  7:43   ` Anand Jain
2021-05-28 12:30     ` David Sterba
2021-05-29 13:48       ` Anand Jain
2021-05-31 18:23         ` David Sterba
2021-05-21 12:06 ` [PATCH 4/6] btrfs: add wrapper for conditional start of exclusive operation David Sterba
2021-05-21 13:29   ` Josef Bacik
2021-05-21 16:45     ` David Sterba
2021-05-26 22:24       ` David Sterba
2021-05-21 12:06 ` [PATCH 5/6] btrfs: add cancelation to resize David Sterba
2021-05-21 13:38   ` Josef Bacik
2021-05-21 12:06 ` [PATCH 6/6] btrfs: add device delete cancel David Sterba
2021-05-21 13:38   ` Josef Bacik
2021-05-21 12:06 ` [PATCH 1/2] btrfs-progs: device remove: add support for cancel David Sterba
2021-05-21 12:06 ` [PATCH 2/2] btrfs-progs: fi resize: " David Sterba
2021-12-14 14:49 ` [PATCH 0/6] Support resize and device delete cancel ops Anand Jain
2021-12-15 15:13   ` David Sterba

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.