-
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
Unable to enumerate directories on RHEL 7.5 #7460
Comments
@seidelma can you verify that falling back to |
@behlendorf Setting both
and so on. Unsetting only one causes the preprocessor to nuke the definition of |
Is this RHEL only or CentOS as well? The rpm build is still a bit broken but as you indicated I can confirm at least CentOS 7.4 doesn't have this. zfs 0.7.8-1 |
@h1z1 This is currently RHEL-only because kernel 3.10.0-862 hasn't been released on CentOS yet (though according to git.centos.org it is in the works, and the offending code in the CentOS version of I've submitted this patch, which fixes the issue, to Red Hat. |
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure. This wouldn't have been a problem however in order to maintain KABI compatibility it was added to the very end of the structure. Callers intending to use this extended interface were additionally required to set the FMODE_KABI_ITERATE flag on the file struct when opening the directory. Update the ZPL to set this RHEL specific flag when required. Using this interface will mean that kmods built for RHEL 7.5 will not work on 7.4 without being rebuilt. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#7460
@behlendorf Looks good with some rudimentary tests I've run. Thanks! |
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure. This wouldn't have been a problem however in order to maintain KABI compatibility it was added to the very end of the structure. Callers intending to use this extended interface were additionally required to set the FMODE_KABI_ITERATE flag on the file struct when opening the directory. Update the ZPL to set this RHEL specific flag when required. Using this interface will mean that kmods built for RHEL 7.5 will not work on 7.4 without being rebuilt. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#7460
3.10.0-862 is released under the CR repository, and I can confirm that both 0.6.5.11 and 0.7.8 have the same issue when rebuilt under that kernel version. |
Hi, |
I've opened https://bugzilla.redhat.com/show_bug.cgi?id=1573633 to raise awareness. |
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#7460
@ElCoyote27 we expect to have an updated point release this week which resolves the issue. |
Thanks Brian. |
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#7460
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7460 Closes openzfs#7463
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7460 Closes openzfs#7463
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7460 Closes openzfs#7463
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#7460 Closes openzfs#7463
As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7460 Closes #7463
System information
Describe the problem you're observing
ZFS is unable to enumerate directories on RHEL 7.5, due to changes Red Hat has made to the kernel with 3.10.0-862. Kernel 3.10.0-693.21.1 from RHEL 7.4 does not experience this issue.
Describe how to reproduce the problem
Install RHEL 7.5
Install ZFS
Include any warning/errors/backtraces from the system logs
This issue is caused by backported changes Red Hat made to their 3.10.0-862.el7 kernel. The
getdents()
system call now callsiterate_dir()
(infs/readdir.c
) which also requires that the file be opened withf_mode & FMODE_KABI_ITERATE
. In relevant part:ZFS, for its part,
#define
s out thereaddir()
file op inmodule/zfs/zpl_file.c
since it detects that the kernel supportsiterate()
:Downgrading to RHEL's kernel-3.10.0-693.21.1.el7 package fixes the issue.
The text was updated successfully, but these errors were encountered: