Skip to contentSkip to conversation

udf fixes for 6.2-rc3 and ext2 cleanup

GIT PULL Jan Kara 2 participants 3 messages Jan 5, 2023 – Jan 6, 2023 VFS

lore
Share & tools
lore

Jan Kara

author reviewer
#0 lore raw

Hello Linus,

could you please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git for_v6.2-rc3

to get:
* A lot of fixes of UDF directory handling code (effectively a rewrite of directory entry handling). It fixes multiple crashes and corruption issues spotted by syzbot.
* Couple of fixes to UDF extent handling code fixing several filesystem corruption issues found by syzbot, fsx, and fsstress.
* Some followup fixups for the extent handling fixes that went in during the merge window.
* Trivial patch replacing kmap_atomic() usage with kmap_local_page() in ext2.

The pull request is somewhat large but given these are all fixes (except for ext2 conversion) and we are only at rc3, I hope it is fine.

Top of the tree is e86812bfac97. The full shortlog is:

Colin Ian King (1):

      udf: Fix spelling mistake "lenght" -> "length"

Fabio M. De Francesco (1):
fs/ext2: Replace kmap_atomic() with kmap_local_page()

Jan Kara (30):
udf: Define EFSCORRUPTED error code
udf: New directory iteration code
udf: Convert udf_readdir() to new directory iteration
udf: Convert udf_expand_dir_adinicb() to new directory iteration
udf: Move udf_expand_dir_adinicb() to its callsite
udf: Implement searching for directory entry using new iteration code
udf: Convert udf_lookup() to use new directory iteration code
udf: Convert udf_get_parent() to new directory iteration code
udf: Convert empty_dir() to new directory iteration code
udf: Provide function to mark entry as deleted using new directory iteration code
udf: Convert udf_rmdir() to new directory iteration code
udf: Convert udf_unlink() to new directory iteration code
udf: Implement adding of dir entries using new iteration code
udf: Convert udf_add_nondir() to new directory iteration
udf: Convert udf_mkdir() to new directory iteration code
udf: Convert udf_link() to new directory iteration code
udf: Convert udf_rename() to new directory iteration code
udf: Remove old directory iteration code
udf: Truncate added extents on failed expansion
udf: Do not bother merging very long extents
udf: Handle error when expanding directory
udf: Handle error when adding extent to symlink
udf: Handle error when adding extent to a file
udf: Allocate name buffer in directory iterator on heap
udf: Move setting of i_lenExtents into udf_do_extend_file()
udf: Fix extension of the last extent in the file
udf: Keep i_lenExtents consistent with the total length of extents
udf: Do not update file length for failed writes to inline files
udf: Preserve link count of system files
udf: Detect system inodes linked into directory hierarchy

Tom Rix (1):
udf: initialize newblock to 0

The diffstat is

 fs/ext2/dir.c      |    4 +-
 fs/udf/dir.c       |  148 ++------
 fs/udf/directory.c |  567 +++++++++++++++++++++-------
 fs/udf/file.c      |   26 +-
 fs/udf/inode.c     |  195 +++-------
 fs/udf/namei.c     | 1062 ++++++++++++++++++----------------------------------
 fs/udf/super.c     |    1 +
 fs/udf/udf_i.h     |    3 +-
 fs/udf/udf_sb.h    |    2 +
 fs/udf/udfdecl.h   |   45 +--
 10 files changed, 920 insertions(+), 1133 deletions(-)

Thanks
Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#1 lore raw
Quoted 3 lines · Jan Kara

The pull request is somewhat large but given these are all fixes (except for ext2 conversion) and we are only at rc3, I hope it is fine.

That

Quoted 2 lines

Jan Kara (30):
udf: New directory iteration code

really is entirely new code, I want to get these kinds of things during the merge window.

This is not some kind of urgent new regression that needs fixing so urgently that we take new development outside the merge window.

This needs to go in for 6.3, and _if_ the syzbot reports are considered super-urgent and important enough to be back-ported, then it would need to be marked for stable and backported, simply because then old kernels would need it too.

But clearly none of this was considered quite that important. So 6.3 it is.

If parts of this is more urgent, send just that part. Not this whole "rewrite directory handling from scratch" stuff.

Linus

author reviewer
#2 lore raw
Quoted 21 lines · Linus Torvalds
Quoted 3 lines · Jan Kara

The pull request is somewhat large but given these are all fixes (except for ext2 conversion) and we are only at rc3, I hope it is fine.

That

Quoted 2 lines

Jan Kara (30):
udf: New directory iteration code

really is entirely new code, I want to get these kinds of things during the merge window.

This is not some kind of urgent new regression that needs fixing so urgently that we take new development outside the merge window.

This needs to go in for 6.3, and _if_ the syzbot reports are considered super-urgent and important enough to be back-ported, then it would need to be marked for stable and backported, simply because then old kernels would need it too.

Quoted 4 lines

But clearly none of this was considered quite that important. So 6.3 it is.

If parts of this is more urgent, send just that part. Not this whole "rewrite directory handling from scratch" stuff.

Sure, fair enough. I also felt it was kind of borderline whether I should wait for the merge window or push. I'll go through the pile and see if there are bits which are important enough and can be easily carved out.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR