Skip to content

debos: disable ext4 dir_index on scratch for 32-bit architectures#704

Draft
obbardc wants to merge 2 commits into
mainfrom
wip/obbardc/fix-scratch-on-32bit
Draft

debos: disable ext4 dir_index on scratch for 32-bit architectures#704
obbardc wants to merge 2 commits into
mainfrom
wip/obbardc/fix-scratch-on-32bit

Conversation

@obbardc

@obbardc obbardc commented Apr 21, 2026

Copy link
Copy Markdown
Member

On 32-bit guests readdir() returns EOVERFLOW when d_off holds an htree hash value with bit 31 set. Disable dir_index on the scratch ext4 filesystem for known 32-bit Debian architectures to avoid this.

This depends on fakemachine PR: go-debos/fakemachine#301

Fixes: #620

obbardc added 2 commits June 24, 2026 02:02
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
On 32-bit guests readdir() returns EOVERFLOW when d_off holds an
htree hash value with bit 31 set. Disable dir_index on the scratch
ext4 filesystem for known 32-bit Debian architectures to avoid this.

This depends on fakemachine PR: go-debos/fakemachine#301

Fixes: #620
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@obbardc obbardc force-pushed the wip/obbardc/fix-scratch-on-32bit branch from a5b453b to 109ec8a Compare June 24, 2026 01:02
Comment thread cmd/debos/debos.go
if is32BitArch(r.Architecture) {
// dir_index stores d_off as a hash which can exceed INT32_MAX,
// causing readdir() to return EOVERFLOW on 32-bit guests.
m.SetScratchMkfsArgs([]string{"-O", "^dir_index"})

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to create another method in fakemachine, e.g. m.SetScratchFilesystem32BitCompatible(true|false) (false by default).

so debos becomes e.g.:

if is32BitArch(r.Architecture) {
	m.SetScratchFilesystem32BitCompatible(true)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

"Value too large for defined data type" error when building armhf image with "--scratchsize" option

1 participant