mbox series

[PATCHv2,0/2] btrfs-progs: Auto resize fs after device replace

Message ID 20200320033227.3721-1-marcos@mpdesouza.com (mailing list archive)
Headers show
Series btrfs-progs: Auto resize fs after device replace | expand

Message

Marcos Paulo de Souza March 20, 2020, 3:32 a.m. UTC
From: Marcos Paulo de Souza <mpdesouza@suse.com>

Changes from v1:
* Reworded the help message and the docs telling the user that the fs will be
  resized to it's max size (suggested by Wenruo)
* Added a warning message saying that the resize failed, asking the user to
  resize manually. (suggested by Wenruo)

Both changes were done only in patch 0002.

Anand suggested this job to be done in kernel side, atomically, but as I
received a good review from Wenruo I decided to send a v2 of this patchset.

Please review, thanks!

Original cover-letter[1]:
These two patches make possible to resize the fs after a successful replace
finishes. The flag -a is responsible for doing it (-r is already use, so -a in
this context means "automatically").

The first patch just moves the resize rationale to utils.c and the second patch
adds the flag an calls resize if -a is informed replace finishes successfully.

Please review!

[1]: https://lore.kernel.org/linux-btrfs/20200307224516.16315-1-marcos@mpdesouza.com/T/#t

Marcos Paulo de Souza (2):
  btrfs-progs: Move resize into functionaly into utils.c
  btrfs-progs: replace: New argument to resize the fs after replace

 Documentation/btrfs-replace.asciidoc |  5 ++-
 cmds/filesystem.c                    | 58 +--------------------------
 cmds/replace.c                       | 21 +++++++++-
 common/utils.c                       | 60 ++++++++++++++++++++++++++++
 common/utils.h                       |  1 +
 5 files changed, 86 insertions(+), 59 deletions(-)