]> git.proxmox.com Git - mirror_zfs.git/commit
RHEL 7.5 compat: FMODE_KABI_ITERATE
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 May 2018 22:01:24 +0000 (15:01 -0700)
committerTony Hutter <hutter2@llnl.gov>
Tue, 8 May 2018 00:19:57 +0000 (17:19 -0700)
commit0ee129199f0a9cd762b6b5f1a4d1f52c8ef177cc
tree90f05583ea07120123bae2c21f49bfd9c0598139
parent245be005976fffba97424a50e8737ac276348554
RHEL 7.5 compat: FMODE_KABI_ITERATE

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
config/kernel-vfs-iterate.m4
include/sys/zfs_vnops.h
include/sys/zpl.h
module/zfs/zfs_vnops.c
module/zfs/zpl_ctldir.c
module/zfs/zpl_file.c