linux-apfs / linux-apfs-rw

APFS module for linux, with experimental write support
GNU General Public License v2.0
547 stars 36 forks source link

Incompatible with kernels >= 5.18 #25

Closed melvyn2 closed 2 years ago

melvyn2 commented 2 years ago
DKMS make.log for linux-apfs-rw-0.2 for kernel 5.18.3-arch1-1 (x86_64)
Mon Jun 13 23:06:19 PDT 2022
make: Entering directory '/usr/lib/modules/5.18.3-arch1-1/build'
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/btree.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/compress.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/dir.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/extents.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/file.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/inode.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/message.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/key.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/namei.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/node.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/object.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/spaceman.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/super.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/symlink.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/transaction.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/unicode.o
  CC [M]  /var/lib/dkms/linux-apfs-rw/0.2/build/xattr.o
/var/lib/dkms/linux-apfs-rw/0.2/build/inode.c:524:10: error: ‘const struct address_space_operations’ has no member named ‘invalidatepage’; did you mean ‘invalidate_folio’?
  524 |         .invalidatepage = apfs_noop_invalidatepage,
      |          ^~~~~~~~~~~~~~
      |          invalidate_folio
/var/lib/dkms/linux-apfs-rw/0.2/build/inode.c:524:27: error: initialization of ‘sector_t (*)(struct address_space *, sector_t)’ {aka ‘long long unsigned int (*)(struct address_space *, long long unsigned int)’} from incompatible pointer type ‘void (*)(struct page *, unsigned int,  unsigned int)’ [-Werror=incompatible-pointer-types]
  524 |         .invalidatepage = apfs_noop_invalidatepage,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/linux-apfs-rw/0.2/build/inode.c:524:27: note: (near initialization for ‘apfs_aops.bmap’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/linux-apfs-rw/0.2/build/inode.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1834: /var/lib/dkms/linux-apfs-rw/0.2/build] Error 2
make: Leaving directory '/usr/lib/modules/5.18.3-arch1-1/build'

Same git revision worked for 5.17.x kernels.

eafer commented 2 years ago

Hi, sorry for the delay. Github isn't sending me email notifications for some reason. apfs_noop_invalidatepage() was removed in 5.18 so I'll have to figure out what to replace it with. Somebody already sent a pull request to deal with this, I'll check it out now.

eafer commented 2 years ago

Ok, it should build now with Paolo's patch. Like I was telling him though, this will likely cause some regressions for mmap(), I'll look into that as soon as I can.

deftdawg commented 2 years ago

@melvyn2 Were you able to get it running on 5.18?

I'm getting some errors that there are some symbols that aren't in 5.18 that the module is trying to use...

[steam@holo linux-apfs-rw]$ sudo make clean  
make -C /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/build M=/home/steam/source/linux-apfs-rw clean
make[1]: Entering directory '/usr/lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/build'
  CLEAN   /home/steam/source/linux-apfs-rw/Module.symvers
make[1]: Leaving directory '/usr/lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/build'
[steam@holo linux-apfs-rw]$ sudo make install
make -C /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/build M=/home/steam/source/linux-apfs-rw modules_install
make[1]: Entering directory '/usr/lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/build'
cat: /home/steam/source/linux-apfs-rw/modules.order: No such file or directory
  DEPMOD  /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol __x86_indirect_alt_call_rcx
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol page_mkclean
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol __x86_indirect_alt_call_rax
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol __x86_indirect_alt_call_r11
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol printk
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol __lock_page
depmod: WARNING: /lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/extra/apfs.ko.zst needs unknown symbol put_devmap_managed_page
make[1]: Leaving directory '/usr/lib/modules/5.18.1-arch1_testHoloISO_20220606.1811/build'
melvyn2 commented 2 years ago

At the time, yes, though now I'm on 5.19 and can't say for newer revisions.