-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sparse image file cause file system corrputed #5869
base: main
Are you sure you want to change the base?
Conversation
This reverts commit ab90be1.
" EXT4-fs error (device vda2): ext4_validate_block_bitmap:421: comm kworker/u20:0 bg 2230: bad block bitmap checksum EXT4-fs (vda2): Delayed block allocation failed for inode 14327754 at logical offset 0 with max blocks 47 with error 74 EXT4-fs (vda2): THis should not happen!! Data will be lost " the reason is virtual machine disk image is created as sparse file truncate command make a sparse file, the space will not alloc before really used this should be better at most time. but maybe not suitable for virtual machines, especially in the case of heavy IO loads this may give extra time delay and operational interruptions when system do really space alloc this behavior may cause later write completed before previous write the incorrect write order may cause file system corrputed
we do test on EXT4 , it works better. test use EXT4 fs ? |
May I ask which hypervisor you are using? If it's Apple Virtualization, simply using a non-sparse file might not be sufficient to prevent filesystem errors. We've had an extensive discussion in #4840. I notice you are using a raw image, so I assume you are using Apple Virtualization because the default image format for QEMU is qcow2. |
we are using Apple Virtualization , we try to build Android AOSP on mac M2 |
…default value),may cause linux file system corrputed, especially in the case of heavy IO loads
we have try to set VZDiskImageCachingMode to uncached , found it works more better , please try this modify
|
We already discussed and tried this approach before: #4840 (comment) We don't get filesystem error initially, but after a reboot we still have a filesystem error showing up. The most reliable way I've found is to switch to |
maybe we should defalut disable cache below macOS 14 and switch to VZNVMExpressControllerDeviceConfiguration on macOS 14+ for now we test aosp build works better than cache enabled |
we found when cache disabled , after a reboot we do'nt found filesystem error showing up again on macOS 14.1.1 host. maybe apple have fixed this problem on macOS 14.1.1 |
For me, the following combinations work reliably:
Details: #4840 |
Anyway spare files are interesting and would be cool to have. |
fix linux virtual machine (ubuntu 23.10.1) report error
"
EXT4-fs error (device vda2): ext4_validate_block_bitmap:421: comm kworker/u20:0 bg 2230: bad block bitmap checksum
EXT4-fs (vda2): Delayed block allocation failed for inode 14327754 at logical offset 0 with max blocks 47 with error 74
EXT4-fs (vda2): THis should not happen!! Data will be lost
"
the reason is virtual machine disk image is created as sparse file
truncate command make a sparse file, the space will not alloc before really used
this should be better at most time.
but maybe not suitable for virtual machines, especially in the case of heavy IO loads
this may give extra time delay and operational interruptions when system do really space alloc
this behavior may cause later write completed before previous write
the incorrect write order may cause file system corrputed