-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Kernel 3.5-rc2 compile issue #784
Comments
This is because of these changes in the kernel: |
same with 3.5-rc3 kernel |
torvalds/linux@b0b0382 caused that. ZFSOnLinux requires that autotools checks be written for API changes. I do not have time to write those right now, but here is an inline patch that you can apply locally:
|
After the patch applied now have similar problem in another file: /var/lib/dkms/zfs/0.6.0.65/build/module/zfs/../../module/zfs/zpl_inode.c:383:2: error: unknown field ‘truncate_range’ specified in initializer |
BTW, this error was in the start post too ) |
Sorry about that. |
Well, I have removed this line and now have the error in the zpl_super.c: /var/lib/dkms/zfs/0.6.0.65/build/module/zfs/../../module/zfs/zpl_inode.c:333:1: warning: ‘zpl_truncate_range’ defined but not used [-Wunused-function] |
torvalds/linux@90324cc caused that. Here is a revised patch that covers the 3 issues mentioned so far:
Writing patches to make ZFS build against a single kernel version is relatively easy for me while writing the autotools tests needed for these changes to be merged is a bit more involved. I have other things that I need to do, so I am patching these build failures by eye rather than actually building it myself. The patches are correct, but the result is that we are iterating on this on github. You might want to chat with me on freenode in the #zfsonlinux channel. It is faster than iterating back and forth on github. |
Thank you so much, it works now |
@colorprint That is great news. As a note for future me, torvalds/linux@17cf28a removed truncate_range(). The file hole punching functionality is provided by fallocate(). cb2d190 added support for that to ZFSOnLinux. |
torvalds/linux@b0b0382 changed export_operations->encode_fn() to use struct inode * instead of struct dentry * torvalds/linux@dbd5768 renamed end_writeback() to clear_inode() torvalds/linux@17cf28a removed inode_operations->truncate_range(). The file hole punching functionality is provided by inode_operations->fallocate() Closes openzfs#784 Signed-off-by: Richard Yao <[email protected]>
The export_operations member ->encode_fh() has been updated to take both the child and parent inodes. This interface used to take the child dentry and a bool describing if the parent is needed. NOTE: While updating this code I noticed that we do not currently cleanly handle the case where we're passed a connectable parent. This code should be audited to make sure we're doing the right thing. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#784
The vmtruncate_range() support has been removed from the kernel in favor of using the fallocate method in the file_operations table. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#784
Can't compile ZFS with 3.5-rc2 kernel:
CC [M] /var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_export.o
/var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_export.c:120:2: warning: initialization from incompatible pointer type [enabled by default]
/var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_export.c:120:2: warning: (near initialization for ‘zpl_export_operations.encode_fh’) [enabled by default]
CC [M] /var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_file.o
CC [M] /var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_inode.o
/var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_inode.c:383:2: error: unknown field ‘truncate_range’ specified in initializer
/var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_inode.c:383:2: warning: initialization from incompatible pointer type [enabled by default]
/var/lib/dkms/zfs/0.6.0.64/build/module/zfs/../../module/zfs/zpl_inode.c:383:2: warning: (near initialization for ‘zpl_inode_operations.removexattr’) [enabled by default]
The text was updated successfully, but these errors were encountered: