HomeFreeBSD

RHEL 7.5 compat: FMODE_KABI_ITERATE

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on May 2 2018, 10:01 PM
GitHub <noreply@github.com>Committed on May 2 2018, 10:01 PM
Parents
rGbc8a6a60e9f0: Fix inst_num overflow in qat_crypt.c
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG9464b9591ea5: RHEL 7.5 compat: FMODE_KABI_ITERATE (authored by Brian Behlendorf <behlendorf1@llnl.gov>).May 2 2018, 10:01 PM