linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7 v2] e2fsprogs: Better handling of indexed directories
@ 2020-02-13 10:15 Jan Kara
  2020-02-13 10:15 ` [PATCH 1/7] e2fsck: Clarify overflow link count error message Jan Kara
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: Jan Kara @ 2020-02-13 10:15 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Jan Kara

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2020-03-26 14:27 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 10:15 [PATCH 0/7 v2] e2fsprogs: Better handling of indexed directories Jan Kara
2020-02-13 10:15 ` [PATCH 1/7] e2fsck: Clarify overflow link count error message Jan Kara
2020-02-14 19:27   ` Andreas Dilger
2020-03-07 18:52   ` Theodore Y. Ts'o
2020-02-13 10:15 ` [PATCH 2/7] e2fsck: Fix indexed dir rehash failure with metadata_csum enabled Jan Kara
2020-02-14 19:28   ` Andreas Dilger
2020-03-07 23:17   ` Theodore Y. Ts'o
2020-03-16  9:30     ` Jan Kara
2020-02-13 10:15 ` [PATCH 3/7] ext2fs: Update allocation info earlier in ext2fs_mkdir() and ext2fs_symlink() Jan Kara
2020-02-14 19:37   ` Andreas Dilger
2020-03-08  0:02   ` Theodore Y. Ts'o
2020-03-08  2:20     ` Theodore Y. Ts'o
2020-03-15 16:15       ` Theodore Y. Ts'o
2020-03-16  9:32         ` Jan Kara
2020-02-13 10:15 ` [PATCH 4/7] ext2fs: Implement dir entry creation in htree directories Jan Kara
2020-03-15 16:43   ` Theodore Y. Ts'o
2020-02-13 10:16 ` [PATCH 5/7] tests: Modify f_large_dir test to excercise indexed dir handling Jan Kara
2020-02-18 20:29   ` Andreas Dilger
2020-03-15 16:43   ` Theodore Y. Ts'o
2020-02-13 10:16 ` [PATCH 6/7] tests: Add test to excercise indexed directories with metadata_csum Jan Kara
2020-02-18 20:34   ` Andreas Dilger
2020-02-13 10:16 ` [PATCH 7/7] tune2fs: Update dir checksums when clearing dir_index feature Jan Kara
2020-02-18 20:50   ` Andreas Dilger
2020-02-19 10:23     ` Jan Kara
2020-03-15 17:15   ` Theodore Y. Ts'o
2020-03-16  0:11     ` Andreas Dilger
2020-03-16  9:27     ` Jan Kara
2020-03-26 14:27     ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).