[PATCHv3 0/3] btrfs-progs: Auto resize fs after device replace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>

Changes from v2:
* Fixed the code format after moving function resize_filesystem in patch 0001
  (suggested by David)
* Sorted the resize_filesystem function prototype in patch 0001 (suggested by
  David)
* Changed the -a into long argument --autoresize in patch 0002 (suggested by
  David)
* Translate srcdev if the argument is not a devid (suggested by David)
* This also changes the way we use the ioctl, now only passing devid to the
  kernel, instead of passing the path and letting the kernel to translate
* Add tests to check the autoresize functionality

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 Qu)
* Added a warning message saying that the resize failed, asking the user to
  resize manually. (suggested by Qu)

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 Qu I decided to send a v3 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!

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

 Documentation/btrfs-replace.asciidoc        |   5 +-
 cmds/filesystem.c                           |  58 +----------
 cmds/replace.c                              | 105 +++++++++++++-------
 common/utils.c                              |  60 +++++++++++
 common/utils.h                              |   2 +
 tests/misc-tests/039-replace-device/test.sh |  56 +++++++++++
 6 files changed, 192 insertions(+), 94 deletions(-)
 create mode 100755 tests/misc-tests/039-replace-device/test.sh

-- 
2.25.1




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux