Skip to content

machine: add SetScratchMkfsArgs to allow customising scratch mkfs options#301

Draft
obbardc wants to merge 1 commit into
mainfrom
wip/obbardc/fix-scratch-on-32bit
Draft

machine: add SetScratchMkfsArgs to allow customising scratch mkfs options#301
obbardc wants to merge 1 commit into
mainfrom
wip/obbardc/fix-scratch-on-32bit

Conversation

@obbardc

@obbardc obbardc commented Apr 21, 2026

Copy link
Copy Markdown
Member

When the scratch filesystem is backed by a disk image it is formatted with mkfs.ext4 using only default options. Some callers may need to adjust those options. For example, debos builds for 32-bit target architectures need to disable the dir_index feature.

This is needed by go-debos/debos#704

…ions

When the scratch filesystem is backed by a disk image it is formatted
with mkfs.ext4 using only default options. Some callers may need to
adjust those options. For example, debos builds for 32-bit target
architectures need to disable the dir_index feature.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@sjoerdsimons

Copy link
Copy Markdown
Member

the scratch filesystem is only meant to be mounted by the vm for /scratch ; So i'm a bit confused by the rationale for this one. Tell me more :)

@obbardc

obbardc commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

the scratch filesystem is only meant to be mounted by the vm for /scratch ; So i'm a bit confused by the rationale for this one. Tell me more :)

@sjoerdsimons this was created to fix go-debos/debos#620 along with go-debos/debos#704

The rationale for this change should be in the linked PR and issue. Does it make sense ?

Happy to solve this in some other way if we can :-). Possibly better to continue the discussion on the linked PR.

obbardc added a commit to go-debos/debos that referenced this pull request Jun 24, 2026
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>
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.

2 participants