Skip to content

Instantly share code, notes, and snippets.

@truatpasteurdotfr
Created May 2, 2018 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save truatpasteurdotfr/f0a1f34b54568475a12e313a663dfefc to your computer and use it in GitHub Desktop.
Save truatpasteurdotfr/f0a1f34b54568475a12e313a663dfefc to your computer and use it in GitHub Desktop.
diff -uNr zfs-0.6.5.11.ori/module/zfs/zpl_file.c zfs-0.6.5.11-7463/module/zfs/zpl_file.c
--- zfs-0.6.5.11.ori/module/zfs/zpl_file.c 2017-07-10 22:27:31.000000000 +0200
+++ zfs-0.6.5.11-7463/module/zfs/zpl_file.c 2018-05-01 20:51:43.000000000 +0200
@@ -93,6 +93,22 @@
return (error);
}
+#if defined(HAVE_VFS_ITERATE) && defined(FMODE_KABI_ITERATE)
+/*
+ * RHEL 7.5 compatibility; the fops.iterate() method was added to
+ * the file_operations structure but in order to maintain KABI
+ * compatibility all callers must set FMODE_KABI_ITERATE which
+ * is checked in iterate_dir().
+ */
+static int
+zpl_dir_open(struct inode *ip, struct file *filp)
+{
+ filp->f_mode |= FMODE_KABI_ITERATE;
+
+ return (0);
+}
+#endif
+
#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
static int
zpl_readdir(struct file *filp, void *dirent, filldir_t filldir)
@@ -886,6 +902,9 @@
const struct file_operations zpl_dir_file_operations = {
.llseek = generic_file_llseek,
.read = generic_read_dir,
+#if defined(HAVE_VFS_ITERATE) && defined(FMODE_KABI_ITERATE)
+ .open = zpl_dir_open,
+#endif
#ifdef HAVE_VFS_ITERATE_SHARED
.iterate_shared = zpl_iterate,
#elif defined(HAVE_VFS_ITERATE)
diff -uNr zfs-0.6.5.11.ori/rpm/generic/zfs-dkms.spec.in zfs-0.6.5.11-7463/rpm/generic/zfs-dkms.spec.in
--- zfs-0.6.5.11.ori/rpm/generic/zfs-dkms.spec.in 2017-07-10 22:22:15.000000000 +0200
+++ zfs-0.6.5.11-7463/rpm/generic/zfs-dkms.spec.in 2018-05-01 17:37:28.000000000 +0200
@@ -6,7 +6,7 @@
Name: %{module}-dkms
Version: @VERSION@
-Release: @RELEASE@%{?dist}
+Release: @RELEASE@%{?dist}.7463
Summary: Kernel module(s) (dkms)
Group: System Environment/Kernel
diff -uNr zfs-0.6.5.11.ori/rpm/generic/zfs-kmod.spec.in zfs-0.6.5.11-7463/rpm/generic/zfs-kmod.spec.in
--- zfs-0.6.5.11.ori/rpm/generic/zfs-kmod.spec.in 2017-07-10 22:22:15.000000000 +0200
+++ zfs-0.6.5.11-7463/rpm/generic/zfs-kmod.spec.in 2018-05-01 17:37:28.000000000 +0200
@@ -43,7 +43,7 @@
Name: %{module}-kmod
Version: @VERSION@
-Release: @RELEASE@%{?dist}
+Release: @RELEASE@%{?dist}.7463
Summary: Kernel module(s)
Group: System Environment/Kernel
diff -uNr zfs-0.6.5.11.ori/rpm/generic/zfs.spec.in zfs-0.6.5.11-7463/rpm/generic/zfs.spec.in
--- zfs-0.6.5.11.ori/rpm/generic/zfs.spec.in 2017-07-10 22:22:15.000000000 +0200
+++ zfs-0.6.5.11-7463/rpm/generic/zfs.spec.in 2018-05-01 17:37:28.000000000 +0200
@@ -62,7 +62,7 @@
Name: @PACKAGE@
Version: @VERSION@
-Release: @RELEASE@%{?dist}
+Release: @RELEASE@%{?dist}.7463
Summary: Commands to control the kernel modules and libraries
Group: System Environment/Kernel
diff -uNr zfs-0.6.5.11.ori/rpm/redhat/zfs-dkms.spec.in zfs-0.6.5.11-7463/rpm/redhat/zfs-dkms.spec.in
--- zfs-0.6.5.11.ori/rpm/redhat/zfs-dkms.spec.in 2017-07-10 22:22:15.000000000 +0200
+++ zfs-0.6.5.11-7463/rpm/redhat/zfs-dkms.spec.in 2018-05-01 17:37:28.000000000 +0200
@@ -6,7 +6,7 @@
Name: %{module}-dkms
Version: @VERSION@
-Release: @RELEASE@%{?dist}
+Release: @RELEASE@%{?dist}.7463
Summary: Kernel module(s) (dkms)
Group: System Environment/Kernel
diff -uNr zfs-0.6.5.11.ori/rpm/redhat/zfs-kmod.spec.in zfs-0.6.5.11-7463/rpm/redhat/zfs-kmod.spec.in
--- zfs-0.6.5.11.ori/rpm/redhat/zfs-kmod.spec.in 2017-07-10 22:22:15.000000000 +0200
+++ zfs-0.6.5.11-7463/rpm/redhat/zfs-kmod.spec.in 2018-05-01 17:37:28.000000000 +0200
@@ -3,7 +3,7 @@
Name: @PACKAGE@-kmod
Version: @VERSION@
-Release: @RELEASE@%{?dist}
+Release: @RELEASE@%{?dist}.7463
Summary: Kernel module(s)
Group: System Environment/Kernel
diff -uNr zfs-0.6.5.11.ori/rpm/redhat/zfs.spec.in zfs-0.6.5.11-7463/rpm/redhat/zfs.spec.in
--- zfs-0.6.5.11.ori/rpm/redhat/zfs.spec.in 2017-07-10 22:22:15.000000000 +0200
+++ zfs-0.6.5.11-7463/rpm/redhat/zfs.spec.in 2018-05-01 17:37:28.000000000 +0200
@@ -62,7 +62,7 @@
Name: @PACKAGE@
Version: @VERSION@
-Release: @RELEASE@%{?dist}
+Release: @RELEASE@%{?dist}.7463
Summary: Commands to control the kernel modules and libraries
Group: System Environment/Kernel
diff -uNr zfs-0.6.5.11.ori/scripts/common.sh zfs-0.6.5.11-7463/scripts/common.sh
--- zfs-0.6.5.11.ori/scripts/common.sh 2017-07-10 22:27:03.000000000 +0200
+++ zfs-0.6.5.11-7463/scripts/common.sh 2018-05-01 20:47:12.000000000 +0200
@@ -35,8 +35,8 @@
pkgdatadir=${prefix}/share/zfs
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
-udevdir=
-udevruledir=
+udevdir=/lib/udev
+udevruledir=/lib/udev/rules.d
sysconfdir=${prefix}/etc
localstatedir=${prefix}/var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment