Comment by cellularmitosis
10 years ago
I've recently been playing with nbdkit, which is basically FUSE but for block devices rather than file systems.
I was shocked to discover that mke2fs doesn't check the return value of its final fsync call. This is compounded by the fact that pwrite calls don't fail across NBD (the writes are cached, so the caller's stack is long gone by the time the get flushed across the network and fails...)
As a test, I created an nbdkit plugin which simply throws away every write. Guess what? mke2fs will happily create a file system on such a block device and not report failure. You only discover a problem when you try to mount the file system.
No comments yet
Contribute on Hacker News ↗