perf(burn): disable BD-R defect management for ~2x speed + 256 MiB#24
Merged
Conversation
growisofs unconditionally formats blank BD-R before burning, which enables drive-firmware defect management: read-after-write verify on every block + Outer Spare Area reservation. The verify-after-write halves effective burn speed (a 4x BD-R writes at ~2x), and the OSA reserves ~256 MiB on a 25 GB single-layer disc. We already have application-layer integrity coverage: par2 FEC, sha512 sidecars, and a post-burn verify pass. Drive-firmware DM is redundant for this workflow. Pass `-use-the-force-luke=spare=none` to skip the format step. On unformatted blanks the drive then accepts writes up to the full `Free Blocks` figure (12219392 blocks × 2048 ≈ 25.03 GB on SL BD-R), so `detect_disc_capacity` is simplified to return `Free Blocks` directly — the MMC-6 32h format-type descriptor walk is no longer needed and would now under-report by ~256 MiB. The two changes are coupled and documented as such in both files. README gains a note that BD-R discs must be blank and unformatted for the fit check to be accurate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
growisofs -use-the-force-luke=spare=noneso blank BD-R stays unformatted: no drive-firmware defect management, no Outer Spare Area reservation. A 4x disc burns at ~4x instead of ~2x, and ~256 MiB per disc is reclaimed.detect_disc_capacityto returnFree Blocksdirectly (Track Size for rewritables). The MMC-6 32h format-type descriptor walk is no longer needed — without the implicit format step, the drive accepts writes up to the full nominal capacity. The two changes are coupled and documented as such; revertingspare=nonerequires restoring the descriptor walk (see commit 43fce62 referenced in both file docstrings).Background
The current capacity logic (commit 43fce62, May 2026) was added because growisofs's default mode formats blank BD-R, which reserves a default OSA (~256 MiB on 25 GB SL) — writes past the formatted LBA failed with
SK=5h/LOGICAL BLOCK ADDRESS OUT OF RANGE. Withspare=nonethat format step is skipped entirely; an unformatted BD-R reports 12,219,392 blocks × 2048 = 25,025,314,816 B inFree Blocks, which is the full writable extent.Application-layer integrity is already covered by par2 FEC + sha512 sidecars + the post-burn verify pass, so the drive-firmware defect management was redundant defence in depth that cost half the write time.
Test plan
bd-archive createreports a slice budget ~256 MiB larger than before on a 25 GB SL BD-R.growisofsaccepts the full Free Blocks extent (noLBA OUT OF RANGEon the last slice).🤖 Generated with Claude Code