Rootdir refactor and small bug fixes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 2 repliesIn review
- v15 patches 1 replySuperseded
Changes in v2 from the cover letter
Add a new fix, to avoid mkfs return 1. The rest doesn't change. Add reviewed-by tag.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happensextent-tree.c volumes.c | +16 | 0 replies | |
| 2/6 | btrfs-progs: mkfs: Avoid positive return value from cleanup_temp_chunksmkfs/ | +3 | 0 replies | |
| 3/6 | btrfs-progs: mkfs: Fix overwritten return value for mkfsmkfs/ | +3 | 0 replies | |
| 4/6 | btrfs-progs: mkfs: Error out gracefully for --rootdirmkfs/ | +13 | 0 replies | |
| 5/6 | btrfs-progs: mkfs: Move image creation of rootdir to its own filesMakefile mkfs/ mkfs/ +1 more | +706 | 1 reply | |
| 6/6 | btrfs-progs: mkfs: Move source dir size calculation to its own filesmkfs/ mkfs/ mkfs/ | +67 | 0 replies |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Nikolay Borisov |
|---|---|
| 1/6 | R-b |
| 2/6 | |
| 3/6 | R-b |
| 4/6 | R-b |
| 5/6 | R-b |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] Rootdir refactor and small bug fixes
Sorry for the v2 patchset, just added a new 3-line patch. But since it can screw up bisect, I re-send the whole patchset, to make the new patch just before mkfs return value fix, so bisect will work as it used to do.
First 4 patches are small bug fixes which can be applied even we don't touch the functionality of --rootdir.
The last two patches will refactor --rootdir related functions ,mainly size_sourcedir() and make_image(), to mkfs/rootdir.[ch].
And rename them to btrfs_mkfs_size_dir() and btrfs_mkfs_fill_dir() respectively.
Functionality is not changed at all, so it will still shrink the device or using the first 1M reserved space.
This moved about 700 lines, which reduced about 1/3 of original mkfs.c.
And by moving this ancient code to its own files, I also fixed several small nits exposed by checkpatch script.
This provides a clean environment for later rootdir rework.
changelog:
v2:
Add a new fix, to avoid mkfs return 1. The rest doesn't change. Add reviewed-by tag.
Qu Wenruo (6):
btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happens
btrfs-progs: mkfs: Avoid positive return value from
cleanup_temp_chunks
btrfs-progs: mkfs: Fix overwritten return value for mkfs
btrfs-progs: mkfs: Error out gracefully for --rootdir
btrfs-progs: mkfs: Move image creation of rootdir to its own files
btrfs-progs: mkfs: Move source dir size calculation to its own files
Makefile | 4 +- extent-tree.c | 3 +- mkfs/main.c | 713 +------------------------------------------------------ mkfs/rootdir.c | 735 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mkfs/rootdir.h | 32 +++ volumes.c | 18 +- 6 files changed, 795 insertions(+), 710 deletions(-) create mode 100644 mkfs/rootdir.c create mode 100644 mkfs/rootdir.h
Signature · 1 line
2.14.2