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)
Thu, Aug 13, 1:21 AM
Unknown Object (File)
Wed, Aug 12, 8:23 PM
Unknown Object (File)
Tue, Aug 11, 6:21 PM
Unknown Object (File)
Mon, Aug 10, 2:54 PM
Unknown Object (File)
Mon, Aug 10, 11:47 AM
Unknown Object (File)
Mon, Aug 10, 9:57 AM
Unknown Object (File)
Mon, Aug 10, 9:35 AM
Unknown Object (File)
Sun, Aug 9, 11:18 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 Not Applicable
Unit
Tests Not Applicable