Name: zfs
Branch: 1.0
Version: 0.6.5.8
-Release: 0ubuntu7
+Release: 0ubuntu9
Release-Tags: relext
License: CDDL
Author: OpenZFS on Linux
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
m4_include([config/kernel-follow-down-one.m4])
m4_include([config/kernel-fsync.m4])
m4_include([config/kernel-generic_io_acct.m4])
+m4_include([config/kernel-generic_readlink.m4])
m4_include([config/kernel-get-disk-ro.m4])
m4_include([config/kernel-get-gendisk.m4])
m4_include([config/kernel-get-link.m4])
m4_include([config/kernel-open-bdev-exclusive.m4])
m4_include([config/kernel-put-link.m4])
m4_include([config/kernel-rename.m4])
+m4_include([config/kernel-req-flags.m4])
m4_include([config/kernel-security-inode-init.m4])
m4_include([config/kernel-set-nlink.m4])
m4_include([config/kernel-setattr-prepare.m4])
ZFS_LINUX_TRY_COMPILE([
#include <linux/blk_types.h>
],[
- enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
+ int op __attribute__ ((unused)) = REQ_OP_DISCARD;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_REQ_OP_DISCARD, 1,
ZFS_LINUX_TRY_COMPILE([
#include <linux/blk_types.h>
],[
- enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+ int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_REQ_OP_SECURE_DISCARD, 1,
+ AC_DEFINE(HAVE_REQ_OP_SECURE_ERASE, 1,
[REQ_OP_SECURE_ERASE is defined])
],[
AC_MSG_RESULT(no)
ZFS_LINUX_TRY_COMPILE([
#include <linux/blk_types.h>
],[
- enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+ int op __attribute__ ((unused)) = REQ_OP_FLUSH;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_REQ_OP_FLUSH, 1,
AC_MSG_RESULT(no)
])
])
+
+AC_DEFUN([ZFS_AC_KERNEL_HAVE_BIO_SET_OP_ATTRS], [
+ AC_MSG_CHECKING([whether bio_set_op_attrs is available])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/blk_types.h>
+ ],[
+ struct bio *bio __attribute__ ((unused)) = NULL;
+
+ bio_set_op_attrs(bio, 0, 0);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BIO_SET_OP_ATTRS, 1,
+ [bio_set_op_attrs is available])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
--- /dev/null
+dnl #
+dnl # 4.10 API
+dnl #
+dnl # NULL inode_operations.readlink implies generic_readlink(), which
+dnl # has been made static.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_GENERIC_READLINK_GLOBAL], [
+ AC_MSG_CHECKING([whether generic_readlink is global])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ int i __attribute__ ((unused));
+
+ i = generic_readlink(NULL, NULL, 0);
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_GENERIC_READLINK, 1,
+ [generic_readlink is global])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
--- /dev/null
+dnl #
+dnl # 4.10 API
+dnl #
+dnl # The WRITE_* and READ_SYNC wrappers have been removed, and
+dnl # REQ_* flags should be used directly.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_USE_REQ_FLAGS], [
+ AC_MSG_CHECKING([whether fops->aio_fsync() exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ unsigned int flags __attribute__ ((unused)) = READ_SYNC;
+ ],[
+ AC_MSG_RESULT(no)
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_REQ_FLAGS, 1, [use REQ_* flags directly])
+ ])
+])
ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS
ZFS_AC_KERNEL_GET_DISK_RO
ZFS_AC_KERNEL_GET_GENDISK
+ ZFS_AC_KERNEL_HAVE_BIO_SET_OP_ATTRS
+ ZFS_AC_KERNEL_GENERIC_READLINK_GLOBAL
ZFS_AC_KERNEL_DISCARD_GRANULARITY
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
ZFS_AC_KERNEL_XATTR_HANDLER_NAME
ZFS_AC_KERNEL_GENERIC_IO_ACCT
ZFS_AC_KERNEL_RENAME_WANTS_FLAGS
ZFS_AC_KERNEL_HAVE_GENERIC_SETXATTR
+ ZFS_AC_KERNEL_USE_REQ_FLAGS
AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
main (void)
{
- enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
+ int op __attribute__ ((unused)) = REQ_OP_DISCARD;
;
return 0;
main (void)
{
- enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+ int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_REQ_OP_SECURE_DISCARD 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_OP_SECURE_ERASE 1" >>confdefs.h
else
main (void)
{
- enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+ int op __attribute__ ((unused)) = REQ_OP_FLUSH;
;
return 0;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_op_attrs is available" >&5
+$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+ struct bio *bio __attribute__ ((unused)) = NULL;
+
+ bio_set_op_attrs(bio, 0, 0);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+ echo "obj-m := conftest.o" >build/Makefile
+ modpost_flag=''
+ test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+ if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_BIO_SET_OP_ATTRS 1" >>confdefs.h
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_readlink is global" >&5
+$as_echo_n "checking whether generic_readlink is global... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ int i __attribute__ ((unused));
+
+ i = generic_readlink(NULL, NULL, 0);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+ echo "obj-m := conftest.o" >build/Makefile
+ modpost_flag=''
+ test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+ if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_GENERIC_READLINK 1" >>confdefs.h
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+ rm -Rf build
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5
$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->aio_fsync() exists" >&5
+$as_echo_n "checking whether fops->aio_fsync() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ unsigned int flags __attribute__ ((unused)) = READ_SYNC;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+ echo "obj-m := conftest.o" >build/Makefile
+ modpost_flag=''
+ test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+ if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define USE_REQ_FLAGS 1" >>confdefs.h
+
+
+
+
fi
rm -Rf build
main (void)
{
- enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
+ int op __attribute__ ((unused)) = REQ_OP_DISCARD;
;
return 0;
main (void)
{
- enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+ int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_REQ_OP_SECURE_DISCARD 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_OP_SECURE_ERASE 1" >>confdefs.h
else
main (void)
{
- enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+ int op __attribute__ ((unused)) = REQ_OP_FLUSH;
;
return 0;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_op_attrs is available" >&5
+$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+ struct bio *bio __attribute__ ((unused)) = NULL;
+
+ bio_set_op_attrs(bio, 0, 0);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+ echo "obj-m := conftest.o" >build/Makefile
+ modpost_flag=''
+ test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+ if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_BIO_SET_OP_ATTRS 1" >>confdefs.h
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_readlink is global" >&5
+$as_echo_n "checking whether generic_readlink is global... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ int i __attribute__ ((unused));
+
+ i = generic_readlink(NULL, NULL, 0);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+ echo "obj-m := conftest.o" >build/Makefile
+ modpost_flag=''
+ test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+ if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_GENERIC_READLINK 1" >>confdefs.h
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+ rm -Rf build
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5
$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->aio_fsync() exists" >&5
+$as_echo_n "checking whether fops->aio_fsync() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ unsigned int flags __attribute__ ((unused)) = READ_SYNC;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+ echo "obj-m := conftest.o" >build/Makefile
+ modpost_flag=''
+ test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+ if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define USE_REQ_FLAGS 1" >>confdefs.h
+
+
+
+
fi
rm -Rf build
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
#endif /* HAVE_BDEV_LOGICAL_BLOCK_SIZE */
#endif /* HAVE_BDEV_PHYSICAL_BLOCK_SIZE */
+#ifndef HAVE_BIO_SET_OP_ATTRS
/*
- * 2.6.37 API change
- * The WRITE_FLUSH, WRITE_FUA, and WRITE_FLUSH_FUA flags have been
- * introduced as a replacement for WRITE_BARRIER. This was done to
- * allow richer semantics to be expressed to the block layer. It is
- * the block layers responsibility to choose the correct way to
- * implement these semantics.
+ * Kernels without bio_set_op_attrs use bi_rw for the bio flags.
*/
-#ifdef WRITE_FLUSH_FUA
-#define VDEV_WRITE_FLUSH_FUA WRITE_FLUSH_FUA
+static inline void
+bio_set_op_attrs(struct bio *bio, unsigned rw, unsigned flags)
+{
+ bio->bi_rw |= rw | flags;
+}
+#endif
+
+/*
+ * bio_set_flush - Set the appropriate flags in a bio to guarantee
+ * data are on non-volatile media on completion.
+ *
+ * 2.6.X - 2.6.36 API,
+ * WRITE_BARRIER - Tells the block layer to commit all previously submitted
+ * writes to stable storage before this one is started and that the current
+ * write is on stable storage upon completion. Also prevents reordering
+ * on both sides of the current operation.
+ *
+ * 2.6.37 - 4.8 API,
+ * Introduce WRITE_FLUSH, WRITE_FUA, and WRITE_FLUSH_FUA flags as a
+ * replacement for WRITE_BARRIER to allow expressing richer semantics
+ * to the block layer. It's up to the block layer to implement the
+ * semantics correctly. Use the WRITE_FLUSH_FUA flag combination.
+ *
+ * 4.8 - 4.9 API,
+ * REQ_FLUSH was renamed to REQ_PREFLUSH. For consistency with previous
+ * ZoL releases, prefer the WRITE_FLUSH_FUA flag set if it's available.
+ *
+ * 4.10 API,
+ * The read/write flags and their modifiers, including WRITE_FLUSH,
+ * WRITE_FUA and WRITE_FLUSH_FUA were removed from fs.h in
+ * torvalds/linux@70fd7614 and replaced by direct flag modification
+ * of the REQ_ flags in bio->bi_opf. Use REQ_PREFLUSH.
+ */
+static inline void
+bio_set_flush(struct bio *bio)
+{
+#if defined(WRITE_BARRIER) /* < 2.6.37 */
+ bio_set_op_attrs(bio, 0, WRITE_BARRIER);
+#elif defined(WRITE_FLUSH_FUA) /* >= 2.6.37 and <= 4.9 */
+ bio_set_op_attrs(bio, 0, WRITE_FLUSH_FUA);
+#elif defined(REQ_PREFLUSH) /* >= 4.10 */
+ bio_set_op_attrs(bio, 0, REQ_PREFLUSH);
#else
-#define VDEV_WRITE_FLUSH_FUA WRITE_BARRIER
+#error "Allowing the build will cause bio_set_flush requests to be ignored."
+ "Please file an issue report at: "
+ "https://github.com/zfsonlinux/zfs/issues/new"
#endif
+}
/*
* 4.8 - 4.x API,
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
$(top_srcdir)/config/kernel-follow-down-one.m4 \
$(top_srcdir)/config/kernel-fsync.m4 \
$(top_srcdir)/config/kernel-generic_io_acct.m4 \
+ $(top_srcdir)/config/kernel-generic_readlink.m4 \
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
$(top_srcdir)/config/kernel-get-gendisk.m4 \
$(top_srcdir)/config/kernel-get-link.m4 \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-put-link.m4 \
$(top_srcdir)/config/kernel-rename.m4 \
+ $(top_srcdir)/config/kernel-req-flags.m4 \
$(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-set-nlink.m4 \
$(top_srcdir)/config/kernel-setattr-prepare.m4 \
return (bio_size);
}
-#ifndef bio_set_op_attrs
-#define bio_set_op_attrs(bio, rw, flags) \
- do { (bio)->bi_rw |= (rw)|(flags); } while (0)
-#endif
-
static inline void
vdev_submit_bio_impl(struct bio *bio)
{
bio->bi_private = zio;
bio->bi_bdev = bdev;
zio->io_delay = jiffies_64;
- bio_set_op_attrs(bio, 0, VDEV_WRITE_FLUSH_FUA);
+ bio_set_flush(bio);
vdev_submit_bio(bio);
invalidate_bdev(bdev);
return;
case ZIO_TYPE_WRITE:
rw = WRITE;
- if ((pri == ZIO_PRIORITY_SYNC_WRITE) && (v->vdev_nonrot))
+ if ((pri == ZIO_PRIORITY_SYNC_WRITE) && (v->vdev_nonrot)) {
+#ifdef USE_REQ_FLAGS
+ flags = REQ_SYNC;
+#else
flags = WRITE_SYNC;
- else
+#endif
+ } else {
flags = 0;
+ }
break;
case ZIO_TYPE_READ:
rw = READ;
+ flags = 0;
+#ifndef USE_REQ_FLAGS
if ((pri == ZIO_PRIORITY_SYNC_READ) && (v->vdev_nonrot))
flags = READ_SYNC;
- else
- flags = 0;
+#endif
break;
default:
};
const struct inode_operations zpl_symlink_inode_operations = {
+#ifdef HAVE_GENERIC_READLINK
.readlink = generic_readlink,
+#endif
#if defined(HAVE_GET_LINK_DELAYED) || defined(HAVE_GET_LINK_COOKIE)
.get_link = zpl_get_link,
#elif defined(HAVE_FOLLOW_LINK_COOKIE) || defined(HAVE_FOLLOW_LINK_NAMEIDATA)
/* BIO_RW_FAILFAST_* are defined */
#undef HAVE_BIO_RW_FAILFAST_DTD
+/* bio_set_op_attrs is available */
+#undef HAVE_BIO_SET_OP_ATTRS
+
/* blkdev_get_by_path() is available */
#undef HAVE_BLKDEV_GET_BY_PATH
/* generic_start_io_acct()/generic_end_io_acct() avaliable */
#undef HAVE_GENERIC_IO_ACCT
+/* generic_readlink is global */
+#undef HAVE_GENERIC_READLINK
+
/* generic_setxattr() exists */
#undef HAVE_GENERIC_SETXATTR
#undef HAVE_REQ_OP_FLUSH
/* REQ_OP_SECURE_ERASE is defined */
-#undef HAVE_REQ_OP_SECURE_DISCARD
+#undef HAVE_REQ_OP_SECURE_ERASE
/* setattr_prepare() is available */
#undef HAVE_SETATTR_PREPARE
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* use REQ_* flags directly */
+#undef USE_REQ_FLAGS
+
/* Version number of package */
#undef VERSION