Page MenuHomeFreeBSD

makefs: zfs uberblock location is calculated wrong
ClosedPublic

Authored by tsoome on Aug 11 2025, 1:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 10, 12:06 PM
Unknown Object (File)
Fri, Dec 5, 8:54 AM
Unknown Object (File)
Nov 10 2025, 12:03 AM
Unknown Object (File)
Oct 29 2025, 2:27 AM
Unknown Object (File)
Oct 29 2025, 2:27 AM
Unknown Object (File)
Oct 29 2025, 2:23 AM
Unknown Object (File)
Oct 28 2025, 1:41 AM
Unknown Object (File)
Oct 26 2025, 5:16 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 66163
Build 63046: 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