dagargo/emu3fs

Kernel 6.8 compatibility - does not compile due to missing block_write_full_page

Closed this issue · 1 comments

It seems that emu3fs is not yet compatible with kernel 6.8 (I run 6.8.8-200.fc39.x86_64 on Fedora 39). I get the following error:

make -C /lib/modules/`uname -r`/build M=$PWD
make[1]: Entering directory '/usr/src/kernels/6.8.8-200.fc39.x86_64'
  CC [M]  /home/bzeiss/develop/emu3fs/file.o
/home/bzeiss/develop/emu3fs/file.c: In function ‘emu3_writepage’:
/home/bzeiss/develop/emu3fs/file.c:89:16: error: implicit declaration of function ‘block_write_full_page’; did you mean ‘block_write_full_folio’? [-Werror=implicit-function-declaration]
   89 |         return block_write_full_page(page, emu3_get_block, wbc);
      |                ^~~~~~~~~~~~~~~~~~~~~
      |                block_write_full_folio
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /home/bzeiss/develop/emu3fs/file.o] Error 1
make[2]: *** [/usr/src/kernels/6.8.8-200.fc39.x86_64/Makefile:1939: /home/bzeiss/develop/emu3fs] Error 2
make[1]: *** [Makefile:252: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.8.8-200.fc39.x86_64'
make: *** [Makefile:8: all] Error 2

From a quick research, it seems that block_write_full_page was removed from kernel 6.8 from include/linux/buffer_head.h while it still existed in 6.7. Other filesystems that used to use this function, like adfs,bfs or hfs, have switched to #include <linux/mpage.h> and mpage_writepages if I'm not mistaken. But I really don't know what I'm talking about ;-)

This seems to be the breaking change:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/linux/buffer_head.h?id=17bf23a981be9c6629198a76940c777eb5c8c521

Fixed.

Tag 6.8 added.