Skip to content

building 2.2.9 on 6.12.0-214.el10 failed: incompatible-pointer-types #18369

@vassilit

Description

@vassilit

System information

Type Version/Name
Distribution Name Centos 10 Stream
Distribution Version
Kernel Version 6.12.0-214.el10
Architecture x86_64
OpenZFS Version 2.2.9

Describe the problem you're observing

ZFS 2.2.9 does not build on the latest Centos 10 kernel:

DKMS (dkms-3.3.0) make.log for zfs/2.2.9 for kernel 6.12.0-214.el10.x86_64 (x86_64)
[...]
/var/lib/dkms/zfs/2.2.9/build/module/os/linux/zfs/zvol_os.c:1121:35: error: initialization of ‘int (*)(struct gendisk *, struct hd_geometry *)’ from incompatible pointer type ‘int (*)(struct block_device *, struct hd_geometry *)’ [-Wincompatible-pointer-types]
 1121 |         .getgeo                 = zvol_getgeo,
      |                                   ^~~~~~~~~~~

Possible cause

kernel-6.12.0-214.el10 changelog has the line:
- block: switch ->getgeo() to struct gendisk (Ming Lei) [RHEL-144763]

Backporting 32169b7 to the 2.2 branch may fix the build and prevent future compilation errors if this patch makes it to RH proper.

However, the patch seems specific to the EL fork of the Linux kernel. Upstream linux-6.12.y seems unaffected.

Describe how to reproduce the problem

Install ZFS and upgrade Centos:

dnf install https://zfsonlinux.org/epel/zfs-release-3-0$(rpm --eval "%{dist}").noarch.rpm
dnf install -y kernel-devel
dnf install -y zfs
dnf upgrade -y

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions