This is still a problem with WSL2, at least on my WSL2 with Windows file system mappings.
I tried to use instructions that use fossil from the hctree page: https://sqlite.org/hctree/doc/hctree/doc/hctree/index.html
Fossil employs sqlite to store SCM information and it fails with "SQLITE_IOERR(1290): os_unix.c:39533: (22) fsync(...)" error, which is the same with VirtualBox: https://www.fossil-scm.org/forum/forumpost/7fb6c96d80?t=c
So WSL2, having to put up with Windows quirks, is not much a Linux anymore. It is slow and some programs can't even run.
But if WSL2 is given its own drive to mount and do what it wants with it, the issue should disappear.
And when WSL2 supports passing partitions, the issue will vanish.
But if WSL2 is given its own drive to mount and do what it wants with it, the issue should disappear.
And when WSL2 supports passing partitions, the issue will vanish.