lanconnected / EnhanceIO

EnhanceIO Open Source for Linux
Other
101 stars 31 forks source link

EnhanceIO doesn't compile with kernel 4.14.0 #33

Closed HJarausch closed 6 years ago

HJarausch commented 6 years ago

Kernel 4.14.0 has changed things again - this time it looks like a bigger change. struct bio doesn't have a field called bi_bdev Caused by commits

74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index")

827180946edf ("zram: write incompressible pages to backing device") 83ff0ec8b13f ("zram: read page from backing device")

interacting with commit

74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index")

lanconnected commented 6 years ago

again, strong reaction from Linus:

but dammit, Jens, this insane crazy constant "let's randomly change block layer details around" needs to STOP.

This has been going on for too many releases by now. What the fck is wrong* with you and Christoph that you can't just leave this thing alone? :)))) https://www.mail-archive.com/linux-block@vger.kernel.org/msg12779.html I'll patch EIO once 4.14 reaches fedora Thanks for reporting

HJarausch commented 6 years ago

Kernel_4.14.patch.zip

Hi, I had a try at patching EnhanceIO for Linux kernel 4.14 (attached) I'd be very grateful if you could have a look at it since any errors could lead to loss of data. Since I have a Ryzen CPU I'd like to use the 4.14 kernel early since it is said to have improvements for that CPU. Many thanks, Helmut

HJarausch commented 6 years ago

EnhanceIO (my patched version) seems to run just fine with kernel 4.14.0. But one thing is strange. I haven't seen any problems when the underlying disk is ext4 formatted. By chance I tried to cache a partition which contains a BTRFS file system. There I got the following problems (io error) from /var/log/messages: Nov 15 14:07:08 numa-be kernel: BTRFS info (device sdc2): use lzo compression Nov 15 14:07:08 numa-be kernel: BTRFS info (device sdc2): enabling auto defrag Nov 15 14:07:08 numa-be kernel: BTRFS info (device sdc2): disk space caching is enabled Nov 15 14:13:43 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 1220608 csum 0xb3aa15b2 expected csum 0x12b593ed mirror 1 Nov 15 14:13:43 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 1220608 csum 0xb3aa15b2 expected csum 0x12b593ed mirror 1 Nov 15 14:13:43 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 1220608 csum 0xb3aa15b2 expected csum 0x12b593ed mirror 1 Nov 15 14:13:43 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 2260992 csum 0x208582c9 expected csum 0x2dd5efc9 mirror 1 Nov 15 14:13:43 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 3309568 csum 0x303e5884 expected csum 0x433ab79a mirror 1 Nov 15 14:14:25 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 1220608 csum 0xb3aa15b2 expected csum 0x12b593ed mirror 1 Nov 15 14:14:25 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 1220608 csum 0xb3aa15b2 expected csum 0x12b593ed mirror 1 Nov 15 14:14:25 numa-be kernel: BTRFS warning (device sdc2): csum failed root 5 ino 440378 off 1220608 csum 0xb3aa15b2 expected csum 0x12b593ed mirror 1

Removing the EnhanceIO cache and accessing the BTRFS file system without caching didn't show any errors. AFAIK EnhanceIO is agnostic w.r.t. to the file system on the partition. But since it is BTRFS - a very special beast - I'd like to ask if this is a know issues or if my version of EnhanceIO is broken. Many thanks for a hint, Helmut

lanconnected commented 6 years ago

btrfs problem has been mentioned here: https://github.com/lanconnected/EnhanceIO/issues/20 I don't know yet what is happening, will have to go through the btrfs code to understand how their checksums work.

lanconnected commented 6 years ago

https://github.com/lanconnected/EnhanceIO/commit/69565a24e9968612f0878e0645b4ce72bd92ad6e now compiles on kernels >= 4.14 ( tested on fedora 27 - 4.14.5 ) Thanks for reporting and for the patch.

HJarausch commented 6 years ago

Many thanks for your patches. The good news it that I can even build EnhanceIO on the 4.15.0-rc3 kernel. Helmut