3 ms·
The problem is likely not in the Ext4 code, but in the block I/O driver (which is Hyper-V specific, IIRC) or even in Hyper-V itself. Several reports mention Win
by tremon 6y ago
The problem is likely not in the Ext4 code, but in the block I/O driver (which is Hyper-V specific, IIRC) or even in Hyper-V itself. Several reports mention Windows shutdowns, sleep or hibernation, so it may be a simple unclean shutdown of the VM.
A bigger problem would be if Hyper-V is either ignoring memory barriers, or caching writes to the disk and losing them when the Hyper-V service is shutdown. But that would likely affect more than just WSL, so we'd have seen the problem sooner (or so I vehemently hope).
- magicalhippo 6y agoI recall ext4 had[1] some issues[2] with data loss due to unclean shutdowns. I assumed that had all been fixed by now, but yeah, these things can get tricky fast. [1]: https://lwn.net/Articles/322823/ https://lwn.net/Articles/322823/ [2]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/45 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781/...
- bmurphy1976 6y agoHuh, interesting. I run a variety of linux based services at home. For years I ran them on a Hyper-V VM (because my computer was technically my gaming machine). I only recently migrated everything to a cluster of Raspberry Pi devices. I used to have occasional problems with this setup, and it was always some kind of drive corruption or mounting issue. I wonder if this is related?
- the8472 6y agoVirtualbox has (had?) similar issues in certain configurations where it maintains a small write cache and doesn't honor IO barriers which lead to journaled/cow filesystems reporting an inconsistent state that should have been prevented by journaling.
- merb 6y ago> Hyper-V service is shutdown as far as I know when wsl2 is actiavted, hyper-v runs as type-1 and linux, windows are virtual after activating it. thus if it crashes, you get a bsod