Page MenuHomeFreeBSD

makefs: zfs uberblock location is calculated wrong
ClosedPublic

Authored by tsoome on Aug 11 2025, 1:43 PM.
Tags
None
Referenced Files
F167375563: D51860.id160398.diff
Fri, Aug 21, 11:08 AM
Unknown Object (File)
Thu, Aug 13, 9:24 AM
Unknown Object (File)
Sat, Aug 8, 11:04 PM
Unknown Object (File)
Sat, Aug 8, 4:48 PM
Unknown Object (File)
Sat, Aug 8, 4:43 PM
Unknown Object (File)
Sat, Aug 8, 11:15 AM
Unknown Object (File)
Fri, Aug 7, 2:41 PM
Unknown Object (File)
Sun, Aug 2, 5:59 AM
Subscribers

Details

Summary

The shift used to calculate uberblock location depends both
on minimum size (UBERBLOCK_SHIFT) and MAX_UBERBLOCK_SHIFT.
Since makefs defaults to use ashift 12, it incidentally
does get the correct size, but ashift 9 does not work with
current code.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66258
Build 63141: arc lint + arc unit

Event Timeline

It'd be nice to have a helper macro for this, basically the same as VDEV_UBERBLOCK_SHIFT but just taking an integer ashift as a parameter. There is already one such macro in OpenZFS, ASHIFT_UBERBLOCK_SHIFT in zhack.c.

This revision is now accepted and ready to land.Aug 12 2025, 1:22 PM

use ASHIFT_UBERBLOCK_SIZE().

This revision now requires review to proceed.Aug 15 2025, 7:36 AM
This revision is now accepted and ready to land.Aug 15 2025, 11:12 AM