Skip to content

🔧 fix: Apple raw disc resize now works with fsync#32

Open
jpmcb wants to merge 1 commit intomainfrom
use-fsync-disc-resize
Open

🔧 fix: Apple raw disc resize now works with fsync#32
jpmcb wants to merge 1 commit intomainfrom
use-fsync-disc-resize

Conversation

@jpmcb
Copy link
Contributor

@jpmcb jpmcb commented Feb 28, 2026

🔧 fix issue with disc corruption errors during ext4-fs mount/grow since using the non-sync vz API could select DiskImageSynchronizationModeNone leading to dmesg errors like:

EXT4-fs error (device vda2): ext4_lookup:1787: inode #147617: comm ls: iget: checksum invalid
EXT4-fs error (device vda2): htree_dirblock_to_tree:1077: inode #195442: block 116189:
    comm exe: bad entry in directory: rec_len is smaller than minimal

vz.NewDiskImageStorageDeviceAttachment() is the macOS 11 API which doesn't support disk sync mode.

With this fix:

sudo dmesg | grep -i ext4
[    2.008609] EXT4-fs (vda2): mounted filesystem f222513b-ded1-49fa-b591-20ce86a2fe7f r/w with ordered data mode. Quota mode: none.
[    3.558817] EXT4-fs (vda2): re-mounted f222513b-ded1-49fa-b591-20ce86a2fe7f.
[    3.989876] EXT4-fs (vda2): resizing filesystem from 1084672 to 5177083 blocks
[    4.015150] EXT4-fs (vda2): resized filesystem to 5177083

Signed-off-by: John McBride <john@papercompute.com>
Copy link
Contributor Author

jpmcb commented Feb 28, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jpmcb jpmcb marked this pull request as ready for review February 28, 2026 03:03
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