-
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
Virtuozzo kernel compat: handle kernel DIRECT_IO via ITERs while VFS_RW_ITERATE are unsupported #11410
Comments
…+ no HAVE_VFS_RW_ITERATE case Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes openzfs#11410
…+ no HAVE_VFS_RW_ITERATE case Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes openzfs#11410 Issue openzfs#11410
Nice to see we're not the "strangest kernel" consumer (grsec, heavily patched) using ZFS. Are you guys "really" on 3.10 or is it like RHEL's 2.6 with bits and pieces backported all the way from the 5.x series? |
We base on RHEL7 kernel (so already inherit a LOT of backports from mainstream, you know) + heavily patch the kernel ourselves + do perform more backports ourselves as well. :) |
Hat's off to you guys for that herculean effort, either you're racking up points to get into digital heaven or doing penance for several prior lifetimes of writing public code in VB/C#/malbolge. |
Ha-ha, we are just making donations to have a chance of getting more life counts in the future. :)
Well, we previously had it working via iovecs, so no any performance drop is expected. i think it's more efficient to spend more resources for new VZ version development (which will have kernel with ITERs out of the box). |
Should i fix it? i thought the rule about string length does not apply to the subject line. |
Agreed - fast and unstable isn't good for anyone. Re commit style - yeah, should be changed, all lines need to fit into the limit IIRC. Actually forced me to make all my commits in all projects correctly, good habit to get into. |
Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes openzfs#11410 Issue openzfs#11410
Thank you for the hint, but i doubt we ever chose to base on a plain mainstream kernel - sitting upon some distro kernel has huge benefits, most important of them:
|
Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes #11410 Closes #11411
Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes #11410 Closes #11411
Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes openzfs#11410 Closes openzfs#11411
Virtuozzo 7 kernels starting 3.10.0-1127.18.2.vz7.163.46 have the following configuration: * no HAVE_VFS_RW_ITERATE * HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET => let's add implementation of zpl_direct_IO() via zpl_aio_{read,write}() in this case. https://bugs.openvz.org/browse/OVZ-7243 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Closes openzfs#11410 Closes openzfs#11411
System information
Describe the problem you're observing
We, Virtuozzo, got a report that zfs module fails to compile for Virtuozzo kernel 3.10.0-1127.18.2.vz7.163.46
http://repo.virtuozzo.com/vz/releases/7.5.0-586/x86_64/os/Packages/v/vzkernel-3.10.0-1127.18.2.vz7.163.46.x86_64.rpm
while it compiled fine for previous Virtuozzo kernel 3.10.0-1127.8.2.vz7.151.14
http://repo.virtuozzo.com/vz/releases/7.5.0-586/x86_64/os/Packages/v/vzkernel-3.10.0-1127.8.2.vz7.151.14.x86_64.rpm
https://bugs.openvz.org/browse/OVZ-7243
Describe how to reproduce the problem
Get an installation of Virtuozzo 7.5 (optionally just install vzkernel and vzkernel-devel packages for version 3.10.0-1127.18.2.vz7.163.46 from http://repo.virtuozzo.com/vz/releases/7.5.0-586/x86_64/os/Packages/v/ in a, say, CentOS 7 environment) and try to compile zfs module.
You will get the following compilation error:
Whats is the reason?
Virtuozzo kernel does not have vfs rw iterators (struct file_operations :: .read_iter()/.write_iter()) compatible with mainstream version, so zfs correctly does not detect HAVE_VFS_RW_ITERATE define.
Previously (for example in vzkernel vz7.151.14) struct address_space_operations :: .direct_IO() worked via IOVECs and zfs correctly detected HAVE_VFS_DIRECT_IO_IOVEC and compilation worked fine, .direct_IO() definition via iovec was used.
zpl_file.c:
But recently we have changed struct address_space_operations :: .direct_IO() to use iterators and now we came to a situation that zfs configurator
i suggest to add a .direct_IO() definition for the case HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET + no HAVE_VFS_RW_ITERATE.
Will send the pull request soon.
Note: even with this patch in zfs, it won't compile for kernel 3.10.0-1127.18.2.vz7.163.46, another kernel patch is to be applied first (we will apply it soon): https://lists.openvz.org/pipermail/devel/2020-December/076222.html
If you want to test the compilation right now, until we make an official kernel with this patch, you can take a test kernel at
http://fe.virtuozzo.com/ceacebe1809ed2631696da3ea06c3853/
The text was updated successfully, but these errors were encountered: