Skip to content

perf(burn): disable BD-R defect management for ~2x speed + 256 MiB#24

Merged
Xitee1 merged 2 commits into
mainfrom
perf/disable-bd-defect-management
May 18, 2026
Merged

perf(burn): disable BD-R defect management for ~2x speed + 256 MiB#24
Xitee1 merged 2 commits into
mainfrom
perf/disable-bd-defect-management

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented May 13, 2026

Summary

  • Pass growisofs -use-the-force-luke=spare=none so 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.
  • Simplify detect_disc_capacity to return Free Blocks directly (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; reverting spare=none requires restoring the descriptor walk (see commit 43fce62 referenced in both file docstrings).
  • README note added so users know BD-R discs must be blank/unformatted for the fit check to be accurate.

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. With spare=none that format step is skipped entirely; an unformatted BD-R reports 12,219,392 blocks × 2048 = 25,025,314,816 B in Free 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

  • Burn a blank BD-R end-to-end at 4x — confirm sustained ~4x throughput (vs. previous ~2x).
  • Confirm bd-archive create reports a slice budget ~256 MiB larger than before on a 25 GB SL BD-R.
  • Confirm growisofs accepts the full Free Blocks extent (no LBA OUT OF RANGE on the last slice).
  • Post-burn verify still passes (par2 self-check on the burned disc).

🤖 Generated with Claude Code

Xitee1 and others added 2 commits May 13, 2026 10:46
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>
@Xitee1 Xitee1 merged commit 1fe9573 into main May 18, 2026
1 check passed
@Xitee1 Xitee1 deleted the perf/disable-bd-defect-management branch May 19, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant