Page MenuHomeFreeBSD

ext2fs: Add large sectorsize disks support
ClosedPublic

Authored by fsu on May 10 2023, 5:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 10:45 PM
Unknown Object (File)
Oct 18 2024, 2:14 AM
Unknown Object (File)
Oct 17 2024, 1:11 PM
Unknown Object (File)
Oct 16 2024, 8:05 PM
Unknown Object (File)
Oct 15 2024, 11:21 AM
Unknown Object (File)
Oct 15 2024, 11:21 AM
Unknown Object (File)
Oct 13 2024, 12:29 PM
Unknown Object (File)
Oct 11 2024, 4:58 PM
Subscribers

Details

Summary

Fix for issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271105

The ext2fs does not support disks with sectorsize more 512 bytes. The main issue is in reading superblock, which is not aligned with 4k value.
Re-implement the superblock reading logic to make it indifferent to disk logical sector size. The logical sector size more then page size is not supported, like it is doing on Linux side.
Also, make some cleanups.

Test Plan

Tested using https://github.com/thedrgreenthumb/Jenkins/tree/master/Target/ext2fs_test_all testcases with md devices with logical sector sizes:
512, 1024, 2048, 4096

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

fsu requested review of this revision.May 10 2023, 5:16 PM

Minimal changes, otherwise LGTM.

fs/ext2fs/ext2_vfsops.c
1382

You could do the error thing within the if ( )

1384

memset() instead of bcopy()

This revision is now accepted and ready to land.May 18 2023, 6:52 PM
This revision was automatically updated to reflect the committed changes.