apfs-dkms fails to build on kinetic with the latest kernel 5.19

Bug #1982115 reported by Andrea Righi
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-apfs-rw (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

apfs dkms fails to build on linux 5.19 with the following errors:

/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/file.c: In function ‘apfs_file_mmap’:
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/file.c:109:28: error: ‘const struct address_space_operations’ has no member named ‘readpage’
  109 | if (!mapping->a_ops->readpage)
      | ^~
make[1]: *** [scripts/Makefile.build:257: /var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/file.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c: In function ‘apfs_readpage’:
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c:21:16: error: implicit declaration of function ‘mpage_readpage’; did you mean ‘apfs_readpage’? [-Werror=implicit-function-declaration]
   21 | return mpage_readpage(page, apfs_get_block);
      | ^~~~~~~~~~~~~~
      | apfs_readpage
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c: In function ‘apfs_write_begin’:
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c:412:52: error: ‘AOP_FLAG_NOFS’ undeclared (first use in this function)
  412 | flags | AOP_FLAG_NOFS);
      | ^~~~~~~~~~~~~
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c:412:52: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c:411:16: error: too many arguments to function ‘grab_cache_page_write_begin’
  411 | page = grab_cache_page_write_begin(mapping, index,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/buffer_head.h:14,
                 from /var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c:7:
./include/linux/pagemap.h:737:14: note: declared here
  737 | struct page *grab_cache_page_write_begin(struct address_space *mapping,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c: At top level:
/var/lib/dkms/linux-apfs-rw/0+git20220214+ds-2/build/inode.c:514:10: error: ‘const struct address_space_operations’ has no member named ‘readpage’
  514 | .readpage = apfs_readpage,

[Test case]

$ sudo apt install apfs-dkms

[Fix]

Support the new filesystem ops interfaces introduced in the 5.19 kernel ABI.

[Regression potential]

We may experience regressions in kernels >= 5.19 that are using apfs.

Revision history for this message
Andrea Righi (arighi) wrote :

Fix (debdiff) that allows to build apfs dkms on 5.19 in attach.

tags: added: patch
Changed in linux-apfs-rw (Ubuntu Kinetic):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-apfs-rw - 0+git20220214+ds-2ubuntu1

---------------
linux-apfs-rw (0+git20220214+ds-2ubuntu1) kinetic; urgency=medium

  * Support Linux 5.19 (LP: #1982115):
    - debian/patches/0001-Linux-5.19-support-new-fs-ops.patch

 -- Andrea Righi <email address hidden> Tue, 19 Jul 2022 14:03:08 +0000

Changed in linux-apfs-rw (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Andrea, or anyone else affected,

Accepted linux-apfs-rw into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-apfs-rw/0+git20220214+ds-2ubuntu2~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in linux-apfs-rw (Ubuntu Jammy):
status: New → Fix Committed
Revision history for this message
Andrea Righi (arighi) wrote :

Tested with positive result (install + autopkgtest) both with stock 5.15 and 5.19.

autopkgtest [08:24:42]: test dkms-autopkgtest: - - - - - - - - - - results - - - - - - - - - -
dkms-autopkgtest PASS
autopkgtest [08:24:42]: @@@@@@@@@@@@@@@@@@@@ summary
dkms-autopkgtest PASS

autopkgtest [08:23:35]: test dkms-autopkgtest: - - - - - - - - - - results - - - - - - - - - -
dkms-autopkgtest PASS
autopkgtest [08:23:35]: @@@@@@@@@@@@@@@@@@@@ summary
dkms-autopkgtest PASS

tags: added: verification-done-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-apfs-rw - 0+git20220214+ds-2ubuntu2~22.04.1

---------------
linux-apfs-rw (0+git20220214+ds-2ubuntu2~22.04.1) jammy; urgency=medium

  * Backport dkms support for HWE kernels. LP: #2002328

linux-apfs-rw (0+git20220214+ds-2ubuntu2) kinetic; urgency=medium

  * Fix u64 math without using -lgcc.

linux-apfs-rw (0+git20220214+ds-2ubuntu1) kinetic; urgency=medium

  * Support Linux 5.19 (LP: #1982115):
    - debian/patches/0001-Linux-5.19-support-new-fs-ops.patch

linux-apfs-rw (0+git20220214+ds-2) unstable; urgency=medium

  * Source only upload.

 -- Dimitri John Ledkov <email address hidden> Mon, 16 Jan 2023 11:43:53 +0000

Changed in linux-apfs-rw (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for linux-apfs-rw has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.