e2fsprogs: Better handling of indexed directories
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 20 repliesApplied
- v13 patches 9 repliesSuperseded
Changes in v2 from the cover letter
* Fixed growing of h-tree to 3-levels
* Added e2fsck fix
* Added tune2fs fix
* Fixed ext2fs_mkdir() and ext2fs_symlink() to work with new ext2fs_link()
* Reworked tests
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | e2fsck: Clarify overflow link count error messagee2fsck/ e2fsck/ e2fsck/ | +24 | 2 replies | |
| 2/7 | e2fsck: Fix indexed dir rehash failure with metadata_csum enabledlib/ | +7 | 3 replies | |
| 3/7 | ext2fs: Update allocation info earlier in ext2fs_mkdir() and ext2fs_symlink()lib/ lib/ | +14 | 5 replies | |
| 4/7 | ext2fs: Implement dir entry creation in htree directorieslib/ | +497 | 1 reply | |
| 5/7 | tests: Modify f_large_dir test to excercise indexed dir handlingtests/ tests/ | +32 | 2 replies | |
| 6/7 | tests: Add test to excercise indexed directories with metadata_csumtests/ tests/ tests/ +1 more | +117 | 1 reply | |
| 7/7 | tune2fs: Update dir checksums when clearing dir_index featuremisc/ | +95 | 6 replies |
Reviews trailers per patch
5 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Andreas Dilger |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | |
| 5/7 | R-b |
| 6/7 | R-b |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/7 v2] e2fsprogs: Better handling of indexed directories
Hello,
Currently, libext2fs does not implement adding entry into htree directory. It just bluntly clears EXT2_INDEX_FL and then treats the directory as non-indexed. This breaks when metadata checksums are enabled and although ext2fs_link() tries to fixup the directory, it doesn't always fixup all the checksums and I have some doubts about practicality of just discarding htree information for really large directories. This patch series implements full support for adding entry into htree directory and some tests to test the functionality.
The first patch in the series is somewhat unrelated, it just clarifies handling of overflown directory i_nlink handling in e2fsck which confused me initially when analyzing the issue.
The second patch fixes a bug in e2fsck when rehashing indexed directories which I've found during testing my series.
The third patch prepares ext2fs_mkdir() and ext2fs_symlink() to safely work with ext2fs_link() - this demonstrates there's a breakage potential in the following changes to ext2fs_link() for external applications using ext2fs_link() because it can now modify the directory inode and allocate blocks. If people are concerned about this, we could create ext2fs_link2() with the new behavior and just restrict ext2fs_link() to bail with error when called on indexed directory with metadata_csum enabled.
Next three patches implement the support for linking into indexed directories and tests.
The last patch then fixes tune2fs to properly recompute directory checksums when disabling dir_index feature.
Changes since v1:
* Fixed growing of h-tree to 3-levels
* Added e2fsck fix
* Added tune2fs fix
* Fixed ext2fs_mkdir() and ext2fs_symlink() to work with new ext2fs_link()
* Reworked tests
Honza