From b3259b6a2ba29595dc5f2df0f6def8c7fc6bcb98 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 16 Dec 2010 14:26:08 -0800 Subject: Autoconf selinux support If libselinux is detected on your system at configure time link against it. This allows us to use a library call to detect if selinux is enabled and if it is to pass the mount option: "context=\"system_u:object_r:file_t:s0" For now this is required because none of the existing selinux policies are aware of the zfs filesystem type. Because of this they do not properly enable xattr based labeling even though zfs supports all of the required hooks. Until distro's add zfs as a known xattr friendly fs type we must use mntpoint labeling. Alternately, end users could modify their existing selinux policy with a little guidance. --- cmd/zfs/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/zfs/Makefile.in') diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index dd44b2684..6bd1f3fbd 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ + $(top_srcdir)/config/user-selinux.m4 \ $(top_srcdir)/config/user-zlib.m4 $(top_srcdir)/config/user.m4 \ $(top_srcdir)/config/zfs-build.m4 \ $(top_srcdir)/config/zfs-meta.m4 $(top_srcdir)/configure.ac @@ -180,6 +181,7 @@ LDFLAGS = @LDFLAGS@ LIBBLKID = @LIBBLKID@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSELINUX = @LIBSELINUX@ LIBTOOL = @LIBTOOL@ LIBUUID = @LIBUUID@ LINUX = @LINUX@ -- cgit v1.2.3 From c5d915f4237bbd1f5623b5044a1924a3cb91852b Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 16 Dec 2010 13:47:30 -0800 Subject: Minimal libshare infrastructure ZFS even under Solaris does not strictly require libshare to be available. The current implementation attempts to dlopen() the library to access the needed symbols. If this fails libshare support is simply disabled. This means that on Linux we only need the most minimal libshare implementation. In fact just enough to prevent the build from failing. Longer term we can decide if we want to implement a libshare library like Solaris. At best this would be an abstraction layer between ZFS and NFS/SMB. Alternately, we can drop libshare entirely and directly integrate ZFS with Linux's NFS/SMB. Finally the bare bones user-libshare.m4 test was dropped. If we do decide to implement libshare at some point it will surely be as part of this package so the check is not needed. --- Makefile.in | 1 - cmd/Makefile.in | 1 - cmd/zdb/Makefile.in | 1 - cmd/zfs/Makefile.in | 1 - cmd/zinject/Makefile.in | 1 - cmd/zpios/Makefile.in | 1 - cmd/zpool/Makefile.in | 1 - cmd/zpool_id/Makefile.in | 1 - cmd/zpool_layout/Makefile.in | 1 - cmd/ztest/Makefile.in | 1 - config/user-libshare.m4 | 8 -- config/user.m4 | 1 - configure | 150 ---------------------------- etc/Makefile.in | 1 - include/Makefile.in | 1 - include/sys/Makefile.in | 1 - include/sys/fm/Makefile.in | 1 - include/sys/fm/fs/Makefile.in | 1 - include/sys/fs/Makefile.in | 1 - lib/Makefile.in | 1 - lib/libavl/Makefile.in | 1 - lib/libefi/Makefile.in | 1 - lib/libnvpair/Makefile.in | 1 - lib/libspl/Makefile.in | 1 - lib/libspl/asm-generic/Makefile.in | 1 - lib/libspl/asm-i386/Makefile.in | 1 - lib/libspl/asm-x86_64/Makefile.in | 1 - lib/libspl/include/Makefile.in | 1 - lib/libspl/include/ia32/Makefile.in | 1 - lib/libspl/include/ia32/sys/Makefile.in | 1 - lib/libspl/include/libshare.h | 18 +++- lib/libspl/include/rpc/Makefile.in | 1 - lib/libspl/include/sys/Makefile.in | 1 - lib/libspl/include/sys/dktp/Makefile.in | 1 - lib/libspl/include/sys/sysevent/Makefile.in | 1 - lib/libspl/include/util/Makefile.in | 1 - lib/libunicode/Makefile.in | 1 - lib/libuutil/Makefile.in | 1 - lib/libzfs/Makefile.in | 1 - lib/libzfs/libzfs_mount.c | 35 ++----- lib/libzpool/Makefile.in | 1 - man/Makefile.in | 1 - man/man8/Makefile.in | 1 - scripts/Makefile.in | 1 - scripts/zpios-profile/Makefile.in | 1 - scripts/zpios-test/Makefile.in | 1 - scripts/zpool-config/Makefile.in | 1 - scripts/zpool-layout/Makefile.in | 1 - zfs_config.h.in | 3 - 49 files changed, 24 insertions(+), 234 deletions(-) delete mode 100644 config/user-libshare.m4 (limited to 'cmd/zfs/Makefile.in') diff --git a/Makefile.in b/Makefile.in index 09708bf4a..0d10478d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -77,7 +77,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index bed295156..016045a6a 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -62,7 +62,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index b84eb2c0f..ce17224a1 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index 6bd1f3fbd..654a3814e 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index c2598673e..daced68ab 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index c30a3e04d..69747f368 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index b628756bd..a6f96f7be 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in index 932bc25f3..5d32e8106 100644 --- a/cmd/zpool_id/Makefile.in +++ b/cmd/zpool_id/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in index 9b1b5ebae..ef53493a5 100644 --- a/cmd/zpool_layout/Makefile.in +++ b/cmd/zpool_layout/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index 3b4e7c45e..ec16a7394 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -65,7 +65,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/config/user-libshare.m4 b/config/user-libshare.m4 deleted file mode 100644 index 3b92bbaa5..000000000 --- a/config/user-libshare.m4 +++ /dev/null @@ -1,8 +0,0 @@ -dnl # -dnl # Check for libshare -dnl # -AC_DEFUN([ZFS_AC_CONFIG_USER_LIBSHARE], [ - AC_CHECK_LIB([share], [sa_init], - [AC_DEFINE([HAVE_LIBSHARE], 1, - [Define to 1 if 'libshare' library available])]) -]) diff --git a/config/user.m4 b/config/user.m4 index 6f0276937..a79deefe8 100644 --- a/config/user.m4 +++ b/config/user.m4 @@ -3,7 +3,6 @@ dnl # Default ZFS user configuration dnl # AC_DEFUN([ZFS_AC_CONFIG_USER], [ ZFS_AC_CONFIG_USER_ARCH - ZFS_AC_CONFIG_USER_LIBSHARE ZFS_AC_CONFIG_USER_IOCTL ZFS_AC_CONFIG_USER_ZLIB ZFS_AC_CONFIG_USER_LIBUUID diff --git a/configure b/configure index 48bf4cba1..d96270472 100755 --- a/configure +++ b/configure @@ -13849,81 +13849,6 @@ $as_echo_n "checking for target asm dir... " >&6; } $as_echo "$TARGET_ASM_DIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for sa_init in -lshare" >&5 -$as_echo_n "checking for sa_init in -lshare... " >&6; } -if test "${ac_cv_lib_share_sa_init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lshare $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sa_init (); -int -main () -{ -return sa_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_share_sa_init=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_share_sa_init=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_share_sa_init" >&5 -$as_echo "$ac_cv_lib_share_sa_init" >&6; } -if test "x$ac_cv_lib_share_sa_init" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBSHARE 1 -_ACEOF - -fi - - - { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5 $as_echo_n "checking for ioctl()... " >&6; } cat >conftest.$ac_ext <<_ACEOF @@ -17446,81 +17371,6 @@ $as_echo_n "checking for target asm dir... " >&6; } $as_echo "$TARGET_ASM_DIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for sa_init in -lshare" >&5 -$as_echo_n "checking for sa_init in -lshare... " >&6; } -if test "${ac_cv_lib_share_sa_init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lshare $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sa_init (); -int -main () -{ -return sa_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_share_sa_init=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_share_sa_init=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_share_sa_init" >&5 -$as_echo "$ac_cv_lib_share_sa_init" >&6; } -if test "x$ac_cv_lib_share_sa_init" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBSHARE 1 -_ACEOF - -fi - - - { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5 $as_echo_n "checking for ioctl()... " >&6; } cat >conftest.$ac_ext <<_ACEOF diff --git a/etc/Makefile.in b/etc/Makefile.in index eb8ad9570..4d3939461 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/include/Makefile.in b/include/Makefile.in index 7a1f40ab5..851bd8a12 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index d3985cc8e..2e8af81de 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index b27565995..4099398b3 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index e8d289abe..ddad52360 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index d1ee3b2d8..903b08d37 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/Makefile.in b/lib/Makefile.in index 18ff05229..d607102b1 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -62,7 +62,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index 500846a77..91590932a 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index 1f4409066..7839c1354 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index e1027d51c..0bafbab1c 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index 385a567c6..8aa947ab4 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 162c386ca..0a8ff7c25 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 9a26bb4d4..6ef74836a 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index a00f235b7..5c1aeafee 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index 360560052..0f2a688ae 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index a9f80cde8..d3a8f6fa2 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -62,7 +62,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index fb0fe3f8c..5f7e05fdd 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/libshare.h b/lib/libspl/include/libshare.h index afbdf5b05..f1fbfad2b 100644 --- a/lib/libspl/include/libshare.h +++ b/lib/libspl/include/libshare.h @@ -23,12 +23,20 @@ * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -/* - * basic API declarations for share management - */ - #ifndef _LIBSPL_LIBSHARE_H #define _LIBSPL_LIBSHARE_H +typedef void *sa_handle_t; /* opaque handle to access core functions */ +typedef void *sa_group_t; +typedef void *sa_share_t; + +/* API Initialization */ +#define SA_INIT_SHARE_API 0x0001 /* init share specific interface */ +#define SA_INIT_CONTROL_API 0x0002 /* init control specific interface */ + +/* Error values */ +#define SA_OK 0 +#define SA_NO_MEMORY 2 /* no memory for data structures */ +#define SA_CONFIG_ERR 6 /* system configuration error */ + #endif /* _LIBSPL_LIBSHARE_H */ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 1fd162a47..850f04542 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index 0746ded39..f8f8294d9 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index 499081af2..19b0f3bcb 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index 0a9c6d186..96af2d3b1 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index 27aa363f3..bfaec7a2e 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index 5daee2b73..fb075e8bf 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 1a28249ae..32d6a7404 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index c8b500466..cad8e6c33 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c index 75ce3676f..42036a44b 100644 --- a/lib/libzfs/libzfs_mount.c +++ b/lib/libzfs/libzfs_mount.c @@ -121,20 +121,21 @@ zfs_share_proto_t share_all_proto[] = { }; /* - * Search the sharetab for the given mountpoint and protocol, returning + * Search for NFS and SMB exports for the given mountpoint and protocol, returning * a zfs_share_type_t value. */ static zfs_share_type_t is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto) { char buf[MAXPATHLEN], *tab; - char *ptr; if (hdl->libzfs_sharetab == NULL) return (SHARED_NOT_SHARED); (void) fseek(hdl->libzfs_sharetab, 0, SEEK_SET); + /* Search /etc/exports for NFS exports */ + /* FIXME: Assumes the file is tab delimited. */ while (fgets(buf, sizeof (buf), hdl->libzfs_sharetab) != NULL) { /* the mountpoint is the first entry on each line */ @@ -143,31 +144,15 @@ is_shared(libzfs_handle_t *hdl, const char *mountpoint, zfs_share_proto_t proto) *tab = '\0'; if (strcmp(buf, mountpoint) == 0) { - /* - * the protocol field is the third field - * skip over second field - */ - ptr = ++tab; - if ((tab = strchr(ptr, '\t')) == NULL) - continue; - ptr = ++tab; - if ((tab = strchr(ptr, '\t')) == NULL) - continue; - *tab = '\0'; - if (strcmp(ptr, - proto_table[proto].p_name) == 0) { - switch (proto) { - case PROTO_NFS: - return (SHARED_NFS); - case PROTO_SMB: - return (SHARED_SMB); - default: - return (0); - } - } + if (proto == PROTO_NFS) + return (SHARED_NFS); + else + return (SHARED_NOT_SHARED); } } + /* XXX: Search /etc/samba/smb.conf for SMB exports, return SHARED_SMB */ + return (SHARED_NOT_SHARED); } @@ -808,10 +793,12 @@ zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto) return (0); if ((ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) { +#ifdef HAVE_SHARE (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED, dgettext(TEXT_DOMAIN, "cannot share '%s': %s"), zfs_get_name(zhp), _sa_errorstr != NULL ? _sa_errorstr(ret) : ""); +#endif /* HAVE_SHARE */ return (-1); } diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index 421e55cc2..209b8594e 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -64,7 +64,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/man/Makefile.in b/man/Makefile.in index 47a16fe64..3dbed3094 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -62,7 +62,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index 0a96d97bd..f3cd85637 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -62,7 +62,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 076fc6c28..6653bf385 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index fe89e1d00..fd95774cb 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index 09f0503c7..fcb6dfedd 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index 71ef3c5f2..da8b65e7c 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/scripts/zpool-layout/Makefile.in b/scripts/zpool-layout/Makefile.in index d270230fe..dde427b3f 100644 --- a/scripts/zpool-layout/Makefile.in +++ b/scripts/zpool-layout/Makefile.in @@ -63,7 +63,6 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/user-frame-larger-than.m4 \ $(top_srcdir)/config/user-ioctl.m4 \ $(top_srcdir)/config/user-libblkid.m4 \ - $(top_srcdir)/config/user-libshare.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-nptl_guard_within_stack.m4 \ $(top_srcdir)/config/user-selinux.m4 \ diff --git a/zfs_config.h.in b/zfs_config.h.in index e1532f635..f8e218259 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -87,9 +87,6 @@ /* Define if you have selinux */ #undef HAVE_LIBSELINUX -/* Define to 1 if 'libshare' library available */ -#undef HAVE_LIBSHARE - /* Define if you have libuuid */ #undef HAVE_LIBUUID -- cgit v1.2.3 From 1ac0ea38a5b19771b0dfbc6b2244c4f674ef1a31 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Feb 2011 10:57:29 -0800 Subject: Add missing -ldl linker option The inclusion on dlsym(), dlopen(), and dlclose() symbols require us to link against the dl library. Be careful to add the flag to both the libzfs library and the commands which depend on the library. --- cmd/zdb/Makefile.am | 2 +- cmd/zdb/Makefile.in | 2 +- cmd/zfs/Makefile.am | 2 +- cmd/zfs/Makefile.in | 2 +- cmd/zinject/Makefile.am | 2 +- cmd/zinject/Makefile.in | 2 +- cmd/zpool/Makefile.am | 2 +- cmd/zpool/Makefile.in | 2 +- lib/libzfs/Makefile.am | 2 +- lib/libzfs/Makefile.in | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'cmd/zfs/Makefile.in') diff --git a/cmd/zdb/Makefile.am b/cmd/zdb/Makefile.am index 16d749991..9304bfc0a 100644 --- a/cmd/zdb/Makefile.am +++ b/cmd/zdb/Makefile.am @@ -20,4 +20,4 @@ zdb_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zdb_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zdb_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index ce17224a1..08f8377e3 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -311,7 +311,7 @@ zdb_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zdb_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zdb_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) all: all-am .SUFFIXES: diff --git a/cmd/zfs/Makefile.am b/cmd/zfs/Makefile.am index ba3e6447e..1b7cd841c 100644 --- a/cmd/zfs/Makefile.am +++ b/cmd/zfs/Makefile.am @@ -22,4 +22,4 @@ zfs_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zfs_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zfs_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index 654a3814e..44fff71f1 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -313,7 +313,7 @@ zfs_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zfs_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zfs_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) all: all-am .SUFFIXES: diff --git a/cmd/zinject/Makefile.am b/cmd/zinject/Makefile.am index df97db372..eb67b1569 100644 --- a/cmd/zinject/Makefile.am +++ b/cmd/zinject/Makefile.am @@ -21,4 +21,4 @@ zinject_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zinject_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zinject_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index daced68ab..114128100 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -312,7 +312,7 @@ zinject_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zinject_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zinject_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) all: all-am .SUFFIXES: diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am index a0d16466e..d3ca0612a 100644 --- a/cmd/zpool/Makefile.am +++ b/cmd/zpool/Makefile.am @@ -23,4 +23,4 @@ zpool_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zpool_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zpool_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index a6f96f7be..f800e6bc0 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -315,7 +315,7 @@ zpool_LDADD = \ $(top_builddir)/lib/libzpool/libzpool.la \ $(top_builddir)/lib/libzfs/libzfs.la -zpool_LDFLAGS = -pthread -lm $(ZLIB) -lrt $(LIBUUID) $(LIBBLKID) +zpool_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID) all: all-am .SUFFIXES: diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am index de5212234..f6b0b0594 100644 --- a/lib/libzfs/Makefile.am +++ b/lib/libzfs/Makefile.am @@ -6,7 +6,7 @@ DEFAULT_INCLUDES += \ lib_LTLIBRARIES = libzfs.la -libzfs_la_LDFLAGS = -lm $(LIBSELINUX) +libzfs_la_LDFLAGS = -lm -ldl $(LIBSELINUX) libzfs_la_LIBADD = \ $(top_builddir)/lib/libefi/libefi.la \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index cad8e6c33..1dbecc335 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -315,7 +315,7 @@ AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 \ -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" lib_LTLIBRARIES = libzfs.la -libzfs_la_LDFLAGS = -lm $(LIBSELINUX) +libzfs_la_LDFLAGS = -lm -ldl $(LIBSELINUX) libzfs_la_LIBADD = \ $(top_builddir)/lib/libefi/libefi.la \ $(top_builddir)/lib/libuutil/libuutil.la -- cgit v1.2.3 From 777d4af89137907adc91377327505f40c296035d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Feb 2011 16:16:52 -0800 Subject: Linux 2.6.35 compat, const struct xattr_handler The const keyword was added to the 'struct xattr_handler' in the generic Linux super_block structure. To handle this we define an appropriate xattr_handler_t typedef which can be used. This was the preferred solution because it keeps the code clean and readable. --- Makefile.in | 1 + cmd/Makefile.in | 1 + cmd/zdb/Makefile.in | 1 + cmd/zfs/Makefile.in | 1 + cmd/zinject/Makefile.in | 1 + cmd/zpios/Makefile.in | 1 + cmd/zpool/Makefile.in | 1 + cmd/zpool_id/Makefile.in | 1 + cmd/zpool_layout/Makefile.in | 1 + cmd/ztest/Makefile.in | 1 + config/kernel-xattr-handler.m4 | 32 ++++++ config/kernel.m4 | 1 + configure | 154 ++++++++++++++++++++++++++++ etc/Makefile.in | 1 + include/Makefile.in | 1 + include/linux/Makefile.am | 1 + include/linux/Makefile.in | 2 + include/linux/xattr_compat.h | 42 ++++++++ include/sys/Makefile.in | 1 + include/sys/fm/Makefile.in | 1 + include/sys/fm/fs/Makefile.in | 1 + include/sys/fs/Makefile.in | 1 + include/sys/zpl.h | 3 +- lib/Makefile.in | 1 + lib/libavl/Makefile.in | 1 + lib/libefi/Makefile.in | 1 + lib/libnvpair/Makefile.in | 1 + lib/libspl/Makefile.in | 1 + lib/libspl/asm-generic/Makefile.in | 1 + lib/libspl/asm-i386/Makefile.in | 1 + lib/libspl/asm-x86_64/Makefile.in | 1 + lib/libspl/include/Makefile.in | 1 + lib/libspl/include/ia32/Makefile.in | 1 + lib/libspl/include/ia32/sys/Makefile.in | 1 + lib/libspl/include/rpc/Makefile.in | 1 + lib/libspl/include/sys/Makefile.in | 1 + lib/libspl/include/sys/dktp/Makefile.in | 1 + lib/libspl/include/sys/sysevent/Makefile.in | 1 + lib/libspl/include/util/Makefile.in | 1 + lib/libunicode/Makefile.in | 1 + lib/libuutil/Makefile.in | 1 + lib/libzfs/Makefile.in | 1 + lib/libzpool/Makefile.in | 1 + man/Makefile.in | 1 + man/man8/Makefile.in | 1 + module/zfs/zpl_xattr.c | 8 +- scripts/Makefile.in | 1 + scripts/zpios-profile/Makefile.in | 1 + scripts/zpios-test/Makefile.in | 1 + scripts/zpool-config/Makefile.in | 1 + scripts/zpool-layout/Makefile.in | 1 + zfs_config.h.in | 3 + 52 files changed, 284 insertions(+), 5 deletions(-) create mode 100644 config/kernel-xattr-handler.m4 create mode 100644 include/linux/xattr_compat.h (limited to 'cmd/zfs/Makefile.in') diff --git a/Makefile.in b/Makefile.in index 0d10478d8..f772c3ba4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,6 +72,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 016045a6a..9c56ab45f 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -57,6 +57,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index 08f8377e3..8d215ea47 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -60,6 +60,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index 44fff71f1..4db263271 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -60,6 +60,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index 114128100..6952f9c2b 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -60,6 +60,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index 69747f368..e28058319 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -60,6 +60,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index f800e6bc0..c19f9bc7c 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -60,6 +60,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in index 5d32e8106..828621d87 100644 --- a/cmd/zpool_id/Makefile.in +++ b/cmd/zpool_id/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in index ef53493a5..bc9f46581 100644 --- a/cmd/zpool_layout/Makefile.in +++ b/cmd/zpool_layout/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index ec16a7394..ead68085f 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -60,6 +60,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/config/kernel-xattr-handler.m4 b/config/kernel-xattr-handler.m4 new file mode 100644 index 000000000..fa7294597 --- /dev/null +++ b/config/kernel-xattr-handler.m4 @@ -0,0 +1,32 @@ +dnl # +dnl # 2.6.35 API change, +dnl # The 'struct xattr_handler' was constified in the generic +dnl # super_block structure. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER], + [AC_MSG_CHECKING([whether super_block uses const struct xattr_hander]) + ZFS_LINUX_TRY_COMPILE([ + #include + #include + + const struct xattr_handler xattr_test_handler = { + .prefix = "test", + .get = NULL, + .set = NULL, + }; + + const struct xattr_handler *xattr_handlers[] = { + &xattr_test_handler, + }; + ],[ + struct super_block sb; + + sb.s_xattr = xattr_handlers; + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_CONST_XATTR_HANDLER, 1, + [super_block uses const struct xattr_hander]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 2c83dc590..d1ed54fba 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -28,6 +28,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_GET_DISK_RO ZFS_AC_KERNEL_RQ_IS_SYNC ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT + ZFS_AC_KERNEL_CONST_XATTR_HANDLER if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" diff --git a/configure b/configure index 716a73fee..19123d9be 100755 --- a/configure +++ b/configure @@ -13816,6 +13816,83 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5 +$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + + const struct xattr_handler xattr_test_handler = { + .prefix = "test", + .get = NULL, + .set = NULL, + }; + + const struct xattr_handler *xattr_handlers[] = { + &xattr_test_handler, + }; + +int +main (void) +{ + + struct super_block sb; + + sb.s_xattr = xattr_handlers; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONST_XATTR_HANDLER 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build @@ -17343,6 +17420,83 @@ $as_echo "no" >&6; } +fi + + rm -Rf build + + + + { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5 +$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + + const struct xattr_handler xattr_test_handler = { + .prefix = "test", + .get = NULL, + .set = NULL, + }; + + const struct xattr_handler *xattr_handlers[] = { + &xattr_test_handler, + }; + +int +main (void) +{ + + struct super_block sb; + + sb.s_xattr = xattr_handlers; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONST_XATTR_HANDLER 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + fi rm -Rf build diff --git a/etc/Makefile.in b/etc/Makefile.in index 4d3939461..b9f7f3685 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/include/Makefile.in b/include/Makefile.in index f87cd7929..8be6edc8a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 4ccd7b124..67b56f83d 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -2,6 +2,7 @@ COMMON_H = KERNEL_H = \ $(top_srcdir)/include/linux/dcache_compat.h + $(top_srcdir)/include/linux/xattr_compat.h USER_H = diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index 51d0a6d5b..bd6db6f53 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ @@ -562,6 +563,7 @@ uninstall-am: uninstall-kernelHEADERS uninstall-libzfsHEADERS ps ps-am tags uninstall uninstall-am uninstall-kernelHEADERS \ uninstall-libzfsHEADERS + $(top_srcdir)/include/linux/xattr_compat.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/linux/xattr_compat.h b/include/linux/xattr_compat.h new file mode 100644 index 000000000..dfa92acab --- /dev/null +++ b/include/linux/xattr_compat.h @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (C) 2011 Lawrence Livermore National Security, LLC. + */ + +#ifndef _ZFS_XATTR_H +#define _ZFS_XATTR_H + +/* + * 2.6.35 API change, + * The const keyword was added to the 'struct xattr_handler' in the + * generic Linux super_block structure. To handle this we define an + * appropriate xattr_handler_t typedef which can be used. This was + * the preferred solution because it keeps the code clean and readable. + */ +#ifdef HAVE_CONST_XATTR_HANDLER +typedef const struct xattr_handler xattr_handler_t; +#else +typedef struct xattr_handler xattr_handler_t; +#endif + +#endif /* _ZFS_XATTR_H */ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index 1525d1d07..e95245f7e 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index 4099398b3..fe92c17a0 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index ddad52360..2e78a7645 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index 903b08d37..968a9f27f 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/include/sys/zpl.h b/include/sys/zpl.h index 33f4f621f..b8c3d0985 100644 --- a/include/sys/zpl.h +++ b/include/sys/zpl.h @@ -26,6 +26,7 @@ #define _SYS_ZPL_H #include +#include /* zpl_inode.c */ extern const struct inode_operations zpl_inode_operations; @@ -58,6 +59,6 @@ extern struct file_system_type zpl_fs_type; extern ssize_t zpl_xattr_list(struct dentry *dentry, char *buf, size_t size); extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip); -extern struct xattr_handler *zpl_xattr_handlers[]; +extern xattr_handler_t *zpl_xattr_handlers[]; #endif /* _SYS_ZPL_H */ diff --git a/lib/Makefile.in b/lib/Makefile.in index d607102b1..de0b8b716 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -57,6 +57,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index 91590932a..3c249ea7e 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index 7839c1354..f162acffe 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index 0bafbab1c..f0da5c4a9 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index 8aa947ab4..b21c56dbb 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 0a8ff7c25..7d3048995 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -58,6 +58,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 6ef74836a..905024274 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 5c1aeafee..028d19298 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index 0f2a688ae..d72b0aadd 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index d3a8f6fa2..295310bc6 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -57,6 +57,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index 5f7e05fdd..a6f607237 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 850f04542..96fdca680 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index f8f8294d9..8bde0cbd6 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index 19b0f3bcb..ec4a3a9dc 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index 96af2d3b1..8d7123566 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index bfaec7a2e..daa1c57c8 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index fb075e8bf..9cb812969 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 32d6a7404..1cd7310e8 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index 1dbecc335..000f3aa26 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index 344612d31..14a2b17cf 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -59,6 +59,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/man/Makefile.in b/man/Makefile.in index 3dbed3094..f0b9b705e 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -57,6 +57,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index f3cd85637..58e804b26 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -57,6 +57,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/module/zfs/zpl_xattr.c b/module/zfs/zpl_xattr.c index 910500a72..86e52f791 100644 --- a/module/zfs/zpl_xattr.c +++ b/module/zfs/zpl_xattr.c @@ -305,7 +305,7 @@ zpl_xattr_user_set(struct inode *ip, const char *name, return (error); } -struct xattr_handler zpl_xattr_user_handler = { +xattr_handler_t zpl_xattr_user_handler = { .prefix = XATTR_USER_PREFIX, .get = zpl_xattr_user_get, .set = zpl_xattr_user_set, @@ -351,7 +351,7 @@ zpl_xattr_trusted_set(struct inode *ip, const char *name, return (error); } -struct xattr_handler zpl_xattr_trusted_handler = { +xattr_handler_t zpl_xattr_trusted_handler = { .prefix = XATTR_TRUSTED_PREFIX, .get = zpl_xattr_trusted_get, .set = zpl_xattr_trusted_set, @@ -415,13 +415,13 @@ zpl_xattr_security_init(struct inode *ip, struct inode *dip) return (error); } -struct xattr_handler zpl_xattr_security_handler = { +xattr_handler_t zpl_xattr_security_handler = { .prefix = XATTR_SECURITY_PREFIX, .get = zpl_xattr_security_get, .set = zpl_xattr_security_set, }; -struct xattr_handler *zpl_xattr_handlers[] = { +xattr_handler_t *zpl_xattr_handlers[] = { &zpl_xattr_security_handler, &zpl_xattr_trusted_handler, &zpl_xattr_user_handler, diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 6653bf385..2b2e30d60 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -58,6 +58,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index fd95774cb..f369bbc2c 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -58,6 +58,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index fcb6dfedd..9dfbe107f 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -58,6 +58,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index da8b65e7c..cc3e557e9 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -58,6 +58,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/scripts/zpool-layout/Makefile.in b/scripts/zpool-layout/Makefile.in index dde427b3f..881676cdd 100644 --- a/scripts/zpool-layout/Makefile.in +++ b/scripts/zpool-layout/Makefile.in @@ -58,6 +58,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \ $(top_srcdir)/config/kernel-rq-for-each_segment.m4 \ $(top_srcdir)/config/kernel-rq-is_sync.m4 \ + $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel.m4 \ $(top_srcdir)/config/user-arch.m4 \ $(top_srcdir)/config/user-frame-larger-than.m4 \ diff --git a/zfs_config.h.in b/zfs_config.h.in index f8e218259..52061a039 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -54,6 +54,9 @@ /* blk_rq_sectors() is available */ #undef HAVE_BLK_RQ_SECTORS +/* super_block uses const struct xattr_hander */ +#undef HAVE_CONST_XATTR_HANDLER + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -- cgit v1.2.3 From 7268e1bec8478639b7a1047e02ab931f30bc2f92 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Feb 2011 08:58:55 -0800 Subject: Linux 2.6.35 compat, fops->fsync() The fsync() callback in the file_operations structure used to take 3 arguments. The callback now only takes 2 arguments because the dentry argument was determined to be unused by all consumers. To handle this a compatibility prototype was added to ensure the right prototype is used. Our implementation never used the dentry argument either so it's just a matter of using the right prototype. --- Makefile.in | 1 + cmd/Makefile.in | 1 + cmd/zdb/Makefile.in | 1 + cmd/zfs/Makefile.in | 1 + cmd/zinject/Makefile.in | 1 + cmd/zpios/Makefile.in | 1 + cmd/zpool/Makefile.in | 1 + cmd/zpool_id/Makefile.in | 1 + cmd/zpool_layout/Makefile.in | 1 + cmd/ztest/Makefile.in | 1 + config/kernel-fsync.m4 | 20 ++++ config/kernel.m4 | 1 + configure | 136 ++++++++++++++++++++++++++++ etc/Makefile.in | 1 + include/Makefile.in | 1 + include/linux/Makefile.am | 5 +- include/linux/Makefile.in | 10 +- include/linux/vfs_compat.h | 42 +++++++++ include/sys/Makefile.in | 1 + include/sys/fm/Makefile.in | 1 + include/sys/fm/fs/Makefile.in | 1 + include/sys/fs/Makefile.in | 1 + include/sys/zpl.h | 1 + lib/Makefile.in | 1 + lib/libavl/Makefile.in | 1 + lib/libefi/Makefile.in | 1 + lib/libnvpair/Makefile.in | 1 + lib/libspl/Makefile.in | 1 + lib/libspl/asm-generic/Makefile.in | 1 + lib/libspl/asm-i386/Makefile.in | 1 + lib/libspl/asm-x86_64/Makefile.in | 1 + lib/libspl/include/Makefile.in | 1 + lib/libspl/include/ia32/Makefile.in | 1 + lib/libspl/include/ia32/sys/Makefile.in | 1 + lib/libspl/include/rpc/Makefile.in | 1 + lib/libspl/include/sys/Makefile.in | 1 + lib/libspl/include/sys/dktp/Makefile.in | 1 + lib/libspl/include/sys/sysevent/Makefile.in | 1 + lib/libspl/include/util/Makefile.in | 1 + lib/libunicode/Makefile.in | 1 + lib/libuutil/Makefile.in | 1 + lib/libzfs/Makefile.in | 1 + lib/libzpool/Makefile.in | 1 + man/Makefile.in | 1 + man/man8/Makefile.in | 1 + module/zfs/zpl_file.c | 3 +- scripts/Makefile.in | 1 + scripts/zpios-profile/Makefile.in | 1 + scripts/zpios-test/Makefile.in | 1 + scripts/zpool-config/Makefile.in | 1 + scripts/zpool-layout/Makefile.in | 1 + zfs_config.h.in | 3 + 52 files changed, 257 insertions(+), 7 deletions(-) create mode 100644 config/kernel-fsync.m4 create mode 100644 include/linux/vfs_compat.h (limited to 'cmd/zfs/Makefile.in') diff --git a/Makefile.in b/Makefile.in index f772c3ba4..5f3dd16b0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 9c56ab45f..f90b1a8f2 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index 8d215ea47..f6b7271bb 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index 4db263271..be89bf1b8 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index 6952f9c2b..274f499ab 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index e28058319..2cc033bf6 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index c19f9bc7c..1f33d8082 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in index 828621d87..39cb02c20 100644 --- a/cmd/zpool_id/Makefile.in +++ b/cmd/zpool_id/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in index bc9f46581..97844f33f 100644 --- a/cmd/zpool_layout/Makefile.in +++ b/cmd/zpool_layout/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index ead68085f..6d0f6f46b 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/config/kernel-fsync.m4 b/config/kernel-fsync.m4 new file mode 100644 index 000000000..2733dba33 --- /dev/null +++ b/config/kernel-fsync.m4 @@ -0,0 +1,20 @@ +dnl # +dnl # 2.6.35 API change +dnl # The dentry argument was deamed unused and dropped in 2.6.36. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_FSYNC_2ARGS], [ + AC_MSG_CHECKING([whether fops->fsync() wants 2 args]) + ZFS_LINUX_TRY_COMPILE([ + #include + ],[ + int (*fsync) (struct file *, int datasync) = NULL; + struct file_operations fops; + + fops.fsync = fsync; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_2ARGS_FSYNC, 1, [fops->fsync() want 2 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index d1ed54fba..c411c8f49 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -29,6 +29,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_RQ_IS_SYNC ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT ZFS_AC_KERNEL_CONST_XATTR_HANDLER + ZFS_AC_KERNEL_FSYNC_2ARGS if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" diff --git a/configure b/configure index 19123d9be..fa721d43f 100755 --- a/configure +++ b/configure @@ -13900,6 +13900,74 @@ fi + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants 2 args" >&5 +$as_echo_n "checking whether fops->fsync() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + int (*fsync) (struct file *, int datasync) = NULL; + struct file_operations fops; + + fops.fsync = fsync; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_FSYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi @@ -17504,6 +17572,74 @@ fi + { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants 2 args" >&5 +$as_echo_n "checking whether fops->fsync() wants 2 args... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + int (*fsync) (struct file *, int datasync) = NULL; + struct file_operations fops; + + fops.fsync = fsync; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_FSYNC 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi diff --git a/etc/Makefile.in b/etc/Makefile.in index b9f7f3685..b782ffd57 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/include/Makefile.in b/include/Makefile.in index 8be6edc8a..33e35ab59 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 67b56f83d..0ea6cfeda 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -1,8 +1,9 @@ COMMON_H = KERNEL_H = \ - $(top_srcdir)/include/linux/dcache_compat.h - $(top_srcdir)/include/linux/xattr_compat.h + $(top_srcdir)/include/linux/dcache_compat.h \ + $(top_srcdir)/include/linux/xattr_compat.h \ + $(top_srcdir)/include/linux/vfs_compat.h USER_H = diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index bd6db6f53..cdb09c67e 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ @@ -85,7 +86,9 @@ am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = -am__kernel_HEADERS_DIST = $(top_srcdir)/include/linux/dcache_compat.h +am__kernel_HEADERS_DIST = $(top_srcdir)/include/linux/dcache_compat.h \ + $(top_srcdir)/include/linux/xattr_compat.h \ + $(top_srcdir)/include/linux/vfs_compat.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -279,7 +282,9 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ COMMON_H = KERNEL_H = \ - $(top_srcdir)/include/linux/dcache_compat.h + $(top_srcdir)/include/linux/dcache_compat.h \ + $(top_srcdir)/include/linux/xattr_compat.h \ + $(top_srcdir)/include/linux/vfs_compat.h USER_H = EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H) @@ -563,7 +568,6 @@ uninstall-am: uninstall-kernelHEADERS uninstall-libzfsHEADERS ps ps-am tags uninstall uninstall-am uninstall-kernelHEADERS \ uninstall-libzfsHEADERS - $(top_srcdir)/include/linux/xattr_compat.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h new file mode 100644 index 000000000..bbc23a962 --- /dev/null +++ b/include/linux/vfs_compat.h @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (C) 2011 Lawrence Livermore National Security, LLC. + */ + +#ifndef _ZFS_VFS_H +#define _ZFS_VFS_H + +/* + * 2.6.35 API change, + * The dentry argument to the .fsync() vfs hook was deemed unused by + * all filesystem consumers and dropped. Add a compatibility prototype + * to ensure correct usage when defining this callback. + */ +#ifdef HAVE_2ARGS_FSYNC +#define ZPL_FSYNC_PROTO(fn, x, y, z) static int fn(struct file *x, int z) +#else +#define ZPL_FSYNC_PROTO(fn, x, y, z) static int fn(struct file *x, \ + struct dentry *y, int z) +#endif + +#endif /* _ZFS_VFS_H */ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index e95245f7e..71b4cb3c4 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index fe92c17a0..e94bc0215 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index 2e78a7645..8ae7708ea 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index 968a9f27f..000f6ef42 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/include/sys/zpl.h b/include/sys/zpl.h index b8c3d0985..b6da0d271 100644 --- a/include/sys/zpl.h +++ b/include/sys/zpl.h @@ -26,6 +26,7 @@ #define _SYS_ZPL_H #include +#include #include /* zpl_inode.c */ diff --git a/lib/Makefile.in b/lib/Makefile.in index de0b8b716..123beb673 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index 3c249ea7e..bdd51988f 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index f162acffe..487692f29 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index f0da5c4a9..eed77dc48 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index b21c56dbb..74aa1d261 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 7d3048995..0a422cfb9 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 905024274..8f57a054b 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 028d19298..6a7e2bde0 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index d72b0aadd..a50ff33ce 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index 295310bc6..82b4cb514 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index a6f607237..5669f8519 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 96fdca680..7902f5093 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index 8bde0cbd6..1f96a1ee1 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index ec4a3a9dc..c670d35ab 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index 8d7123566..5724382b0 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index daa1c57c8..e7b4f91dd 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index 9cb812969..c200a8589 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 1cd7310e8..a41d12d5b 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index 000f3aa26..b92f2b28e 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index 14a2b17cf..0f685471a 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/man/Makefile.in b/man/Makefile.in index f0b9b705e..93475646b 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index 58e804b26..a0b8a5638 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c index 585f971e8..ed6704bb2 100644 --- a/module/zfs/zpl_file.c +++ b/module/zfs/zpl_file.c @@ -45,8 +45,7 @@ zpl_readdir(struct file *filp, void *dirent, filldir_t filldir) return (error); } -static int -zpl_fsync(struct file *filp, struct dentry *dentry, int datasync) +ZPL_FSYNC_PROTO(zpl_fsync, filp, unused_dentry, datasync) { cred_t *cr; int error; diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 2b2e30d60..ba9ab4ed7 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index f369bbc2c..6e278eadb 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index 9dfbe107f..5a96a4d8d 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index cc3e557e9..c3882fda6 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/scripts/zpool-layout/Makefile.in b/scripts/zpool-layout/Makefile.in index 881676cdd..44dd41e04 100644 --- a/scripts/zpool-layout/Makefile.in +++ b/scripts/zpool-layout/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ + $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \ $(top_srcdir)/config/kernel-kobj-name-len.m4 \ diff --git a/zfs_config.h.in b/zfs_config.h.in index 52061a039..fd7bd668c 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -6,6 +6,9 @@ /* bio_end_io_t wants 2 args */ #undef HAVE_2ARGS_BIO_END_IO_T +/* fops->fsync() want 2 args */ +#undef HAVE_2ARGS_FSYNC + /* struct block_device_operations use bdevs */ #undef HAVE_BDEV_BLOCK_DEVICE_OPERATIONS -- cgit v1.2.3 From 2c395def2763ccc7a549d297f7f11bd304caaeae Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Feb 2011 13:46:10 -0800 Subject: Linux 2.6.36 compat, sops->evict_inode() The new prefered inteface for evicting an inode from the inode cache is the ->evict_inode() callback. It replaces both the ->delete_inode() and ->clear_inode() callbacks which were previously used for this. --- Makefile.in | 1 + cmd/Makefile.in | 1 + cmd/zdb/Makefile.in | 1 + cmd/zfs/Makefile.in | 1 + cmd/zinject/Makefile.in | 1 + cmd/zpios/Makefile.in | 1 + cmd/zpool/Makefile.in | 1 + cmd/zpool_id/Makefile.in | 1 + cmd/zpool_layout/Makefile.in | 1 + cmd/ztest/Makefile.in | 1 + config/kernel-evict-inode.m4 | 21 +++++ config/kernel.m4 | 1 + configure | 136 ++++++++++++++++++++++++++++ etc/Makefile.in | 1 + include/Makefile.in | 1 + include/linux/Makefile.in | 1 + include/sys/Makefile.in | 1 + include/sys/fm/Makefile.in | 1 + include/sys/fm/fs/Makefile.in | 1 + include/sys/fs/Makefile.in | 1 + lib/Makefile.in | 1 + lib/libavl/Makefile.in | 1 + lib/libefi/Makefile.in | 1 + lib/libnvpair/Makefile.in | 1 + lib/libspl/Makefile.in | 1 + lib/libspl/asm-generic/Makefile.in | 1 + lib/libspl/asm-i386/Makefile.in | 1 + lib/libspl/asm-x86_64/Makefile.in | 1 + lib/libspl/include/Makefile.in | 1 + lib/libspl/include/ia32/Makefile.in | 1 + lib/libspl/include/ia32/sys/Makefile.in | 1 + lib/libspl/include/rpc/Makefile.in | 1 + lib/libspl/include/sys/Makefile.in | 1 + lib/libspl/include/sys/dktp/Makefile.in | 1 + lib/libspl/include/sys/sysevent/Makefile.in | 1 + lib/libspl/include/util/Makefile.in | 1 + lib/libunicode/Makefile.in | 1 + lib/libuutil/Makefile.in | 1 + lib/libzfs/Makefile.in | 1 + lib/libzpool/Makefile.in | 1 + man/Makefile.in | 1 + man/man8/Makefile.in | 1 + module/zfs/zfs_vnops.c | 2 - module/zfs/zpl_super.c | 54 +++++++++-- scripts/Makefile.in | 1 + scripts/zpios-profile/Makefile.in | 1 + scripts/zpios-test/Makefile.in | 1 + scripts/zpool-config/Makefile.in | 1 + scripts/zpool-layout/Makefile.in | 1 + zfs_config.h.in | 3 + 50 files changed, 250 insertions(+), 11 deletions(-) create mode 100644 config/kernel-evict-inode.m4 (limited to 'cmd/zfs/Makefile.in') diff --git a/Makefile.in b/Makefile.in index 5f3dd16b0..3c266e161 100644 --- a/Makefile.in +++ b/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index f90b1a8f2..05e70be6b 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index f6b7271bb..0ff5b4bc5 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index be89bf1b8..d6ce3ae34 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index 274f499ab..8182ab346 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index 2cc033bf6..b29bfd7d6 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index 1f33d8082..9ceb47448 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in index 39cb02c20..c518542ce 100644 --- a/cmd/zpool_id/Makefile.in +++ b/cmd/zpool_id/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in index 97844f33f..6b21c3e40 100644 --- a/cmd/zpool_layout/Makefile.in +++ b/cmd/zpool_layout/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index 6d0f6f46b..c7291cb36 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/config/kernel-evict-inode.m4 b/config/kernel-evict-inode.m4 new file mode 100644 index 000000000..3cf5a3666 --- /dev/null +++ b/config/kernel-evict-inode.m4 @@ -0,0 +1,21 @@ +dnl # +dnl # 2.6.36 API change +dnl # The sops->delete_inode() and sops->clear_inode() callbacks have +dnl # replaced by a single sops->evict_inode() callback. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_EVICT_INODE], [ + AC_MSG_CHECKING([whether sops->evict_inode() exists]) + ZFS_LINUX_TRY_COMPILE([ + #include + ],[ + void (*evict_inode) (struct inode *) = NULL; + struct super_operations sops; + + sops.evict_inode = evict_inode; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_EVICT_INODE, 1, [sops->evict_inode() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 1f271d178..c3321ed8d 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -32,6 +32,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_XATTR_HANDLER_GET ZFS_AC_KERNEL_XATTR_HANDLER_SET ZFS_AC_KERNEL_FSYNC_2ARGS + ZFS_AC_KERNEL_EVICT_INODE if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" diff --git a/configure b/configure index 55cf1576f..02a071557 100755 --- a/configure +++ b/configure @@ -14107,6 +14107,74 @@ fi + { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + void (*evict_inode) (struct inode *) = NULL; + struct super_operations sops; + + sops.evict_inode = evict_inode; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EVICT_INODE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi @@ -17918,6 +17986,74 @@ fi + { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5 +$as_echo_n "checking whether sops->evict_inode() exists... " >&6; } + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + void (*evict_inode) (struct inode *) = NULL; + struct super_operations sops; + + sops.evict_inode = evict_inode; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EVICT_INODE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + + +fi + + rm -Rf build + + + + if test "$LINUX_OBJ" != "$LINUX"; then KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" fi diff --git a/etc/Makefile.in b/etc/Makefile.in index b782ffd57..88640a716 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/include/Makefile.in b/include/Makefile.in index 33e35ab59..f47e747f1 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index cdb09c67e..e70c16afc 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index 71b4cb3c4..37339e255 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index e94bc0215..d05018dd1 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index 8ae7708ea..e2ad9533f 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index 000f6ef42..ce196fb89 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/Makefile.in b/lib/Makefile.in index 123beb673..139d3e436 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index bdd51988f..421b2851f 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index 487692f29..00f109db1 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index eed77dc48..c47aa7d89 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index 74aa1d261..be5ddf1ec 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 0a422cfb9..67e9a0f44 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 8f57a054b..bbb7265ee 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 6a7e2bde0..625adc54e 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index a50ff33ce..66ba65f70 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index 82b4cb514..c0836280a 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index 5669f8519..243eaeb12 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 7902f5093..35c2b1403 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index 1f96a1ee1..b0b29bf2a 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index c670d35ab..f98455474 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index 5724382b0..d787d8a8b 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index e7b4f91dd..f3950b9b1 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index c200a8589..64bfe3990 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index a41d12d5b..6b0525ea6 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index b92f2b28e..e10cd8078 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index 0f685471a..96bced0bf 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/man/Makefile.in b/man/Makefile.in index 93475646b..c209c2961 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index a0b8a5638..0a8d52923 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 30b30891b..363307932 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -3632,8 +3632,6 @@ zfs_inactive(struct inode *ip) zfs_sb_t *zsb = ITOZSB(ip); int error; - truncate_inode_pages(&ip->i_data, 0); - #ifdef HAVE_SNAPSHOT /* Early return for snapshot inode? */ #endif /* HAVE_SNAPSHOT */ diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c index bbb7beaf3..0417ce2ff 100644 --- a/module/zfs/zpl_super.c +++ b/module/zfs/zpl_super.c @@ -47,22 +47,54 @@ zpl_inode_destroy(struct inode *ip) zfs_inode_destroy(ip); } +/* + * When ->drop_inode() is called its return value indicates if the + * inode should be evicted from the inode cache. If the inode is + * unhashed and has no links the default policy is to evict it + * immediately. + * + * Prior to 2.6.36 this eviction was accomplished by the vfs calling + * ->delete_inode(). It was ->delete_inode()'s responsibility to + * truncate the inode pages and call clear_inode(). The call to + * clear_inode() synchronously invalidates all the buffers and + * calls ->clear_inode(). It was ->clear_inode()'s responsibility + * to cleanup and filesystem specific data before freeing the inode. + * + * This elaborate mechanism was replaced by ->evict_inode() which + * does the job of both ->delete_inode() and ->clear_inode(). It + * will be called exactly once, and when it returns the inode must + * be in a state where it can simply be freed. The ->evict_inode() + * callback must minimally truncate the inode pages, and call + * end_writeback() to complete all outstanding writeback for the + * inode. After this is complete evict inode can cleanup any + * remaining filesystem specific data. + */ +#ifdef HAVE_EVICT_INODE static void -zpl_inode_delete(struct inode *ip) +zpl_evict_inode(struct inode *ip) { - loff_t oldsize = i_size_read(ip); - - i_size_write(ip, 0); - truncate_pagecache(ip, oldsize, 0); - clear_inode(ip); + truncate_inode_pages(&ip->i_data, 0); + end_writeback(ip); + zfs_inactive(ip); } +#else + static void -zpl_evict_inode(struct inode *ip) +zpl_clear_inode(struct inode *ip) { zfs_inactive(ip); } +static void +zpl_inode_delete(struct inode *ip) +{ + truncate_inode_pages(&ip->i_data, 0); + clear_inode(ip); +} + +#endif /* HAVE_EVICT_INODE */ + static void zpl_put_super(struct super_block *sb) { @@ -136,11 +168,15 @@ zpl_kill_sb(struct super_block *sb) const struct super_operations zpl_super_operations = { .alloc_inode = zpl_inode_alloc, .destroy_inode = zpl_inode_destroy, - .delete_inode = zpl_inode_delete, .dirty_inode = NULL, .write_inode = NULL, .drop_inode = NULL, - .clear_inode = zpl_evict_inode, +#ifdef HAVE_EVICT_INODE + .evict_inode = zpl_evict_inode, +#else + .clear_inode = zpl_clear_inode, + .delete_inode = zpl_inode_delete, +#endif /* HAVE_EVICT_INODE */ .put_super = zpl_put_super, .write_super = NULL, .sync_fs = NULL, diff --git a/scripts/Makefile.in b/scripts/Makefile.in index ba9ab4ed7..ba491bc54 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index 6e278eadb..bd356296e 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index 5a96a4d8d..0030fa3d1 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index c3882fda6..5fd446dc6 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/scripts/zpool-layout/Makefile.in b/scripts/zpool-layout/Makefile.in index 44dd41e04..d8b181d9f 100644 --- a/scripts/zpool-layout/Makefile.in +++ b/scripts/zpool-layout/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ diff --git a/zfs_config.h.in b/zfs_config.h.in index d6999bbda..2f09157e3 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -69,6 +69,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H +/* sops->evict_inode() exists */ +#undef HAVE_EVICT_INODE + /* kernel defines fmode_t */ #undef HAVE_FMODE_T -- cgit v1.2.3