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)
Mar 7 2024, 9:13 AM
Unknown Object (File)
Mar 7 2024, 8:33 AM
Unknown Object (File)
Mar 7 2024, 8:28 AM
Unknown Object (File)
Mar 7 2024, 6:32 AM
Unknown Object (File)
Jan 5 2024, 12:01 AM
Unknown Object (File)
Dec 20 2023, 6:17 AM
Unknown Object (File)
Dec 14 2023, 3:16 AM
Unknown Object (File)
Dec 12 2023, 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

Minimal changes, otherwise LGTM.

fs/ext2fs/ext2_vfsops.c
1382 ↗(On Diff #121814)

You could do the error thing within the if ( )

1384 ↗(On Diff #121814)

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.