Skip to content

Remaining part of mkfs --rootdir rework

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9btrfs-progs: mkfs: Cleanup temporary chunks before filling rootdirmkfs/main.c+7 -60 replies
2/9btrfs-progs: mkfs: Don't use custom chunk allocator for rootdirmkfs/main.c+0 -620 replies
3/9btrfs-progs: mkfs/rootdir: Use over-reserve method to make size estimate easiermkfs/main.c mkfs/rootdir.c mkfs/rootdir.h+139 -940 replies
4/9btrfs-progs: mkfs/rootdir: Shrink fs for rootdir optionmkfs/main.c mkfs/rootdir.c mkfs/rootdir.h+117 -00 replies
5/9btrfs-progs: mkfs: Separate shrink from rootdirDocumentation/mkfs.btrfs.asciidoc mkfs/main.c mkfs/rootdir.c +1 more+53 -80 replies
6/9btrfs-progs: mkfs: Fix regression preventing --rootdir to create filemkfs/main.c utils.c utils.h+20 -21 reply
7/9btrfs-progs: tests/mkfs: Introduce test case to check if mkfs rootdir can create new filetests/mkfs-tests/011-rootdir-create-file/test.sh+14 -00 replies
8/9btrfs-progs: mkfs: Use the whole file or block device to mkfs for rootdirmkfs/main.c utils.c utils.h+22 -30 replies
9/9btrfs-progs: tests/mkfs: Introduce test case to verify if mkfs.btrfs rootdir shrink behaves correctlytests/mkfs-tests/012-rootdir-no-shrink/test.sh+38 -00 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchTomohiro Misono
1/9
2/9
3/9
4/9
5/9
6/9R-b
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] Remaining part of mkfs --rootdir rework

Can be fetched from my github repo:
https://github.com/adam900710/btrfs-progs/tree/mkfs_rootdir_rework

Based on the following commit head of David's devel branch:
------
commit af322ba5aa1dd0b2a3422e1c4acd8082948efa7b (david/devel)
Author: Su Yue <[email protected]>
Date: Tue Nov 28 17:14:48 2017 +0800

btrfs-progs: fi defrag: clean up duplicate code if find errors

In function cmd_filesystem_defrag(), lines of code for error handling are duplicate and hard to expand in further.

Create a jump label for errors.

------

Patch 1 is split from original patch.
Patch 2~5 are the patches rebased. Only minor conflicts.

Patch 6~7 are regression fix and its test case. Which prohibits mkfs.btrfs --rootdir from creating new file.

Patch 8~9 are fix and test case for incorrect shrink behavior, which will shrink the fs even --shrink is not specified.

Qu Wenruo (9):
btrfs-progs: mkfs: Cleanup temporary chunks before filling rootdir
btrfs-progs: mkfs: Don't use custom chunk allocator for rootdir
btrfs-progs: mkfs/rootdir: Use over-reserve method to make size
estimate easier
btrfs-progs: mkfs/rootdir: Shrink fs for rootdir option
btrfs-progs: mkfs: Separate shrink from rootdir
btrfs-progs: mkfs: Fix regression preventing --rootdir to create file
btrfs-progs: tests/mkfs: Introduce test case to check if mkfs rootdir
can create new file
btrfs-progs: mkfs: Use the whole file or block device to mkfs for
rootdir
btrfs-progs: tests/mkfs: Introduce test case to verify if mkfs.btrfs
rootdir shrink behaves correctly

 Documentation/mkfs.btrfs.asciidoc                |  11 +
 mkfs/main.c                                      | 231 ++++++++++-----------
 mkfs/rootdir.c                                   | 249 +++++++++++++++++++----
 mkfs/rootdir.h                                   |   7 +-
 tests/mkfs-tests/011-rootdir-create-file/test.sh |  14 ++
 tests/mkfs-tests/012-rootdir-no-shrink/test.sh   |  38 ++++
 utils.c                                          |  17 +-
 utils.h                                          |   2 +
 8 files changed, 402 insertions(+), 167 deletions(-)
 create mode 100755 tests/mkfs-tests/011-rootdir-create-file/test.sh
 create mode 100755 tests/mkfs-tests/012-rootdir-no-shrink/test.sh
Signature · 1 line
2.15.0