Repository navigation
Linux 4.14 compat: vfs_read & vfs_write - #667
Conversation
5fc421d to
a6cd7b8
Compare
|
This looks much better than #666. :) |
a6cd7b8 to
6fe4271
Compare
|
@pritambaral unfortunately it was also broken, which is why all the send/recv tests failed. I've refreshed the patch to drop the old versions of |
|
I think this is fine. I supported the old kernel_read/kernel_write APIs only for the sake of any future backports to those APIs; chances of which are pretty low anyway. And if those old APIs do receive any backported fixes, corresponding changes can be made in spl too. |
6fe4271 to
e041117
Compare
The kernel_read & kernel_write functions have always wrapped the vfs_read & vfs_write functions respectively. However, they could not be used by vn_rdwr() since the offset wasn't passed as a pointer. This prevented us from being able to properly update the file offset. Linux 4.14 unexported vfs_read & vfs_write but also changed the signature of kernel_read & kernel_write to provide the needed functionality. Use these updated functions when available. Reviewed-by: Pritam Baral <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
The kernel_read & kernel_write functions have always wrapped the vfs_read & vfs_write functions respectively. However, they could not be used by vn_rdwr() since the offset wasn't passed as a pointer. This prevented us from being able to properly update the file offset. Linux 4.14 unexported vfs_read & vfs_write but also changed the signature of kernel_read & kernel_write to provide the needed functionality. Use these updated functions when available. Reviewed-by: Pritam Baral <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#656 Closes openzfs#667
|
This did not detect properly on my system, fyi (4.14.x), I didn't even look into why to be honest, I just hard coded the options in |
|
@akatrevorjay can you provide the exact kernel version and distribution where this didn't work. |
|
Sure, 4.14.3-041303-generic from Ubuntu's mainline builds
On Fri, Dec 8, 2017, 9:10 AM Brian Behlendorf ***@***.***> wrote:
@akatrevorjay <https://github.com/akatrevorjay> can ou provide the exact
kernel version and distribution where this didn't work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#667 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABQGIjsEk48wPTRl3VHhzVfF8cFcCdH4ks5s-W1xgaJpZM4QeF_y>
.
--
Ty,
Trevor
|
|
@akatrevorjay zfs master builds fine for me on ubuntu 17.10 with the 4.14.5 kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14.5/. Are you using the latest zfs and spl? Can you list your build commands and build errors? |
Slightly modified version of #666 for 4.14 kernels.
Strict prototype checking was moved to configure removing the need for LINUX_VERSION_CODE. This is desirable because ensures the code always uses the correct interface even when patches from the upstream kernel are cherry picked for older kernels.
spl_kernel_write/spl_kernel_read wrapper functions moved to file_compat.h.
Compatibility code for
vfs_readwas left in place even though all supported kernel versions should providekernel_read. Just in case.