Linux 5.12 Lands Fix For File-System Corruption Caused By Swapfile Issue
For those wanting to help in testing out the Linux 5.12 kernel, at least it should no longer eat your data now if you rely on a swapfile.
The file-system corruption issue on Linux 5.12 Git noted last week and then followed up on yesterday when the corruption hit Intel's graphics CI systems and narrowed down to a set of swap-related changes, has now been resolved with today's latest Git code.
The fix isn't simply reverting the set of memory management patches talked about yesterday but fortunately a new patch was brewed that properly addresses the problem. Linux block maintainer and storage expert Jens Axboe was able to come up with a fix and got it punctually merged into the mainline tree.
The fix is about properly handling the swapfile read/write offset. Axboe noted in the patch, "We're not factoring in the start of the file for where to write and read the swapfile, which leads to very unfortunate side effects of writing where we should not be..." In other words, clobbering the underlying file-system where the system's swapfile is placed.
With that fix now in, we can get back to looking at Linux 5.12 performance changes and other more interesting testing than worrying about data loss.
The file-system corruption issue on Linux 5.12 Git noted last week and then followed up on yesterday when the corruption hit Intel's graphics CI systems and narrowed down to a set of swap-related changes, has now been resolved with today's latest Git code.
The fix isn't simply reverting the set of memory management patches talked about yesterday but fortunately a new patch was brewed that properly addresses the problem. Linux block maintainer and storage expert Jens Axboe was able to come up with a fix and got it punctually merged into the mainline tree.
The fix is about properly handling the swapfile read/write offset. Axboe noted in the patch, "We're not factoring in the start of the file for where to write and read the swapfile, which leads to very unfortunate side effects of writing where we should not be..." In other words, clobbering the underlying file-system where the system's swapfile is placed.
With that fix now in, we can get back to looking at Linux 5.12 performance changes and other more interesting testing than worrying about data loss.
51 Comments