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

linux kernel changed arguments of proc_create_data and deleted timespec64_trunc #9956

Closed
softminus opened this issue Feb 6, 2020 · 2 comments
Labels
Type: Building Indicates an issue related to building binaries

Comments

@softminus
Copy link

System information

Type Version/Name
Distribution Name Arch linux
Distribution Version n/a, rolling release
Linux Kernel 5.5.0-09560-g4c7d00ccf40d/
Architecture x86_64
ZFS Version 81acb1e
SPL Version 81acb1e

Describe the problem you're observing

Latest zfs fails to build on latest kernel, due to kernel commits 97a32539b9568bb653683349e5a76d02ff3c3e2c and d56c0d45f0e27f814e87a1676b6bdccccbc252e9 to include/linux/proc_fs.h that changes "file_operations" to "proc_ops" in the arguments of proc_create and proc_create_data.

Describe how to reproduce the problem

Try to build ZFS with a kernel that includes the commits 97a32539b9568bb653683349e5a76d02ff3c3e2c and d56c0d45f0e27f814e87a1676b6bdccccbc252e9, and it fails.

Include any warning/errors/backtraces from the system logs

/home/thz/zfs/module/spl/../os/linux/spl/spl-kstat.c: In function ‘kstat_proc_entry_install’:
/home/thz/zfs/module/spl/../os/linux/spl/spl-kstat.c:693:24: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
693 | module->ksm_proc, file_ops, data);
| ^~~~~~~~
| |
| const struct file_operations *
In file included from /home/thz/zfs/include/os/linux/spl/sys/proc.h:28,
from /home/thz/zfs/include/os/linux/spl/sys/kstat.h:33,
from /home/thz/zfs/module/spl/../os/linux/spl/spl-kstat.c:28:
./include/linux/proc_fs.h:59:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
59 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
| ^~~~~~~~~~~~~~~~

@softminus
Copy link
Author

i changed the proc_ops stuff in my commit here, it seems to build OK; i'm going to reboot and make sure that the ZFS kernel module actually works.

Oh and there's a similar issue with timespec64_trunc being utterly nixed from the kernel (in commit bddea11b1b9385f713006820f16a9fbe5efe6b47. i'm not sure whether the timestamp truncation should be removed altogether or whether timespec64_trunc should be implemented within ZFS. i copy-pasted its definition in my commit but that's just because i wanted to make it build with the least effort, not because i believe that is the correct option.

@softminus softminus changed the title linux kernel changed arguments of proc_create and proc_create_data; zfs fails to build linux kernel changed arguments of proc_create_data and deleted timespec64_trunc Feb 6, 2020
@dreamcat4
Copy link

@behlendorf has raised a pr for this now #9961

@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Feb 7, 2020
gamanakis pushed a commit to gamanakis/zfs that referenced this issue Apr 15, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
gamanakis pushed a commit to gamanakis/zfs that referenced this issue Apr 15, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 15, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 22, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 22, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Apr 28, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
tonyhutter pushed a commit that referenced this issue May 12, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9956
Closes #9961
snajpa pushed a commit to vpsfreecz/zfs that referenced this issue May 28, 2020
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
jsai20 pushed a commit to jsai20/zfs that referenced this issue Mar 30, 2021
The timestamp_truncate() function was added, it replaces the existing
timespec64_trunc() function.  This change renames our wrapper function
to be consistent with the upstream name and updates the compatibility
code for older kernels accordingly.

Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9956
Closes openzfs#9961
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

No branches or pull requests

3 participants