3 ms·
I'd find it interesting to read an analysis how this bug could have happened from a technical point. Like... is swap file support going shortcuts in the kernel
by mschuster91 6y ago
I'd find it interesting to read an analysis how this bug could have happened from a technical point.
Like... is swap file support going shortcuts in the kernel so that it can corrupt the file system the swap file is residing on? Because (at least in my hope) no matter of write() or whatever calls on a file handle should cause a filesystem corruption...
- cesarb 6y agoThe swap file code does not go through the filesystem. It's the exact same code which is used for a swap partition or a swap file, and it writes directly to the block device (the partition). The main difference is that, if you have a swap file, the "swapon" call asks the filesystem to tell it which ranges in the block device contain the swap, instead of using the whole block device.
- bombcar 6y agoI did not know this - it makes sense, but it certainly a surprise.