abbbi / nullfsvfs

a virtual black hole file system that behaves like /dev/null
GNU General Public License v3.0
291 stars 12 forks source link

Doesn't build on kernel 5.14.2: ‘simple_readpage’ and ‘simple_write_end’ undeclared #11

Closed kseistrup closed 3 years ago

kseistrup commented 3 years ago
==> dkms install --no-depmod -m nullfsvfs -v 0.9 -k 5.14.2-arch1-2
Error! Bad return status for module build on kernel: 5.14.2-arch1-2 (x86_64)
Consult /var/lib/dkms/nullfsvfs/0.9/build/make.log for more information.

make-log:

DKMS make.log for nullfsvfs-0.9 for kernel 5.14.2-arch1-2 (x86_64)
2021-09-10T11:45:41 CEST
make: Entering directory '/usr/lib/modules/5.14.2-arch1-2/build'
  CC [M]  /var/lib/dkms/nullfsvfs/0.9/build/nullfs.o
/var/lib/dkms/nullfsvfs/0.9/build/nullfs.c:204:20: error: ‘simple_readpage’ undeclared here (not in a function); did you mean ‘simple_rename’?
  204 |     .readpage    = simple_readpage,
      |                    ^~~~~~~~~~~~~~~
      |                    simple_rename
/var/lib/dkms/nullfsvfs/0.9/build/nullfs.c:206:20: error: ‘simple_write_end’ undeclared here (not in a function); did you mean ‘simple_write_begin’?
  206 |     .write_end   = simple_write_end,
      |                    ^~~~~~~~~~~~~~~~
      |                    simple_write_begin
make[1]: *** [scripts/Makefile.build:271: /var/lib/dkms/nullfsvfs/0.9/build/nullfs.o] Error 1
make: *** [Makefile:1851: /var/lib/dkms/nullfsvfs/0.9/build] Error 2
make: Leaving directory '/usr/lib/modules/5.14.2-arch1-2/build'

gcc (GCC) 11.1.0

abbbi commented 3 years ago

Heres the cause, probably:

https://github.com/torvalds/linux/commit/c1e3dbe9818e3caa4e467255a348df56912ca549#diff-f84e488ba056d9b58d21e7f4e31aecff231947339b177c27253f7eb5e7764878

kseistrup commented 3 years ago

They're made static, and the symbols are no longer exported, is that why?

What a pity, nullfsvfs worked well with kernel 5.13.

abbbi commented 3 years ago

https://github.com/abbbi/nullfsvfs/commit/7381a0ca8348e649f9ab0d414dd90e1496162cca

can you check build with this branch? i dont have kernel 5.14 available atm, guess it should work ;)

kseistrup commented 3 years ago

I'm not sure I know how to do that as I'm just using https://aur.archlinux.org/packages/nullfsvfs-dkms from AUR to install nullfsvfs. Hm… :thinking:

kseistrup commented 3 years ago

I may be able to tweak the ArchLinux PKGBUILD to use that branch…

kseistrup commented 3 years ago

Commit 7381a0ca8348e649f9ab0d414dd90e1496162cca compiles, installs and works on ArchLinux kernel 5.14.2-arch1-2.

Thanks for your help and swift action!

abbbi commented 3 years ago

Merged and released 0.10

kseistrup commented 3 years ago

Wonderful! :heart_eyes_cat: