Page MenuHomeFreeBSD

ext2fs: Add large sectorsize disks support
ClosedPublic

Authored by fsu on May 10 2023, 5:16 PM.
Tags
None
Referenced Files
F106232553: D40047.diff
Fri, Dec 27, 3:13 PM
Unknown Object (File)
Mon, Dec 2, 11:18 AM
Unknown Object (File)
Nov 25 2024, 11:59 PM
Unknown Object (File)
Nov 25 2024, 8:14 AM
Unknown Object (File)
Nov 23 2024, 8:03 PM
Unknown Object (File)
Nov 22 2024, 11:11 PM
Unknown Object (File)
Nov 22 2024, 10:09 AM
Unknown Object (File)
Nov 21 2024, 9:04 AM
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.