Meta: 1
Name: zfs
Branch: 1.0
-Version: 0.6.5.7
+Version: 0.6.5.8
Release: 1
Release-Tags: relext
License: CDDL
done; \
fi
+lint: cppcheck
+
+cppcheck:
+ @if type cppcheck > /dev/null 2>&1; then \
+ cppcheck --quiet --force ${top_srcdir}; \
+ fi
+
ctags:
$(RM) tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
done; \
fi
+lint: cppcheck
+
+cppcheck:
+ @if type cppcheck > /dev/null 2>&1; then \
+ cppcheck --quiet --force ${top_srcdir}; \
+ fi
+
ctags:
$(RM) tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
m4_include([config/kernel-bio-bvec-iter.m4])
m4_include([config/kernel-bio-end-io-t-args.m4])
m4_include([config/kernel-bio-failfast.m4])
+m4_include([config/kernel-bio-op.m4])
m4_include([config/kernel-bio-rw-barrier.m4])
m4_include([config/kernel-bio-rw-discard.m4])
m4_include([config/kernel-blk-queue-flush.m4])
m4_include([config/kernel-sget-args.m4])
m4_include([config/kernel-show-options.m4])
m4_include([config/kernel-shrink.m4])
+m4_include([config/kernel-submit_bio.m4])
m4_include([config/kernel-truncate-range.m4])
m4_include([config/kernel-truncate-setsize.m4])
m4_include([config/kernel-vfs-iterate.m4])
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
zio_compress_table[(idx)].ci_name : "UNKNOWN")
#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \
zio_checksum_table[(idx)].ci_name : "UNKNOWN")
-#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \
- dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \
- dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN")
#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : \
(((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ? \
DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES))
+static char *
+zdb_ot_name(dmu_object_type_t type)
+{
+ if (type < DMU_OT_NUMTYPES)
+ return (dmu_ot[type].ot_name);
+ else if ((type & DMU_OT_NEWTYPE) &&
+ ((type & DMU_OT_BYTESWAP_MASK) < DMU_BSWAP_NUMFUNCS))
+ return (dmu_ot_byteswap[type & DMU_OT_BYTESWAP_MASK].ob_name);
+ else
+ return ("UNKNOWN");
+}
+
#ifndef lint
extern int zfs_recover;
extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
(void) printf("%10lld %3u %5s %5s %5s %5s %6s %s%s\n",
(u_longlong_t)object, doi.doi_indirection, iblk, dblk,
- asize, lsize, fill, ZDB_OT_NAME(doi.doi_type), aux);
+ asize, lsize, fill, zdb_ot_name(doi.doi_type), aux);
if (doi.doi_bonus_type != DMU_OT_NONE && verbosity > 3) {
(void) printf("%10s %3s %5s %5s %5s %5s %6s %s\n",
"", "", "", "", "", bonus_size, "bonus",
- ZDB_OT_NAME(doi.doi_bonus_type));
+ zdb_ot_name(doi.doi_bonus_type));
}
if (verbosity >= 4) {
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
])
dnl #
-dnl # 2.6.30 API change,
-dnl # caching of ACL into the inode was added in this version.
+dnl # 3.1 API change,
+dnl # posix_acl_equiv_mode now wants an umode_t* instead of a mode_t*
dnl #
-AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CACHING], [
- AC_MSG_CHECKING([whether inode has i_acl and i_default_acl])
+AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
+ AC_MSG_CHECKING([whether posix_acl_equiv_mode() wants umode_t])
ZFS_LINUX_TRY_COMPILE([
#include <linux/fs.h>
+ #include <linux/posix_acl.h>
],[
- struct inode ino;
- ino.i_acl = NULL;
- ino.i_default_acl = NULL;
+ umode_t tmp;
+ posix_acl_equiv_mode(NULL,&tmp);
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_POSIX_ACL_CACHING, 1,
- [inode contains i_acl and i_default_acl])
+ AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1,
+ [ posix_acl_equiv_mode wants umode_t*])
],[
AC_MSG_RESULT(no)
])
])
dnl #
-dnl # 3.1 API change,
-dnl # posix_acl_equiv_mode now wants an umode_t* instead of a mode_t*
+dnl # 4.8 API change,
+dnl # The function posix_acl_valid now must be passed a namespace.
dnl #
-AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
- AC_MSG_CHECKING([whether posix_acl_equiv_mode() wants umode_t])
+AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [
+ AC_MSG_CHECKING([whether posix_acl_valid() wants user namespace])
ZFS_LINUX_TRY_COMPILE([
#include <linux/fs.h>
#include <linux/posix_acl.h>
],[
- umode_t tmp;
- posix_acl_equiv_mode(NULL,&tmp);
+ struct user_namespace *user_ns = NULL;
+ const struct posix_acl *acl = NULL;
+ int error;
+
+ error = posix_acl_valid(user_ns, acl);
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1,
- [ posix_acl_equiv_mode wants umode_t*])
+ AC_DEFINE(HAVE_POSIX_ACL_VALID_WITH_NS, 1,
+ [posix_acl_valid() wants user namespace])
],[
AC_MSG_RESULT(no)
])
])
dnl #
-dnl # 2.6.30 API change,
-dnl # current_umask exists only since this version.
+dnl # 4.7 API change,
+dnl # The kernel get_acl will now check cache before calling i_op->get_acl and
+dnl # do set_cached_acl after that, so i_op->get_acl don't need to do that
+dnl # anymore.
dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CURRENT_UMASK], [
- AC_MSG_CHECKING([whether current_umask exists])
+AC_DEFUN([ZFS_AC_KERNE_GET_ACL_HANDLE_CACHE], [
+ AC_MSG_CHECKING([whether uncached_acl_sentinel() exists])
ZFS_LINUX_TRY_COMPILE([
#include <linux/fs.h>
],[
- current_umask();
+ void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_CURRENT_UMASK, 1, [current_umask() exists])
+ AC_DEFINE(HAVE_KERNEL_GET_ACL_HANDLE_CACHE, 1, [uncached_acl_sentinel() exists])
],[
AC_MSG_RESULT(no)
])
--- /dev/null
+dnl #
+dnl # Linux 4.8 API,
+dnl #
+dnl # The bio_op() helper was introduced as a replacement for explicitly
+dnl # checking the bio->bi_rw flags. The following checks are used to
+dnl # detect if a specific operation is supported.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_DISCARD], [
+ AC_MSG_CHECKING([whether REQ_OP_DISCARD is defined])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/blk_types.h>
+ ],[
+ enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_REQ_OP_DISCARD, 1,
+ [REQ_OP_DISCARD is defined])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_SECURE_ERASE], [
+ AC_MSG_CHECKING([whether REQ_OP_SECURE_ERASE is defined])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/blk_types.h>
+ ],[
+ enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_REQ_OP_SECURE_DISCARD, 1,
+ [REQ_OP_SECURE_ERASE is defined])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+
+AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_FLUSH], [
+ AC_MSG_CHECKING([whether REQ_OP_FLUSH is defined])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/blk_types.h>
+ ],[
+ enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_REQ_OP_FLUSH, 1,
+ [REQ_OP_FLUSH is defined])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_OPF], [
+ AC_MSG_CHECKING([whether bio->bi_opf is defined])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/bio.h>
+ ],[
+ struct bio bio __attribute__ ((unused));
+ bio.bi_opf = 0;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BIO_BI_OPF, 1, [bio->bi_opf is defined])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BLK_QUEUE_FLUSH, 1,
[blk_queue_flush() is available])
+
+ AC_MSG_CHECKING([whether blk_queue_flush() is GPL-only])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("$ZFS_META_LICENSE");
+ ],[
+ struct request_queue *q = NULL;
+ (void) blk_queue_flush(q, REQ_FLUSH);
+ ],[
+ AC_MSG_RESULT(no)
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY, 1,
+ [blk_queue_flush() is GPL-only])
+ ])
],[
AC_MSG_RESULT(no)
])
- AC_MSG_CHECKING([whether blk_queue_flush() is GPL-only])
+ dnl #
+ dnl # 4.7 API change
+ dnl # Replace blk_queue_flush with blk_queue_write_cache
+ dnl #
+ AC_MSG_CHECKING([whether blk_queue_write_cache() exists])
ZFS_LINUX_TRY_COMPILE([
- #include <linux/module.h>
+ #include <linux/kernel.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("$ZFS_META_LICENSE");
],[
struct request_queue *q = NULL;
- (void) blk_queue_flush(q, REQ_FLUSH);
- ],[
- AC_MSG_RESULT(no)
+ blk_queue_write_cache(q, true, true);
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY, 1,
- [blk_queue_flush() is GPL-only])
+ AC_DEFINE(HAVE_BLK_QUEUE_WRITE_CACHE, 1,
+ [blk_queue_write_cache() exists])
+
+ AC_MSG_CHECKING([whether blk_queue_write_cache() is GPL-only])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("$ZFS_META_LICENSE");
+ ],[
+ struct request_queue *q = NULL;
+ blk_queue_write_cache(q, true, true);
+ ],[
+ AC_MSG_RESULT(no)
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY, 1,
+ [blk_queue_write_cache() is GPL-only])
+ ])
+ ],[
+ AC_MSG_RESULT(no)
])
+
EXTRA_KCFLAGS="$tmp_flags"
])
--- /dev/null
+dnl #
+dnl # 4.8 API change
+dnl # The rw argument has been removed from submit_bio/submit_bio_wait.
+dnl # Callers are now expected to set bio->bi_rw instead of passing it in.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SUBMIT_BIO], [
+ AC_MSG_CHECKING([whether submit_bio() wants 1 arg])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/bio.h>
+ ],[
+ blk_qc_t blk_qc;
+ struct bio *bio = NULL;
+ blk_qc = submit_bio(bio);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_1ARG_SUBMIT_BIO, 1, [submit_bio() wants 1 arg])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
-dnl #
-dnl # 3.11 API change
-dnl #
AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [
- AC_MSG_CHECKING([whether fops->iterate() is available])
+ dnl #
+ dnl # 4.7 API change
+ dnl #
+ AC_MSG_CHECKING([whether fops->iterate_shared() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/fs.h>
int iterate(struct file *filp, struct dir_context * context)
static const struct file_operations fops
__attribute__ ((unused)) = {
- .iterate = iterate,
+ .iterate_shared = iterate,
};
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_VFS_ITERATE, 1,
- [fops->iterate() is available])
+ AC_DEFINE(HAVE_VFS_ITERATE_SHARED, 1,
+ [fops->iterate_shared() is available])
],[
AC_MSG_RESULT(no)
- AC_MSG_CHECKING([whether fops->readdir() is available])
+ dnl #
+ dnl # 3.11 API change
+ dnl #
+ AC_MSG_CHECKING([whether fops->iterate() is available])
ZFS_LINUX_TRY_COMPILE([
#include <linux/fs.h>
- int readdir(struct file *filp, void *entry, filldir_t func)
+ int iterate(struct file *filp, struct dir_context * context)
{ return 0; }
static const struct file_operations fops
__attribute__ ((unused)) = {
- .readdir = readdir,
+ .iterate = iterate,
};
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_VFS_READDIR, 1,
- [fops->readdir() is available])
+ AC_DEFINE(HAVE_VFS_ITERATE, 1,
+ [fops->iterate() is available])
],[
- AC_MSG_ERROR(no; file a bug report with ZFSOnLinux)
- ])
+ AC_MSG_RESULT(no)
+
+ AC_MSG_CHECKING([whether fops->readdir() is available])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ int readdir(struct file *filp, void *entry, filldir_t func)
+ { return 0; }
+ static const struct file_operations fops
+ __attribute__ ((unused)) = {
+ .readdir = readdir,
+ };
+ ],[
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_VFS_READDIR, 1,
+ [fops->readdir() is available])
+ ],[
+ AC_MSG_ERROR(no; file a bug report with ZFSOnLinux)
+ ])
+ ])
])
])
dnl #
AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
dnl #
- dnl # 4.4 API change,
- dnl # The xattr_handler->get() callback was changed to take a
- dnl # attr_handler, and handler_flags argument was removed and
- dnl # should be accessed by handler->flags.
+ dnl # 4.7 API change,
+ dnl # The xattr_handler->get() callback was changed to take both
+ dnl # dentry and inode.
dnl #
- AC_MSG_CHECKING([whether xattr_handler->get() wants xattr_handler])
+ AC_MSG_CHECKING([whether xattr_handler->get() wants both dentry and inode])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
int get(const struct xattr_handler *handler,
- struct dentry *dentry, const char *name,
- void *buffer, size_t size) { return 0; }
+ struct dentry *dentry, struct inode *inode,
+ const char *name, void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_XATTR_GET_HANDLER, 1,
- [xattr_handler->get() wants xattr_handler])
+ AC_DEFINE(HAVE_XATTR_GET_DENTRY_INODE, 1,
+ [xattr_handler->get() wants both dentry and inode])
],[
dnl #
- dnl # 2.6.33 API change,
- dnl # The xattr_handler->get() callback was changed to take
- dnl # a dentry instead of an inode, and a handler_flags
- dnl # argument was added.
+ dnl # 4.4 API change,
+ dnl # The xattr_handler->get() callback was changed to take a
+ dnl # attr_handler, and handler_flags argument was removed and
+ dnl # should be accessed by handler->flags.
dnl #
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
+ AC_MSG_CHECKING([whether xattr_handler->get() wants xattr_handler])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
- int get(struct dentry *dentry, const char *name,
- void *buffer, size_t size, int handler_flags)
- { return 0; }
+ int get(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_XATTR_GET_DENTRY, 1,
- [xattr_handler->get() wants dentry])
+ AC_DEFINE(HAVE_XATTR_GET_HANDLER, 1,
+ [xattr_handler->get() wants xattr_handler])
],[
dnl #
- dnl # 2.6.32 API
+ dnl # 2.6.33 API change,
+ dnl # The xattr_handler->get() callback was changed to take
+ dnl # a dentry instead of an inode, and a handler_flags
+ dnl # argument was added.
dnl #
AC_MSG_RESULT(no)
- AC_MSG_CHECKING(
- [whether xattr_handler->get() wants inode])
+ AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
- int get(struct inode *ip, const char *name,
- void *buffer, size_t size) { return 0; }
+ int get(struct dentry *dentry, const char *name,
+ void *buffer, size_t size, int handler_flags)
+ { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_XATTR_GET_INODE, 1,
- [xattr_handler->get() wants inode])
+ AC_DEFINE(HAVE_XATTR_GET_DENTRY, 1,
+ [xattr_handler->get() wants dentry])
],[
- AC_MSG_ERROR([no; please file a bug report])
+ dnl #
+ dnl # 2.6.32 API
+ dnl #
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(
+ [whether xattr_handler->get() wants inode])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/xattr.h>
+
+ int get(struct inode *ip, const char *name,
+ void *buffer, size_t size) { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .get = get,
+ };
+ ],[
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_XATTR_GET_INODE, 1,
+ [xattr_handler->get() wants inode])
+ ],[
+ AC_MSG_ERROR([no; please file a bug report])
+ ])
])
])
])
dnl #
AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
dnl #
- dnl # 4.4 API change,
- dnl # The xattr_handler->set() callback was changed to take a
- dnl # xattr_handler, and handler_flags argument was removed and
- dnl # should be accessed by handler->flags.
+ dnl # 4.7 API change,
+ dnl # The xattr_handler->set() callback was changed to take both
+ dnl # dentry and inode.
dnl #
- AC_MSG_CHECKING([whether xattr_handler->set() wants xattr_handler])
+ AC_MSG_CHECKING([whether xattr_handler->set() wants both dentry and inode])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
int set(const struct xattr_handler *handler,
- struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags)
+ struct dentry *dentry, struct inode *inode,
+ const char *name, const void *buffer,
+ size_t size, int flags)
{ return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_XATTR_SET_HANDLER, 1,
- [xattr_handler->set() wants xattr_handler])
+ AC_DEFINE(HAVE_XATTR_SET_DENTRY_INODE, 1,
+ [xattr_handler->set() wants both dentry and inode])
],[
dnl #
- dnl # 2.6.33 API change,
+ dnl # 4.4 API change,
dnl # The xattr_handler->set() callback was changed to take a
- dnl # dentry instead of an inode, and a handler_flags
- dnl # argument was added.
+ dnl # xattr_handler, and handler_flags argument was removed and
+ dnl # should be accessed by handler->flags.
dnl #
- AC_MSG_RESULT(no)
- AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
+ AC_MSG_CHECKING([whether xattr_handler->set() wants xattr_handler])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
- int set(struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags,
- int handler_flags) { return 0; }
+ int set(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags)
+ { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.set = set,
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_XATTR_SET_DENTRY, 1,
- [xattr_handler->set() wants dentry])
+ AC_DEFINE(HAVE_XATTR_SET_HANDLER, 1,
+ [xattr_handler->set() wants xattr_handler])
],[
dnl #
- dnl # 2.6.32 API
+ dnl # 2.6.33 API change,
+ dnl # The xattr_handler->set() callback was changed to take a
+ dnl # dentry instead of an inode, and a handler_flags
+ dnl # argument was added.
dnl #
AC_MSG_RESULT(no)
- AC_MSG_CHECKING(
- [whether xattr_handler->set() wants inode])
+ AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
ZFS_LINUX_TRY_COMPILE([
#include <linux/xattr.h>
- int set(struct inode *ip, const char *name,
- const void *buffer, size_t size, int flags)
- { return 0; }
+ int set(struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags,
+ int handler_flags) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.set = set,
],[
],[
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_XATTR_SET_INODE, 1,
- [xattr_handler->set() wants inode])
+ AC_DEFINE(HAVE_XATTR_SET_DENTRY, 1,
+ [xattr_handler->set() wants dentry])
],[
- AC_MSG_ERROR([no; please file a bug report])
+ dnl #
+ dnl # 2.6.32 API
+ dnl #
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(
+ [whether xattr_handler->set() wants inode])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/xattr.h>
+
+ int set(struct inode *ip, const char *name,
+ const void *buffer, size_t size, int flags)
+ { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
+ ],[
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_XATTR_SET_INODE, 1,
+ [xattr_handler->set() wants inode])
+ ],[
+ AC_MSG_ERROR([no; please file a bug report])
+ ])
])
])
])
ZFS_AC_KERNEL_CONFIG
ZFS_AC_KERNEL_DECLARE_EVENT_CLASS
ZFS_AC_KERNEL_CURRENT_BIO_TAIL
+ ZFS_AC_KERNEL_SUBMIT_BIO
ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
ZFS_AC_KERNEL_TYPE_FMODE_T
ZFS_AC_KERNEL_BIO_BVEC_ITER
ZFS_AC_KERNEL_BIO_FAILFAST_DTD
ZFS_AC_KERNEL_REQ_FAILFAST_MASK
+ ZFS_AC_KERNEL_REQ_OP_DISCARD
+ ZFS_AC_KERNEL_REQ_OP_SECURE_ERASE
+ ZFS_AC_KERNEL_REQ_OP_FLUSH
+ ZFS_AC_KERNEL_BIO_BI_OPF
ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
ZFS_AC_KERNEL_BIO_RW_BARRIER
ZFS_AC_KERNEL_BIO_RW_DISCARD
ZFS_AC_KERNEL_POSIX_ACL_FROM_XATTR_USERNS
ZFS_AC_KERNEL_POSIX_ACL_RELEASE
ZFS_AC_KERNEL_POSIX_ACL_CHMOD
- ZFS_AC_KERNEL_POSIX_ACL_CACHING
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
+ ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION
ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA
ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL
ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL_WITH_FLAGS
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
- ZFS_AC_KERNEL_CURRENT_UMASK
+ ZFS_AC_KERNE_GET_ACL_HANDLE_CACHE
ZFS_AC_KERNEL_SHOW_OPTIONS
ZFS_AC_KERNEL_FILE_INODE
ZFS_AC_KERNEL_FSYNC
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for zfs 0.6.5.7.
+# Generated by GNU Autoconf 2.68 for zfs 0.6.5.8.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# Identity of this package.
PACKAGE_NAME='zfs'
PACKAGE_TARNAME='zfs'
-PACKAGE_VERSION='0.6.5.7'
-PACKAGE_STRING='zfs 0.6.5.7'
+PACKAGE_VERSION='0.6.5.8'
+PACKAGE_STRING='zfs 0.6.5.8'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures zfs 0.6.5.7 to adapt to many kinds of systems.
+\`configure' configures zfs 0.6.5.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of zfs 0.6.5.7:";;
+ short | recursive ) echo "Configuration of zfs 0.6.5.8:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-zfs configure 0.6.5.7
+zfs configure 0.6.5.8
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by zfs $as_me 0.6.5.7, which was
+It was created by zfs $as_me 0.6.5.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='zfs'
- VERSION='0.6.5.7'
+ VERSION='0.6.5.8'
cat >>confdefs.h <<_ACEOF
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether submit_bio() wants 1 arg" >&5
+$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/bio.h>
+
+int
+main (void)
+{
+
+ blk_qc_t blk_qc;
+ struct bio *bio = NULL;
+ blk_qc = submit_bio(bio);
+
+ ;
+ 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_1ARG_SUBMIT_BIO 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 bio_end_io_t wants 1 arg" >&5
-$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_DISCARD is defined" >&5
+$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/bio.h>
-
- void wanted_end_io(struct bio *bio) { return; }
-
- bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
+ #include <linux/blk_types.h>
int
main (void)
{
+ enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_1ARG_BIO_END_IO_T 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_OP_DISCARD 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_BARRIER is defined" >&5
-$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_SECURE_ERASE is defined" >&5
+$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/bio.h>
+ #include <linux/blk_types.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = BIO_RW_BARRIER;
+ enum req_op 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_BIO_RW_BARRIER 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_OP_SECURE_DISCARD 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_DISCARD is defined" >&5
-$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_FLUSH is defined" >&5
+$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/bio.h>
+ #include <linux/blk_types.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = BIO_RW_DISCARD;
+ enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BIO_RW_DISCARD 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_OP_FLUSH 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is available" >&5
-$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio->bi_opf is defined" >&5
+$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/blkdev.h>
+ #include <linux/bio.h>
int
main (void)
{
- struct request_queue *q = NULL;
- (void) blk_queue_flush(q, REQ_FLUSH);
+ struct bio bio __attribute__ ((unused));
+ bio.bi_opf = 0;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BLK_QUEUE_FLUSH 1" >>confdefs.h
+$as_echo "#define HAVE_BIO_BI_OPF 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is GPL-only" >&5
-$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
-
-
- #include <linux/module.h>
- #include <linux/blkdev.h>
-
- MODULE_LICENSE("$ZFS_META_LICENSE");
-
-int
-main (void)
-{
-
- struct request_queue *q = NULL;
- (void) blk_queue_flush(q, REQ_FLUSH);
-
- ;
- 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 HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
-
-
-
-
-fi
- rm -Rf build
-
-
- EXTRA_KCFLAGS="$tmp_flags"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_hw_sectors() is available" >&5
-$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_end_io_t wants 1 arg" >&5
+$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/blkdev.h>
-
-int
-main (void)
-{
-
- struct request_queue *q = NULL;
- (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
-
- ;
- 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_BLK_QUEUE_MAX_HW_SECTORS 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
-
-
- EXTRA_KCFLAGS="$tmp_flags"
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_segments() is available" >&5
-$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
+ #include <linux/bio.h>
+ void wanted_end_io(struct bio *bio) { return; }
- #include <linux/blkdev.h>
+ bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
int
main (void)
{
- struct request_queue *q = NULL;
- (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1" >>confdefs.h
+$as_echo "#define HAVE_1ARG_BIO_END_IO_T 1" >>confdefs.h
else
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_disk_ro() is available" >&5
-$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_BARRIER is defined" >&5
+$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/blkdev.h>
+ #include <linux/bio.h>
int
main (void)
{
- struct gendisk *disk = NULL;
- (void) get_disk_ro(disk);
+ int flags __attribute__ ((unused));
+ flags = BIO_RW_BARRIER;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_GET_DISK_RO 1" >>confdefs.h
+$as_echo "#define HAVE_BIO_RW_BARRIER 1" >>confdefs.h
else
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_gendisk() is available" >&5
-$as_echo_n "checking whether get_gendisk() is available... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_DISCARD is defined" >&5
+$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/genhd.h>
+ #include <linux/bio.h>
int
main (void)
{
- get_gendisk(0, NULL);
+ int flags __attribute__ ((unused));
+ flags = BIO_RW_DISCARD;
+
+ ;
+ 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_RW_DISCARD 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 blk_queue_flush() is available" >&5
+$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ (void) blk_queue_flush(q, REQ_FLUSH);
+
+ ;
+ 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_BLK_QUEUE_FLUSH 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ (void) blk_queue_flush(q, REQ_FLUSH);
+
+ ;
+ 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 HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+
+
+
+
+fi
+ rm -Rf build
+
+
+
+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 blk_queue_write_cache() exists" >&5
+$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/kernel.h>
+ #include <linux/blkdev.h>
+
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ blk_queue_write_cache(q, true, true);
+
+ ;
+ 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_BLK_QUEUE_WRITE_CACHE 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_write_cache() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ blk_queue_write_cache(q, true, true);
+
+ ;
+ 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 HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1" >>confdefs.h
+
+
+
+
+fi
+ rm -Rf build
+
+
+
+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
+
+
+
+ EXTRA_KCFLAGS="$tmp_flags"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_hw_sectors() is available" >&5
+$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
+
+ ;
+ 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_BLK_QUEUE_MAX_HW_SECTORS 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
+
+
+ EXTRA_KCFLAGS="$tmp_flags"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_segments() is available" >&5
+$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
+
+ ;
+ 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_BLK_QUEUE_MAX_SEGMENTS 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
+
+
+ EXTRA_KCFLAGS="$tmp_flags"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_disk_ro() is available" >&5
+$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+ struct gendisk *disk = NULL;
+ (void) get_disk_ro(disk);
+
+ ;
+ 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_GET_DISK_RO 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
+
+
+ EXTRA_KCFLAGS="$tmp_flags"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_gendisk() is available" >&5
+$as_echo_n "checking whether get_gendisk() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/genhd.h>
+
+int
+main (void)
+{
+
+ get_gendisk(0, NULL);
;
return 0;
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
int get(const struct xattr_handler *handler,
- struct dentry *dentry, const char *name,
- void *buffer, size_t size) { return 0; }
+ struct dentry *dentry, struct inode *inode,
+ const char *name, void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_XATTR_GET_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_DENTRY_INODE 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; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
- int get(struct dentry *dentry, const char *name,
- void *buffer, size_t size, int handler_flags)
- { return 0; }
+ int get(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_XATTR_GET_HANDLER 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; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/xattr.h>
+
+ int get(struct dentry *dentry, const char *name,
+ void *buffer, size_t size, int handler_flags)
+ { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .get = get,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_XATTR_GET_DENTRY 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; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/xattr.h>
+
+ int get(struct inode *ip, const char *name,
+ void *buffer, size_t size) { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .get = get,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_XATTR_GET_DENTRY 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_INODE 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; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants inode" >&5
-$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
+ as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+ rm -Rf build
+
+
+
+
+
+fi
+ rm -Rf build
+
+
+
+
+
+fi
+ rm -Rf build
+
+
+
+
+
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/xattr.h>
+ #include <linux/xattr.h>
- int get(struct inode *ip, const char *name,
- void *buffer, size_t size) { return 0; }
- static const struct xattr_handler
- xops __attribute__ ((unused)) = {
- .get = get,
- };
+ int set(const struct xattr_handler *handler,
+ struct dentry *dentry, struct inode *inode,
+ const char *name, const void *buffer,
+ size_t size, int flags)
+ { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
int
main (void)
$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_XATTR_GET_INODE 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_DENTRY_INODE 1" >>confdefs.h
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- as_fn_error $? "no; please file a bug report" "$LINENO" 5
-
-
-
-fi
- rm -Rf build
-
-
-
-
-
-fi
- rm -Rf build
-
-
-
-
-
-fi
- rm -Rf build
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/xattr.h>
+ #include <linux/xattr.h>
- int set(const struct xattr_handler *handler,
- struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags)
- { return 0; }
- static const struct xattr_handler
- xops __attribute__ ((unused)) = {
- .set = set,
- };
+ int set(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags)
+ { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
int
main (void)
$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_XATTR_SET_HANDLER 1" >>confdefs.h
$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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/xattr.h>
+ #include <linux/xattr.h>
- int set(struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags,
- int handler_flags) { return 0; }
- static const struct xattr_handler
- xops __attribute__ ((unused)) = {
- .set = set,
- };
+ int set(struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags,
+ int handler_flags) { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
int
main (void)
$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_XATTR_SET_DENTRY 1" >>confdefs.h
$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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants inode" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants inode" >&5
$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/xattr.h>
+ #include <linux/xattr.h>
- int set(struct inode *ip, const char *name,
- const void *buffer, size_t size, int flags)
- { return 0; }
- static const struct xattr_handler
- xops __attribute__ ((unused)) = {
- .set = set,
- };
+ int set(struct inode *ip, const char *name,
+ const void *buffer, size_t size, int flags)
+ { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
int
main (void)
$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_XATTR_SET_INODE 1" >>confdefs.h
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- as_fn_error $? "no; please file a bug report" "$LINENO" 5
+ as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+ rm -Rf build
+
+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode has i_acl and i_default_acl" >&5
-$as_echo_n "checking whether inode has i_acl and i_default_acl... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5
+$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/fs.h>
+ #include <linux/posix_acl.h>
int
main (void)
{
- struct inode ino;
- ino.i_acl = NULL;
- ino.i_default_acl = NULL;
+ umode_t tmp;
+ posix_acl_equiv_mode(NULL,&tmp);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_POSIX_ACL_CACHING 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5
-$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_valid() wants user namespace" >&5
+$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- umode_t tmp;
- posix_acl_equiv_mode(NULL,&tmp);
+ struct user_namespace *user_ns = NULL;
+ const struct posix_acl *acl = NULL;
+ int error;
+
+ error = posix_acl_valid(user_ns, acl);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_VALID_WITH_NS 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_umask exists" >&5
-$as_echo_n "checking whether current_umask exists... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uncached_acl_sentinel() exists" >&5
+$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- current_umask();
+ void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_CURRENT_UMASK 1" >>confdefs.h
+$as_echo "#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate() is available" >&5
-$as_echo_n "checking whether fops->iterate() is available... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate_shared() is available" >&5
+$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
static const struct file_operations fops
__attribute__ ((unused)) = {
- .iterate = iterate,
+ .iterate_shared = iterate,
};
int
$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_VFS_ITERATE_SHARED 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; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate() is available" >&5
+$as_echo_n "checking whether fops->iterate() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+ int iterate(struct file *filp, struct dir_context * context)
+ { return 0; }
+
+ static const struct file_operations fops
+ __attribute__ ((unused)) = {
+ .iterate = iterate,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_VFS_ITERATE 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; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->readdir() is available" >&5
+$as_echo_n "checking whether fops->readdir() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+ int readdir(struct file *filp, void *entry, filldir_t func)
+ { return 0; }
+
+ static const struct file_operations fops
+ __attribute__ ((unused)) = {
+ .readdir = readdir,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_VFS_ITERATE 1" >>confdefs.h
+$as_echo "#define HAVE_VFS_READDIR 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; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->readdir() is available" >&5
-$as_echo_n "checking whether fops->readdir() is available... " >&6; }
+ as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
-cat confdefs.h - <<_ACEOF >conftest.c
-
-
- #include <linux/fs.h>
- int readdir(struct file *filp, void *entry, filldir_t func)
- { return 0; }
-
- static const struct file_operations fops
- __attribute__ ((unused)) = {
- .readdir = readdir,
- };
-
-int
-main (void)
-{
-
-
- ;
- 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_VFS_READDIR 1" >>confdefs.h
+fi
+ rm -Rf build
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
-
fi
rm -Rf build
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether submit_bio() wants 1 arg" >&5
+$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/bio.h>
+
+int
+main (void)
+{
+
+ blk_qc_t blk_qc;
+ struct bio *bio = NULL;
+ blk_qc = submit_bio(bio);
+
+ ;
+ 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_1ARG_SUBMIT_BIO 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}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1" >>confdefs.h
+$as_echo "#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 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
+
+
+ EXTRA_KCFLAGS="$tmp_flags"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio has bi_iter" >&5
+$as_echo_n "checking whether bio has bi_iter... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/bio.h>
+
+int
+main (void)
+{
+
+ struct bio bio;
+ bio.bi_iter.bi_sector = 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_BVEC_ITER 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 BIO_RW_FAILFAST_* are defined" >&5
+$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/bio.h>
+
+int
+main (void)
+{
+
+ int flags __attribute__ ((unused));
+ flags = ((1 << BIO_RW_FAILFAST_DEV) |
+ (1 << BIO_RW_FAILFAST_TRANSPORT) |
+ (1 << BIO_RW_FAILFAST_DRIVER));
+
+ ;
+ 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_RW_FAILFAST_DTD 1" >>confdefs.h
else
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio has bi_iter" >&5
-$as_echo_n "checking whether bio has bi_iter... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_FAILFAST_MASK is defined" >&5
+$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- struct bio bio;
- bio.bi_iter.bi_sector = 0;
+ int flags __attribute__ ((unused));
+ flags = REQ_FAILFAST_MASK;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BIO_BVEC_ITER 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_FAILFAST_MASK 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_FAILFAST_* are defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_DISCARD is defined" >&5
+$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/bio.h>
+ #include <linux/blk_types.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = ((1 << BIO_RW_FAILFAST_DEV) |
- (1 << BIO_RW_FAILFAST_TRANSPORT) |
- (1 << BIO_RW_FAILFAST_DRIVER));
+ enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BIO_RW_FAILFAST_DTD 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_OP_DISCARD 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_FAILFAST_MASK is defined" >&5
-$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_SECURE_ERASE is defined" >&5
+$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+ enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+
+ ;
+ 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_REQ_OP_SECURE_DISCARD 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 REQ_OP_FLUSH is defined" >&5
+$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+ enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+
+ ;
+ 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_REQ_OP_FLUSH 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 bio->bi_opf is defined" >&5
+$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- int flags __attribute__ ((unused));
- flags = REQ_FAILFAST_MASK;
+ struct bio bio __attribute__ ((unused));
+ bio.bi_opf = 0;
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_REQ_FAILFAST_MASK 1" >>confdefs.h
+$as_echo "#define HAVE_BIO_BI_OPF 1" >>confdefs.h
else
$as_echo "#define HAVE_BLK_QUEUE_FLUSH 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ (void) blk_queue_flush(q, REQ_FLUSH);
+
+ ;
+ 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 HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+
+
+
+
+fi
+ rm -Rf build
+
+
+
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is GPL-only" >&5
-$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_write_cache() exists" >&5
+$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
- #include <linux/module.h>
+ #include <linux/kernel.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("$ZFS_META_LICENSE");
int
main (void)
{
struct request_queue *q = NULL;
- (void) blk_queue_flush(q, REQ_FLUSH);
+ blk_queue_write_cache(q, true, true);
+
+ ;
+ 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_BLK_QUEUE_WRITE_CACHE 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_write_cache() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ blk_queue_write_cache(q, true, true);
;
return 0;
$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 "$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 "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+$as_echo "#define HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1" >>confdefs.h
rm -Rf build
+
+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
+
+
+
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
int get(const struct xattr_handler *handler,
- struct dentry *dentry, const char *name,
- void *buffer, size_t size) { return 0; }
+ struct dentry *dentry, struct inode *inode,
+ const char *name, void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_XATTR_GET_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_DENTRY_INODE 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; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
- int get(struct dentry *dentry, const char *name,
- void *buffer, size_t size, int handler_flags)
- { return 0; }
+ int get(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ void *buffer, size_t size) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_XATTR_GET_DENTRY 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_HANDLER 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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants inode" >&5
-$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
- int get(struct inode *ip, const char *name,
- void *buffer, size_t size) { return 0; }
+ int get(struct dentry *dentry, const char *name,
+ void *buffer, size_t size, int handler_flags)
+ { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.get = get,
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+$as_echo "#define HAVE_XATTR_GET_DENTRY 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; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/xattr.h>
+
+ int get(struct inode *ip, const char *name,
+ void *buffer, size_t size) { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .get = get,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_XATTR_GET_INODE 1" >>confdefs.h
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- as_fn_error $? "no; please file a bug report" "$LINENO" 5
+ as_fn_error $? "no; please file a bug report" "$LINENO" 5
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
+
+fi
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
int set(const struct xattr_handler *handler,
- struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags)
+ struct dentry *dentry, struct inode *inode,
+ const char *name, const void *buffer,
+ size_t size, int flags)
{ return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_XATTR_SET_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_DENTRY_INODE 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; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
- int set(struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags,
- int handler_flags) { return 0; }
+ int set(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags)
+ { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.set = set,
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_XATTR_SET_DENTRY 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_HANDLER 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 "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants inode" >&5
-$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/xattr.h>
- int set(struct inode *ip, const char *name,
- const void *buffer, size_t size, int flags)
- { return 0; }
+ int set(struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags,
+ int handler_flags) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.set = set,
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+$as_echo "#define HAVE_XATTR_SET_DENTRY 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; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/xattr.h>
+
+ int set(struct inode *ip, const char *name,
+ const void *buffer, size_t size, int flags)
+ { return 0; }
+ static const struct xattr_handler
+ xops __attribute__ ((unused)) = {
+ .set = set,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_XATTR_SET_INODE 1" >>confdefs.h
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- as_fn_error $? "no; please file a bug report" "$LINENO" 5
+ as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+ rm -Rf build
+
+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode has i_acl and i_default_acl" >&5
-$as_echo_n "checking whether inode has i_acl and i_default_acl... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5
+$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/fs.h>
+ #include <linux/posix_acl.h>
int
main (void)
{
- struct inode ino;
- ino.i_acl = NULL;
- ino.i_default_acl = NULL;
+ umode_t tmp;
+ posix_acl_equiv_mode(NULL,&tmp);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_POSIX_ACL_CACHING 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5
-$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_valid() wants user namespace" >&5
+$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- umode_t tmp;
- posix_acl_equiv_mode(NULL,&tmp);
+ struct user_namespace *user_ns = NULL;
+ const struct posix_acl *acl = NULL;
+ int error;
+
+ error = posix_acl_valid(user_ns, acl);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_VALID_WITH_NS 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_umask exists" >&5
-$as_echo_n "checking whether current_umask exists... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uncached_acl_sentinel() exists" >&5
+$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- current_umask();
+ void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
;
return 0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_CURRENT_UMASK 1" >>confdefs.h
+$as_echo "#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1" >>confdefs.h
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate() is available" >&5
-$as_echo_n "checking whether fops->iterate() is available... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate_shared() is available" >&5
+$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
static const struct file_operations fops
__attribute__ ((unused)) = {
- .iterate = iterate,
+ .iterate_shared = iterate,
};
int
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_VFS_ITERATE 1" >>confdefs.h
+$as_echo "#define HAVE_VFS_ITERATE_SHARED 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->readdir() is available" >&5
-$as_echo_n "checking whether fops->readdir() is available... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate() is available" >&5
+$as_echo_n "checking whether fops->iterate() is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/fs.h>
- int readdir(struct file *filp, void *entry, filldir_t func)
+ int iterate(struct file *filp, struct dir_context * context)
{ return 0; }
static const struct file_operations fops
__attribute__ ((unused)) = {
- .readdir = readdir,
+ .iterate = iterate,
};
int
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+$as_echo "#define HAVE_VFS_ITERATE 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; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->readdir() is available" >&5
+$as_echo_n "checking whether fops->readdir() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+ int readdir(struct file *filp, void *entry, filldir_t func)
+ { return 0; }
+
+ static const struct file_operations fops
+ __attribute__ ((unused)) = {
+ .readdir = readdir,
+ };
+
+int
+main (void)
+{
+
+
+ ;
+ 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_VFS_READDIR 1" >>confdefs.h
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
+ as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
+fi
+ rm -Rf build
+
+
+
+
fi
rm -Rf build
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by zfs $as_me 0.6.5.7, which was
+This file was extended by zfs $as_me 0.6.5.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-zfs config.status 0.6.5.7
+zfs config.status 0.6.5.8
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
-zfs
+# Always load kernel modules at boot. The default behavior is to load the
+# kernel modules in the zfs-import-*.service or when blkid(8) detects a pool.
+#zfs
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
# ZFS is enabled by default
-enable zfs.*
+enable zfs-import-cache.service
+disable zfs-import-scan.service
+enable zfs-mount.service
+enable zfs-share.service
+enable zfs-zed.service
+enable zfs.target
50-zfs.preset
systemdunit_DATA = \
- zed.service \
+ zfs-zed.service \
zfs-import-cache.service \
zfs-import-scan.service \
zfs-mount.service \
zfs.target
EXTRA_DIST = \
- $(top_srcdir)/etc/systemd/system/zed.service.in \
+ $(top_srcdir)/etc/systemd/system/zfs-zed.service.in \
$(top_srcdir)/etc/systemd/system/zfs-import-cache.service.in \
$(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \
$(top_srcdir)/etc/systemd/system/zfs-mount.service.in \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
50-zfs.preset
systemdunit_DATA = \
- zed.service \
+ zfs-zed.service \
zfs-import-cache.service \
zfs-import-scan.service \
zfs-mount.service \
zfs.target
EXTRA_DIST = \
- $(top_srcdir)/etc/systemd/system/zed.service.in \
+ $(top_srcdir)/etc/systemd/system/zfs-zed.service.in \
$(top_srcdir)/etc/systemd/system/zfs-import-cache.service.in \
$(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \
$(top_srcdir)/etc/systemd/system/zfs-mount.service.in \
+++ /dev/null
-[Unit]
-Description=ZFS Event Daemon (zed)
-Documentation=man:zed(8)
-After=zfs-import-cache.service
-After=zfs-import-scan.service
-
-[Service]
-ExecStart=@sbindir@/zed -F
-Restart=on-abort
Requires=systemd-udev-settle.service
After=systemd-udev-settle.service
After=cryptsetup.target
+After=systemd-remount-fs.service
ConditionPathExists=@sysconfdir@/zfs/zpool.cache
[Service]
RemainAfterExit=yes
ExecStartPre=/sbin/modprobe zfs
ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
+
+[Install]
+WantedBy=zfs-mount.service
+WantedBy=zfs.target
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/sbin/modprobe zfs
-ExecStart=@sbindir@/zpool import -d /dev/disk/by-id -aN
+ExecStart=@sbindir@/zpool import -aN -o cachefile=none
+
+[Install]
+WantedBy=zfs-mount.service
+WantedBy=zfs.target
[Unit]
Description=Mount ZFS filesystems
DefaultDependencies=no
-Wants=zfs-import-cache.service
-Wants=zfs-import-scan.service
-Requires=systemd-udev-settle.service
After=systemd-udev-settle.service
After=zfs-import-cache.service
After=zfs-import-scan.service
+After=systemd-remount-fs.service
Before=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@sbindir@/zfs mount -a
+
+[Install]
+WantedBy=zfs-share.service
+WantedBy=zfs.target
[Unit]
Description=ZFS file system shares
-After=nfs-server.service
+After=nfs-server.service nfs-kernel-server.service
After=smb.service
After=zfs-mount.service
-Requires=zfs-mount.service
-PartOf=nfs-server.service
+PartOf=nfs-server.service nfs-kernel-server.service
PartOf=smb.service
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStartPre=-@bindir@/rm /etc/dfs/sharetab
+ExecStartPre=-@bindir@/rm -f /etc/dfs/sharetab
ExecStart=@sbindir@/zfs share -a
+
+[Install]
+WantedBy=zfs.target
--- /dev/null
+[Unit]
+Description=ZFS Event Daemon (zed)
+Documentation=man:zed(8)
+After=zfs-import-cache.service
+After=zfs-import-scan.service
+
+[Service]
+ExecStart=@sbindir@/zed -F
+Restart=on-abort
+
+[Install]
+Alias=zed.service
+WantedBy=zfs.target
[Unit]
Description=ZFS startup target
-Requires=zfs-mount.service
-Requires=zfs-share.service
-Wants=zed.service
[Install]
WantedBy=multi-user.target
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
#endif /* HAVE_FMODE_T */
/*
- * 2.6.36 API change,
+ * 4.7 - 4.x API,
+ * The blk_queue_write_cache() interface has replaced blk_queue_flush()
+ * interface. However, the new interface is GPL-only thus we implement
+ * our own trivial wrapper when the GPL-only version is detected.
+ *
+ * 2.6.36 - 4.6 API,
* The blk_queue_flush() interface has replaced blk_queue_ordered()
* interface. However, while the old interface was available to all the
* new one is GPL-only. Thus if the GPL-only version is detected we
- * implement our own trivial helper compatibility funcion. The hope is
- * that long term this function will be opened up.
+ * implement our own trivial helper.
+ *
+ * 2.6.x - 2.6.35
+ * Legacy blk_queue_ordered() interface.
*/
-#if defined(HAVE_BLK_QUEUE_FLUSH) && defined(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY)
-#define blk_queue_flush __blk_queue_flush
static inline void
-__blk_queue_flush(struct request_queue *q, unsigned int flags)
+blk_queue_set_write_cache(struct request_queue *q, bool wc, bool fua)
{
- q->flush_flags = flags & (REQ_FLUSH | REQ_FUA);
+#if defined(HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY)
+ spin_lock_irq(q->queue_lock);
+ if (wc)
+ queue_flag_set(QUEUE_FLAG_WC, q);
+ else
+ queue_flag_clear(QUEUE_FLAG_WC, q);
+ if (fua)
+ queue_flag_set(QUEUE_FLAG_FUA, q);
+ else
+ queue_flag_clear(QUEUE_FLAG_FUA, q);
+ spin_unlock_irq(q->queue_lock);
+#elif defined(HAVE_BLK_QUEUE_WRITE_CACHE)
+ blk_queue_write_cache(q, wc, fua);
+#elif defined(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY)
+ if (wc)
+ q->flush_flags |= REQ_FLUSH;
+ if (fua)
+ q->flush_flags |= REQ_FUA;
+#elif defined(HAVE_BLK_QUEUE_FLUSH)
+ blk_queue_flush(q, (wc ? REQ_FLUSH : 0) | (fua ? REQ_FUA : 0));
+#else
+ blk_queue_ordered(q, QUEUE_ORDERED_DRAIN, NULL);
+#endif
}
-#endif /* HAVE_BLK_QUEUE_FLUSH && HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */
+
/*
* Most of the blk_* macros were removed in 2.6.36. Ostensibly this was
* done to improve readability and allow easier grepping. However, from
* 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.
- *
- * The existence of these flags implies that REQ_FLUSH an REQ_FUA are
- * defined. Thus we can safely define VDEV_REQ_FLUSH and VDEV_REQ_FUA
- * compatibility macros.
*/
#ifdef WRITE_FLUSH_FUA
#define VDEV_WRITE_FLUSH_FUA WRITE_FLUSH_FUA
-#define VDEV_REQ_FLUSH REQ_FLUSH
-#define VDEV_REQ_FUA REQ_FUA
#else
#define VDEV_WRITE_FLUSH_FUA WRITE_BARRIER
-#ifdef HAVE_BIO_RW_BARRIER
-#define VDEV_REQ_FLUSH (1 << BIO_RW_BARRIER)
-#define VDEV_REQ_FUA (1 << BIO_RW_BARRIER)
-#else
-#define VDEV_REQ_FLUSH REQ_HARDBARRIER
-#define VDEV_REQ_FUA REQ_FUA
#endif
+
+/*
+ * 4.8 - 4.x API,
+ * REQ_OP_FLUSH
+ *
+ * 4.8-rc0 - 4.8-rc1,
+ * REQ_PREFLUSH
+ *
+ * 2.6.36 - 4.7 API,
+ * REQ_FLUSH
+ *
+ * 2.6.x - 2.6.35 API,
+ * HAVE_BIO_RW_BARRIER
+ *
+ * Used to determine if a cache flush has been requested. This check has
+ * been left intentionally broad in order to cover both a legacy flush
+ * and the new preflush behavior introduced in Linux 4.8. This is correct
+ * in all cases but may have a performance impact for some kernels. It
+ * has the advantage of minimizing kernel specific changes in the zvol code.
+ */
+static inline boolean_t
+bio_is_flush(struct bio *bio)
+{
+#if defined(HAVE_REQ_OP_FLUSH) && defined(HAVE_BIO_BI_OPF)
+ return ((bio_op(bio) == REQ_OP_FLUSH) || (bio->bi_opf & REQ_PREFLUSH));
+#elif defined(REQ_PREFLUSH) && defined(HAVE_BIO_BI_OPF)
+ return (bio->bi_opf & REQ_PREFLUSH);
+#elif defined(REQ_PREFLUSH) && !defined(HAVE_BIO_BI_OPF)
+ return (bio->bi_rw & REQ_PREFLUSH);
+#elif defined(REQ_FLUSH)
+ return (bio->bi_rw & REQ_FLUSH);
+#elif defined(HAVE_BIO_RW_BARRIER)
+ return (bio->bi_rw & (1 << BIO_RW_BARRIER));
+#else
+#error "Allowing the build will cause flush requests to be ignored. Please "
+ "file an issue report at: https://github.com/zfsonlinux/zfs/issues/new"
#endif
+}
/*
- * 2.6.32 API change
- * Use the normal I/O patch for discards.
+ * 4.8 - 4.x API,
+ * REQ_FUA flag moved to bio->bi_opf
+ *
+ * 2.6.x - 4.7 API,
+ * REQ_FUA
*/
-#ifdef QUEUE_FLAG_DISCARD
-#ifdef HAVE_BIO_RW_DISCARD
-#define VDEV_REQ_DISCARD (1 << BIO_RW_DISCARD)
+static inline boolean_t
+bio_is_fua(struct bio *bio)
+{
+#if defined(HAVE_BIO_BI_OPF)
+ return (bio->bi_opf & REQ_FUA);
+#elif defined(REQ_FUA)
+ return (bio->bi_rw & REQ_FUA);
#else
-#define VDEV_REQ_DISCARD REQ_DISCARD
+#error "Allowing the build will cause fua requests to be ignored. Please "
+ "file an issue report at: https://github.com/zfsonlinux/zfs/issues/new"
#endif
+}
+
+/*
+ * 4.8 - 4.x API,
+ * REQ_OP_DISCARD
+ *
+ * 2.6.36 - 4.7 API,
+ * REQ_DISCARD
+ *
+ * 2.6.28 - 2.6.35 API,
+ * BIO_RW_DISCARD
+ *
+ * In all cases the normal I/O path is used for discards. The only
+ * difference is how the kernel tags individual I/Os as discards.
+ */
+static inline boolean_t
+bio_is_discard(struct bio *bio)
+{
+#if defined(HAVE_REQ_OP_DISCARD)
+ return (bio_op(bio) == REQ_OP_DISCARD);
+#elif defined(REQ_DISCARD)
+ return (bio->bi_rw & REQ_DISCARD);
+#elif defined(HAVE_BIO_RW_DISCARD)
+ return (bio->bi_rw & (1 << BIO_RW_DISCARD));
#else
#error "Allowing the build will cause discard requests to become writes "
- "potentially triggering the DMU_MAX_ACCESS assertion. Please file a "
+ "potentially triggering the DMU_MAX_ACCESS assertion. Please file "
"an issue report at: https://github.com/zfsonlinux/zfs/issues/new"
#endif
+}
+
+/*
+ * 4.8 - 4.x API,
+ * REQ_OP_SECURE_ERASE
+ *
+ * 2.6.36 - 4.7 API,
+ * REQ_SECURE
+ *
+ * 2.6.x - 2.6.35 API,
+ * Unsupported by kernel
+ */
+static inline boolean_t
+bio_is_secure_erase(struct bio *bio)
+{
+#if defined(HAVE_REQ_OP_SECURE_ERASE)
+ return (bio_op(bio) == REQ_OP_SECURE_ERASE);
+#elif defined(REQ_SECURE)
+ return (bio->bi_rw & REQ_SECURE);
+#else
+ return (0);
+#endif
+}
/*
* 2.6.33 API change
* At 60 seconds the kernel will also begin issuing RCU stall warnings.
*/
#include <linux/posix_acl.h>
-#ifndef HAVE_POSIX_ACL_CACHING
-#define ACL_NOT_CACHED ((void *)(-1))
-#endif /* HAVE_POSIX_ACL_CACHING */
#if defined(HAVE_POSIX_ACL_RELEASE) && !defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)
static inline void
zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) {
-#ifdef HAVE_POSIX_ACL_CACHING
struct posix_acl *older = NULL;
spin_lock(&ip->i_lock);
spin_unlock(&ip->i_lock);
zpl_posix_acl_release(older);
-#endif /* HAVE_POSIX_ACL_CACHING */
}
static inline void
#else
typedef mode_t zpl_equivmode_t;
#endif /* HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T */
-#endif /* CONFIG_FS_POSIX_ACL */
-#ifndef HAVE_CURRENT_UMASK
-static inline int
-current_umask(void)
-{
- return (current->fs->umask);
-}
-#endif /* HAVE_CURRENT_UMASK */
+/*
+ * 4.8 API change,
+ * posix_acl_valid() now must be passed a namespace, the namespace from
+ * from super block associated with the given inode is used for this purpose.
+ */
+#ifdef HAVE_POSIX_ACL_VALID_WITH_NS
+#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(ip->i_sb->s_user_ns, acl)
+#else
+#define zpl_posix_acl_valid(ip, acl) posix_acl_valid(acl)
+#endif
+
+#endif /* CONFIG_FS_POSIX_ACL */
/*
* 2.6.38 API change,
}
#endif
+/*
+ * 4.7 API change,
+ * The xattr_handler->get() callback was changed to take a both dentry and
+ * inode, because the dentry might not be attached to an inode yet.
+ */
+#if defined(HAVE_XATTR_GET_DENTRY_INODE)
+#define ZPL_XATTR_GET_WRAPPER(fn) \
+static int \
+fn(const struct xattr_handler *handler, struct dentry *dentry, \
+ struct inode *inode, const char *name, void *buffer, size_t size) \
+{ \
+ return (__ ## fn(inode, name, buffer, size)); \
+}
/*
* 4.4 API change,
* The xattr_handler->get() callback was changed to take a xattr_handler,
* and handler_flags argument was removed and should be accessed by
* handler->flags.
*/
-#if defined(HAVE_XATTR_GET_HANDLER)
+#elif defined(HAVE_XATTR_GET_HANDLER)
#define ZPL_XATTR_GET_WRAPPER(fn) \
static int \
fn(const struct xattr_handler *handler, struct dentry *dentry, \
}
#endif
+/*
+ * 4.7 API change,
+ * The xattr_handler->set() callback was changed to take a both dentry and
+ * inode, because the dentry might not be attached to an inode yet.
+ */
+#if defined(HAVE_XATTR_SET_DENTRY_INODE)
+#define ZPL_XATTR_SET_WRAPPER(fn) \
+static int \
+fn(const struct xattr_handler *handler, struct dentry *dentry, \
+ struct inode *inode, const char *name, const void *buffer, \
+ size_t size, int flags) \
+{ \
+ return (__ ## fn(inode, name, buffer, size, flags)); \
+}
/*
* 4.4 API change,
* The xattr_handler->set() callback was changed to take a xattr_handler,
* and handler_flags argument was removed and should be accessed by
* handler->flags.
*/
-#if defined(HAVE_XATTR_SET_HANDLER)
+#elif defined(HAVE_XATTR_SET_HANDLER)
#define ZPL_XATTR_SET_WRAPPER(fn) \
static int \
fn(const struct xattr_handler *handler, struct dentry *dentry, \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
void dsl_dataset_disown(dsl_dataset_t *ds, void *tag);
void dsl_dataset_name(dsl_dataset_t *ds, char *name);
boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, void *tag);
+int dsl_dataset_namelen(dsl_dataset_t *ds);
uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
dsl_dataset_t *origin, uint64_t flags, cred_t *, dmu_tx_t *);
uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
#define ZAP_MAXNAMELEN 256
#define ZAP_MAXVALUELEN (1024 * 8)
#define ZAP_OLDMAXVALUELEN 1024
+#define ZFS_MAX_DATASET_NAME_LEN 256
/*
* Dataset properties are identified by these constants and must be added to
((zc1).zc_word[2] - (zc2).zc_word[2]) | \
((zc1).zc_word[3] - (zc2).zc_word[3])))
+#define ZIO_CHECKSUM_IS_ZERO(zc) \
+ (0 == ((zc)->zc_word[0] | (zc)->zc_word[1] | \
+ (zc)->zc_word[2] | (zc)->zc_word[3]))
+
#define DVA_IS_VALID(dva) (DVA_GET_ASIZE(dva) != 0)
#define ZIO_SET_CHECKSUM(zcp, w0, w1, w2, w3) \
__field(uint32_t, z_sync_cnt)
__field(mode_t, z_mode)
__field(boolean_t, z_is_sa)
- __field(boolean_t, z_is_zvol)
__field(boolean_t, z_is_mapped)
__field(boolean_t, z_is_ctldir)
__field(boolean_t, z_is_stale)
__entry->z_sync_cnt = zn->z_sync_cnt;
__entry->z_mode = zn->z_mode;
__entry->z_is_sa = zn->z_is_sa;
- __entry->z_is_zvol = zn->z_is_zvol;
__entry->z_is_mapped = zn->z_is_mapped;
__entry->z_is_ctldir = zn->z_is_ctldir;
__entry->z_is_stale = zn->z_is_stale;
"zn_prefetch %u moved %u blksz %u seq %u "
"mapcnt %llu gen %llu size %llu atime 0x%llx:0x%llx "
"links %llu pflags %llu uid %llu gid %llu "
- "sync_cnt %u mode 0x%x is_sa %d is_zvol %d "
+ "sync_cnt %u mode 0x%x is_sa %d "
"is_mapped %d is_ctldir %d is_stale %d inode { "
"ino %lu nlink %u version %llu size %lli blkbits %u "
"bytes %u mode 0x%x generation %x } } ace { type %u "
__entry->z_size, __entry->z_atime[0], __entry->z_atime[1],
__entry->z_links, __entry->z_pflags, __entry->z_uid,
__entry->z_gid, __entry->z_sync_cnt, __entry->z_mode,
- __entry->z_is_sa, __entry->z_is_zvol, __entry->z_is_mapped,
+ __entry->z_is_sa, __entry->z_is_mapped,
__entry->z_is_ctldir, __entry->z_is_stale, __entry->i_ino,
__entry->i_nlink, __entry->i_version, __entry->i_size,
__entry->i_blkbits, __entry->i_bytes, __entry->i_mode,
} vdev_disk_t;
extern int vdev_disk_physio(struct block_device *, caddr_t,
- size_t, uint64_t, int);
+ size_t, uint64_t, int, int);
extern int vdev_disk_read_rootlabel(char *, char *, nvlist_t **);
#endif /* _KERNEL */
#ifdef _KERNEL
-#include <sys/zfs_znode.h>
+#include <sys/list.h>
+#include <sys/avl.h>
+#include <sys/condvar.h>
typedef enum {
RL_READER,
RL_APPEND
} rl_type_t;
+typedef struct zfs_rlock {
+ kmutex_t zr_mutex; /* protects changes to zr_avl */
+ avl_tree_t zr_avl; /* avl tree of range locks */
+ uint64_t *zr_size; /* points to znode->z_size */
+ uint_t *zr_blksz; /* points to znode->z_blksz */
+ uint64_t *zr_max_blksz; /* points to zsb->z_max_blksz */
+} zfs_rlock_t;
+
typedef struct rl {
- znode_t *r_zp; /* znode this lock applies to */
+ zfs_rlock_t *r_zrl;
avl_node_t r_node; /* avl node link */
uint64_t r_off; /* file range offset */
uint64_t r_len; /* file range length */
* is converted to RL_WRITER that specified to lock from the start of the
* end of file. Returns the range lock structure.
*/
-rl_t *zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type);
+rl_t *zfs_range_lock(zfs_rlock_t *zrl, uint64_t off, uint64_t len,
+ rl_type_t type);
/* Unlock range and destroy range lock structure. */
void zfs_range_unlock(rl_t *rl);
*/
int zfs_range_compare(const void *arg1, const void *arg2);
+static inline void
+zfs_rlock_init(zfs_rlock_t *zrl)
+{
+ mutex_init(&zrl->zr_mutex, NULL, MUTEX_DEFAULT, NULL);
+ avl_create(&zrl->zr_avl, zfs_range_compare,
+ sizeof (rl_t), offsetof(rl_t, r_node));
+ zrl->zr_size = NULL;
+ zrl->zr_blksz = NULL;
+ zrl->zr_max_blksz = NULL;
+}
+
+static inline void
+zfs_rlock_destroy(zfs_rlock_t *zrl)
+{
+ avl_destroy(&zrl->zr_avl);
+ mutex_destroy(&zrl->zr_mutex);
+}
#endif /* _KERNEL */
#ifdef __cplusplus
#include <sys/rrwlock.h>
#include <sys/zfs_sa.h>
#include <sys/zfs_stat.h>
+#include <sys/zfs_rlock.h>
#endif
#include <sys/zfs_acl.h>
#include <sys/zil.h>
krwlock_t z_parent_lock; /* parent lock for directories */
krwlock_t z_name_lock; /* "master" lock for dirent locks */
zfs_dirlock_t *z_dirlocks; /* directory entry lock list */
- kmutex_t z_range_lock; /* protects changes to z_range_avl */
- avl_tree_t z_range_avl; /* avl tree of file range locks */
+ zfs_rlock_t z_range_lock; /* file range lock */
uint8_t z_unlinked; /* file has been unlinked */
uint8_t z_atime_dirty; /* atime needs to be synced */
uint8_t z_zn_prefetch; /* Prefetch znodes? */
zfs_acl_t *z_acl_cached; /* cached acl */
krwlock_t z_xattr_lock; /* xattr data lock */
nvlist_t *z_xattr_cached; /* cached xattrs */
- struct znode *z_xattr_parent; /* xattr parent znode */
list_node_t z_link_node; /* all znodes in fs link */
sa_handle_t *z_sa_hdl; /* handle to sa data */
boolean_t z_is_sa; /* are we native sa? */
- boolean_t z_is_zvol; /* are we used by the zvol */
boolean_t z_is_mapped; /* are we mmap'ed */
boolean_t z_is_ctldir; /* are we .zfs entry */
boolean_t z_is_stale; /* are we stale due to rollback? */
extern const struct file_operations zpl_fops_shares;
extern const struct inode_operations zpl_ops_shares;
-#ifdef HAVE_VFS_ITERATE
+#if defined(HAVE_VFS_ITERATE) || defined(HAVE_VFS_ITERATE_SHARED)
#define DIR_CONTEXT_INIT(_dirent, _actor, _pos) { \
.actor = _actor, \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
Name: libzfs
Description: LibZFS library
-Version: 0.6.5.7
+Version: 0.6.5.8
URL: http://zfsonlinux.org
Requires: libzfs_core
Cflags: -I${includedir}/libzfs -I${includedir}/libspl
Name: libzfs_core
Description: LibZFS core library
-Version: 0.6.5.7
+Version: 0.6.5.8
URL: http://zfsonlinux.org
Cflags: -I${includedir}/libzfs -I${includedir}/libspl
Libs: -L${libdir} -lzfs_core
}
if (recursive) {
-
parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name);
if (parentname == NULL) {
ret = -1;
ret = -1;
goto error;
}
-
- } else {
+ } else if (zhp->zfs_type != ZFS_TYPE_SNAPSHOT) {
if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, 0,
force_unmount ? MS_FORCE : 0)) == NULL)
return (-1);
* On failure, we still want to remount any filesystems that
* were previously mounted, so we don't alter the system state.
*/
- if (!recursive)
+ if (cl != NULL)
(void) changelist_postfix(cl);
} else {
- if (!recursive) {
+ if (cl != NULL) {
changelist_rename(cl, zfs_get_name(zhp), target);
ret = changelist_postfix(cl);
}
}
error:
- if (parentname) {
+ if (parentname != NULL) {
free(parentname);
}
- if (zhrp) {
+ if (zhrp != NULL) {
zfs_close(zhrp);
}
- if (cl) {
+ if (cl != NULL) {
changelist_free(cl);
}
return (ret);
}
/* Prefer paths earlier in the search order. */
- if (best->ne_num_labels == best->ne_num_labels &&
+ if (ne->ne_num_labels == best->ne_num_labels &&
ne->ne_order < best->ne_order) {
best = ne;
continue;
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014 by Delphix. All rights reserved.
*/
/*
if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
return (0);
- if ((ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) {
- (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
- dgettext(TEXT_DOMAIN, "cannot share '%s': %s"),
- zfs_get_name(zhp), sa_errorstr(ret));
- return (-1);
- }
-
for (curr_proto = proto; *curr_proto != PROTO_END; curr_proto++) {
/*
* Return success if there are no share options.
strcmp(shareopts, "off") == 0)
continue;
+ ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API);
+ if (ret != SA_OK) {
+ (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
+ dgettext(TEXT_DOMAIN, "cannot share '%s': %s"),
+ zfs_get_name(zhp), sa_errorstr(ret));
+ return (-1);
+ }
+
/*
* If the 'zoned' property is set, then zfs_is_mountable()
* will have already bailed out if we are in the global zone.
if (gotb)
return (1);
- return (strcmp(zfs_get_name(a), zfs_get_name(b)));
+ return (strcmp(zfs_get_name(*za), zfs_get_name(*zb)));
}
/*
"one or more devices are already in use\n"));
(void) zfs_error(hdl, EZFS_BADDEV, desc);
break;
-
+ case ENAMETOOLONG:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "new name of at least one dataset is longer than "
+ "the maximum allowable length"));
+ (void) zfs_error(hdl, EZFS_NAMETOOLONG, desc);
+ break;
default:
(void) zpool_standard_error(hdl, error, desc);
zpool_explain_recover(hdl,
continue;
}
- if (cbp->cb_columns[i + 1] == GET_COL_NONE)
+ if (i == (ZFS_GET_NCOLS - 1) ||
+ cbp->cb_columns[i + 1] == GET_COL_NONE)
(void) printf("%s", str);
else if (cbp->cb_scripted)
(void) printf("%s\t", str);
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
.sp
.LP
+.sp
+.ne 2
+.na
+\fBignore_hole_birth\fR (int)
+.ad
+.RS 12n
+When set, the hole_birth optimization will not be used, and all holes will
+always be sent on zfs send. Useful if you suspect your datasets are affected
+by a bug in hole_birth.
+.sp
+Use \fB1\fR (default) for on and \fB0\fR for off.
+.RE
+
.sp
.ne 2
.na
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
+++ /dev/null
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x51198477, "module_layout" },
- { 0xbc32eee7, "spl_panic" },
- { 0xe52592a, "panic" },
- { 0xb4390f9a, "mcount" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl";
-
-
-MODULE_INFO(srcversion, "C188A8AF7758C6D5506AE88");
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
*/
#include <sys/stropts.h>
#define NVPAIR2I_NVP(nvp) \
((i_nvp_t *)((size_t)(nvp) - offsetof(i_nvp_t, nvi_nvp)))
+#ifdef _KERNEL
+int nvpair_max_recursion = 20;
+#else
+int nvpair_max_recursion = 100;
+#endif
int
nv_alloc_init(nv_alloc_t *nva, const nv_alloc_ops_t *nvo, /* args */ ...)
const nvs_ops_t *nvs_ops;
void *nvs_private;
nvpriv_t *nvs_priv;
+ int nvs_recursion;
} nvstream_t;
/*
nvs_embedded(nvstream_t *nvs, nvlist_t *embedded)
{
switch (nvs->nvs_op) {
- case NVS_OP_ENCODE:
- return (nvs_operation(nvs, embedded, NULL));
+ case NVS_OP_ENCODE: {
+ int err;
+ if (nvs->nvs_recursion >= nvpair_max_recursion)
+ return (EINVAL);
+ nvs->nvs_recursion++;
+ err = nvs_operation(nvs, embedded, NULL);
+ nvs->nvs_recursion--;
+ return (err);
+ }
case NVS_OP_DECODE: {
nvpriv_t *priv;
int err;
nvlist_init(embedded, embedded->nvl_nvflag, priv);
+ if (nvs->nvs_recursion >= nvpair_max_recursion)
+ return (EINVAL);
+ nvs->nvs_recursion++;
if ((err = nvs_operation(nvs, embedded, NULL)) != 0)
nvlist_free(embedded);
+ nvs->nvs_recursion--;
return (err);
}
default:
return (EINVAL);
nvs.nvs_op = nvs_op;
+ nvs.nvs_recursion = 0;
/*
* For NVS_OP_ENCODE and NVS_OP_DECODE make sure an nvlist and
+++ /dev/null
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x51198477, "module_layout" },
- { 0x349cba85, "strchr" },
- { 0x25ec1b28, "strlen" },
- { 0xab140103, "spl_kmem_alloc" },
- { 0xbc32eee7, "spl_panic" },
- { 0xe2d5255a, "strcmp" },
- { 0xde0bdcff, "memset" },
- { 0xb4390f9a, "mcount" },
- { 0x85abc85f, "strncmp" },
- { 0xdae80439, "spl_vmem_alloc" },
- { 0x82fe53e1, "ddi_strtol" },
- { 0xddd4a3d3, "xdrmem_create" },
- { 0xa3a5be95, "memmove" },
- { 0x80c3f220, "spl_kmem_free" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl";
-
-
-MODULE_INFO(srcversion, "3BD67F56FE7BC46673DD6A6");
+++ /dev/null
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x51198477, "module_layout" },
- { 0x25ec1b28, "strlen" },
- { 0xe2d5255a, "strcmp" },
- { 0xb4390f9a, "mcount" },
- { 0x85abc85f, "strncmp" },
- { 0xf0fdf6cb, "__stack_chk_fail" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=";
-
-
-MODULE_INFO(srcversion, "5DC8CE3A830A36341CDAF7F");
+++ /dev/null
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x51198477, "module_layout" },
- { 0x4c4fef19, "kernel_stack" },
- { 0x25ec1b28, "strlen" },
- { 0xab140103, "spl_kmem_alloc" },
- { 0x167e7f9d, "__get_user_1" },
- { 0xbc32eee7, "spl_panic" },
- { 0xe2d5255a, "strcmp" },
- { 0x4f8b5ddb, "_copy_to_user" },
- { 0xee8843fa, "nvpair_value_uint64" },
- { 0x11089ac7, "_ctype" },
- { 0xa1c76e0a, "_cond_resched" },
- { 0xb4390f9a, "mcount" },
- { 0x85abc85f, "strncmp" },
- { 0x9ca95a0e, "sort" },
- { 0xd42a96fa, "nvpair_name" },
- { 0x1bfac311, "nvlist_lookup_nvlist" },
- { 0x5d6e0bba, "nvlist_lookup_uint64" },
- { 0xd0920999, "nvpair_value_uint32" },
- { 0x29c88b11, "nvlist_next_nvpair" },
- { 0x82027a4c, "cmn_err" },
- { 0x50720c5f, "snprintf" },
- { 0xec1cce40, "nvlist_lookup_nvlist_array" },
- { 0xa3a5be95, "memmove" },
- { 0x80c3f220, "spl_kmem_free" },
- { 0x4f6b400b, "_copy_from_user" },
- { 0xa66a6969, "nvpair_value_nvlist" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl,znvpair";
-
-
-MODULE_INFO(srcversion, "D94B05FC2B3769899B59647");
l2arc_buf_hdr_t *l2hdr = NULL;
arc_state_t *state = NULL;
+ memset(abi, 0, sizeof (arc_buf_info_t));
+
+ if (hdr == NULL)
+ return;
+
+ abi->abi_flags = hdr->b_flags;
+
if (HDR_HAS_L1HDR(hdr)) {
l1hdr = &hdr->b_l1hdr;
state = l1hdr->b_state;
if (HDR_HAS_L2HDR(hdr))
l2hdr = &hdr->b_l2hdr;
- memset(abi, 0, sizeof (arc_buf_info_t));
- abi->abi_flags = hdr->b_flags;
-
if (l1hdr) {
abi->abi_datacnt = l1hdr->b_datacnt;
abi->abi_access = l1hdr->b_arc_access;
if (func != NULL)
func(ap->p_adjust, ap->p_private);
- /* Callback unregistered concurrently with execution */
- if (refcount_remove(&ap->p_refcnt, func) == 0) {
- ASSERT(!list_link_active(&ap->p_node));
- refcount_destroy(&ap->p_refcnt);
- kmem_free(ap, sizeof (*ap));
- }
+ refcount_remove(&ap->p_refcnt, func);
}
/*
/*
* Gracefully handle a damaged logical block size as a
- * checksum error by passing a dummy zio to the done callback.
+ * checksum error.
*/
if (size > spa_maxblocksize(spa)) {
- if (done) {
- rzio = zio_null(pio, spa, NULL,
- NULL, NULL, zio_flags);
- rzio->io_error = ECKSUM;
- done(rzio, buf, private);
- zio_nowait(rzio);
- }
- rc = ECKSUM;
+ ASSERT3P(buf, ==, NULL);
+ rc = SET_ERROR(ECKSUM);
goto out;
}
void
arc_remove_prune_callback(arc_prune_t *p)
{
+ boolean_t wait = B_FALSE;
mutex_enter(&arc_prune_mtx);
list_remove(&arc_prune_list, p);
- if (refcount_remove(&p->p_refcnt, &arc_prune_list) == 0) {
- refcount_destroy(&p->p_refcnt);
- kmem_free(p, sizeof (*p));
- }
+ if (refcount_remove(&p->p_refcnt, &arc_prune_list) > 0)
+ wait = B_TRUE;
mutex_exit(&arc_prune_mtx);
+
+ /* wait for arc_prune_task to finish */
+ if (wait)
+ taskq_wait_outstanding(arc_prune_taskq, 0);
+ ASSERT0(refcount_count(&p->p_refcnt));
+ refcount_destroy(&p->p_refcnt);
+ kmem_free(p, sizeof (*p));
}
void
arc_c_max = zfs_arc_max;
arc_c = arc_c_max;
arc_p = (arc_c >> 1);
- arc_meta_limit = MIN(arc_meta_limit, arc_c_max);
+ arc_meta_limit = MIN(arc_meta_limit, (3 * arc_c_max) / 4);
}
/* Valid range: 32M - <arc_c_max> */
if (db->db_blkid == DMU_SPILL_BLKID) {
mutex_enter(&dn->dn_mtx);
+ if (!(dn->dn_phys->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) {
+ /*
+ * In the previous transaction group, the bonus buffer
+ * was entirely used to store the attributes for the
+ * dnode which overrode the dn_spill field. However,
+ * when adding more attributes to the file a spill
+ * block was required to hold the extra attributes.
+ *
+ * Make sure to clear the garbage left in the dn_spill
+ * field from the previous attributes in the bonus
+ * buffer. Otherwise, after writing out the spill
+ * block to the new allocated dva, it will free
+ * the old block pointed to by the invalid dn_spill.
+ */
+ db->db_blkptr = NULL;
+ }
dn->dn_phys->dn_flags |= DNODE_FLAG_SPILL_BLKPTR;
mutex_exit(&dn->dn_mtx);
}
}
mutex_enter(&db->db_mtx);
- mutex_exit(DBUF_HASH_MUTEX(h, dsh->idx));
if (db->db_state != DB_EVICTING) {
length = __dbuf_stats_hash_table_data(buf, size, db);
}
mutex_exit(&db->db_mtx);
- mutex_enter(DBUF_HASH_MUTEX(h, dsh->idx));
}
mutex_exit(DBUF_HASH_MUTEX(h, dsh->idx));
#include <sys/zfeature.h>
int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */
+int32_t ignore_hole_birth = 1;
typedef struct prefetch_data {
kmutex_t pd_mtx;
*
* Note that the meta-dnode cannot be reallocated.
*/
- if ((!td->td_realloc_possible ||
+ if (!ignore_hole_birth && (!td->td_realloc_possible ||
zb->zb_object == DMU_META_DNODE_OBJECT) &&
td->td_hole_birth_enabled_txg <= td->td_min_txg)
return (0);
module_param(zfs_pd_bytes_max, int, 0644);
MODULE_PARM_DESC(zfs_pd_bytes_max, "Max number of bytes to prefetch");
+
+module_param(ignore_hole_birth, int, 0644);
+MODULE_PARM_DESC(ignore_hole_birth, "Ignore hole_birth txg for send");
#endif
}
}
+int
+dsl_dataset_namelen(dsl_dataset_t *ds)
+{
+ int len;
+ VERIFY0(dsl_dataset_get_snapname(ds));
+ mutex_enter(&ds->ds_lock);
+ len = dsl_dir_namelen(ds->ds_dir) + 1 + strlen(ds->ds_snapname);
+ mutex_exit(&ds->ds_lock);
+ return (len);
+}
+
void
dsl_dataset_rele(dsl_dataset_t *ds, void *tag)
{
int err;
dsl_pool_t *dp = dsl_pool_open_impl(spa, txg);
+ /*
+ * Initialize the caller's dsl_pool_t structure before we actually open
+ * the meta objset. This is done because a self-healing write zio may
+ * be issued as part of dmu_objset_open_impl() and the spa needs its
+ * dsl_pool_t initialized in order to handle the write.
+ */
+ *dpp = dp;
+
err = dmu_objset_open_impl(spa, NULL, &dp->dp_meta_rootbp,
&dp->dp_meta_objset);
- if (err != 0)
+ if (err != 0) {
dsl_pool_close(dp);
- else
- *dpp = dp;
+ *dpp = NULL;
+ }
return (err);
}
return (0);
}
+/* ARGSUSED */
+int
+verify_dataset_name_len(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg)
+{
+ if (dsl_dataset_namelen(ds) >= ZFS_MAX_DATASET_NAME_LEN)
+ return (SET_ERROR(ENAMETOOLONG));
+
+ return (0);
+}
+
static int
spa_load_verify(spa_t *spa)
{
if (policy.zrp_request & ZPOOL_NEVER_REWIND)
return (0);
+ dsl_pool_config_enter(spa->spa_dsl_pool, FTAG);
+ error = dmu_objset_find_dp(spa->spa_dsl_pool,
+ spa->spa_dsl_pool->dp_root_dir_obj, verify_dataset_name_len, NULL,
+ DS_FIND_CHILDREN);
+ dsl_pool_config_exit(spa->spa_dsl_pool, FTAG);
+ if (error != 0)
+ return (error);
+
rio = zio_root(spa, NULL, &sle,
ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE);
VERIFY(nvlist_pack(nvl, &buf, &buflen, NV_ENCODE_XDR,
KM_SLEEP) == 0);
-#ifdef __linux__
+#if defined(__linux__) && defined(_KERNEL)
/*
* Write the configuration to disk. Due to the complexity involved
* in performing a rename from within the kernel the file is truncated
*/
(void) snprintf(temp, MAXPATHLEN, "%s.tmp", dp->scd_path);
- if (vn_open(temp, UIO_SYSSPACE, oflags, 0644, &vp, CRCREAT, 0) == 0) {
+ error = vn_open(temp, UIO_SYSSPACE, oflags, 0644, &vp, CRCREAT, 0);
+ if (error == 0) {
if (vn_rdwr(UIO_WRITE, vp, buf, buflen, 0, UIO_SYSSPACE,
0, RLIM64_INFINITY, kcred, NULL) == 0 &&
VOP_FSYNC(vp, FSYNC, kcred, NULL) == 0) {
ASSERT(oldc <= newc);
- mspp = kmem_zalloc(newc * sizeof (*mspp), KM_SLEEP);
+ mspp = vmem_zalloc(newc * sizeof (*mspp), KM_SLEEP);
if (oldc != 0) {
bcopy(vd->vdev_ms, mspp, oldc * sizeof (*mspp));
- kmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
+ vmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
}
vd->vdev_ms = mspp;
if (msp != NULL)
metaslab_fini(msp);
}
- kmem_free(vd->vdev_ms, count * sizeof (metaslab_t *));
+ vmem_free(vd->vdev_ms, count * sizeof (metaslab_t *));
vd->vdev_ms = NULL;
}
spa_last_synced_txg(spa) : -1ULL;
if ((label = vdev_label_read_config(vd, txg)) == NULL) {
- vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
+ vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_BAD_LABEL);
return (0);
}
/*
* If the vdev was resilvering and no longer has any
- * DTLs then reset its resilvering flag.
+ * DTLs then reset its resilvering flag and dirty
+ * the top level so that we persist the change.
*/
if (vd->vdev_resilver_txg != 0 &&
range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0 &&
- range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0)
+ range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) {
vd->vdev_resilver_txg = 0;
+ vdev_config_dirty(vd->vdev_top);
+ }
mutex_exit(&vd->vdev_dtl_lock);
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)
+{
+#ifdef HAVE_1ARG_SUBMIT_BIO
+ submit_bio(bio);
+#else
+ submit_bio(0, bio);
+#endif
+}
+
static inline void
-vdev_submit_bio(int rw, struct bio *bio)
+vdev_submit_bio(struct bio *bio)
{
#ifdef HAVE_CURRENT_BIO_TAIL
struct bio **bio_tail = current->bio_tail;
current->bio_tail = NULL;
- submit_bio(rw, bio);
+ vdev_submit_bio_impl(bio);
current->bio_tail = bio_tail;
#else
struct bio_list *bio_list = current->bio_list;
current->bio_list = NULL;
- submit_bio(rw, bio);
+ vdev_submit_bio_impl(bio);
current->bio_list = bio_list;
#endif
}
static int
__vdev_disk_physio(struct block_device *bdev, zio_t *zio, caddr_t kbuf_ptr,
- size_t kbuf_size, uint64_t kbuf_offset, int flags, int wait)
+ size_t kbuf_size, uint64_t kbuf_offset, int rw, int flags, int wait)
{
dio_request_t *dr;
caddr_t bio_ptr;
uint64_t bio_offset;
- int rw, bio_size, bio_count = 16;
+ int bio_size, bio_count = 16;
int i = 0, error = 0;
ASSERT3U(kbuf_offset + kbuf_size, <=, bdev->bd_inode->i_size);
if (zio && !(zio->io_flags & (ZIO_FLAG_IO_RETRY | ZIO_FLAG_TRYHARD)))
bio_set_flags_failfast(bdev, &flags);
- rw = flags;
dr->dr_zio = zio;
dr->dr_wait = wait;
dr->dr_bio[i]->bi_bdev = bdev;
BIO_BI_SECTOR(dr->dr_bio[i]) = bio_offset >> 9;
- dr->dr_bio[i]->bi_rw = rw;
dr->dr_bio[i]->bi_end_io = vdev_disk_physio_completion;
dr->dr_bio[i]->bi_private = dr;
+ bio_set_op_attrs(dr->dr_bio[i], rw, flags);
/* Remaining size is returned to become the new size */
bio_size = bio_map(dr->dr_bio[i], bio_ptr, bio_size);
/* Submit all bio's associated with this dio */
for (i = 0; i < dr->dr_bio_count; i++)
if (dr->dr_bio[i])
- vdev_submit_bio(rw, dr->dr_bio[i]);
+ vdev_submit_bio(dr->dr_bio[i]);
/*
* On synchronous blocking requests we wait for all bio the completion
int
vdev_disk_physio(struct block_device *bdev, caddr_t kbuf,
- size_t size, uint64_t offset, int flags)
+ size_t size, uint64_t offset, int rw, int flags)
{
bio_set_flags_failfast(bdev, &flags);
- return (__vdev_disk_physio(bdev, NULL, kbuf, size, offset, flags, 1));
+ return (__vdev_disk_physio(bdev, NULL, kbuf, size, offset, rw, flags,
+ 1));
}
BIO_END_IO_PROTO(vdev_disk_io_flush_completion, bio, rc)
bio->bi_private = zio;
bio->bi_bdev = bdev;
zio->io_delay = jiffies_64;
- vdev_submit_bio(VDEV_WRITE_FLUSH_FUA, bio);
+ bio_set_op_attrs(bio, 0, VDEV_WRITE_FLUSH_FUA);
+ vdev_submit_bio(bio);
invalidate_bdev(bdev);
return (0);
vdev_t *v = zio->io_vd;
vdev_disk_t *vd = v->vdev_tsd;
zio_priority_t pri = zio->io_priority;
- int flags, error;
+ int rw, flags, error;
switch (zio->io_type) {
case ZIO_TYPE_IOCTL:
zio_execute(zio);
return;
case ZIO_TYPE_WRITE:
+ rw = WRITE;
if ((pri == ZIO_PRIORITY_SYNC_WRITE) && (v->vdev_nonrot))
flags = WRITE_SYNC;
else
- flags = WRITE;
+ flags = 0;
break;
case ZIO_TYPE_READ:
+ rw = READ;
if ((pri == ZIO_PRIORITY_SYNC_READ) && (v->vdev_nonrot))
flags = READ_SYNC;
else
- flags = READ;
+ flags = 0;
break;
default:
}
error = __vdev_disk_physio(vd->vd_bdev, zio, zio->io_data,
- zio->io_size, zio->io_offset, flags, 0);
+ zio->io_size, zio->io_offset, rw, flags, 0);
if (error) {
zio->io_error = error;
zio_interrupt(zio);
/* read vdev label */
offset = vdev_label_offset(size, i, 0);
if (vdev_disk_physio(bdev, (caddr_t)label,
- VDEV_SKIP_SIZE + VDEV_PHYS_SIZE, offset, READ_SYNC) != 0)
+ VDEV_SKIP_SIZE + VDEV_PHYS_SIZE, offset, READ,
+ REQ_SYNC) != 0)
continue;
if (nvlist_unpack(label->vl_vdev_phys.vp_nvlist,
vdev_queue_max_async_writes(spa_t *spa)
{
int writes;
- uint64_t dirty = spa->spa_dsl_pool->dp_dirty_total;
+ uint64_t dirty = 0;
+ dsl_pool_t *dp = spa_get_dsl(spa);
uint64_t min_bytes = zfs_dirty_data_max *
zfs_vdev_async_write_active_min_dirty_percent / 100;
uint64_t max_bytes = zfs_dirty_data_max *
zfs_vdev_async_write_active_max_dirty_percent / 100;
+ /*
+ * Async writes may occur before the assignment of the spa's
+ * dsl_pool_t if a self-healing zio is issued prior to the
+ * completion of dmu_objset_open_impl().
+ */
+ if (dp == NULL)
+ return (zfs_vdev_async_write_max_active);
+
/*
* Sync tasks correspond to interactive user actions. To reduce the
* execution time of those actions we push data out as fast as possible.
*/
- if (spa_has_pending_synctask(spa)) {
+ if (spa_has_pending_synctask(spa))
return (zfs_vdev_async_write_max_active);
- }
+ dirty = dp->dp_dirty_total;
if (dirty < min_bytes)
return (zfs_vdev_async_write_min_active);
if (dirty > max_bytes)
+++ /dev/null
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x51198477, "module_layout" },
- { 0xdd4acab1, "vn_fsync" },
- { 0x9937746a, "d_path" },
- { 0x13be9977, "nvlist_add_boolean_array" },
- { 0x9a1dfd65, "strpbrk" },
- { 0xb7d1325e, "nvlist_add_int32" },
- { 0x6cc650a4, "zfs_prop_get_type" },
- { 0x6ae12453, "__kstat_install" },
- { 0x1c90ea0e, "nvlist_add_int64" },
- { 0x36198a4d, "nvpair_value_string" },
- { 0x405c1144, "get_seconds" },
- { 0x8d8996ce, "z_uncompress" },
- { 0x4c327173, "alloc_disk" },
- { 0x34eccc79, "generic_getxattr" },
- { 0x8b484c4c, "fnvlist_lookup_nvpair" },
- { 0xcf47e212, "fnvlist_add_int32" },
- { 0x26b64321, "call_usermodehelper_setfns" },
- { 0xf5893abf, "up_read" },
- { 0x8f20556d, "blk_cleanup_queue" },
- { 0xaada9d55, "zfs_prop_init" },
- { 0xb41ea00a, "nvlist_add_uint8_array" },
- { 0xeae36f92, "blk_queue_io_opt" },
- { 0xdc89486b, "zfs_name_to_prop" },
- { 0xdb347c7a, "call_usermodehelper_exec" },
- { 0x3a3b4efc, "generic_file_llseek" },
- { 0xda48c2e6, "__mark_inode_dirty" },
- { 0xd4bf55ff, "u8_validate" },
- { 0x3228f0a3, "d_invalidate" },
- { 0x21b5a134, "__set_page_dirty_nobuffers" },
- { 0xf2f1ef64, "fnvlist_alloc" },
- { 0xadaabe1b, "pv_lock_ops" },
- { 0x349cba85, "strchr" },
- { 0x9191a98c, "nvlist_add_uint32_array" },
- { 0xce291afa, "bio_alloc" },
- { 0x150ddbd2, "kstat_runq_enter" },
- { 0x370dbc79, "__remove_inode_hash" },
- { 0x2fe3ab3e, "get_gendisk" },
- { 0x3ec8886f, "param_ops_int" },
- { 0x1403a15e, "taskq_member" },
- { 0xb0364551, "zio_arena" },
- { 0xf5dea0d6, "nvpair_value_int64_array" },
- { 0x25ec1b28, "strlen" },
- { 0xd0ee38b8, "schedule_timeout_uninterruptible" },
- { 0x8205f265, "crhold" },
- { 0x3a9b6fb9, "blk_unregister_region" },
- { 0xb37f3106, "d_set_d_op" },
- { 0xaaf57193, "blk_queue_max_hw_sectors" },
- { 0x1efe1f66, "vn_close" },
- { 0xa6867664, "filemap_write_and_wait_range" },
- { 0x4ff1c9bc, "populate_rootfs_wait" },
- { 0x16916efb, "nvlist_prev_nvpair" },
- { 0x19295e53, "taskq_create" },
- { 0x1ba29031, "zfs_component_namecheck" },
- { 0xffc19dde, "elevator_change" },
- { 0x89a7204c, "kill_anon_super" },
- { 0x3f38bd50, "crgetruid" },
- { 0x6a4152d5, "nvlist_add_uint64" },
- { 0x6363ef50, "fnvlist_pack_free" },
- { 0xd0799edd, "posix_acl_to_xattr" },
- { 0xd14a7eb5, "vn_getattr" },
- { 0xed8dac48, "nvlist_pack" },
- { 0xbd100793, "cpu_online_mask" },
- { 0x79aa04a2, "get_random_bytes" },
- { 0x67053080, "current_kernel_time" },
- { 0xf4f0a175, "avl_nearest" },
- { 0xab140103, "spl_kmem_alloc" },
- { 0x5d16cdc5, "nvlist_exists" },
- { 0xd0bd878, "seq_puts" },
- { 0x80c478fd, "rootdir" },
- { 0xa850554e, "vn_seek" },
- { 0x73a78bc4, "downgrade_write" },
- { 0xcb98e344, "truncate_inode_pages_range" },
- { 0x2e93154b, "generic_file_open" },
- { 0xacf4d843, "match_strdup" },
- { 0xffff91e3, "taskq_init_ent" },
- { 0x3f69d73b, "test_set_page_writeback" },
- { 0xefc4da17, "kobj_close_file" },
- { 0xcf24ceff, "nvlist_remove" },
- { 0xcd69282b, "__lock_page" },
- { 0xb54533f7, "usecs_to_jiffies" },
- { 0x581b3ff3, "zpool_prop_get_type" },
- { 0xa483a8c3, "zfs_prop_to_name" },
- { 0x63bdf5f0, "crgetngroups" },
- { 0xf7fb002a, "kobj_get_filesize" },
- { 0xd6f70ea0, "nvlist_empty" },
- { 0x187c0510, "nvpair_value_int64" },
- { 0x21a7d814, "seq_printf" },
- { 0xac095684, "zfs_prop_inheritable" },
- { 0xb6c2717d, "fnvlist_lookup_uint64" },
- { 0x44e9a829, "match_token" },
- { 0x582829a0, "avl_last" },
- { 0xf4e84391, "nvlist_add_nvlist" },
- { 0xb205e7ee, "nvpair_value_uint16_array" },
- { 0x8e4c2658, "crgetgroups" },
- { 0x7cb40d78, "avl_insert_here" },
- { 0xf3e29ae0, "zpool_prop_to_name" },
- { 0x64913468, "nvpair_value_uint8_array" },
- { 0x305105e, "end_writeback" },
- { 0xba2adaf, "mutex_unlock" },
- { 0x407478e1, "nvpair_value_uint32_array" },
- { 0x85df9b6c, "strsep" },
- { 0xccc94e8, "nvlist_lookup_string" },
- { 0x4704f678, "vn_rdwr" },
- { 0xb05ef89e, "fnvlist_add_uint64" },
- { 0x80336cc4, "generic_read_dir" },
- { 0x1083f24f, "zfs_prop_valid_for_type" },
- { 0x5be9e34a, "zfs_prop_setonce" },
- { 0x76e8f609, "igrab" },
- { 0x76ad2c09, "fnvlist_size" },
- { 0x58b765b9, "pool_namecheck" },
- { 0x47c7b0d2, "cpu_number" },
- { 0x75fb8325, "generic_setxattr" },
- { 0xafe82e10, "strcspn" },
- { 0x3b251083, "mount_nodev" },
- { 0x84000109, "path_get" },
- { 0xa5894c2a, "redirty_page_for_writepage" },
- { 0x91715312, "sprintf" },
- { 0x8eb0a41f, "tsd_destroy" },
- { 0xb8e71471, "spl_kmem_cache_free" },
- { 0xbc32eee7, "spl_panic" },
- { 0xcc13e034, "nv_alloc_init" },
- { 0x50ea1952, "nvlist_add_int16_array" },
- { 0x7d11c268, "jiffies" },
- { 0x6ccdbacb, "lookup_bdev" },
- { 0x6fba9cae, "truncate_setsize" },
- { 0x31eb4278, "mutex_trylock" },
- { 0x57a6ccd0, "down_read" },
- { 0xe2d5255a, "strcmp" },
- { 0x35225ea3, "down_write_trylock" },
- { 0xb3d0550d, "end_page_writeback" },
- { 0x8a4cbe5a, "cv_timedwait_hires" },
- { 0xde9360ba, "totalram_pages" },
- { 0xaa65a555, "kmem_asprintf" },
- { 0x42585bc5, "nvlist_add_string_array" },
- { 0x1d06c4ac, "u8_strcmp" },
- { 0xd416eac3, "nvlist_xalloc" },
- { 0xcfb24408, "nvpair_value_int32" },
- { 0x786ba98a, "crgetuid" },
- { 0xf2cb0b79, "uio_prefaultpages" },
- { 0xba3e2d71, "zone_get_hostid" },
- { 0xd1bf81d6, "invalidate_bdev" },
- { 0x6395be94, "__init_waitqueue_head" },
- { 0x4f8b5ddb, "_copy_to_user" },
- { 0x3c7cdc13, "avl_remove" },
- { 0x528f1f4e, "nvpair_value_int8_array" },
- { 0xe24d3a97, "jiffies_64" },
- { 0xee8843fa, "nvpair_value_uint64" },
- { 0xc98d2e5d, "blk_queue_max_segments" },
- { 0x106b6ba8, "taskq_destroy" },
- { 0x6d0aba34, "wait_for_completion" },
- { 0x72aa82c6, "param_ops_charp" },
- { 0xb11fa1ce, "strlcat" },
- { 0x45fe0d68, "inode_owner_or_capable" },
- { 0x114258fb, "misc_register" },
- { 0x7023fd74, "zfs_spa_version_map" },
- { 0x66cb0ee2, "nvpair_value_uint64_array" },
- { 0xaba3870c, "kern_path" },
- { 0xde0bdcff, "memset" },
- { 0x8b78128, "spl_kmem_cache_destroy" },
- { 0xbd256438, "nvlist_lookup_nvpair" },
- { 0x81c1c2b2, "vmem_size" },
- { 0xbc9dddde, "taskq_wait_id" },
- { 0x4f6584e1, "vn_getf" },
- { 0x516b8b85, "nvlist_add_int8_array" },
- { 0x79a0ecea, "d_add_ci" },
- { 0xc810362f, "strdup" },
- { 0x852e6c79, "blk_alloc_queue" },
- { 0x26cd2d80, "fnvlist_num_pairs" },
- { 0x22c35c6c, "fnvpair_value_nvlist" },
- { 0xe9ba039d, "avl_destroy" },
- { 0x11089ac7, "_ctype" },
- { 0xd9977d8, "fletcher_4_incremental_native" },
- { 0x8f64aa4, "_raw_spin_unlock_irqrestore" },
- { 0x69371301, "current_task" },
- { 0x143fcac6, "__cv_signal" },
- { 0x7b6047b1, "avl_numnodes" },
- { 0x6127b911, "kstat_waitq_exit" },
- { 0x882c1dc4, "check_disk_change" },
- { 0x2d004b80, "current_fs_time" },
- { 0x87ebeb76, "__mutex_init" },
- { 0x27e1a049, "printk" },
- { 0xeba677bd, "posix_acl_chmod" },
- { 0x30da4fbf, "fnvlist_free" },
- { 0xe6b9d3c4, "find_lock_page" },
- { 0xeb69fdd8, "d_obtain_alias" },
- { 0x2fa5a500, "memcmp" },
- { 0x90cc07c8, "blk_queue_max_discard_sectors" },
- { 0x9d9024f7, "del_gendisk" },
- { 0x68a9f991, "nvlist_add_uint16_array" },
- { 0xa4cec62, "nv_fixed_ops" },
- { 0x6a36f138, "zpool_prop_feature" },
- { 0xd04b4649, "crgetfsgid" },
- { 0xf2048734, "bio_add_page" },
- { 0xe8856dea, "nvlist_remove_nvpair" },
- { 0x35b9d4a6, "nvlist_add_nvlist_array" },
- { 0x75a78768, "nvlist_alloc" },
- { 0xa26a953e, "fletcher_2_byteswap" },
- { 0x27655c15, "zfs_allocatable_devs" },
- { 0xf7eb91ff, "d_alloc_root" },
- { 0xe52592a, "panic" },
- { 0xe2fd64d6, "nvpair_value_hrtime" },
- { 0xa1c76e0a, "_cond_resched" },
- { 0xb940ee11, "taskq_wait" },
- { 0x7ec9bfbc, "strncpy" },
- { 0x70f7c090, "__kstat_set_raw_ops" },
- { 0xb4390f9a, "mcount" },
- { 0x422932ac, "nvlist_lookup_int32" },
- { 0x9e5f923c, "blkdev_get_by_path" },
- { 0x5da5c9c6, "security_inode_init_security" },
- { 0x8b19c37b, "check_disk_size_change" },
- { 0x11edcd4c, "blk_register_region" },
- { 0x85abc85f, "strncmp" },
- { 0x672144bd, "strlcpy" },
- { 0xbf8ba54a, "vprintk" },
- { 0xafe1db9d, "mutex_lock" },
- { 0xe5318fa0, "write_cache_pages" },
- { 0xa340453c, "system_taskq" },
- { 0x13401075, "taskq_dispatch" },
- { 0xc8f88566, "nvpair_value_uint16" },
- { 0x9f1dd1aa, "avl_insert" },
- { 0x732cbdd2, "avl_is_empty" },
- { 0xcb99edb0, "posix_acl_equiv_mode" },
- { 0x5bb6ad4b, "spl_vmem_zalloc" },
- { 0x71a50dbc, "register_blkdev" },
- { 0x9b4571df, "nvpair_value_int32_array" },
- { 0x79cca7cb, "uioskip" },
- { 0x30cc3621, "insert_inode_locked" },
- { 0xb3db5628, "avl_create" },
- { 0xafa476dd, "nvpair_value_int8" },
- { 0x90782bf3, "nvlist_add_string" },
- { 0x13f6f973, "wait_on_page_bit" },
- { 0x5559ab10, "zfs_deleg_whokey" },
- { 0x4223cbc0, "uiocopy" },
- { 0x7a82be45, "unlock_page" },
- { 0x3b4ceb4a, "up_write" },
- { 0x5318e74d, "shrink_dcache_sb" },
- { 0x1ebbfffd, "ddi_copyout" },
- { 0xe6e3b875, "down_write" },
- { 0xcc762837, "kstat_waitq_enter" },
- { 0x52252d43, "get_disk" },
- { 0x6d601403, "crgetgid" },
- { 0x64623de, "kmem_vasprintf" },
- { 0x618628e6, "avl_destroy_nodes" },
- { 0xd16645b6, "fnvlist_add_nvlist" },
- { 0x89f2142a, "nvpair_value_nvlist_array" },
- { 0xdb9e2c22, "posix_acl_create" },
- { 0xd42a96fa, "nvpair_name" },
- { 0x52778ec7, "vcmn_err" },
- { 0x7c0a143, "bio_endio" },
- { 0x920ca817, "bio_put" },
- { 0xf41bf8b5, "generic_removexattr" },
- { 0x1b7b5809, "__cv_broadcast" },
- { 0x3323ccb1, "tsd_get" },
- { 0xfcb16c49, "mark_page_accessed" },
- { 0x180d429, "nvlist_add_int64_array" },
- { 0x53bddca5, "taskq_dispatch_ent" },
- { 0x61651be, "strcat" },
- { 0x27277915, "vm_stat" },
- { 0xd1346eaa, "avl_first" },
- { 0x5cbae8f4, "crgetfsuid" },
- { 0x1bc61496, "nvpair_value_int16_array" },
- { 0xb5a459dc, "unregister_blkdev" },
- { 0x24208ad1, "__cv_wait_io" },
- { 0xb428a99c, "zfs_deleg_verify_nvlist" },
- { 0x87b743ea, "inode_init_once" },
- { 0x1bfac311, "nvlist_lookup_nvlist" },
- { 0x7479525e, "fnvlist_add_uint64_array" },
- { 0x9d9f80c4, "nvlist_free" },
- { 0x5eb99327, "simple_getattr" },
- { 0x50c5246d, "nvlist_add_uint8" },
- { 0x5d6e0bba, "nvlist_lookup_uint64" },
- { 0xaeefe7de, "submit_bio" },
- { 0xc6cbbc89, "capable" },
- { 0x31eaf145, "init_task" },
- { 0xb1c3a01a, "oops_in_progress" },
- { 0x9f984513, "strrchr" },
- { 0x351c2576, "z_compress_level" },
- { 0x901bfc1a, "ilookup" },
- { 0x81376bfd, "vn_remove" },
- { 0xb0030d43, "blkdev_put" },
- { 0xc50bab05, "unregister_shrinker" },
- { 0xe8adb6d8, "nvpair_value_boolean_value" },
- { 0x81483072, "nvlist_add_uint16" },
- { 0x9e3e7c5, "simple_dir_operations" },
- { 0xeaa8f57, "generic_file_mmap" },
- { 0x12a38747, "usleep_range" },
- { 0x6ae07d22, "__cv_wait" },
- { 0x17980bc5, "crfree" },
- { 0x34fdc162, "nvlist_unpack" },
- { 0x62dbf439, "blk_queue_make_request" },
- { 0x1e77f, "nvlist_add_int32_array" },
- { 0x1ef1f75f, "posix_acl_valid" },
- { 0xaeab70e4, "zfs_prop_default_numeric" },
- { 0xfce9b49e, "uiomove" },
- { 0xc54a86a3, "blk_queue_physical_block_size" },
- { 0x10006f1f, "nvlist_lookup_nv_alloc" },
- { 0xf7b48661, "vn_set_pwd" },
- { 0xcb59902f, "nvlist_lookup_byte_array" },
- { 0xf0fdf6cb, "__stack_chk_fail" },
- { 0xb9249d16, "cpu_possible_mask" },
- { 0x3bd1b1f6, "msecs_to_jiffies" },
- { 0xfe56e2a4, "nvpair_value_int16" },
- { 0xcc8e80f8, "kstat_runq_exit" },
- { 0x1000e51, "schedule" },
- { 0x958b84e3, "tsd_create" },
- { 0x667ba081, "spl_kmem_cache_create" },
- { 0x20173f35, "taskq_wait_outstanding" },
- { 0x5295f485, "posix_acl_from_xattr" },
- { 0x85261be0, "__kstat_create" },
- { 0xaebbec7c, "kobj_read_file" },
- { 0x5b2da8a8, "put_disk" },
- { 0xffa90716, "unlock_new_inode" },
- { 0x2bbdb1d2, "nvlist_add_uint32" },
- { 0x6da84db2, "deactivate_super" },
- { 0x7274e02f, "bdi_setup_and_register" },
- { 0x447bea0b, "fnvpair_value_uint64" },
- { 0x2e36ff5c, "nvlist_remove_all" },
- { 0x6dc38171, "fnvlist_add_boolean" },
- { 0xd94959c7, "fletcher_4_native" },
- { 0x5e95b1cd, "current_umask" },
- { 0xb948e867, "zfs_prop_userquota" },
- { 0xd0920999, "nvpair_value_uint32" },
- { 0xc5ca5da8, "nvlist_merge" },
- { 0xdae80439, "spl_vmem_alloc" },
- { 0xdeea79ca, "nvlist_add_int8" },
- { 0xd22ed5e2, "spl_kmem_cache_alloc" },
- { 0x6b63f55e, "heap_arena" },
- { 0x1e60b5ba, "clear_page_dirty_for_io" },
- { 0xc6956d59, "inode_change_ok" },
- { 0xa3a77c69, "down_read_trylock" },
- { 0x65f3602b, "vn_releasef" },
- { 0x82384b7, "path_put" },
- { 0x4b88e0e9, "zpool_get_rewind_policy" },
- { 0x360e492b, "__cv_init" },
- { 0xd52bf1ce, "_raw_spin_lock" },
- { 0x2168361b, "fnvlist_add_nvlist_array" },
- { 0xff3980bf, "read_cache_pages" },
- { 0xb6445021, "zpool_prop_init" },
- { 0x9327f5ce, "_raw_spin_lock_irqsave" },
- { 0xe9167510, "fnvpair_value_string" },
- { 0xe52947e7, "__phys_addr" },
- { 0x7521d525, "fnvlist_lookup_string" },
- { 0x1b8f1d1e, "strfree" },
- { 0x9e7bdafa, "register_filesystem" },
- { 0xdafb8f63, "zpool_name_to_prop" },
- { 0x29c88b11, "nvlist_next_nvpair" },
- { 0x10f2eb76, "vsnprintf" },
- { 0x443890f9, "u8_textprep_str" },
- { 0x659a64d0, "call_usermodehelper_setup" },
- { 0x16d71b69, "__cv_wait_sig" },
- { 0x88163724, "zfs_prop_user" },
- { 0x2c0fbe10, "vn_open" },
- { 0xa456b044, "zfs_prop_readonly" },
- { 0x82027a4c, "cmn_err" },
- { 0xff40513c, "avl_find" },
- { 0xc43ab895, "nvlist_add_boolean_value" },
- { 0xe6990065, "fletcher_4_incremental_byteswap" },
- { 0x506746b6, "getrawmonotonic" },
- { 0x2e99f25f, "__cv_timedwait_sig" },
- { 0x8dfdd77d, "fnvpair_value_int32" },
- { 0x4c82bcb5, "nvlist_add_byte" },
- { 0x5c5fd5f1, "iput" },
- { 0xa0ed48c9, "fnvlist_lookup_nvlist" },
- { 0x6db955bf, "nvpair_type" },
- { 0xd2c3d1c4, "ddi_copyin" },
- { 0x1285cb78, "tsd_set" },
- { 0x3896a905, "__thread_exit" },
- { 0x37a0cba, "kfree" },
- { 0x531d58c3, "zpool_prop_index_to_string" },
- { 0xd234c7f7, "nvlist_add_nvpair" },
- { 0x236c8c64, "memcpy" },
- { 0x3799704a, "spl_kmem_cache_set_move" },
- { 0x5ecf6f91, "vn_mode_to_vtype" },
- { 0xea8a6c75, "param_ops_long" },
- { 0xe3e12c4f, "d_splice_alias" },
- { 0x9518b623, "register_shrinker" },
- { 0xe1f620de, "add_disk" },
- { 0x4b2cb038, "zfs_prop_index_to_string" },
- { 0xd1c1752d, "zfs_zpl_version_map" },
- { 0x434773c9, "avl_walk" },
- { 0xf715d7e4, "fletcher_4_byteswap" },
- { 0x86f43149, "zfs_userquota_prop_prefixes" },
- { 0xf68905fd, "ddi_strtoull" },
- { 0x45dd41aa, "generic_readlink" },
- { 0xa2fb3ea8, "put_page" },
- { 0x5aa48f01, "bdi_destroy" },
- { 0x4cbbd171, "__bitmap_weight" },
- { 0x4b69abe5, "nvpair_value_byte" },
- { 0x6811efbd, "nvlist_size" },
- { 0xd7e6464c, "fletcher_2_native" },
- { 0x3d6d97a2, "ioctl_by_bdev" },
- { 0x670fde39, "fnvlist_pack" },
- { 0x5cc844b3, "unregister_filesystem" },
- { 0x6cfc93ad, "init_special_inode" },
- { 0x9f46de9, "kobj_open_file" },
- { 0x4e7a84e6, "avl_add" },
- { 0x185936d6, "groupmember" },
- { 0x4ea06afa, "nvlist_add_byte_array" },
- { 0x4b06d2e7, "complete" },
- { 0x50720c5f, "snprintf" },
- { 0x3a1aa9fb, "bdget" },
- { 0x7be1c89e, "blk_queue_max_segment_size" },
- { 0xd433d2cb, "__kstat_delete" },
- { 0xa3de192d, "fnvlist_add_string" },
- { 0x504be4f9, "nvlist_add_int16" },
- { 0xec1cce40, "nvlist_lookup_nvlist_array" },
- { 0x4ccb2dda, "new_inode" },
- { 0xa3a5be95, "memmove" },
- { 0x43c69f9a, "zpool_prop_default_numeric" },
- { 0xae5d807c, "vmalloc_to_page" },
- { 0x80c3f220, "spl_kmem_free" },
- { 0x8eb2664d, "fnvlist_remove_nvpair" },
- { 0x6edb75cf, "follow_down_one" },
- { 0x7466fa85, "spl_kmem_cache_reap_now" },
- { 0xaa9db9bb, "nvlist_add_uint64_array" },
- { 0xf473f2ff, "blkdev_get" },
- { 0xc236e29a, "zfs_prop_default_string" },
- { 0xbaa28806, "simple_dir_inode_operations" },
- { 0x1500ba78, "__thread_create" },
- { 0x778a305, "spl_vmem_free" },
- { 0x4f6b400b, "_copy_from_user" },
- { 0xb3e56341, "taskq_cancel_id" },
- { 0xa2c56c31, "param_ops_ulong" },
- { 0xfad8deb5, "nv_alloc_fini" },
- { 0xc3fe87c8, "param_ops_uint" },
- { 0x19471135, "bdget_disk" },
- { 0xa66a6969, "nvpair_value_nvlist" },
- { 0xdfb0b5e5, "misc_deregister" },
- { 0xf91d3b5a, "nvlist_dup" },
- { 0x62c31a0, "bdput" },
- { 0x9c679abb, "d_instantiate" },
- { 0x2a6e6109, "__init_rwsem" },
- { 0xec031267, "taskq_dispatch_delay" },
- { 0x2821e0b2, "nvlist_lookup_uint64_array" },
- { 0x85524b8b, "p0" },
- { 0x59fe72f0, "__cv_destroy" },
- { 0x38dbd03a, "dataset_namecheck" },
- { 0x5fb4b61d, "fnvlist_dup" },
- { 0x8b50312f, "generic_fillattr" },
- { 0x2e1cae5a, "vn_openat" },
- { 0xe914e41e, "strcpy" },
- { 0xda6b5415, "set_disk_ro" },
- { 0x9dcb88fc, "spl_kmem_zalloc" },
- { 0x75907276, "kmem_debugging" },
- { 0xc3ff0fa1, "nvpair_value_uint8" },
- { 0xdb7958d9, "taskq_empty_ent" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl,znvpair,zcommon,zunicode,zavl";
-
-
-MODULE_INFO(srcversion, "6D4A581C24AFCEC615C1511");
{
uint32_t working_mode;
int error;
- boolean_t check_privs;
- znode_t *check_zp = zp;
+ int is_attr;
+ boolean_t check_privs;
+ znode_t *xzp;
+ znode_t *check_zp = zp;
mode_t needed_bits;
uid_t owner;
+ is_attr = ((zp->z_pflags & ZFS_XATTR) && S_ISDIR(ZTOI(zp)->i_mode));
+
/*
* If attribute then validate against base file
*/
- if ((zp->z_pflags & ZFS_XATTR) && S_ISDIR(ZTOI(zp)->i_mode)) {
+ if (is_attr) {
uint64_t parent;
- rw_enter(&zp->z_xattr_lock, RW_READER);
- if (zp->z_xattr_parent) {
- check_zp = zp->z_xattr_parent;
- rw_exit(&zp->z_xattr_lock);
-
- /*
- * Verify a lookup yields the same znode.
- */
- ASSERT3S(sa_lookup(zp->z_sa_hdl, SA_ZPL_PARENT(
- ZTOZSB(zp)), &parent, sizeof (parent)), ==, 0);
- ASSERT3U(check_zp->z_id, ==, parent);
- } else {
- rw_exit(&zp->z_xattr_lock);
-
- error = sa_lookup(zp->z_sa_hdl, SA_ZPL_PARENT(
- ZTOZSB(zp)), &parent, sizeof (parent));
- if (error)
- return (error);
+ if ((error = sa_lookup(zp->z_sa_hdl,
+ SA_ZPL_PARENT(ZTOZSB(zp)), &parent,
+ sizeof (parent))) != 0)
+ return (error);
- /*
- * Cache the lookup on the parent file znode as
- * zp->z_xattr_parent and hold a reference. This
- * effectively pins the parent in memory until all
- * child xattr znodes have been destroyed and
- * release their references in zfs_inode_destroy().
- */
- error = zfs_zget(ZTOZSB(zp), parent, &check_zp);
- if (error)
- return (error);
-
- rw_enter(&zp->z_xattr_lock, RW_WRITER);
- if (zp->z_xattr_parent == NULL)
- zp->z_xattr_parent = check_zp;
- rw_exit(&zp->z_xattr_lock);
+ if ((error = zfs_zget(ZTOZSB(zp),
+ parent, &xzp)) != 0) {
+ return (error);
}
+ check_zp = xzp;
+
/*
* fixup mode to map to xattr perms
*/
if ((error = zfs_zaccess_common(check_zp, mode, &working_mode,
&check_privs, skipaclchk, cr)) == 0) {
+ if (is_attr)
+ iput(ZTOI(xzp));
return (secpolicy_vnode_access2(cr, ZTOI(zp), owner,
needed_bits, needed_bits));
}
if (error && !check_privs) {
+ if (is_attr)
+ iput(ZTOI(xzp));
return (error);
}
needed_bits, needed_bits);
}
+ if (is_attr)
+ iput(ZTOI(xzp));
+
return (error);
}
zp->z_gid = 0;
zp->z_mode = 0;
zp->z_sync_cnt = 0;
- zp->z_is_zvol = B_FALSE;
zp->z_is_mapped = B_FALSE;
zp->z_is_ctldir = B_TRUE;
zp->z_is_sa = B_FALSE;
if (error)
skipped += 1;
dmu_tx_commit(tx);
-
+ set_nlink(ZTOI(xzp), xzp->z_links);
zfs_iput_async(ZTOI(xzp));
}
zap_cursor_fini(&zc);
mutex_enter(&xzp->z_lock);
xzp->z_unlinked = B_TRUE; /* mark xzp for deletion */
xzp->z_links = 0; /* no more links to it */
+ set_nlink(ZTOI(xzp), 0); /* this will let iput purge us */
VERIFY(0 == sa_update(xzp->z_sa_hdl, SA_ZPL_LINKS(zsb),
&xzp->z_links, sizeof (xzp->z_links), tx));
mutex_exit(&xzp->z_lock);
mutex_enter(&os->os_user_ptr_lock);
*zsbp = dmu_objset_get_user(os);
- if (*zsbp && (*zsbp)->z_sb) {
- atomic_inc(&((*zsbp)->z_sb->s_active));
- } else {
+ /* bump s_active only when non-zero to prevent umount race */
+ if (*zsbp == NULL || (*zsbp)->z_sb == NULL ||
+ !atomic_inc_not_zero(&((*zsbp)->z_sb->s_active))) {
error = SET_ERROR(ESRCH);
}
mutex_exit(&os->os_user_ptr_lock);
* Check if a write lock can be grabbed, or wait and recheck until available.
*/
static void
-zfs_range_lock_writer(znode_t *zp, rl_t *new)
+zfs_range_lock_writer(zfs_rlock_t *zrl, rl_t *new)
{
- avl_tree_t *tree = &zp->z_range_avl;
+ avl_tree_t *tree = &zrl->zr_avl;
rl_t *rl;
avl_index_t where;
uint64_t end_size;
for (;;) {
/*
- * Range locking is also used by zvol and uses a
- * dummied up znode. However, for zvol, we don't need to
- * append or grow blocksize, and besides we don't have
- * a "sa" data or zfs_sb_t - so skip that processing.
+ * Range locking is also used by zvol. However, for zvol, we
+ * don't need to append or grow blocksize, so skip that
+ * processing.
*
* Yes, this is ugly, and would be solved by not handling
* grow or append in range lock code. If that was done then
* we could make the range locking code generically available
* to other non-zfs consumers.
*/
- if (!zp->z_is_zvol) { /* caller is ZPL */
+ if (zrl->zr_size) { /* caller is ZPL */
/*
* If in append mode pick up the current end of file.
* This is done under z_range_lock to avoid races.
*/
if (new->r_type == RL_APPEND)
- new->r_off = zp->z_size;
+ new->r_off = *zrl->zr_size;
/*
* If we need to grow the block size then grab the whole
* file range. This is also done under z_range_lock to
* avoid races.
*/
- end_size = MAX(zp->z_size, new->r_off + len);
- if (end_size > zp->z_blksz && (!ISP2(zp->z_blksz) ||
- zp->z_blksz < ZTOZSB(zp)->z_max_blksz)) {
+ end_size = MAX(*zrl->zr_size, new->r_off + len);
+ if (end_size > *zrl->zr_blksz &&
+ (!ISP2(*zrl->zr_blksz) ||
+ *zrl->zr_blksz < *zrl->zr_max_blksz)) {
new->r_off = 0;
new->r_len = UINT64_MAX;
}
cv_init(&rl->r_wr_cv, NULL, CV_DEFAULT, NULL);
rl->r_write_wanted = B_TRUE;
}
- cv_wait(&rl->r_wr_cv, &zp->z_range_lock);
+ cv_wait(&rl->r_wr_cv, &zrl->zr_mutex);
/* reset to original */
new->r_off = off;
* Check if a reader lock can be grabbed, or wait and recheck until available.
*/
static void
-zfs_range_lock_reader(znode_t *zp, rl_t *new)
+zfs_range_lock_reader(zfs_rlock_t *zrl, rl_t *new)
{
- avl_tree_t *tree = &zp->z_range_avl;
+ avl_tree_t *tree = &zrl->zr_avl;
rl_t *prev, *next;
avl_index_t where;
uint64_t off = new->r_off;
cv_init(&prev->r_rd_cv, NULL, CV_DEFAULT, NULL);
prev->r_read_wanted = B_TRUE;
}
- cv_wait(&prev->r_rd_cv, &zp->z_range_lock);
+ cv_wait(&prev->r_rd_cv, &zrl->zr_mutex);
goto retry;
}
if (off + len < prev->r_off + prev->r_len)
cv_init(&next->r_rd_cv, NULL, CV_DEFAULT, NULL);
next->r_read_wanted = B_TRUE;
}
- cv_wait(&next->r_rd_cv, &zp->z_range_lock);
+ cv_wait(&next->r_rd_cv, &zrl->zr_mutex);
goto retry;
}
if (off + len <= next->r_off + next->r_len)
* previously locked as RL_WRITER).
*/
rl_t *
-zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type)
+zfs_range_lock(zfs_rlock_t *zrl, uint64_t off, uint64_t len, rl_type_t type)
{
rl_t *new;
ASSERT(type == RL_READER || type == RL_WRITER || type == RL_APPEND);
new = kmem_alloc(sizeof (rl_t), KM_SLEEP);
- new->r_zp = zp;
+ new->r_zrl = zrl;
new->r_off = off;
if (len + off < off) /* overflow */
len = UINT64_MAX - off;
new->r_write_wanted = B_FALSE;
new->r_read_wanted = B_FALSE;
- mutex_enter(&zp->z_range_lock);
+ mutex_enter(&zrl->zr_mutex);
if (type == RL_READER) {
/*
* First check for the usual case of no locks
*/
- if (avl_numnodes(&zp->z_range_avl) == 0)
- avl_add(&zp->z_range_avl, new);
+ if (avl_numnodes(&zrl->zr_avl) == 0)
+ avl_add(&zrl->zr_avl, new);
else
- zfs_range_lock_reader(zp, new);
- } else
- zfs_range_lock_writer(zp, new); /* RL_WRITER or RL_APPEND */
- mutex_exit(&zp->z_range_lock);
+ zfs_range_lock_reader(zrl, new);
+ } else /* RL_WRITER or RL_APPEND */
+ zfs_range_lock_writer(zrl, new);
+ mutex_exit(&zrl->zr_mutex);
return (new);
}
* Unlock a reader lock
*/
static void
-zfs_range_unlock_reader(znode_t *zp, rl_t *remove, list_t *free_list)
+zfs_range_unlock_reader(zfs_rlock_t *zrl, rl_t *remove, list_t *free_list)
{
- avl_tree_t *tree = &zp->z_range_avl;
+ avl_tree_t *tree = &zrl->zr_avl;
rl_t *rl, *next = NULL;
uint64_t len;
void
zfs_range_unlock(rl_t *rl)
{
- znode_t *zp = rl->r_zp;
+ zfs_rlock_t *zrl = rl->r_zrl;
list_t free_list;
rl_t *free_rl;
ASSERT(!rl->r_proxy);
list_create(&free_list, sizeof (rl_t), offsetof(rl_t, rl_node));
- mutex_enter(&zp->z_range_lock);
+ mutex_enter(&zrl->zr_mutex);
if (rl->r_type == RL_WRITER) {
/* writer locks can't be shared or split */
- avl_remove(&zp->z_range_avl, rl);
+ avl_remove(&zrl->zr_avl, rl);
if (rl->r_write_wanted)
cv_broadcast(&rl->r_wr_cv);
* lock may be shared, let zfs_range_unlock_reader()
* release the zp->z_range_lock lock and free the rl_t
*/
- zfs_range_unlock_reader(zp, rl, &free_list);
+ zfs_range_unlock_reader(zrl, rl, &free_list);
}
- mutex_exit(&zp->z_range_lock);
+ mutex_exit(&zrl->zr_mutex);
while ((free_rl = list_head(&free_list)) != NULL) {
list_remove(&free_list, free_rl);
void
zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len)
{
- znode_t *zp = rl->r_zp;
+ zfs_rlock_t *zrl = rl->r_zrl;
/* Ensure there are no other locks */
- ASSERT(avl_numnodes(&zp->z_range_avl) == 1);
+ ASSERT(avl_numnodes(&zrl->zr_avl) == 1);
ASSERT(rl->r_off == 0);
ASSERT(rl->r_type == RL_WRITER);
ASSERT(!rl->r_proxy);
ASSERT3U(rl->r_len, ==, UINT64_MAX);
ASSERT3U(rl->r_cnt, ==, 1);
- mutex_enter(&zp->z_range_lock);
+ mutex_enter(&zrl->zr_mutex);
rl->r_off = off;
rl->r_len = len;
if (rl->r_read_wanted)
cv_broadcast(&rl->r_rd_cv);
- mutex_exit(&zp->z_range_lock);
+ mutex_exit(&zrl->zr_mutex);
}
/*
return (-1);
return (0);
}
+
+#ifdef _KERNEL
+EXPORT_SYMBOL(zfs_range_lock);
+EXPORT_SYMBOL(zfs_range_unlock);
+EXPORT_SYMBOL(zfs_range_reduce);
+EXPORT_SYMBOL(zfs_range_compare);
+#endif
}
EXPORT_SYMBOL(zfs_root);
-#if !defined(HAVE_SPLIT_SHRINKER_CALLBACK) && !defined(HAVE_SHRINK) && \
- defined(HAVE_D_PRUNE_ALIASES)
+#ifdef HAVE_D_PRUNE_ALIASES
/*
* Linux kernels older than 3.1 do not support a per-filesystem shrinker.
* To accommodate this we must improvise and manually walk the list of znodes
} else {
*objects = (*shrinker->scan_objects)(shrinker, &sc);
}
+
#elif defined(HAVE_SPLIT_SHRINKER_CALLBACK)
*objects = (*shrinker->scan_objects)(shrinker, &sc);
#elif defined(HAVE_SHRINK)
*objects = (*shrinker->shrink)(shrinker, &sc);
#elif defined(HAVE_D_PRUNE_ALIASES)
+#define D_PRUNE_ALIASES_IS_DEFAULT
*objects = zfs_sb_prune_aliases(zsb, nr_to_scan);
#else
#error "No available dentry and inode cache pruning mechanism."
#endif
+
+#if defined(HAVE_D_PRUNE_ALIASES) && !defined(D_PRUNE_ALIASES_IS_DEFAULT)
+#undef D_PRUNE_ALIASES_IS_DEFAULT
+ /*
+ * Fall back to zfs_sb_prune_aliases if the kernel's per-superblock
+ * shrinker couldn't free anything, possibly due to the inodes being
+ * allocated in a different memcg.
+ */
+ if (*objects == 0)
+ *objects = zfs_sb_prune_aliases(zsb, nr_to_scan);
+#endif
+
ZFS_EXIT(zsb);
dprintf_ds(zsb->z_os->os_dsl_dataset,
ZFS_EXIT(zsb);
return (err);
}
+
+ /* Don't export xattr stuff */
+ if (zp->z_pflags & ZFS_XATTR) {
+ iput(ZTOI(zp));
+ ZFS_EXIT(zsb);
+ return (SET_ERROR(ENOENT));
+ }
+
(void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(zsb), &zp_gen,
sizeof (uint64_t));
zp_gen = zp_gen & gen_mask;
fid_gen);
iput(ZTOI(zp));
ZFS_EXIT(zsb);
- return (SET_ERROR(EINVAL));
+ return (SET_ERROR(ENOENT));
}
*ipp = ZTOI(zp);
/*
* Lock the range against changes.
*/
- rl = zfs_range_lock(zp, uio->uio_loffset, uio->uio_resid, RL_READER);
+ rl = zfs_range_lock(&zp->z_range_lock, uio->uio_loffset, uio->uio_resid,
+ RL_READER);
/*
* If we are reading past end-of-file we can skip
* Obtain an appending range lock to guarantee file append
* semantics. We reset the write offset once we have the lock.
*/
- rl = zfs_range_lock(zp, 0, n, RL_APPEND);
+ rl = zfs_range_lock(&zp->z_range_lock, 0, n, RL_APPEND);
woff = rl->r_off;
if (rl->r_len == UINT64_MAX) {
/*
* this write, then this range lock will lock the entire file
* so that we can re-write the block safely.
*/
- rl = zfs_range_lock(zp, woff, n, RL_WRITER);
+ rl = zfs_range_lock(&zp->z_range_lock, woff, n, RL_WRITER);
}
if (woff >= limit) {
* we don't have to write the data twice.
*/
if (buf != NULL) { /* immediate write */
- zgd->zgd_rl = zfs_range_lock(zp, offset, size, RL_READER);
+ zgd->zgd_rl = zfs_range_lock(&zp->z_range_lock, offset, size,
+ RL_READER);
/* test for truncation needs to be done while range locked */
if (offset >= zp->z_size) {
error = SET_ERROR(ENOENT);
size = zp->z_blksz;
blkoff = ISP2(size) ? P2PHASE(offset, size) : offset;
offset -= blkoff;
- zgd->zgd_rl = zfs_range_lock(zp, offset, size,
- RL_READER);
+ zgd->zgd_rl = zfs_range_lock(&zp->z_range_lock, offset,
+ size, RL_READER);
if (zp->z_blksz == size)
break;
offset += blkoff;
redirty_page_for_writepage(wbc, pp);
unlock_page(pp);
- rl = zfs_range_lock(zp, pgoff, pglen, RL_WRITER);
+ rl = zfs_range_lock(&zp->z_range_lock, pgoff, pglen, RL_WRITER);
lock_page(pp);
/* Page mapping changed or it was no longer dirty, we're done */
* Iterate over list of pages and read each page individually.
*/
page_idx = 0;
- cur_pp = pl[0];
for (total = io_off + io_len; io_off < total; io_off += PAGESIZE) {
caddr_t va;
+ cur_pp = pl[page_idx++];
va = kmap(cur_pp);
err = dmu_read(os, zp->z_id, io_off, PAGESIZE, va,
DMU_READ_PREFETCH);
err = SET_ERROR(EIO);
return (err);
}
- cur_pp = pl[++page_idx];
}
return (0);
mutex_init(&zp->z_acl_lock, NULL, MUTEX_DEFAULT, NULL);
rw_init(&zp->z_xattr_lock, NULL, RW_DEFAULT, NULL);
- mutex_init(&zp->z_range_lock, NULL, MUTEX_DEFAULT, NULL);
- avl_create(&zp->z_range_avl, zfs_range_compare,
- sizeof (rl_t), offsetof(rl_t, r_node));
+ zfs_rlock_init(&zp->z_range_lock);
zp->z_dirlocks = NULL;
zp->z_acl_cached = NULL;
zp->z_xattr_cached = NULL;
- zp->z_xattr_parent = NULL;
zp->z_moved = 0;
return (0);
}
rw_destroy(&zp->z_name_lock);
mutex_destroy(&zp->z_acl_lock);
rw_destroy(&zp->z_xattr_lock);
- avl_destroy(&zp->z_range_avl);
- mutex_destroy(&zp->z_range_lock);
+ zfs_rlock_destroy(&zp->z_range_lock);
ASSERT(zp->z_dirlocks == NULL);
ASSERT(zp->z_acl_cached == NULL);
ASSERT(zp->z_xattr_cached == NULL);
- ASSERT(zp->z_xattr_parent == NULL);
}
static int
zp->z_xattr_cached = NULL;
}
- if (zp->z_xattr_parent) {
- zfs_iput_async(ZTOI(zp->z_xattr_parent));
- zp->z_xattr_parent = NULL;
- }
-
kmem_cache_free(znode_cache, zp);
}
*/
static znode_t *
zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
- dmu_object_type_t obj_type, uint64_t obj, sa_handle_t *hdl,
- struct inode *dip)
+ dmu_object_type_t obj_type, uint64_t obj, sa_handle_t *hdl)
{
znode_t *zp;
struct inode *ip;
ASSERT(zp->z_dirlocks == NULL);
ASSERT3P(zp->z_acl_cached, ==, NULL);
ASSERT3P(zp->z_xattr_cached, ==, NULL);
- ASSERT3P(zp->z_xattr_parent, ==, NULL);
zp->z_moved = 0;
zp->z_sa_hdl = NULL;
zp->z_unlinked = 0;
zp->z_blksz = blksz;
zp->z_seq = 0x7A4653;
zp->z_sync_cnt = 0;
- zp->z_is_zvol = B_FALSE;
zp->z_is_mapped = B_FALSE;
zp->z_is_ctldir = B_FALSE;
zp->z_is_stale = B_FALSE;
+ zp->z_range_lock.zr_size = &zp->z_size;
+ zp->z_range_lock.zr_blksz = &zp->z_blksz;
+ zp->z_range_lock.zr_max_blksz = &ZTOZSB(zp)->z_max_blksz;
zfs_znode_sa_init(zsb, zp, db, obj_type, hdl);
zp->z_mode = mode;
- /*
- * xattr znodes hold a reference on their unique parent
- */
- if (dip && zp->z_pflags & ZFS_XATTR) {
- igrab(dip);
- zp->z_xattr_parent = ITOZ(dip);
- }
-
ip->i_ino = obj;
zfs_inode_update(zp);
zfs_inode_set_ops(zsb, ip);
VERIFY(sa_replace_all_by_template(sa_hdl, sa_attrs, cnt, tx) == 0);
if (!(flag & IS_ROOT_NODE)) {
- *zpp = zfs_znode_alloc(zsb, db, 0, obj_type, obj, sa_hdl,
- ZTOI(dzp));
+ *zpp = zfs_znode_alloc(zsb, db, 0, obj_type, obj, sa_hdl);
VERIFY(*zpp != NULL);
VERIFY(dzp != NULL);
} else {
* bonus buffer.
*/
zp = zfs_znode_alloc(zsb, db, doi.doi_data_block_size,
- doi.doi_bonus_type, obj_num, NULL, NULL);
+ doi.doi_bonus_type, obj_num, NULL);
if (zp == NULL) {
err = SET_ERROR(ENOENT);
} else {
uint64_t gen;
znode_hold_t *zh;
+ /*
+ * skip ctldir, otherwise they will always get invalidated. This will
+ * cause funny behaviour for the mounted snapdirs. Especially for
+ * Linux >= 3.18, d_invalidate will detach the mountpoint and prevent
+ * anyone automount it again as long as someone is still using the
+ * detached mount.
+ */
+ if (zp->z_is_ctldir)
+ return (0);
+
zh = zfs_znode_hold_enter(zsb, obj_num);
mutex_enter(&zp->z_acl_lock);
nvlist_free(zp->z_xattr_cached);
zp->z_xattr_cached = NULL;
}
-
- if (zp->z_xattr_parent) {
- zfs_iput_async(ZTOI(zp->z_xattr_parent));
- zp->z_xattr_parent = NULL;
- }
rw_exit(&zp->z_xattr_lock);
ASSERT(zp->z_sa_hdl == NULL);
/*
* We will change zp_size, lock the whole file.
*/
- rl = zfs_range_lock(zp, 0, UINT64_MAX, RL_WRITER);
+ rl = zfs_range_lock(&zp->z_range_lock, 0, UINT64_MAX, RL_WRITER);
/*
* Nothing to do if file already at desired length.
/*
* Lock the range being freed.
*/
- rl = zfs_range_lock(zp, off, len, RL_WRITER);
+ rl = zfs_range_lock(&zp->z_range_lock, off, len, RL_WRITER);
/*
* Nothing to do if file already at desired length.
/*
* We will change zp_size, lock the whole file.
*/
- rl = zfs_range_lock(zp, 0, UINT64_MAX, RL_WRITER);
+ rl = zfs_range_lock(&zp->z_range_lock, 0, UINT64_MAX, RL_WRITER);
/*
* Nothing to do if file already at desired length.
return (error);
}
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
static int
zpl_root_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
.open = zpl_common_open,
.llseek = generic_file_llseek,
.read = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+ .iterate_shared = zpl_root_iterate,
+#elif defined(HAVE_VFS_ITERATE)
.iterate = zpl_root_iterate,
#else
.readdir = zpl_root_readdir,
return (error);
}
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
static int
zpl_snapdir_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
.open = zpl_common_open,
.llseek = generic_file_llseek,
.read = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+ .iterate_shared = zpl_snapdir_iterate,
+#elif defined(HAVE_VFS_ITERATE)
.iterate = zpl_snapdir_iterate,
#else
.readdir = zpl_snapdir_readdir,
return (error);
}
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
static int
zpl_shares_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
.open = zpl_common_open,
.llseek = generic_file_llseek,
.read = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+ .iterate_shared = zpl_shares_iterate,
+#elif defined(HAVE_VFS_ITERATE)
.iterate = zpl_shares_iterate,
#else
.readdir = zpl_shares_readdir,
return (error);
}
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
static int
zpl_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
loff_t maxbytes = ip->i_sb->s_maxbytes;
loff_t error;
- spl_inode_lock(ip);
+ spl_inode_lock_shared(ip);
cookie = spl_fstrans_mark();
error = -zfs_holey(ip, whence, &offset);
spl_fstrans_unmark(cookie);
if (error == 0)
error = lseek_execute(filp, ip, offset, maxbytes);
- spl_inode_unlock(ip);
+ spl_inode_unlock_shared(ip);
return (error);
}
const struct file_operations zpl_dir_file_operations = {
.llseek = generic_file_llseek,
.read = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+ .iterate_shared = zpl_iterate,
+#elif defined(HAVE_VFS_ITERATE)
.iterate = zpl_iterate,
#else
.readdir = zpl_readdir,
if (mntopts) {
substring_t args[MAX_OPT_ARGS];
- char *tmp_mntopts, *p;
+ char *tmp_mntopts, *p, *t;
int token;
- tmp_mntopts = strdup(mntopts);
+ t = tmp_mntopts = strdup(mntopts);
- while ((p = strsep(&tmp_mntopts, ",")) != NULL) {
+ while ((p = strsep(&t, ",")) != NULL) {
if (!*p)
continue;
char *name;
int size;
-#ifdef HAVE_POSIX_ACL_CACHING
+ /*
+ * As of Linux 3.14, the kernel get_acl will check this for us.
+ * Also as of Linux 4.7, comparing against ACL_NOT_CACHED is wrong
+ * as the kernel get_acl will set it to temporary sentinel value.
+ */
+#ifndef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
acl = get_cached_acl(ip, type);
if (acl != ACL_NOT_CACHED)
return (acl);
-#endif /* HAVE_POSIX_ACL_CACHING */
+#endif
switch (type) {
case ACL_TYPE_ACCESS:
if (size > 0)
kmem_free(value, size);
+ /* As of Linux 4.7, the kernel get_acl will set this for us */
+#ifndef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
if (!IS_ERR(acl))
zpl_set_cached_acl(ip, type, acl);
+#endif
return (acl);
}
if (IS_ERR(acl))
return (PTR_ERR(acl));
else if (acl) {
- error = posix_acl_valid(acl);
+ error = zpl_posix_acl_valid(ip, acl);
if (error) {
zpl_posix_acl_release(acl);
return (error);
if (IS_ERR(acl))
return (PTR_ERR(acl));
else if (acl) {
- error = posix_acl_valid(acl);
+ error = zpl_posix_acl_valid(ip, acl);
if (error) {
zpl_posix_acl_release(acl);
return (error);
uint32_t zv_open_count; /* open counts */
uint32_t zv_changed; /* disk changed */
zilog_t *zv_zilog; /* ZIL handle */
- znode_t zv_znode; /* for range locking */
+ zfs_rlock_t zv_range_lock; /* range lock */
dmu_buf_t *zv_dbuf; /* bonus handle */
dev_t zv_dev; /* device id */
struct gendisk *zv_disk; /* generic disk */
ASSERT(zv && zv->zv_open_count > 0);
- if (bio->bi_rw & VDEV_REQ_FLUSH)
+ if (bio_is_flush(bio))
zil_commit(zv->zv_zilog, ZVOL_OBJ);
/*
if (size == 0)
goto out;
- rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_WRITER);
+ rl = zfs_range_lock(&zv->zv_range_lock, offset, size, RL_WRITER);
tx = dmu_tx_create(zv->zv_objset);
dmu_tx_hold_write(tx, ZVOL_OBJ, offset, size);
error = dmu_write_bio(zv->zv_objset, ZVOL_OBJ, bio, tx);
if (error == 0)
zvol_log_write(zv, tx, offset, size,
- !!(bio->bi_rw & VDEV_REQ_FUA));
+ !!(bio_is_fua(bio)));
dmu_tx_commit(tx);
zfs_range_unlock(rl);
- if ((bio->bi_rw & VDEV_REQ_FUA) ||
+ if ((bio_is_fua(bio)) ||
zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zv->zv_zilog, ZVOL_OBJ);
return (SET_ERROR(EIO));
/*
- * Align the request to volume block boundaries when REQ_SECURE is
- * available, but not requested. If we don't, then this will force
- * dnode_free_range() to zero out the unaligned parts, which is slow
- * (read-modify-write) and useless since we are not freeing any space
- * by doing so. Kernels that do not support REQ_SECURE (2.6.32 through
- * 2.6.35) will not receive this optimization.
+ * Align the request to volume block boundaries when a secure erase is
+ * not required. This will prevent dnode_free_range() from zeroing out
+ * the unaligned parts which is slow (read-modify-write) and useless
+ * since we are not freeing any space by doing so.
*/
-#ifdef REQ_SECURE
- if (!(bio->bi_rw & REQ_SECURE)) {
+ if (!bio_is_secure_erase(bio)) {
start = P2ROUNDUP(start, zv->zv_volblocksize);
end = P2ALIGN(end, zv->zv_volblocksize);
size = end - start;
}
-#endif
if (start >= end)
return (0);
- rl = zfs_range_lock(&zv->zv_znode, start, size, RL_WRITER);
+ rl = zfs_range_lock(&zv->zv_range_lock, start, size, RL_WRITER);
error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, start, size);
/*
* TODO: maybe we should add the operation to the log.
*/
-
zfs_range_unlock(rl);
return (error);
if (len == 0)
return (0);
- rl = zfs_range_lock(&zv->zv_znode, offset, len, RL_READER);
+ rl = zfs_range_lock(&zv->zv_range_lock, offset, len, RL_READER);
error = dmu_read_bio(zv->zv_objset, ZVOL_OBJ, bio);
goto out2;
}
- if (bio->bi_rw & VDEV_REQ_DISCARD) {
+ if (bio_is_discard(bio) || bio_is_secure_erase(bio)) {
error = zvol_discard(bio);
goto out2;
}
zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_SLEEP);
zgd->zgd_zilog = zv->zv_zilog;
- zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_READER);
+ zgd->zgd_rl = zfs_range_lock(&zv->zv_range_lock, offset, size,
+ RL_READER);
/*
* Write records come in two flavors: immediate and indirect.
goto out_kmem;
blk_queue_make_request(zv->zv_queue, zvol_request);
-
-#ifdef HAVE_BLK_QUEUE_FLUSH
- blk_queue_flush(zv->zv_queue, VDEV_REQ_FLUSH | VDEV_REQ_FUA);
-#else
- blk_queue_ordered(zv->zv_queue, QUEUE_ORDERED_DRAIN, NULL);
-#endif /* HAVE_BLK_QUEUE_FLUSH */
+ blk_queue_set_write_cache(zv->zv_queue, B_TRUE, B_TRUE);
zv->zv_disk = alloc_disk(ZVOL_MINORS);
if (zv->zv_disk == NULL)
zv->zv_open_count = 0;
strlcpy(zv->zv_name, name, MAXNAMELEN);
- mutex_init(&zv->zv_znode.z_range_lock, NULL, MUTEX_DEFAULT, NULL);
- avl_create(&zv->zv_znode.z_range_avl, zfs_range_compare,
- sizeof (rl_t), offsetof(rl_t, r_node));
- zv->zv_znode.z_is_zvol = TRUE;
+ zfs_rlock_init(&zv->zv_range_lock);
zv->zv_disk->major = zvol_major;
zv->zv_disk->first_minor = (dev & MINORMASK);
ASSERT(MUTEX_HELD(&zvol_state_lock));
ASSERT(zv->zv_open_count == 0);
- avl_destroy(&zv->zv_znode.z_range_avl);
- mutex_destroy(&zv->zv_znode.z_range_lock);
+ zfs_rlock_destroy(&zv->zv_range_lock);
zv->zv_disk->private_data = NULL;
+++ /dev/null
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x51198477, "module_layout" },
- { 0x3a8fb147, "dmu_tx_hold_free" },
- { 0x6b85513b, "dmu_objset_create" },
- { 0x4d73bbca, "dmu_object_set_blocksize" },
- { 0x26b64321, "call_usermodehelper_setfns" },
- { 0xdb347c7a, "call_usermodehelper_exec" },
- { 0xadaabe1b, "pv_lock_ops" },
- { 0xbf479b07, "dmu_tx_abort" },
- { 0x4ff1c9bc, "populate_rootfs_wait" },
- { 0xc8b57c27, "autoremove_wake_function" },
- { 0x79aa04a2, "get_random_bytes" },
- { 0x67053080, "current_kernel_time" },
- { 0x71642c98, "dmu_tx_wait" },
- { 0xab140103, "spl_kmem_alloc" },
- { 0xba2adaf, "mutex_unlock" },
- { 0xd3b65d9d, "kthread_create_on_node" },
- { 0xbc32eee7, "spl_panic" },
- { 0x4040455, "dmu_tx_commit" },
- { 0x6395be94, "__init_waitqueue_head" },
- { 0x4f8b5ddb, "_copy_to_user" },
- { 0x114258fb, "misc_register" },
- { 0xde0bdcff, "memset" },
- { 0x69371301, "current_task" },
- { 0x87ebeb76, "__mutex_init" },
- { 0x27e1a049, "printk" },
- { 0x4ebec927, "kthread_stop" },
- { 0x81034537, "dmu_objset_disown" },
- { 0xa1c76e0a, "_cond_resched" },
- { 0x7ec9bfbc, "strncpy" },
- { 0xb4390f9a, "mcount" },
- { 0xafe1db9d, "mutex_lock" },
- { 0x5bb6ad4b, "spl_vmem_zalloc" },
- { 0x6357a5a8, "dmu_write" },
- { 0x952664c5, "do_exit" },
- { 0x7da403ec, "dsl_destroy_head" },
- { 0x699a8466, "dmu_objset_own" },
- { 0x8c51c50b, "dmu_object_free" },
- { 0xf0fdf6cb, "__stack_chk_fail" },
- { 0xd62c833f, "schedule_timeout" },
- { 0x1000e51, "schedule" },
- { 0x252f790a, "dmu_object_alloc" },
- { 0xdae80439, "spl_vmem_alloc" },
- { 0xcfa37f55, "wake_up_process" },
- { 0xcd992a36, "dmu_tx_create" },
- { 0xd52bf1ce, "_raw_spin_lock" },
- { 0xcf21d241, "__wake_up" },
- { 0x659a64d0, "call_usermodehelper_setup" },
- { 0x236c8c64, "memcpy" },
- { 0x5c8b5ce8, "prepare_to_wait" },
- { 0xfa66f77c, "finish_wait" },
- { 0xf005a1c7, "dmu_tx_assign" },
- { 0x50720c5f, "snprintf" },
- { 0x80c3f220, "spl_kmem_free" },
- { 0xe55595ee, "dmu_read" },
- { 0x778a305, "spl_vmem_free" },
- { 0x4f6b400b, "_copy_from_user" },
- { 0x2482e688, "vsprintf" },
- { 0xdfb0b5e5, "misc_deregister" },
- { 0xa296a969, "dmu_tx_hold_write" },
- { 0x9dcb88fc, "spl_kmem_zalloc" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=zfs,spl";
-
-
-MODULE_INFO(srcversion, "6224A8554C1154556C8A26B");
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Sep 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.8-1
+- Linux 4.6, 4.7 and 4.8 compatibility zfsonlinux/spl#549 zfsonlinux/spl#563 zfsonlinux/spl#565 zfsonlinux/spl#566 zfsonlinux/zfs#4664 zfsonlinux/zfs#4665 zfsonlinux/zfs#4717 zfsonlinux/zfs#4726 zfsonlinux/zfs#4892 zfsonlinux/zfs#4899 zfsonlinux/zfs#4922 zfsonlinux/zfs#4944 zfsonlinux/zfs#4946 zfsonlinux/zfs#4951
+- Fix new tunable to ignore hole_birth, enabled by default zfsonlinux/zfs#4833
+- Fix rw_tryupgrade() semantics zfsonlinux/spl#534 zfsonlinux/spl#554
+- Fix taskq_wait_outstanding() re-evaluation issue zfsonlinux/spl#553
+- Fix race between taskq_destroy and new spawning thread zfsonlinux/spl#550 zfsonlinux/spl#553
+- Fix handle NULL case in spl_kmem_free_track() zfsonlinux/spl#567
+- Fix persist vdev_resilver_txg changes zfsonlinux/zfs#4790
+- Fix array bounds read in zprop_print_one_property() zfsonlinux/zfs#5003
+- Fix call zfs_get_name() with invalid parameter zfsonlinux/zfs#4919
+- Fix incorrect pool state after import zfsonlinux/zfs#4948
+- Fix self-healing IO prior to dsl_pool_init() completion zfsonlinux/zfs#4652
+- Fix stack corruption after importing a pool with a too-long name zfsonlinux/zfs@dc4abb4
+- Fix deeply nested nvlist can overflow stack zfsonlinux/zfs#4924
+- Fix dbuf_stats_hash_table_data race zfsonlinux/zfs#4846
+- Fix NULL dereference when accessing dbuf kstat zfsonlinux/zfs#4837
+- Fix NFS fh_to_dentry() should return ESTALE when generation mismatch zfsonlinux/zfs#4828
+- Fix allowing accessing XATTR via export handle zfsonlinux/zfs#4828
+- Fix out-of-bound access in zfs_fillpage() zfsonlinux/zfs#4705 zfsonlinux/zfs#4708
+- Fix memleak in zpl_parse_options zfsonlinux/zfs#4706 zfsonlinux/zfs#4708
+- Fix arc_prune_task use-after-free zfsonlinux/zfs#4687 zfsonlinux/zfs#4690
+- Fix get_zfs_sb() race with concurrent umount zfsonlinux/zfs@5cff9a0
+- Fix xattr parent inode pinning zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix xattr purge during iput zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix metaslab_free_dva(): bad DVA X:Y:Z zfsonlinux/zfs#3937
+- Fix large kmem_alloc in vdev_metaslab_init zfsonlinux/zfs#4752
+- Fix snapdir by skipping ctldir znode in zfs_rezget zfsonlinux/zfs#4514 zfsonlinux/zfs#4661 zfsonlinux/zfs#4672
+- Fix libshare performance issue zfsonlinux/zfs#4119
+- Fix ztest truncated cache file zfsonlinux/zfs#4129
+- Fix obeying arc_meta_limit default size when changing arc_max zfsonlinux/zfs#4001
+- Fix bug in fix_paths() zfsonlinux/zfs#4632
+- Fix systemd configuration zfsonlinux/zfs#4325 zfsonlinux/zfs#4496 zfsonlinux/zfs#4658 zfsonlinux/zfs#4699
+- Fix use kernel provided mutex owner zfsonlinux/spl#540
+- Fix rename 'zed.service' to 'zfs-zed.service' zfsonlinux/zfs#3837
+- Add support for MIPS zfsonlinux/spl#558
+- Add nfs-kernel-server for Debian zfsonlinux/zfs#4350
+- Remove HAVE_CURRENT_UMASK and HAVE_POSIX_ACL_CACHING zfsonlinux/zfs#4922
+- Remove dummy znode from zvol_state zfsonlinux/zfs#4510
+- Fix gcc -Warray-bounds check for dump_object() in zdb zfsonlinux/zfs#4907
+- Handle block pointers with a corrupt logical size zfsonlinux/zfs#4069 zfsonlinux/zfs#4080
* Thu May 12 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.7-1
- Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177
- Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520
%endif
%changelog
+* Fri Sep 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.8-1
+- Linux 4.6, 4.7 and 4.8 compatibility zfsonlinux/spl#549 zfsonlinux/spl#563 zfsonlinux/spl#565 zfsonlinux/spl#566 zfsonlinux/zfs#4664 zfsonlinux/zfs#4665 zfsonlinux/zfs#4717 zfsonlinux/zfs#4726 zfsonlinux/zfs#4892 zfsonlinux/zfs#4899 zfsonlinux/zfs#4922 zfsonlinux/zfs#4944 zfsonlinux/zfs#4946 zfsonlinux/zfs#4951
+- Fix new tunable to ignore hole_birth, enabled by default zfsonlinux/zfs#4833
+- Fix rw_tryupgrade() semantics zfsonlinux/spl#534 zfsonlinux/spl#554
+- Fix taskq_wait_outstanding() re-evaluation issue zfsonlinux/spl#553
+- Fix race between taskq_destroy and new spawning thread zfsonlinux/spl#550 zfsonlinux/spl#553
+- Fix handle NULL case in spl_kmem_free_track() zfsonlinux/spl#567
+- Fix persist vdev_resilver_txg changes zfsonlinux/zfs#4790
+- Fix array bounds read in zprop_print_one_property() zfsonlinux/zfs#5003
+- Fix call zfs_get_name() with invalid parameter zfsonlinux/zfs#4919
+- Fix incorrect pool state after import zfsonlinux/zfs#4948
+- Fix self-healing IO prior to dsl_pool_init() completion zfsonlinux/zfs#4652
+- Fix stack corruption after importing a pool with a too-long name zfsonlinux/zfs@dc4abb4
+- Fix deeply nested nvlist can overflow stack zfsonlinux/zfs#4924
+- Fix dbuf_stats_hash_table_data race zfsonlinux/zfs#4846
+- Fix NULL dereference when accessing dbuf kstat zfsonlinux/zfs#4837
+- Fix NFS fh_to_dentry() should return ESTALE when generation mismatch zfsonlinux/zfs#4828
+- Fix allowing accessing XATTR via export handle zfsonlinux/zfs#4828
+- Fix out-of-bound access in zfs_fillpage() zfsonlinux/zfs#4705 zfsonlinux/zfs#4708
+- Fix memleak in zpl_parse_options zfsonlinux/zfs#4706 zfsonlinux/zfs#4708
+- Fix arc_prune_task use-after-free zfsonlinux/zfs#4687 zfsonlinux/zfs#4690
+- Fix get_zfs_sb() race with concurrent umount zfsonlinux/zfs@5cff9a0
+- Fix xattr parent inode pinning zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix xattr purge during iput zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix metaslab_free_dva(): bad DVA X:Y:Z zfsonlinux/zfs#3937
+- Fix large kmem_alloc in vdev_metaslab_init zfsonlinux/zfs#4752
+- Fix snapdir by skipping ctldir znode in zfs_rezget zfsonlinux/zfs#4514 zfsonlinux/zfs#4661 zfsonlinux/zfs#4672
+- Fix libshare performance issue zfsonlinux/zfs#4119
+- Fix ztest truncated cache file zfsonlinux/zfs#4129
+- Fix obeying arc_meta_limit default size when changing arc_max zfsonlinux/zfs#4001
+- Fix bug in fix_paths() zfsonlinux/zfs#4632
+- Fix systemd configuration zfsonlinux/zfs#4325 zfsonlinux/zfs#4496 zfsonlinux/zfs#4658 zfsonlinux/zfs#4699
+- Fix use kernel provided mutex owner zfsonlinux/spl#540
+- Fix rename 'zed.service' to 'zfs-zed.service' zfsonlinux/zfs#3837
+- Add support for MIPS zfsonlinux/spl#558
+- Add nfs-kernel-server for Debian zfsonlinux/zfs#4350
+- Remove HAVE_CURRENT_UMASK and HAVE_POSIX_ACL_CACHING zfsonlinux/zfs#4922
+- Remove dummy znode from zvol_state zfsonlinux/zfs#4510
+- Fix gcc -Warray-bounds check for dump_object() in zdb zfsonlinux/zfs#4907
+- Handle block pointers with a corrupt logical size zfsonlinux/zfs#4069 zfsonlinux/zfs#4080
* Thu May 12 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.7-1
- Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177
- Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
%endif
%changelog
+* Fri Sep 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.8-1
+- Linux 4.6, 4.7 and 4.8 compatibility zfsonlinux/spl#549 zfsonlinux/spl#563 zfsonlinux/spl#565 zfsonlinux/spl#566 zfsonlinux/zfs#4664 zfsonlinux/zfs#4665 zfsonlinux/zfs#4717 zfsonlinux/zfs#4726 zfsonlinux/zfs#4892 zfsonlinux/zfs#4899 zfsonlinux/zfs#4922 zfsonlinux/zfs#4944 zfsonlinux/zfs#4946 zfsonlinux/zfs#4951
+- Fix new tunable to ignore hole_birth, enabled by default zfsonlinux/zfs#4833
+- Fix rw_tryupgrade() semantics zfsonlinux/spl#534 zfsonlinux/spl#554
+- Fix taskq_wait_outstanding() re-evaluation issue zfsonlinux/spl#553
+- Fix race between taskq_destroy and new spawning thread zfsonlinux/spl#550 zfsonlinux/spl#553
+- Fix handle NULL case in spl_kmem_free_track() zfsonlinux/spl#567
+- Fix persist vdev_resilver_txg changes zfsonlinux/zfs#4790
+- Fix array bounds read in zprop_print_one_property() zfsonlinux/zfs#5003
+- Fix call zfs_get_name() with invalid parameter zfsonlinux/zfs#4919
+- Fix incorrect pool state after import zfsonlinux/zfs#4948
+- Fix self-healing IO prior to dsl_pool_init() completion zfsonlinux/zfs#4652
+- Fix stack corruption after importing a pool with a too-long name zfsonlinux/zfs@dc4abb4
+- Fix deeply nested nvlist can overflow stack zfsonlinux/zfs#4924
+- Fix dbuf_stats_hash_table_data race zfsonlinux/zfs#4846
+- Fix NULL dereference when accessing dbuf kstat zfsonlinux/zfs#4837
+- Fix NFS fh_to_dentry() should return ESTALE when generation mismatch zfsonlinux/zfs#4828
+- Fix allowing accessing XATTR via export handle zfsonlinux/zfs#4828
+- Fix out-of-bound access in zfs_fillpage() zfsonlinux/zfs#4705 zfsonlinux/zfs#4708
+- Fix memleak in zpl_parse_options zfsonlinux/zfs#4706 zfsonlinux/zfs#4708
+- Fix arc_prune_task use-after-free zfsonlinux/zfs#4687 zfsonlinux/zfs#4690
+- Fix get_zfs_sb() race with concurrent umount zfsonlinux/zfs@5cff9a0
+- Fix xattr parent inode pinning zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix xattr purge during iput zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix metaslab_free_dva(): bad DVA X:Y:Z zfsonlinux/zfs#3937
+- Fix large kmem_alloc in vdev_metaslab_init zfsonlinux/zfs#4752
+- Fix snapdir by skipping ctldir znode in zfs_rezget zfsonlinux/zfs#4514 zfsonlinux/zfs#4661 zfsonlinux/zfs#4672
+- Fix libshare performance issue zfsonlinux/zfs#4119
+- Fix ztest truncated cache file zfsonlinux/zfs#4129
+- Fix obeying arc_meta_limit default size when changing arc_max zfsonlinux/zfs#4001
+- Fix bug in fix_paths() zfsonlinux/zfs#4632
+- Fix systemd configuration zfsonlinux/zfs#4325 zfsonlinux/zfs#4496 zfsonlinux/zfs#4658 zfsonlinux/zfs#4699
+- Fix use kernel provided mutex owner zfsonlinux/spl#540
+- Fix rename 'zed.service' to 'zfs-zed.service' zfsonlinux/zfs#3837
+- Add support for MIPS zfsonlinux/spl#558
+- Add nfs-kernel-server for Debian zfsonlinux/zfs#4350
+- Remove HAVE_CURRENT_UMASK and HAVE_POSIX_ACL_CACHING zfsonlinux/zfs#4922
+- Remove dummy znode from zvol_state zfsonlinux/zfs#4510
+- Fix gcc -Warray-bounds check for dump_object() in zdb zfsonlinux/zfs#4907
+- Handle block pointers with a corrupt logical size zfsonlinux/zfs#4069 zfsonlinux/zfs#4080
* Thu May 12 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.7-1
- Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177
- Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
$(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
$(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
$(top_srcdir)/config/kernel-bio-failfast.m4 \
+ $(top_srcdir)/config/kernel-bio-op.m4 \
$(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
$(top_srcdir)/config/kernel-bio-rw-discard.m4 \
$(top_srcdir)/config/kernel-blk-queue-flush.m4 \
$(top_srcdir)/config/kernel-sget-args.m4 \
$(top_srcdir)/config/kernel-show-options.m4 \
$(top_srcdir)/config/kernel-shrink.m4 \
+ $(top_srcdir)/config/kernel-submit_bio.m4 \
$(top_srcdir)/config/kernel-truncate-range.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-vfs-iterate.m4 \
/* kmap_atomic wants 1 args */
#undef HAVE_1ARG_KMAP_ATOMIC
+/* submit_bio() wants 1 arg */
+#undef HAVE_1ARG_SUBMIT_BIO
+
/* bdi_setup_and_register() wants 2 args */
#undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER
/* bdev_physical_block_size() is available */
#undef HAVE_BDEV_PHYSICAL_BLOCK_SIZE
+/* bio->bi_opf is defined */
+#undef HAVE_BIO_BI_OPF
+
/* bio has bi_iter */
#undef HAVE_BIO_BVEC_ITER
/* blk_queue_max_segments() is available */
#undef HAVE_BLK_QUEUE_MAX_SEGMENTS
+/* blk_queue_write_cache() exists */
+#undef HAVE_BLK_QUEUE_WRITE_CACHE
+
+/* blk_queue_write_cache() is GPL-only */
+#undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY
+
/* struct block_device_operations.release returns void */
#undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
/* current->bio_tail exists */
#undef HAVE_CURRENT_BIO_TAIL
-/* current_umask() exists */
-#undef HAVE_CURRENT_UMASK
-
/* DECLARE_EVENT_CLASS() is available */
#undef HAVE_DECLARE_EVENT_CLASS
/* is_owner_or_cap() exists */
#undef HAVE_IS_OWNER_OR_CAP
+/* uncached_acl_sentinel() exists */
+#undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
+
/* kernel defines KOBJ_NAME_LEN */
#undef HAVE_KOBJ_NAME_LEN
/* iops->permission() with nameidata exists */
#undef HAVE_PERMISSION_WITH_NAMEIDATA
-/* inode contains i_acl and i_default_acl */
-#undef HAVE_POSIX_ACL_CACHING
-
/* posix_acl_chmod() exists */
#undef HAVE_POSIX_ACL_CHMOD
/* posix_acl_release() is GPL-only */
#undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY
+/* posix_acl_valid() wants user namespace */
+#undef HAVE_POSIX_ACL_VALID_WITH_NS
+
/* iops->put_link() cookie */
#undef HAVE_PUT_LINK_COOKIE
/* REQ_FAILFAST_MASK is defined */
#undef HAVE_REQ_FAILFAST_MASK
+/* REQ_OP_DISCARD is defined */
+#undef HAVE_REQ_OP_DISCARD
+
+/* REQ_OP_FLUSH is defined */
+#undef HAVE_REQ_OP_FLUSH
+
+/* REQ_OP_SECURE_ERASE is defined */
+#undef HAVE_REQ_OP_SECURE_DISCARD
+
/* set_nlink() is available */
#undef HAVE_SET_NLINK
/* fops->iterate() is available */
#undef HAVE_VFS_ITERATE
+/* fops->iterate_shared() is available */
+#undef HAVE_VFS_ITERATE_SHARED
+
/* fops->readdir() is available */
#undef HAVE_VFS_READDIR
/* xattr_handler->get() wants dentry */
#undef HAVE_XATTR_GET_DENTRY
+/* xattr_handler->get() wants both dentry and inode */
+#undef HAVE_XATTR_GET_DENTRY_INODE
+
/* xattr_handler->get() wants xattr_handler */
#undef HAVE_XATTR_GET_HANDLER
/* xattr_handler->set() wants dentry */
#undef HAVE_XATTR_SET_DENTRY
+/* xattr_handler->set() wants both dentry and inode */
+#undef HAVE_XATTR_SET_DENTRY_INODE
+
/* xattr_handler->set() wants xattr_handler */
#undef HAVE_XATTR_SET_HANDLER