bugGNU GRUB - Bugs: bug #61606, Grub should support ext2/ext4 file...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61606: Grub should support ext2/ext4 file systes with the large_dir feature

Submitter:  Theodore Tso <tytso>
Submitted:  Fri 03 Dec 2021 01:11:12 AM UTC
   
 
Category:  Filesystem Severity:  Major
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Fri 03 Dec 2021 01:25:21 AM UTC, comment #1: 

Correction: as in the attached diff, the bit should be added to EXT2_DRIVER_IGNORED_INCOMPAT

Theodore Tso <tytso>
Fri 03 Dec 2021 01:11:12 AM UTC, original submission:  

Grub uses the fs/ext2.c code to support ext2/ext3/ext4 file systems.

Recently, ext4 added the a large_dir feature, which adds support for a 3 level htree directory support.   Grub supports existing file systems with htree directories by ignoring their existence, and since the index nodes for the hash tree look like deleted directory entries (by design), grub can simply do a brute force O(n) linear search of directories.   The same is true for 3 level deep htrees indicated by large_dir feature flag.   Hence, all that is needed for grub to support large_dir file systems is to add the following definition to grub-core/fs/ext2.c:

#define EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000 /* >2GB or 3-lvl htree */

And then add that bit into the macro EXT2_DRIVER_SUPPORT_INCOMPAT.

Theodore Tso <tytso>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #52412:  diff added by tytso (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tytso (Submitted the item)
  • -email is unavailable- added by tytso
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-03 tytso Attached File- Added diff, #52412
        Carbon-Copy- Added tytso

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code