Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDE_DATA() replaced by pde_data() in 5.17 #118

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

zack-vii
Copy link
Contributor

@zack-vii zack-vii commented Aug 20, 2024

c.f. openzfs/zfs#13004

currently does not work on ubuntu-20 kernel 5.15.0

@petermilne
Copy link
Contributor

zack-vii : sorry, I don't understand. You've raised the threshold for faking PDE_DATA from >= 5.14 to >= 5.17.
Does this change make it work at 5.15.0 ?.
ie: 5.15.0 still features PDE_DATA ?

@zack-vii
Copy link
Contributor Author

zack-vii commented Aug 20, 2024

since the function PDA_DATA was only renamed in 5.17. the original patch causes a problem on kernel 5.15.0 ; yes 5.15 still uses PDE_DATA()

In file included from /var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:33:
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c: In function ‘hb_seq_show’:
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/acq-fiber-hba.h:53:22: error: implicit declaration of function ‘pde_data’ [-Werror=implicit-function-declaration]
   53 | #define PDE_DATA(in) pde_data(in)
      |                      ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:103:27: note: in expansion of macro ‘PDE_DATA’
  103 |  struct AFHBA_DEV *adev = PDE_DATA(file_inode(file));
      |                           ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/acq-fiber-hba.h:53:22: warning: initialization of ‘struct AFHBA_DEV *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   53 | #define PDE_DATA(in) pde_data(in)
      |                      ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:103:27: note: in expansion of macro ‘PDE_DATA’
  103 |  struct AFHBA_DEV *adev = PDE_DATA(file_inode(file));
      |                           ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c: In function ‘hbd_seq_show’:
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/acq-fiber-hba.h:53:22: warning: initialization of ‘struct AFHBA_DEV *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   53 | #define PDE_DATA(in) pde_data(in)
      |                      ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:121:27: note: in expansion of macro ‘PDE_DATA’
  121 |  struct AFHBA_DEV *adev = PDE_DATA(file_inode(file));
      |                           ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c: In function ‘ab_seq_show’:
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/acq-fiber-hba.h:53:22: warning: initialization of ‘struct AFHBA_DEV *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   53 | #define PDE_DATA(in) pde_data(in)
      |                      ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:137:27: note: in expansion of macro ‘PDE_DATA’
  137 |  struct AFHBA_DEV *adev = PDE_DATA(file_inode(file));
      |                           ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c: In function ‘job_proc_show’:
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/acq-fiber-hba.h:53:22: warning: initialization of ‘struct AFHBA_DEV *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   53 | #define PDE_DATA(in) pde_data(in)
      |                      ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:241:27: note: in expansion of macro ‘PDE_DATA’
  241 |  struct AFHBA_DEV *adev = PDE_DATA(file_inode(file));
      |                           ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c: In function ‘iommu_proc_show’:
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/acq-fiber-hba.h:53:22: warning: initialization of ‘struct AFHBA_DEV *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   53 | #define PDE_DATA(in) pde_data(in)
      |                      ^~~~~~~~
/var/lib/dkms/dtacq-afhba404/1.1.1-1/build/afs_procfs.c:303:34: note: in expansion of macro ‘PDE_DATA’
  303 |         struct AFHBA_DEV *adev = PDE_DATA(file_inode(file));
      |                                  ^~~~~~~~
cc1: some warnings being treated as errors

@petermilne petermilne merged commit b4ef7c7 into D-TACQ:master Aug 20, 2024
@mastrain
Copy link

I am pretty sure it was Rocky/Redhat to blame. This change was back-ported for some reason to kernels 5.14 for the Rocky/Redhat distros and started failing on us. Was discussed on issue #103

@zack-vii zack-vii deleted the pde_data branch August 22, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants