Page MenuHomeFreeBSD

nanobsd: Account for metadata overhead in code slice
ClosedPublic

Authored by jlduran on May 24 2026, 11:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 4, 5:50 AM
Unknown Object (File)
Tue, Jun 30, 3:28 AM
Unknown Object (File)
Mon, Jun 15, 1:46 AM
Unknown Object (File)
Sun, Jun 7, 11:29 AM
Unknown Object (File)
Sun, Jun 7, 11:23 AM
Unknown Object (File)
Sat, Jun 6, 6:29 PM
Unknown Object (File)
Sat, Jun 6, 6:24 PM
Unknown Object (File)
Jun 4 2026, 6:35 PM
Subscribers

Details

Summary

The code slice size (CODE_SIZE) includes 16 sectors reserved for disk
metadata (see bsdlabel(8) offset). Subtract these 16 sectors from the
total size passed to nano_makefs.

This prevents the generated filesystem from consuming the entire slice
allocation, ensuring there is enough space for the metadata without
overflowing the partition boundary.

Diff Detail

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