btrfs-progs: enhance --subvol/--inode-flags options
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | btrfs-progs: mkfs/rootdir: extract subvol validation code into a helpermkfs/ mkfs/ mkfs/ | +51 | 0 replies | |
| 2/5 | btrfs-progs: mkfs/rootdir: extract inode flags validation code into a helpermkfs/ mkfs/ mkfs/ | +43 | 0 replies | |
| 3/5 | btrfs-progs: mkfs/rootdir: enhance subvols detectionmkfs/ mkfs/ | +40 | 0 replies | |
| 4/5 | btrfs-progs: mkfs/rootdir: enhance inode flags detectionmkfs/ mkfs/ | +23 | 0 replies | |
| 5/5 | btrfs-progs: doc/mkfs: remove the note about memory usageDocumentation/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] btrfs-progs: enhance --subvol/--inode-flags options
Currently both --subvol and --inode-flags save the full path into their structures, and check each inode against those full path.
For long paths it can be time consuming, and this introduces extra memory for each structure.
This series enhance the handling of those options by:
- Extract the validation part into a dedicated helper inside rootdir.[ch]
- Use st_dev/st_ino to replace full_path
This reduces runtime and memory usage for the involved structures.
- Remove the memory usage warning note
Even with the old 8K per structure memory usage, 1024 options will only 8M memory, that's accetable even for a lot of micro-controllers, not to mention modern desktop/servers.
I'm a little paranoid at that time, with the memory usage almost halved, we can safely remove that warning note.
Qu Wenruo (5):
btrfs-progs: mkfs/rootdir: extract subvol validation code into a
helper
btrfs-progs: mkfs/rootdir: extract inode flags validation code into a
helper
btrfs-progs: mkfs/rootdir: enhance subvols detection
btrfs-progs: mkfs/rootdir: enhance inode flags detection
btrfs-progs: doc/mkfs: remove the note about memory usage
Documentation/mkfs.btrfs.rst | 5 -- mkfs/main.c | 84 ++------------------ mkfs/rootdir.c | 147 +++++++++++++++++++++++++++++++---- mkfs/rootdir.h | 14 +++- 4 files changed, 148 insertions(+), 102 deletions(-)
--
2.50.1