openzfs / spl

A shim layer which adds the core interfaces required for OpenZFS.
https://zfsonlinux.org/
GNU General Public License v2.0
282 stars 181 forks source link

spl-vnode.c compilation error with kernel 5.1.4 #717

Closed jmrcpn closed 5 years ago

jmrcpn commented 5 years ago

Unable to successfully compile SPL, trouble within spl-vnode.c AND kernel 5.1.4. everything else equal, SPL is successfully compiled with kernel 5.0.9. Here is the spl "make" end result: ;---------------------------------------------------------- make[2]: Leaving directory '/home/jmp/rpmbuild/BUILD/spl-0.7.13/scripts' Making all in module make[2]: Entering directory '/home/jmp/rpmbuild/BUILD/spl-0.7.13/module' make -C /usr/src/kernels/5.1.4-1.41.149.ok_8.5 M=pwd CONFIG_SPL=m modules make[3]: Entering directory '/usr/src/kernels/5.1.4-1.41.149.ok_8.5' CC [M] /home/jmp/rpmbuild/BUILD/spl-0.7.13/module/spl/spl-vnode.o /home/jmp/rpmbuild/BUILD/spl-0.7.13/module/spl/spl-vnode.c: In function ‘vn_set_pwd’: /home/jmp/rpmbuild/BUILD/spl-0.7.13/module/spl/spl-vnode.c:611:9: error: implicit declaration of function ‘get_ds’; did you mean ‘get_fs’? [-Werror=implicit-function-declaration] set_fs(get_ds()); ^~ get_fs /home/jmp/rpmbuild/BUILD/spl-0.7.13/module/spl/spl-vnode.c:611:9: error: incompatible type for argument 1 of ‘set_fs’ set_fs(get_ds()); In file included from ./include/linux/uaccess.h:11, from ./include/linux/poll.h:12, from ./include/linux/ring_buffer.h:7, from ./include/linux/trace_events.h:6, from ./include/trace/syscall.h:7, from ./include/linux/syscalls.h:86, from /home/jmp/rpmbuild/BUILD/spl-0.7.13/include/sys/vnode.h:29, from /home/jmp/rpmbuild/BUILD/spl-0.7.13/module/spl/spl-vnode.c:28: ./arch/x86/include/asm/uaccess.h:29:40: note: expected ‘mm_segment_t’ {aka ‘struct ’} but argument is of type ‘int’ static inline void set_fs(mm_segment_t fs ;---------------------------------------------------------- Could someone confirm finding? Is a bypass possible?

behlendorf commented 5 years ago

See https://github.com/zfsonlinux/zfs/pull/8777 for the pending fix.

jmrcpn commented 5 years ago

Using zfs-0.8.0 with kernel 5.1.4 1) spl 0.7.13 become obsolete (spl is within zfs-0.8.0) 2) release zfs-0.8.0 is compiling fine (NO needed adjustment to spl-vnode.c code)

From my side, everything is fine using 0.8.0 with linux 5.1.4 Many Thanks.