zfs icon indicating copy to clipboard operation
zfs copied to clipboard

Linux 6.10 compatibility

Open robn opened this issue 1 year ago • 7 comments

Motivation and Context

My dad gave me one dollar bill 'Cause I'm his smartest son, And I swapped it for two shiny quarters 'Cause two is more than one!

-- Smart, Shel Silverstein, 1974.

Changes to support Linux 6.10.

Closes #16231.

Description

See commit messages.

How Has This Been Tested?

Compiled, basic sanity check and zvol test tag succeeded for the following kernel versions:

  • 6.10.0-rc1
  • 6.9.1
  • 6.8.10
  • 6.7.12
  • 6.6.31
  • 6.5.13
  • 6.4.16
  • 6.2.16
  • 6.1.91
  • 5.10.217
  • 4.14.336 (test zvol_misc_snapdev trips a kernel BUG in zvol_mq_queue_rq, but this is present in master too)
  • 4.9.337
  • 4.4.302

Note that the hang described in #16089 persists in 6.10.

I've not yet done a full ZTS run.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Performance enhancement (non-breaking change which improves efficiency)
  • [x] Code cleanup (non-breaking change which makes code smaller or more readable)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • [ ] Documentation (a change to man pages or other documentation)

Checklist:

  • [x] My code follows the OpenZFS code style requirements.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the contributing document.
  • [ ] I have added tests to cover my changes.
  • [x] I have run the ZFS Test Suite with this change applied.
  • [x] All commit messages are properly formatted and contain Signed-off-by.

robn avatar Jun 06 '24 07:06 robn

This PR appears to work with kernel 6.10.0-rc[2,3] when applied (with appropriate fuzzing) to the 2.2.5-staging branch.

satmandu avatar Jun 06 '24 23:06 satmandu

Hi @robn - are you ready for us to look this over? I see it's still marked as draft.

tonyhutter avatar Jun 07 '24 00:06 tonyhutter

@tonyhutter sure! I made it draft mostly to indicate that it might not be ready. Partly because 6.10 isn't out yet, but also because of #16089.

robn avatar Jun 07 '24 08:06 robn

Seems to be running well, for casual usage. Haven't seen any errors, been <= a day, so MMV. Basically running fine with pools I already had (tried 6.10rc4 and 6.10-pf, both OK).

ascendbeing avatar Jun 18 '24 12:06 ascendbeing

Removed draft now that the zvol hang is understood and fixed in #16282.

robn avatar Jun 21 '24 00:06 robn

@ascendbeing thanks for testing, very much appreciated!

robn avatar Jun 21 '24 00:06 robn

I'm happy to pull this in if we can get one more reviewer to take a quick look and approve.

tonyhutter avatar Jun 21 '24 16:06 tonyhutter

This worked on 6.9.x-gentoo (tested 1 version ~.4-.6), so, probably, earlier compat is largely the same. Still running fine with 6.10-pf, which, last I checked, isn't caught up with rc6. I'll edit this when I've tested 6.10rc6.

ascendbeing avatar Jul 01 '24 00:07 ascendbeing

This patch is working for me applied against the 2.2.5-staging tree with kernel 6.10.0-rc6 on two x86_64 devices.

satmandu avatar Jul 01 '24 03:07 satmandu

zfs-2.2.5-staging branch with the above applied, still FTBFS on s390x/6.10-rc6:

  CC [M]  /home/ubuntu/zfs/module/os/linux/zfs/zvol_os.o
  LD [M]  /home/ubuntu/zfs/module/zfs.o
  MODPOST /home/ubuntu/zfs/module/Module.symvers
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'vm_layout'
make[5]: *** [scripts/Makefile.modpost:145: /home/ubuntu/zfs/module/Module.symvers] Error 1
make[4]: *** [/usr/src/linux-headers-6.10.0-13-generic/Makefile:1891: modpost] Error 2

same happened using the zfs-2.2.4 tag.

piso77 avatar Jul 02 '24 08:07 piso77

latest 6.10-pf and -rc6 working for me too. I just made a pool (14tb x1 w/ copies=2) on -pf. Seems to be in working order.

ascendbeing avatar Jul 05 '24 01:07 ascendbeing

zfs-2.2.5-staging branch with the above applied, still FTBFS on s390x/6.10-rc6:

  CC [M]  /home/ubuntu/zfs/module/os/linux/zfs/zvol_os.o
  LD [M]  /home/ubuntu/zfs/module/zfs.o
  MODPOST /home/ubuntu/zfs/module/Module.symvers
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'vm_layout'
make[5]: *** [scripts/Makefile.modpost:145: /home/ubuntu/zfs/module/Module.symvers] Error 1
make[4]: *** [/usr/src/linux-headers-6.10.0-13-generic/Makefile:1891: modpost] Error 2

same happened using the zfs-2.2.4 tag.

The GPL only symbol vm_layout symbol is added in Linux 6.10-rc 1 2 (and some following commits).

I did not track the reference chain in zfs down to this symbol. Yet it seems not so trivial to workaround, since the whole mm subsystem in s390x arch is refactored and tightly coupled around vm_layout in 6.10.

Harry-Chen avatar Jul 06 '24 01:07 Harry-Chen

@robn did you manage to run the full test suite on a 6.10 kernel?

darkbasic avatar Jul 15 '24 07:07 darkbasic

Now that @behlendorf approved it and @tonyhutter was waiting for one more reviewer, are there any blockers for 2.2.5 to release? Waiting sincerely for the new release and the bump of the newly supported kernel version.

Alexandero89 avatar Jul 16 '24 00:07 Alexandero89

@robn did you manage to run the full test suite on a 6.10 kernel?

I've not yet had chance unfortunately. From what I've seen I would expect it to succeed with #16282 merged, but I currently do not have a great sense of overall stability on 6.9+. That's my own gut feel though; I don't have anything in particular to point at.

robn avatar Jul 16 '24 00:07 robn

Merged 7ca7bb7fd723a91366ce767aea53c4f5c2d65afb / e951dba48a6330aca9c161c50189f6974e6877f0 / b409892ae5028965a6fe98dde1346594807e6e45

tonyhutter avatar Jul 16 '24 00:07 tonyhutter

Thanks all for the review and testing. Hopefully it's a good one!

robn avatar Jul 16 '24 00:07 robn

@piso77 if this is still an issue on the released 6.10 on s390x, please open a new issue. Thanks!

robn avatar Jul 16 '24 00:07 robn