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)
Fri, Oct 10, 3:57 AM
Unknown Object (File)
Fri, Oct 10, 3:57 AM
Unknown Object (File)
Fri, Oct 10, 3:57 AM
Unknown Object (File)
Fri, Oct 10, 3:57 AM
Unknown Object (File)
Thu, Oct 9, 10:45 PM
Unknown Object (File)
Wed, Sep 24, 1:47 AM
Unknown Object (File)
Tue, Sep 23, 6:08 PM
Unknown Object (File)
Sep 20 2025, 10:13 PM
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 Not Applicable
Unit
Tests Not Applicable

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