Skip to content

Support resize and device delete cancel ops

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: protect exclusive_operation by super_lockfs/btrfs/ctree.h fs/btrfs/ioctl.c+17 -31 reply
2/6btrfs: add cancelable chunk relocation supportfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/relocation.c+69 -17 replies
3/6btrfs: introduce try-lock semantics for exclusive op startfs/btrfs/ctree.h fs/btrfs/ioctl.c+29 -05 replies
4/6btrfs: add wrapper for conditional start of exclusive operationfs/btrfs/ioctl.c+42 -03 replies
5/6btrfs: add cancelation to resizefs/btrfs/ioctl.c+26 -211 reply
6/6btrfs: add device delete cancelfs/btrfs/ioctl.c+24 -191 reply

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchJosef BacikAnand JainFilipe Manana
1/6R-b
2/6R-b
3/6R-b R-b
4/6
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] Support resize and device delete cancel ops

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(-)
Signature · 1 line
2.29.2