From: Aron Xu Date: Mon, 19 Sep 2016 20:14:07 +0000 (+0800) Subject: Merge tag 'upstream/0.6.5.8' X-Git-Tag: debian/0.7.9-2~102 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=de20629416b4707e5ee457cad1e14ffaf0d8094a;hp=c377a227f0cf00a4c20bcba03e5c852110bc5af7;p=mirror_zfs-debian.git Merge tag 'upstream/0.6.5.8' Upstream version 0.6.5.8 --- diff --git a/META b/META index f2cc9595..00be65be 100644 --- a/META +++ b/META @@ -1,7 +1,7 @@ Meta: 1 Name: zfs Branch: 1.0 -Version: 0.6.5.7 +Version: 0.6.5.8 Release: 1 Release-Tags: relext License: CDDL diff --git a/Makefile.am b/Makefile.am index f8abb5f2..eacc76a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,6 +55,13 @@ shellcheck: 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 diff --git a/Makefile.in b/Makefile.in index c85d874f..ee78f9cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,6 +72,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -122,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -1214,6 +1216,13 @@ shellcheck: 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 diff --git a/aclocal.m4 b/aclocal.m4 index 6e972572..60201509 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1099,6 +1099,7 @@ m4_include([config/kernel-bdi-setup-and-register.m4]) 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]) @@ -1149,6 +1150,7 @@ m4_include([config/kernel-set-nlink.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]) diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 4d9f316a..f5ed0f57 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/arc_summary/Makefile.in b/cmd/arc_summary/Makefile.in index 430e21e2..bb3936a7 100644 --- a/cmd/arc_summary/Makefile.in +++ b/cmd/arc_summary/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/arcstat/Makefile.in b/cmd/arcstat/Makefile.in index a146a63c..89718f44 100644 --- a/cmd/arcstat/Makefile.in +++ b/cmd/arcstat/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/dbufstat/Makefile.in b/cmd/dbufstat/Makefile.in index a72144c9..76349697 100644 --- a/cmd/dbufstat/Makefile.in +++ b/cmd/dbufstat/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/fsck_zfs/Makefile.in b/cmd/fsck_zfs/Makefile.in index 8ee90cd6..77a5fc32 100644 --- a/cmd/fsck_zfs/Makefile.in +++ b/cmd/fsck_zfs/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/mount_zfs/Makefile.in b/cmd/mount_zfs/Makefile.in index 282fac7a..1db590b7 100644 --- a/cmd/mount_zfs/Makefile.in +++ b/cmd/mount_zfs/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/vdev_id/Makefile.in b/cmd/vdev_id/Makefile.in index f1cbea92..351809f3 100644 --- a/cmd/vdev_id/Makefile.in +++ b/cmd/vdev_id/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index dba5e3b1..48d2b620 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 59a0b1b6..882c6874 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -67,13 +67,22 @@ 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; @@ -1925,12 +1934,12 @@ dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header) (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) { diff --git a/cmd/zed/Makefile.in b/cmd/zed/Makefile.in index 408cfcf1..d71afe31 100644 --- a/cmd/zed/Makefile.in +++ b/cmd/zed/Makefile.in @@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -104,6 +105,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index bd1cb882..b9542a3d 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zhack/Makefile.in b/cmd/zhack/Makefile.in index ffd3cc0b..71174ae4 100644 --- a/cmd/zhack/Makefile.in +++ b/cmd/zhack/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index efd77177..1579d83b 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index e9b95018..ad745051 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index 1b221ca7..e4917860 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zstreamdump/Makefile.in b/cmd/zstreamdump/Makefile.in index c2b21965..5fc951f1 100644 --- a/cmd/zstreamdump/Makefile.in +++ b/cmd/zstreamdump/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index 42da33b0..a1f55615 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/cmd/zvol_id/Makefile.in b/cmd/zvol_id/Makefile.in index ce8d9522..7682110d 100644 --- a/cmd/zvol_id/Makefile.in +++ b/cmd/zvol_id/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4 index 1cb28b25..e6f2bf50 100644 --- a/config/kernel-acl.m4 +++ b/config/kernel-acl.m4 @@ -76,42 +76,45 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CHMOD], [ ]) 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 + #include ],[ - 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 #include ],[ - 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) ]) @@ -247,18 +250,20 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [ ]) 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 ],[ - 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) ]) diff --git a/config/kernel-bio-op.m4 b/config/kernel-bio-op.m4 new file mode 100644 index 00000000..b4b69951 --- /dev/null +++ b/config/kernel-bio-op.m4 @@ -0,0 +1,67 @@ +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 + ],[ + 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 + ],[ + 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 + ],[ + 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 + ],[ + 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) + ]) +]) diff --git a/config/kernel-blk-queue-flush.m4 b/config/kernel-blk-queue-flush.m4 index bb74ea1c..1baab83a 100644 --- a/config/kernel-blk-queue-flush.m4 +++ b/config/kernel-blk-queue-flush.m4 @@ -22,25 +22,64 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLUSH], [ 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 + #include + + 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 + #include #include - 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 + #include + #include + + 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" ]) diff --git a/config/kernel-submit_bio.m4 b/config/kernel-submit_bio.m4 new file mode 100644 index 00000000..da5f85ca --- /dev/null +++ b/config/kernel-submit_bio.m4 @@ -0,0 +1,20 @@ +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 + ],[ + 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) + ]) +]) diff --git a/config/kernel-vfs-iterate.m4 b/config/kernel-vfs-iterate.m4 index c2c65622..7b1599e1 100644 --- a/config/kernel-vfs-iterate.m4 +++ b/config/kernel-vfs-iterate.m4 @@ -1,8 +1,8 @@ -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 int iterate(struct file *filp, struct dir_context * context) @@ -10,34 +10,55 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [ 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 - 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 + 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) + ]) + ]) ]) ]) diff --git a/config/kernel-xattr-handler.m4 b/config/kernel-xattr-handler.m4 index f6142871..dcffd448 100644 --- a/config/kernel-xattr-handler.m4 +++ b/config/kernel-xattr-handler.m4 @@ -62,18 +62,17 @@ dnl # Supported xattr handler get() interfaces checked newest to oldest. 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 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, @@ -81,23 +80,22 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_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 - 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, @@ -105,20 +103,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_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 - 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, @@ -126,10 +127,32 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_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 + + 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]) + ]) ]) ]) ]) @@ -140,18 +163,18 @@ dnl # Supported xattr handler set() interfaces checked newest to oldest. 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 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)) = { @@ -160,23 +183,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [ ],[ ],[ 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 - 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, @@ -184,21 +207,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_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 - 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, @@ -206,10 +231,33 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_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 + + 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]) + ]) ]) ]) ]) diff --git a/config/kernel.m4 b/config/kernel.m4 index a9f1b6ac..53720eee 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -8,6 +8,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ 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 @@ -22,6 +23,10 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ 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 @@ -40,14 +45,14 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ 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 diff --git a/configure b/configure index 4ae6130c..ecaed8ba 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /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, @@ -567,8 +567,8 @@ MAKEFLAGS= # 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='' @@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then # 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]... @@ -1472,7 +1472,7 @@ fi 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 @@ -1607,7 +1607,7 @@ fi 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. @@ -1972,7 +1972,7 @@ cat >config.log <<_ACEOF 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 $@ @@ -3099,7 +3099,7 @@ fi # Define the identity of the package. PACKAGE='zfs' - VERSION='0.6.5.7' + VERSION='0.6.5.8' cat >>confdefs.h <<_ACEOF @@ -13045,6 +13045,73 @@ fi +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 + +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 @@ -14122,23 +14189,20 @@ fi - { $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 - - void wanted_end_io(struct bio *bio) { return; } - - bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io; + #include int main (void) { + enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD; ; return 0; @@ -14172,7 +14236,7 @@ _ACEOF { $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 @@ -14190,21 +14254,20 @@ fi - { $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 + #include int main (void) { - int flags __attribute__ ((unused)); - flags = BIO_RW_BARRIER; + enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE; ; return 0; @@ -14238,7 +14301,7 @@ _ACEOF { $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 @@ -14256,21 +14319,20 @@ fi - { $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 + #include int main (void) { - int flags __attribute__ ((unused)); - flags = BIO_RW_DISCARD; + enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH; ; return 0; @@ -14304,7 +14366,7 @@ _ACEOF { $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 @@ -14322,23 +14384,21 @@ fi - { $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 + #include 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; @@ -14372,7 +14432,7 @@ _ACEOF { $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 @@ -14389,162 +14449,24 @@ fi - { $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 - #include - - 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 - -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 + void wanted_end_io(struct bio *bio) { return; } - #include + 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; @@ -14578,7 +14500,7 @@ _ACEOF { $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 @@ -14594,26 +14516,23 @@ 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}" + { $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 + #include int main (void) { - struct gendisk *disk = NULL; - (void) get_disk_ro(disk); + int flags __attribute__ ((unused)); + flags = BIO_RW_BARRIER; ; return 0; @@ -14647,7 +14566,7 @@ _ACEOF { $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 @@ -14663,23 +14582,569 @@ 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; } + { $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 + #include 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 + +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 + #include + + 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 + #include + + +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 + #include + #include + + 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 + +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 + +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 + +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 + +int +main (void) +{ + + get_gendisk(0, NULL); ; return 0; @@ -14985,8 +15450,8 @@ fi - { $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 @@ -14995,8 +15460,8 @@ cat confdefs.h - <<_ACEOF >conftest.c #include 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, @@ -15039,17 +15504,15 @@ _ACEOF { $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 @@ -15057,9 +15520,9 @@ cat confdefs.h - <<_ACEOF >conftest.c #include - 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, @@ -15099,33 +15562,190 @@ _ACEOF $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 + + 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 + + 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 + #include - 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) @@ -15161,57 +15781,33 @@ _ACEOF $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 + #include - 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) @@ -15247,7 +15843,7 @@ _ACEOF $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 @@ -15257,24 +15853,24 @@ 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 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 + #include - 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) @@ -15310,7 +15906,7 @@ _ACEOF $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 @@ -15320,24 +15916,24 @@ 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 "$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 + #include - 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) @@ -15373,7 +15969,7 @@ _ACEOF $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 @@ -15383,7 +15979,14 @@ 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 + as_fn_error $? "no; please file a bug report" "$LINENO" 5 + + + +fi + rm -Rf build + + @@ -16153,22 +16756,22 @@ fi - { $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 + #include 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; @@ -16202,7 +16805,7 @@ _ACEOF { $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 @@ -16220,8 +16823,8 @@ fi - { $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 @@ -16234,8 +16837,11 @@ int 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; @@ -16269,7 +16875,7 @@ _ACEOF { $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 @@ -16651,8 +17257,8 @@ fi - { $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 @@ -16664,7 +17270,7 @@ int main (void) { - current_umask(); + void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL); ; return 0; @@ -16698,7 +17304,7 @@ _ACEOF { $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 @@ -20588,8 +21194,8 @@ $as_echo "#define HAVE_LSEEK_EXECUTE 1" >>confdefs.h - { $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 @@ -20601,7 +21207,7 @@ cat confdefs.h - <<_ACEOF >conftest.c static const struct file_operations fops __attribute__ ((unused)) = { - .iterate = iterate, + .iterate_shared = iterate, }; int @@ -20638,80 +21244,150 @@ _ACEOF $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 + 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 + 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 - 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 @@ -20722,7 +21398,6 @@ fi - fi rm -Rf build @@ -22877,6 +23552,73 @@ fi +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 + +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 @@ -23735,7 +24477,142 @@ _ACEOF { $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 + +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 + +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 @@ -23751,11 +24628,10 @@ 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; } + { $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 @@ -23767,8 +24643,8 @@ int main (void) { - struct bio bio; - bio.bi_iter.bi_sector = 0; + int flags __attribute__ ((unused)); + flags = REQ_FAILFAST_MASK; ; return 0; @@ -23802,7 +24678,7 @@ _ACEOF { $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 @@ -23820,23 +24696,20 @@ fi - { $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 + #include 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; @@ -23870,7 +24743,7 @@ _ACEOF { $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 @@ -23888,8 +24761,138 @@ fi - { $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 + +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 + +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 @@ -23901,8 +24904,8 @@ int main (void) { - int flags __attribute__ ((unused)); - flags = REQ_FAILFAST_MASK; + struct bio bio __attribute__ ((unused)); + bio.bi_opf = 0; ; return 0; @@ -23936,7 +24939,7 @@ _ACEOF { $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 @@ -24207,6 +25210,74 @@ $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 + #include + + 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 @@ -24221,24 +25292,78 @@ fi - { $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 + #include #include - 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 + #include + #include + + MODULE_LICENSE("$ZFS_META_LICENSE"); + +int +main (void) +{ + + struct request_queue *q = NULL; + blk_queue_write_cache(q, true, true); ; return 0; @@ -24269,17 +25394,17 @@ _ACEOF $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 @@ -24288,6 +25413,21 @@ 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" @@ -24817,8 +25957,8 @@ fi - { $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 @@ -24827,8 +25967,8 @@ cat confdefs.h - <<_ACEOF >conftest.c #include 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, @@ -24871,17 +26011,15 @@ _ACEOF { $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 @@ -24889,9 +26027,9 @@ cat confdefs.h - <<_ACEOF >conftest.c #include - 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, @@ -24934,17 +26072,17 @@ _ACEOF { $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 @@ -24952,8 +26090,9 @@ cat confdefs.h - <<_ACEOF >conftest.c #include - 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, @@ -24996,6 +26135,68 @@ _ACEOF { $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 + + 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 @@ -25003,7 +26204,7 @@ 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 + as_fn_error $? "no; please file a bug report" "$LINENO" 5 @@ -25027,8 +26228,15 @@ fi - { $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 @@ -25037,8 +26245,9 @@ cat confdefs.h - <<_ACEOF >conftest.c #include 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)) = { @@ -25082,17 +26291,15 @@ _ACEOF { $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 @@ -25100,9 +26307,10 @@ cat confdefs.h - <<_ACEOF >conftest.c #include - 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, @@ -25145,17 +26353,17 @@ _ACEOF { $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 @@ -25163,9 +26371,9 @@ cat confdefs.h - <<_ACEOF >conftest.c #include - 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, @@ -25208,6 +26416,69 @@ _ACEOF { $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 + + 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 @@ -25215,7 +26486,14 @@ 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 + as_fn_error $? "no; please file a bug report" "$LINENO" 5 + + + +fi + rm -Rf build + + @@ -25985,22 +27263,22 @@ fi - { $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 + #include 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; @@ -26034,7 +27312,7 @@ _ACEOF { $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 @@ -26052,8 +27330,8 @@ fi - { $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 @@ -26066,8 +27344,11 @@ int 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; @@ -26101,7 +27382,7 @@ _ACEOF { $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 @@ -26483,8 +27764,8 @@ fi - { $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 @@ -26496,7 +27777,7 @@ int main (void) { - current_umask(); + void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL); ; return 0; @@ -26530,7 +27811,7 @@ _ACEOF { $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 @@ -30420,8 +31701,8 @@ $as_echo "#define HAVE_LSEEK_EXECUTE 1" >>confdefs.h - { $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 @@ -30433,7 +31714,7 @@ cat confdefs.h - <<_ACEOF >conftest.c static const struct file_operations fops __attribute__ ((unused)) = { - .iterate = iterate, + .iterate_shared = iterate, }; int @@ -30473,7 +31754,7 @@ _ACEOF { $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 @@ -30483,20 +31764,20 @@ 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_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 - 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 @@ -30536,6 +31817,69 @@ _ACEOF { $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 + 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 @@ -30543,7 +31887,7 @@ 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 + as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5 @@ -30554,6 +31898,12 @@ fi +fi + rm -Rf build + + + + fi rm -Rf build @@ -32464,7 +33814,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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 @@ -32530,7 +33880,7 @@ _ACEOF 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\\" diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 7826ca29..118c3531 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/contrib/bash_completion.d/Makefile.in b/contrib/bash_completion.d/Makefile.in index 1c97d6c6..29ebd97a 100644 --- a/contrib/bash_completion.d/Makefile.in +++ b/contrib/bash_completion.d/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/contrib/dracut/90zfs/Makefile.in b/contrib/dracut/90zfs/Makefile.in index 64cab1a7..bc4a7e3c 100644 --- a/contrib/dracut/90zfs/Makefile.in +++ b/contrib/dracut/90zfs/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/contrib/dracut/Makefile.in b/contrib/dracut/Makefile.in index a1464f89..b1f64e82 100644 --- a/contrib/dracut/Makefile.in +++ b/contrib/dracut/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/contrib/initramfs/Makefile.in b/contrib/initramfs/Makefile.in index cfe9bc4c..7bfb9335 100644 --- a/contrib/initramfs/Makefile.in +++ b/contrib/initramfs/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/etc/Makefile.in b/etc/Makefile.in index 327d705b..711d0e18 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/etc/init.d/Makefile.in b/etc/init.d/Makefile.in index d3624b78..c45ec3af 100644 --- a/etc/init.d/Makefile.in +++ b/etc/init.d/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/etc/modules-load.d/Makefile.in b/etc/modules-load.d/Makefile.in index a196c035..67dde479 100644 --- a/etc/modules-load.d/Makefile.in +++ b/etc/modules-load.d/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/etc/modules-load.d/zfs.conf.in b/etc/modules-load.d/zfs.conf.in index 73304bc2..8b41baa3 100644 --- a/etc/modules-load.d/zfs.conf.in +++ b/etc/modules-load.d/zfs.conf.in @@ -1 +1,3 @@ -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 diff --git a/etc/systemd/Makefile.in b/etc/systemd/Makefile.in index c1d7c06d..cdb6a6a2 100644 --- a/etc/systemd/Makefile.in +++ b/etc/systemd/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/etc/systemd/system/50-zfs.preset.in b/etc/systemd/system/50-zfs.preset.in index 4efdd720..4d82778e 100644 --- a/etc/systemd/system/50-zfs.preset.in +++ b/etc/systemd/system/50-zfs.preset.in @@ -1,2 +1,7 @@ # 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 diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am index 82aedd1e..f7023dff 100644 --- a/etc/systemd/system/Makefile.am +++ b/etc/systemd/system/Makefile.am @@ -2,7 +2,7 @@ systemdpreset_DATA = \ 50-zfs.preset systemdunit_DATA = \ - zed.service \ + zfs-zed.service \ zfs-import-cache.service \ zfs-import-scan.service \ zfs-mount.service \ @@ -10,7 +10,7 @@ systemdunit_DATA = \ 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 \ diff --git a/etc/systemd/system/Makefile.in b/etc/systemd/system/Makefile.in index 562cfe05..3e87b46e 100644 --- a/etc/systemd/system/Makefile.in +++ b/etc/systemd/system/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -367,7 +369,7 @@ systemdpreset_DATA = \ 50-zfs.preset systemdunit_DATA = \ - zed.service \ + zfs-zed.service \ zfs-import-cache.service \ zfs-import-scan.service \ zfs-mount.service \ @@ -375,7 +377,7 @@ systemdunit_DATA = \ 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 \ diff --git a/etc/systemd/system/zed.service.in b/etc/systemd/system/zed.service.in deleted file mode 100644 index 5b236309..00000000 --- a/etc/systemd/system/zed.service.in +++ /dev/null @@ -1,9 +0,0 @@ -[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 diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index b1deb6ed..8a444b13 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -4,6 +4,7 @@ DefaultDependencies=no Requires=systemd-udev-settle.service After=systemd-udev-settle.service After=cryptsetup.target +After=systemd-remount-fs.service ConditionPathExists=@sysconfdir@/zfs/zpool.cache [Service] @@ -11,3 +12,7 @@ Type=oneshot RemainAfterExit=yes ExecStartPre=/sbin/modprobe zfs ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN + +[Install] +WantedBy=zfs-mount.service +WantedBy=zfs.target diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index 517e12e3..01052838 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -10,4 +10,8 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache 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 diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in index f1056af3..0664fd9e 100644 --- a/etc/systemd/system/zfs-mount.service.in +++ b/etc/systemd/system/zfs-mount.service.in @@ -1,15 +1,17 @@ [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 diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in index c27bbf90..688731ea 100644 --- a/etc/systemd/system/zfs-share.service.in +++ b/etc/systemd/system/zfs-share.service.in @@ -1,14 +1,16 @@ [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 diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in new file mode 100644 index 00000000..e3dec3dc --- /dev/null +++ b/etc/systemd/system/zfs-zed.service.in @@ -0,0 +1,13 @@ +[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 diff --git a/etc/systemd/system/zfs.target.in b/etc/systemd/system/zfs.target.in index 35415338..4699463b 100644 --- a/etc/systemd/system/zfs.target.in +++ b/etc/systemd/system/zfs.target.in @@ -1,8 +1,5 @@ [Unit] Description=ZFS startup target -Requires=zfs-mount.service -Requires=zfs-share.service -Wants=zed.service [Install] WantedBy=multi-user.target diff --git a/etc/zfs/Makefile.in b/etc/zfs/Makefile.in index eb321986..a2099659 100644 --- a/etc/zfs/Makefile.in +++ b/etc/zfs/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/Makefile.in b/include/Makefile.in index c7e241ec..4b6fd072 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index 6c24b478..edf5b919 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index 868b89c5..d26d2429 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -37,21 +37,48 @@ typedef unsigned __bitwise__ fmode_t; #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 @@ -272,41 +299,121 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags) * 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 diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index bcec1146..b4881a6c 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -202,9 +202,6 @@ lseek_execute( * At 60 seconds the kernel will also begin issuing RCU stall warnings. */ #include -#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) @@ -233,7 +230,6 @@ zpl_posix_acl_release(struct posix_acl *acl) 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); @@ -255,7 +251,6 @@ zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) { spin_unlock(&ip->i_lock); zpl_posix_acl_release(older); -#endif /* HAVE_POSIX_ACL_CACHING */ } static inline void @@ -320,15 +315,19 @@ typedef umode_t zpl_equivmode_t; #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, diff --git a/include/linux/xattr_compat.h b/include/linux/xattr_compat.h index 5e19ea1e..b1c42930 100644 --- a/include/linux/xattr_compat.h +++ b/include/linux/xattr_compat.h @@ -101,13 +101,26 @@ fn(struct inode *ip, char *list, size_t list_size, \ } #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, \ @@ -140,13 +153,27 @@ fn(struct inode *ip, const char *name, void *buffer, size_t size) \ } #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, \ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index d997dc4c..708064b8 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h index d6da5dcf..da6f21c2 100644 --- a/include/sys/dsl_dataset.h +++ b/include/sys/dsl_dataset.h @@ -221,6 +221,7 @@ int dsl_dataset_own_obj(struct dsl_pool *dp, uint64_t dsobj, 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, diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index 1f556484..647ae309 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index 22352550..39e2fa2d 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index a96c5691..22a0f8ff 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 4da144c7..57bf55f9 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -69,6 +69,7 @@ typedef enum dmu_objset_type { #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 diff --git a/include/sys/spa.h b/include/sys/spa.h index 5dc9084d..bfd2e790 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -446,6 +446,10 @@ _NOTE(CONSTCOND) } while (0) ((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) \ diff --git a/include/sys/trace_acl.h b/include/sys/trace_acl.h index b94cb79c..a656869c 100644 --- a/include/sys/trace_acl.h +++ b/include/sys/trace_acl.h @@ -64,7 +64,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class, __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) @@ -104,7 +103,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class, __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; @@ -128,7 +126,7 @@ DECLARE_EVENT_CLASS(zfs_ace_class, "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 " @@ -139,7 +137,7 @@ DECLARE_EVENT_CLASS(zfs_ace_class, __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, diff --git a/include/sys/vdev_disk.h b/include/sys/vdev_disk.h index d5a1889d..cf8028d2 100644 --- a/include/sys/vdev_disk.h +++ b/include/sys/vdev_disk.h @@ -38,7 +38,7 @@ typedef struct vdev_disk { } 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 */ diff --git a/include/sys/zfs_rlock.h b/include/sys/zfs_rlock.h index ea5e4036..5322f3bc 100644 --- a/include/sys/zfs_rlock.h +++ b/include/sys/zfs_rlock.h @@ -32,7 +32,9 @@ extern "C" { #ifdef _KERNEL -#include +#include +#include +#include typedef enum { RL_READER, @@ -40,8 +42,16 @@ typedef enum { 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 */ @@ -61,7 +71,8 @@ typedef struct rl { * 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); @@ -78,6 +89,23 @@ void zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len); */ 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 diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h index c03bef5c..32ffe07d 100644 --- a/include/sys/zfs_znode.h +++ b/include/sys/zfs_znode.h @@ -37,6 +37,7 @@ #include #include #include +#include #endif #include #include @@ -187,8 +188,7 @@ typedef struct znode { 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? */ @@ -209,11 +209,9 @@ typedef struct znode { 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? */ diff --git a/include/sys/zpl.h b/include/sys/zpl.h index 54b35e02..c6085481 100644 --- a/include/sys/zpl.h +++ b/include/sys/zpl.h @@ -123,7 +123,7 @@ extern const struct inode_operations zpl_ops_snapdirs; 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, \ diff --git a/lib/Makefile.in b/lib/Makefile.in index d29ccfbd..b2e1ae4b 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index e018aa22..c382c85b 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index 9987c375..410969c7 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index 63942432..0aa20ade 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libshare/Makefile.in b/lib/libshare/Makefile.in index 17d2a50e..27710476 100644 --- a/lib/libshare/Makefile.in +++ b/lib/libshare/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index a141ed77..dc636228 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 677332ab..6da7fa1e 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 69edd0af..13a80399 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 972d2658..fd0c9ac9 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index 102317d4..b7be635d 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index 1305ba77..6b0fef9a 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index dfbde307..ec67679d 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 0b087cec..89b3e7b8 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index e226197e..8851be1b 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index 425d4ea1..8ba2d634 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index be96252c..1f5ea91f 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index 3bc8f047..bb6a8377 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index afebe96c..cd3b81f2 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 6ef1a43a..ad56e938 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index d9a989eb..f30f4798 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -102,6 +103,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libzfs/libzfs.pc b/lib/libzfs/libzfs.pc index ee6f0a47..f031e4c7 100644 --- a/lib/libzfs/libzfs.pc +++ b/lib/libzfs/libzfs.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include 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 diff --git a/lib/libzfs/libzfs_core.pc b/lib/libzfs/libzfs_core.pc index b59c0e45..9869d0f7 100644 --- a/lib/libzfs/libzfs_core.pc +++ b/lib/libzfs/libzfs_core.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include 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 diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 088ee35c..dde1a9a0 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -3889,7 +3889,6 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive, } if (recursive) { - parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name); if (parentname == NULL) { ret = -1; @@ -3902,8 +3901,7 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive, 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); @@ -3952,23 +3950,23 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive, * 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); diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index e40f6f69..d0df9e3c 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -221,7 +221,7 @@ fix_paths(nvlist_t *nv, name_entry_t *names) } /* 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; diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c index c01ec105..bd874e48 100644 --- a/lib/libzfs/libzfs_mount.c +++ b/lib/libzfs/libzfs_mount.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014 by Delphix. All rights reserved. */ /* @@ -744,13 +745,6 @@ zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto) 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. @@ -761,6 +755,14 @@ zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto) 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. @@ -1072,7 +1074,7 @@ libzfs_dataset_cmp(const void *a, const void *b) if (gotb) return (1); - return (strcmp(zfs_get_name(a), zfs_get_name(b))); + return (strcmp(zfs_get_name(*za), zfs_get_name(*zb))); } /* diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index a194b8b5..da980cfd 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -1891,7 +1891,12 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname, "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, diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c old mode 100644 new mode 100755 index ccace2d2..56dfd950 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -1352,7 +1352,8 @@ zprop_print_one_property(const char *name, zprop_get_cbdata_t *cbp, 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); diff --git a/lib/libzfs_core/Makefile.in b/lib/libzfs_core/Makefile.in index 5f1a2f98..06f448eb 100644 --- a/lib/libzfs_core/Makefile.in +++ b/lib/libzfs_core/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index 4f58907b..a4ceaf5c 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/man/Makefile.in b/man/Makefile.in index 3ebd7994..fcd6e60e 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/man/man1/Makefile.in b/man/man1/Makefile.in index 8e87b29f..3208853f 100644 --- a/man/man1/Makefile.in +++ b/man/man1/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/man/man5/Makefile.in b/man/man5/Makefile.in index 078599bd..5a5288dc 100644 --- a/man/man5/Makefile.in +++ b/man/man5/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index bce26fa9..23f7efae 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -24,6 +24,19 @@ Description of the different parameters to the ZFS module. .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 diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index 499bf380..a29ef5fa 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/module/avl/zavl.mod.c b/module/avl/zavl.mod.c deleted file mode 100644 index 062c559e..00000000 --- a/module/avl/zavl.mod.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include - -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"); diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c index 1eca0fee..16a0fc3e 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016 by Delphix. All rights reserved. */ #include @@ -138,6 +139,11 @@ static int nvlist_add_common(nvlist_t *nvl, const char *name, data_type_t type, #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 */ ...) @@ -2017,6 +2023,7 @@ typedef struct { const nvs_ops_t *nvs_ops; void *nvs_private; nvpriv_t *nvs_priv; + int nvs_recursion; } nvstream_t; /* @@ -2168,9 +2175,16 @@ static int 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; @@ -2183,8 +2197,12 @@ nvs_embedded(nvstream_t *nvs, nvlist_t *embedded) 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: @@ -2272,6 +2290,7 @@ nvlist_common(nvlist_t *nvl, char *buf, size_t *buflen, int encoding, return (EINVAL); nvs.nvs_op = nvs_op; + nvs.nvs_recursion = 0; /* * For NVS_OP_ENCODE and NVS_OP_DECODE make sure an nvlist and diff --git a/module/nvpair/znvpair.mod.c b/module/nvpair/znvpair.mod.c deleted file mode 100644 index 9c37d776..00000000 --- a/module/nvpair/znvpair.mod.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -#include - -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"); diff --git a/module/unicode/zunicode.mod.c b/module/unicode/zunicode.mod.c deleted file mode 100644 index 88cda5ed..00000000 --- a/module/unicode/zunicode.mod.c +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -#include - -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"); diff --git a/module/zcommon/zcommon.mod.c b/module/zcommon/zcommon.mod.c deleted file mode 100644 index 465d2410..00000000 --- a/module/zcommon/zcommon.mod.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include - -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"); diff --git a/module/zfs/arc.c b/module/zfs/arc.c index c53c01ea..04fde6c1 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -1451,6 +1451,13 @@ arc_buf_info(arc_buf_t *ab, arc_buf_info_t *abi, int state_index) 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; @@ -1458,9 +1465,6 @@ arc_buf_info(arc_buf_t *ab, arc_buf_info_t *abi, int state_index) 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; @@ -2697,12 +2701,7 @@ arc_prune_task(void *ptr) 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); } /* @@ -4320,17 +4319,11 @@ top: /* * 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; } @@ -4568,13 +4561,19 @@ arc_add_prune_callback(arc_prune_func_t *func, void *private) 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 @@ -5250,7 +5249,7 @@ arc_tuning_update(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 - */ diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index d340da82..483067cc 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -2628,6 +2628,22 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, dmu_tx_t *tx) 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); } diff --git a/module/zfs/dbuf_stats.c b/module/zfs/dbuf_stats.c index afdf828e..6f39f80e 100644 --- a/module/zfs/dbuf_stats.c +++ b/module/zfs/dbuf_stats.c @@ -148,7 +148,6 @@ dbuf_stats_hash_table_data(char *buf, size_t size, void *data) } 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); @@ -157,7 +156,6 @@ dbuf_stats_hash_table_data(char *buf, size_t size, void *data) } mutex_exit(&db->db_mtx); - mutex_enter(DBUF_HASH_MUTEX(h, dsh->idx)); } mutex_exit(DBUF_HASH_MUTEX(h, dsh->idx)); diff --git a/module/zfs/dmu_traverse.c b/module/zfs/dmu_traverse.c index cdb29b62..a58f77f0 100644 --- a/module/zfs/dmu_traverse.c +++ b/module/zfs/dmu_traverse.c @@ -39,6 +39,7 @@ #include int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */ +int32_t ignore_hole_birth = 1; typedef struct prefetch_data { kmutex_t pd_mtx; @@ -250,7 +251,7 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp, * * 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); @@ -692,4 +693,7 @@ EXPORT_SYMBOL(traverse_pool); 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 diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index a0638856..7124f3d6 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -665,6 +665,17 @@ dsl_dataset_name(dsl_dataset_t *ds, char *name) } } +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) { diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c old mode 100644 new mode 100755 index ada0eac6..cf5259ac --- a/module/zfs/dsl_pool.c +++ b/module/zfs/dsl_pool.c @@ -182,12 +182,20 @@ dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp) 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); } diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 4468cdf8..a220ae39 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -1974,6 +1974,16 @@ spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, 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) { @@ -1988,6 +1998,14 @@ 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); diff --git a/module/zfs/spa_config.c b/module/zfs/spa_config.c index 929f1816..19432e0a 100644 --- a/module/zfs/spa_config.c +++ b/module/zfs/spa_config.c @@ -174,7 +174,7 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) 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 @@ -201,7 +201,8 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) */ (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) { diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 7aff5455..7d814a63 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -877,11 +877,11 @@ vdev_metaslab_init(vdev_t *vd, uint64_t txg) 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; @@ -935,7 +935,7 @@ vdev_metaslab_fini(vdev_t *vd) 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; } @@ -1407,7 +1407,7 @@ vdev_validate(vdev_t *vd, boolean_t strict) 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); } @@ -1894,12 +1894,15 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, int scrub_done) /* * 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); diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index 9b51ecc1..2f06e721 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -494,30 +494,45 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int bio_size) 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); @@ -530,7 +545,6 @@ retry: 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; @@ -574,9 +588,9 @@ retry: 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); @@ -594,7 +608,7 @@ retry: /* 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 @@ -617,10 +631,11 @@ retry: 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) @@ -661,7 +676,8 @@ vdev_disk_io_flush(struct block_device *bdev, zio_t *zio) 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); @@ -673,7 +689,7 @@ vdev_disk_io_start(zio_t *zio) 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: @@ -712,17 +728,19 @@ vdev_disk_io_start(zio_t *zio) 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: @@ -732,7 +750,7 @@ vdev_disk_io_start(zio_t *zio) } 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); @@ -833,7 +851,8 @@ vdev_disk_read_rootlabel(char *devpath, char *devid, nvlist_t **config) /* 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, diff --git a/module/zfs/vdev_queue.c b/module/zfs/vdev_queue.c index 0c62a6fa..4ed62f96 100644 --- a/module/zfs/vdev_queue.c +++ b/module/zfs/vdev_queue.c @@ -249,20 +249,29 @@ static int 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) diff --git a/module/zfs/zfs.mod.c b/module/zfs/zfs.mod.c deleted file mode 100644 index 9e0b2272..00000000 --- a/module/zfs/zfs.mod.c +++ /dev/null @@ -1,474 +0,0 @@ -#include -#include -#include - -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"); diff --git a/module/zfs/zfs_acl.c b/module/zfs/zfs_acl.c index a208dea1..bbb01930 100644 --- a/module/zfs/zfs_acl.c +++ b/module/zfs/zfs_acl.c @@ -2473,53 +2473,33 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr) { 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 */ @@ -2561,11 +2541,15 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr) 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); } @@ -2626,6 +2610,9 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr) needed_bits, needed_bits); } + if (is_attr) + iput(ZTOI(xzp)); + return (error); } diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index fc46a730..05d841d4 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -486,7 +486,6 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id, 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; diff --git a/module/zfs/zfs_dir.c b/module/zfs/zfs_dir.c index c1eadd0d..b0c8e365 100644 --- a/module/zfs/zfs_dir.c +++ b/module/zfs/zfs_dir.c @@ -593,7 +593,7 @@ zfs_purgedir(znode_t *dzp) if (error) skipped += 1; dmu_tx_commit(tx); - + set_nlink(ZTOI(xzp), xzp->z_links); zfs_iput_async(ZTOI(xzp)); } zap_cursor_fini(&zc); @@ -694,6 +694,7 @@ zfs_rmnode(znode_t *zp) 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); diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 745f7132..3ebe28d7 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -1379,9 +1379,9 @@ get_zfs_sb(const char *dsname, zfs_sb_t **zsbp) 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); diff --git a/module/zfs/zfs_rlock.c b/module/zfs/zfs_rlock.c index 5064eb79..fd3e8a68 100644 --- a/module/zfs/zfs_rlock.c +++ b/module/zfs/zfs_rlock.c @@ -101,9 +101,9 @@ * 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; @@ -112,32 +112,32 @@ zfs_range_lock_writer(znode_t *zp, rl_t *new) 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; } @@ -175,7 +175,7 @@ wait: 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; @@ -353,9 +353,9 @@ zfs_range_add_reader(avl_tree_t *tree, rl_t *new, rl_t *prev, avl_index_t where) * 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; @@ -378,7 +378,7 @@ retry: 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) @@ -401,7 +401,7 @@ retry: 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) @@ -423,14 +423,14 @@ got_lock: * 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; @@ -441,18 +441,18 @@ zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type) 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); } @@ -474,9 +474,9 @@ zfs_range_free(void *arg) * 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; @@ -543,7 +543,7 @@ zfs_range_unlock_reader(znode_t *zp, rl_t *remove, list_t *free_list) 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; @@ -552,10 +552,10 @@ zfs_range_unlock(rl_t *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); @@ -568,9 +568,9 @@ zfs_range_unlock(rl_t *rl) * 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); @@ -588,17 +588,17 @@ zfs_range_unlock(rl_t *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; @@ -607,7 +607,7 @@ zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len) if (rl->r_read_wanted) cv_broadcast(&rl->r_rd_cv); - mutex_exit(&zp->z_range_lock); + mutex_exit(&zrl->zr_mutex); } /* @@ -626,3 +626,10 @@ zfs_range_compare(const void *arg1, const void *arg2) 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 diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 7d8332ac..b9f1715b 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1124,8 +1124,7 @@ zfs_root(zfs_sb_t *zsb, struct inode **ipp) } 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 @@ -1215,15 +1214,29 @@ zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects) } 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, @@ -1601,6 +1614,14 @@ zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp) 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; @@ -1613,7 +1634,7 @@ zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp) fid_gen); iput(ZTOI(zp)); ZFS_EXIT(zsb); - return (SET_ERROR(EINVAL)); + return (SET_ERROR(ENOENT)); } *ipp = ZTOI(zp); diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 43c3a3c2..960df25b 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -481,7 +481,8 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr) /* * 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 @@ -663,7 +664,7 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr) * 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) { /* @@ -680,7 +681,7 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr) * 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) { @@ -1007,7 +1008,8 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio) * 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); @@ -1028,8 +1030,8 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio) 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; @@ -3947,7 +3949,7 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc) 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 */ @@ -4192,10 +4194,10 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages) * 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); @@ -4206,7 +4208,6 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages) err = SET_ERROR(EIO); return (err); } - cur_pp = pl[++page_idx]; } return (0); diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c index 1742a51e..eac9ce48 100644 --- a/module/zfs/zfs_znode.c +++ b/module/zfs/zfs_znode.c @@ -113,14 +113,11 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags) 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); } @@ -137,13 +134,11 @@ zfs_znode_cache_destructor(void *buf, void *arg) 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 @@ -435,11 +430,6 @@ zfs_inode_destroy(struct inode *ip) 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); } @@ -501,8 +491,7 @@ zfs_inode_set_ops(zfs_sb_t *zsb, struct inode *ip) */ 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; @@ -521,7 +510,6 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz, 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; @@ -531,10 +519,12 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz, 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); @@ -560,14 +550,6 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz, 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); @@ -913,8 +895,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr, 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 { @@ -1124,7 +1105,7 @@ again: * 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 { @@ -1148,6 +1129,16 @@ zfs_rezget(znode_t *zp) 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); @@ -1162,11 +1153,6 @@ zfs_rezget(znode_t *zp) 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); @@ -1437,7 +1423,7 @@ zfs_extend(znode_t *zp, uint64_t end) /* * 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. @@ -1554,7 +1540,7 @@ zfs_free_range(znode_t *zp, uint64_t off, uint64_t len) /* * 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. @@ -1636,7 +1622,7 @@ zfs_trunc(znode_t *zp, uint64_t end) /* * 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. diff --git a/module/zfs/zpl_ctldir.c b/module/zfs/zpl_ctldir.c index dd02e9e9..069834ea 100644 --- a/module/zfs/zpl_ctldir.c +++ b/module/zfs/zpl_ctldir.c @@ -81,7 +81,7 @@ out: 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) { @@ -144,7 +144,9 @@ const struct file_operations zpl_fops_root = { .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, @@ -285,7 +287,7 @@ out: 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) { @@ -385,7 +387,9 @@ const struct file_operations zpl_fops_snapdir = { .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, @@ -472,7 +476,7 @@ out: 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) { @@ -525,7 +529,9 @@ const struct file_operations zpl_fops_shares = { .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, diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c index 5c430c7c..a629b59d 100644 --- a/module/zfs/zpl_file.c +++ b/module/zfs/zpl_file.c @@ -93,7 +93,7 @@ zpl_iterate(struct file *filp, struct dir_context *ctx) 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) { @@ -419,13 +419,13 @@ zpl_llseek(struct file *filp, loff_t offset, int whence) 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); } @@ -851,7 +851,9 @@ const struct file_operations zpl_file_operations = { 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, diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c index bcdbbd69..91c36c9e 100644 --- a/module/zfs/zpl_super.c +++ b/module/zfs/zpl_super.c @@ -336,12 +336,12 @@ zpl_parse_options(char *osname, char *mntopts, zfs_mntopts_t *zmo, 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; diff --git a/module/zfs/zpl_xattr.c b/module/zfs/zpl_xattr.c index 1a15d4d6..f14dd1a5 100644 --- a/module/zfs/zpl_xattr.c +++ b/module/zfs/zpl_xattr.c @@ -1017,11 +1017,16 @@ zpl_get_acl(struct inode *ip, int type) 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: @@ -1051,8 +1056,11 @@ zpl_get_acl(struct inode *ip, int type) 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); } @@ -1290,7 +1298,7 @@ __zpl_xattr_acl_set_access(struct inode *ip, const char *name, 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); @@ -1330,7 +1338,7 @@ __zpl_xattr_acl_set_default(struct inode *ip, const char *name, 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); diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index a7a79e6d..04f68b5f 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -74,7 +74,7 @@ typedef struct zvol_state { 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 */ @@ -623,7 +623,7 @@ zvol_write(struct bio *bio) 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); /* @@ -632,7 +632,7 @@ zvol_write(struct bio *bio) 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); @@ -648,12 +648,12 @@ zvol_write(struct bio *bio) 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); @@ -677,32 +677,27 @@ zvol_discard(struct bio *bio) 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); @@ -722,7 +717,7 @@ zvol_read(struct bio *bio) 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); @@ -767,7 +762,7 @@ zvol_request(struct request_queue *q, struct bio *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; } @@ -823,7 +818,8 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio) 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. @@ -1234,12 +1230,7 @@ zvol_alloc(dev_t dev, const char *name) 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) @@ -1250,10 +1241,7 @@ zvol_alloc(dev_t dev, const char *name) 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); @@ -1282,8 +1270,7 @@ zvol_free(zvol_state_t *zv) 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; diff --git a/module/zpios/zpios.mod.c b/module/zpios/zpios.mod.c deleted file mode 100644 index bc848b53..00000000 --- a/module/zpios/zpios.mod.c +++ /dev/null @@ -1,88 +0,0 @@ -#include -#include -#include - -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"); diff --git a/rpm/Makefile.in b/rpm/Makefile.in index 97886746..e7278b1c 100644 --- a/rpm/Makefile.in +++ b/rpm/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/rpm/generic/Makefile.in b/rpm/generic/Makefile.in index 74305ec8..78620c8d 100644 --- a/rpm/generic/Makefile.in +++ b/rpm/generic/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/rpm/generic/zfs-kmod.spec.in b/rpm/generic/zfs-kmod.spec.in index 3db3a27c..2f41d0bc 100644 --- a/rpm/generic/zfs-kmod.spec.in +++ b/rpm/generic/zfs-kmod.spec.in @@ -186,6 +186,46 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 9 2016 Ned Bass - 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 - 0.6.5.7-1 - Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177 - Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520 diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index f62cc0e0..d02826e2 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -327,6 +327,46 @@ exit 0 %endif %changelog +* Fri Sep 9 2016 Ned Bass - 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 - 0.6.5.7-1 - Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177 - Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520 diff --git a/rpm/redhat/Makefile.in b/rpm/redhat/Makefile.in index 55f2da6f..f2127cd3 100644 --- a/rpm/redhat/Makefile.in +++ b/rpm/redhat/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/rpm/redhat/zfs.spec.in b/rpm/redhat/zfs.spec.in index f62cc0e0..d02826e2 100644 --- a/rpm/redhat/zfs.spec.in +++ b/rpm/redhat/zfs.spec.in @@ -327,6 +327,46 @@ exit 0 %endif %changelog +* Fri Sep 9 2016 Ned Bass - 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 - 0.6.5.7-1 - Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177 - Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520 diff --git a/scripts/Makefile.in b/scripts/Makefile.in index be71b304..34fa6e56 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index ed6641a0..bf6ee46c 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index d9a0662a..df9979fc 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index b460c819..9e0c050c 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/udev/Makefile.in b/udev/Makefile.in index bdb9d7d3..296b1f86 100644 --- a/udev/Makefile.in +++ b/udev/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/udev/rules.d/Makefile.in b/udev/rules.d/Makefile.in index 52374a58..b427873e 100644 --- a/udev/rules.d/Makefile.in +++ b/udev/rules.d/Makefile.in @@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ @@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.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 \ diff --git a/zfs_config.h.in b/zfs_config.h.in index f94b67fc..c376d220 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -12,6 +12,9 @@ /* 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 @@ -39,6 +42,9 @@ /* 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 @@ -66,6 +72,12 @@ /* 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 @@ -102,9 +114,6 @@ /* 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 @@ -207,6 +216,9 @@ /* 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 @@ -258,9 +270,6 @@ /* 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 @@ -276,6 +285,9 @@ /* 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 @@ -288,6 +300,15 @@ /* 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 @@ -330,6 +351,9 @@ /* 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 @@ -339,6 +363,9 @@ /* 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 @@ -363,6 +390,9 @@ /* 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