Version in base suite: 2.3.2-2 Base version: zfs-linux_2.3.2-2 Target version: zfs-linux_2.3.9-0+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/contrib/z/zfs-linux/zfs-linux_2.3.2-2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/contrib/z/zfs-linux/zfs-linux_2.3.9-0+deb13u1.dsc AUTHORS | 10 META | 4 Makefile.am | 1 Makefile.in | 646 README.md | 42 aclocal.m4 | 442 autogen.sh | 1 cmd/Makefile.am | 1 cmd/arc_summary | 8 cmd/arcstat.in | 19 cmd/raidz_test/Makefile.am | 1 cmd/raidz_test/raidz_test.c | 23 cmd/raidz_test/raidz_test.h | 2 cmd/zdb/Makefile.am | 1 cmd/zdb/zdb.c | 318 cmd/zdb/zdb.h | 2 cmd/zdb/zdb_il.c | 2 cmd/zed/Makefile.am | 1 cmd/zed/agents/zfs_agents.c | 67 cmd/zed/agents/zfs_mod.c | 59 cmd/zed/zed.d/Makefile.am | 1 cmd/zed/zed.d/zed-functions.sh | 3 cmd/zed/zed_disk_event.c | 16 cmd/zed/zed_event.c | 2 cmd/zfs/Makefile.am | 1 cmd/zfs/zfs_main.c | 257 cmd/zfs/zfs_project.c | 36 cmd/zhack.c | 532 cmd/zinject/Makefile.am | 1 cmd/zpool/Makefile.am | 1 cmd/zpool/zpool_main.c | 42 cmd/zpool/zpool_vdev.c | 90 cmd/zpool_influxdb/Makefile.am | 1 cmd/zstream/Makefile.am | 1 cmd/ztest.c | 43 config/CppCheck.am | 1 config/Rules.am | 4 config/Shellcheck.am | 1 config/Substfiles.am | 1 config/always-arch.m4 | 1 config/always-compiler-options.m4 | 1 config/always-cppcheck.m4 | 1 config/always-parallel.m4 | 1 config/always-python.m4 | 1 config/always-pyzfs.m4 | 1 config/always-sed.m4 | 1 config/always-shellcheck.m4 | 1 config/always-system.m4 | 1 config/ax_compare_version.m4 | 1 config/ax_count_cpus.m4 | 1 config/ax_python_devel.m4 | 5 config/ax_restore_flags.m4 | 1 config/ax_save_flags.m4 | 1 config/compile | 2 config/config.guess | 1478 config/config.sub | 739 config/deb.am | 21 config/depcomp | 2 config/find_system_library.m4 | 1 config/gettext.m4 | 1 config/host-cpu-c-abi.m4 | 1 config/iconv.m4 | 1 config/install-sh | 148 config/kernel-access-ok-type.m4 | 1 config/kernel-acl.m4 | 32 config/kernel-add-disk.m4 | 1 config/kernel-assign_str.m4 | 1 config/kernel-automount.m4 | 1 config/kernel-bio.m4 | 1 config/kernel-bio_max_segs.m4 | 1 config/kernel-blk-queue.m4 | 27 config/kernel-blkdev.m4 | 10 config/kernel-block-device-operations.m4 | 35 config/kernel-commit-metadata.m4 | 1 config/kernel-config-defined.m4 | 1 config/kernel-copy-from-user-inatomic.m4 | 29 config/kernel-cpu_has_feature.m4 | 1 config/kernel-declare-event-class.m4 | 1 config/kernel-dentry-alias.m4 | 32 config/kernel-dentry-operations.m4 | 83 config/kernel-discard-granularity.m4 | 1 config/kernel-drop-inode.m4 | 25 config/kernel-file.m4 | 1 config/kernel-filelock.m4 | 23 config/kernel-filemap-splice-read.m4 | 1 config/kernel-flush_dcache_page.m4 | 1 config/kernel-fmode-t.m4 | 1 config/kernel-follow-down-one.m4 | 22 config/kernel-follow-down.m4 | 70 config/kernel-fpu.m4 | 1 config/kernel-free-inode.m4 | 25 config/kernel-fs-context.m4 | 61 config/kernel-fs-parse.m4 | 34 config/kernel-fst-mount.m4 | 30 config/kernel-fsync-bdev.m4 | 1 config/kernel-generic_fadvise.m4 | 1 config/kernel-generic_fillattr.m4 | 1 config/kernel-generic_io_acct.m4 | 1 config/kernel-genhd-flags.m4 | 1 config/kernel-get-disk-ro.m4 | 1 config/kernel-iattr-vfsid.m4 | 1 config/kernel-idmap.m4 | 64 config/kernel-idmap_mnt_api.m4 | 1 config/kernel-inode-create.m4 | 1 config/kernel-inode-getattr.m4 | 1 config/kernel-inode-lookup.m4 | 1 config/kernel-inode-permission.m4 | 1 config/kernel-inode-setattr.m4 | 1 config/kernel-inode-state.m4 | 24 config/kernel-inode-times.m4 | 1 config/kernel-insert-inode-locked.m4 | 1 config/kernel-is_owner_or_cap.m4 | 1 config/kernel-kasan-enabled.m4 | 24 config/kernel-kmap-atomic-args.m4 | 3 config/kernel-kmap-local-page.m4 | 1 config/kernel-kmem.m4 | 1 config/kernel-kthread.m4 | 1 config/kernel-kuid-helpers.m4 | 1 config/kernel-kuidgid.m4 | 1 config/kernel-make-request-fn.m4 | 1 config/kernel-misc-minor.m4 | 1 config/kernel-mkdir.m4 | 58 config/kernel-mknod.m4 | 1 config/kernel-mm-page-flags.m4 | 28 config/kernel-mm-pagemap.m4 | 1 config/kernel-namespace.m4 | 32 config/kernel-objtool.m4 | 37 config/kernel-pagemap-folio_wait_bit.m4 | 1 config/kernel-pagemap-readahead-page.m4 | 24 config/kernel-pde-data.m4 | 1 config/kernel-percpu.m4 | 1 config/kernel-pin-user-pages.m4 | 1 config/kernel-proc-operations.m4 | 1 config/kernel-readpages.m4 | 25 config/kernel-reclaim_state.m4 | 1 config/kernel-register_sysctl_table.m4 | 1 config/kernel-rename.m4 | 28 config/kernel-revalidate-disk-size.m4 | 1 config/kernel-sb-dying.m4 | 1 config/kernel-sb-wb-err.m4 | 28 config/kernel-sched.m4 | 1 config/kernel-security-inode-init.m4 | 1 config/kernel-set-nlink.m4 | 1 config/kernel-setattr-prepare.m4 | 1 config/kernel-sget-args.m4 | 25 config/kernel-show-options.m4 | 1 config/kernel-shrink.m4 | 1 config/kernel-siginfo.m4 | 1 config/kernel-stdarg.m4 | 1 config/kernel-strlcpy.m4 | 1 config/kernel-symlink.m4 | 1 config/kernel-sysfs.m4 | 1 config/kernel-timer.m4 | 33 config/kernel-tmpfile.m4 | 1 config/kernel-totalhigh_pages.m4 | 1 config/kernel-totalram-pages-func.m4 | 1 config/kernel-truncate-setsize.m4 | 1 config/kernel-types.m4 | 1 config/kernel-usleep_range.m4 | 1 config/kernel-vfs-file_range.m4 | 1 config/kernel-vfs-filemap_dirty_folio.m4 | 1 config/kernel-vfs-fsync.m4 | 1 config/kernel-vfs-iov_iter.m4 | 1 config/kernel-vfs-migrate_folio.m4 | 1 config/kernel-vfs-migratepage.m4 | 1 config/kernel-vfs-read_folio.m4 | 1 config/kernel-vfs-readpages.m4 | 26 config/kernel-vfs-set_page_dirty.m4 | 1 config/kernel-vfs-writepage.m4 | 25 config/kernel-workqueue.m4 | 77 config/kernel-writeback.m4 | 59 config/kernel-writepage_t.m4 | 26 config/kernel-xattr-handler.m4 | 1 config/kernel-zero_page.m4 | 1 config/kernel.m4 | 174 config/lib-ld.m4 | 1 config/lib-link.m4 | 1 config/lib-prefix.m4 | 1 config/libtool.m4 | 227 config/ltmain.sh | 866 config/ltoptions.m4 | 4 config/ltsugar.m4 | 2 config/ltversion.m4 | 13 config/lt~obsolete.m4 | 4 config/missing | 2 config/mount-helper.m4 | 1 config/nls.m4 | 1 config/pkg.m4 | 1 config/po.m4 | 1 config/progtest.m4 | 1 config/rpm.am | 1 config/tgz.am | 1 config/toolchain-cfi.m4 | 33 config/toolchain-simd.m4 | 70 config/user-aio.h.m4 | 1 config/user-backtrace.m4 | 1 config/user-clock_gettime.m4 | 1 config/user-dracut.m4 | 1 config/user-gettext.m4 | 1 config/user-libaio.m4 | 1 config/user-libatomic.m4 | 1 config/user-libblkid.m4 | 1 config/user-libcrypto.m4 | 1 config/user-libexec.m4 | 1 config/user-libfetch.m4 | 1 config/user-libtirpc.m4 | 1 config/user-libudev.m4 | 1 config/user-libunwind.m4 | 17 config/user-libuuid.m4 | 1 config/user-makedev.m4 | 1 config/user-mount-setattr.m4 | 27 config/user-pam.m4 | 1 config/user-runstatedir.m4 | 1 config/user-statx.m4 | 36 config/user-systemd.m4 | 1 config/user-sysvinit.m4 | 1 config/user-udev.m4 | 1 config/user-zlib.m4 | 1 config/user.m4 | 3 config/zfs-build.m4 | 42 config/zfs-meta.m4 | 7 configure |46366 +++++----- configure.ac | 4 contrib/Makefile.am | 1 contrib/bash_completion.d/Makefile.am | 1 contrib/bpftrace/Makefile.am | 1 contrib/debian/Makefile.am | 1 contrib/debian/control | 8 contrib/debian/not-installed | 1 contrib/debian/openzfs-zfsutils.install | 2 contrib/debian/rules.in | 6 contrib/dracut/Makefile.am | 1 contrib/initramfs/Makefile.am | 1 contrib/initramfs/hooks/zfs.in | 2 contrib/initramfs/scripts/zfs | 3 contrib/pam_zfs_key/Makefile.am | 1 contrib/pam_zfs_key/pam_zfs_key.c | 25 contrib/pyzfs/Makefile.am | 1 contrib/pyzfs/libzfs_core/exceptions.py | 1 contrib/pyzfs/libzfs_core/test/test_libzfs_core.py | 2 contrib/zcp/Makefile.am | 1 copy-builtin | 5 debian/changelog | 13 debian/libzfs6linux.symbols | 1 debian/libzpool6linux.symbols | 29 debian/patches/1000-dont-symlink-zed-scripts.patch | 2 debian/patches/1001-Prevent-manual-builds-in-the-DKMS-source.patch | 2 debian/patches/1002-Check-for-META-and-DCH-consistency-in-autoconf.patch | 25 debian/patches/2100-zfs-load-module.patch | 22 debian/patches/3100-remove-libzfs-module-timeout.patch | 2 debian/patches/force-verbose-rules.patch | 6 debian/patches/move-arcstat-1-to-8.patch | 4 debian/patches/series | 6 debian/patches/ubuntu/zfs-mount-container-start.patch | 4 debian/patches/upstream/0001-Fix-2-bugs-in-non-raw-send-with-encryption.patch | 72 debian/patches/upstream/0002-ARC-Avoid-overflows-in-arc_evict_adj.patch | 64 debian/patches/upstream/0003-Sort-the-blocking-snapshots-list.patch | 49 debian/patches/upstream/0004-Prefer-embedded-blocks-to-dedup.patch | 64 debian/patches/upstream/0005-Add-more-descriptive-destroy-error-message.patch | 51 debian/patches/upstream/0006-Export-correct-symbols-for-Lustre-Direct-IO.patch | 56 debian/rules | 6 debian/zfsutils-linux.install | 2 etc/Makefile.am | 8 etc/init.d/README.md | 2 etc/sudoers.d/zfs | 9 etc/systemd/system-generators/zfs-mount-generator.c | 5 etc/systemd/system/zfs-import-cache.service.in | 4 etc/systemd/system/zfs-import-scan.service.in | 4 etc/systemd/system/zfs-mount.service.in | 1 etc/systemd/system/zfs-mount@.service.in | 25 etc/systemd/system/zfs-volume-wait.service.in | 1 include/Makefile.am | 1 include/Makefile.in | 53 include/libzfs.h | 1 include/os/freebsd/Makefile.am | 1 include/os/freebsd/spl/sys/ccompile.h | 5 include/os/freebsd/spl/sys/cmn_err.h | 16 include/os/freebsd/spl/sys/debug.h | 71 include/os/freebsd/spl/sys/kmem.h | 4 include/os/freebsd/spl/sys/misc.h | 5 include/os/freebsd/spl/sys/mod_os.h | 3 include/os/freebsd/spl/sys/policy.h | 2 include/os/freebsd/spl/sys/proc.h | 4 include/os/freebsd/spl/sys/sysmacros.h | 77 include/os/freebsd/spl/sys/vm.h | 1 include/os/linux/Makefile.am | 3 include/os/linux/kernel/linux/blkdev_compat.h | 18 include/os/linux/kernel/linux/dcache_compat.h | 47 include/os/linux/kernel/linux/mod_compat.h | 64 include/os/linux/kernel/linux/page_compat.h | 4 include/os/linux/kernel/linux/pagemap_compat.h | 36 include/os/linux/kernel/linux/simd_x86.h | 21 include/os/linux/kernel/linux/vfs_compat.h | 61 include/os/linux/kernel/linux/workqueue_compat.h | 41 include/os/linux/kernel/linux/xattr_compat.h | 17 include/os/linux/spl/sys/debug.h | 67 include/os/linux/spl/sys/kmem.h | 5 include/os/linux/spl/sys/misc.h | 6 include/os/linux/spl/sys/rwlock.h | 132 include/os/linux/spl/sys/stat.h | 2 include/os/linux/spl/sys/sysmacros.h | 4 include/os/linux/spl/sys/uio.h | 4 include/os/linux/zfs/sys/policy.h | 2 include/os/linux/zfs/sys/trace_acl.h | 7 include/os/linux/zfs/sys/zfs_vfsops_os.h | 14 include/os/linux/zfs/sys/zfs_znode_impl.h | 1 include/os/linux/zfs/sys/zpl.h | 36 include/sys/arc.h | 9 include/sys/arc_impl.h | 12 include/sys/brt_impl.h | 2 include/sys/dbuf.h | 2 include/sys/ddt.h | 7 include/sys/dmu.h | 41 include/sys/dmu_recv.h | 1 include/sys/dmu_tx.h | 6 include/sys/dnode.h | 15 include/sys/dsl_dataset.h | 4 include/sys/dsl_dir.h | 4 include/sys/frame.h | 8 include/sys/fs/zfs.h | 15 include/sys/metaslab.h | 4 include/sys/metaslab_impl.h | 10 include/sys/mmp.h | 10 include/sys/range_tree.h | 9 include/sys/spa.h | 8 include/sys/spa_impl.h | 3 include/sys/txg.h | 30 include/sys/uberblock_impl.h | 22 include/sys/vdev.h | 13 include/sys/vdev_impl.h | 3 include/sys/vdev_raidz_impl.h | 1 include/sys/vdev_rebuild.h | 4 include/sys/zap_impl.h | 3 include/sys/zcp.h | 1 include/sys/zfs_context.h | 13 include/sys/zfs_debug.h | 3 include/sys/zfs_file.h | 5 include/sys/zfs_project.h | 10 include/sys/zfs_vnops.h | 1 include/sys/zfs_znode.h | 2 include/sys/zio.h | 3 include/sys/zio_impl.h | 13 include/zfs_gitrev.h | 2 lib/Makefile.am | 1 lib/libavl/Makefile.am | 1 lib/libefi/Makefile.am | 1 lib/libefi/rdwr_efi.c | 10 lib/libicp/Makefile.am | 1 lib/libnvpair/Makefile.am | 1 lib/libshare/libshare.c | 8 lib/libshare/os/linux/smb.c | 5 lib/libspl/Makefile.am | 1 lib/libspl/backtrace.c | 66 lib/libspl/include/Makefile.am | 4 lib/libspl/include/assert.h | 77 lib/libspl/include/os/freebsd/sys/mount.h | 17 lib/libspl/include/os/linux/sys/mount.h | 18 lib/libspl/include/os/linux/sys/stat.h | 5 lib/libspl/include/os/linux/sys/vfs.h | 33 lib/libspl/include/sys/abd_impl_os.h | 42 lib/libspl/include/sys/abd_os.h | 48 lib/libspl/os/linux/getmntany.c | 43 lib/libuutil/uu_ident.c | 2 lib/libzdb/Makefile.am | 1 lib/libzfs/Makefile.am | 1 lib/libzfs/libzfs.abi | 8 lib/libzfs/libzfs_changelist.c | 15 lib/libzfs/libzfs_crypto.c | 11 lib/libzfs/libzfs_dataset.c | 71 lib/libzfs/libzfs_diff.c | 4 lib/libzfs/libzfs_impl.h | 17 lib/libzfs/libzfs_iter.c | 2 lib/libzfs/libzfs_mount.c | 43 lib/libzfs/libzfs_pool.c | 67 lib/libzfs/libzfs_sendrecv.c | 8 lib/libzfs/libzfs_status.c | 78 lib/libzfs/libzfs_util.c | 8 lib/libzfs/os/freebsd/libzfs_compat.c | 6 lib/libzfs/os/freebsd/libzfs_zmount.c | 18 lib/libzfs/os/linux/libzfs_mount_os.c | 150 lib/libzfs/os/linux/libzfs_util_os.c | 6 lib/libzfs_core/Makefile.am | 8 lib/libzfs_core/libzfs_core.abi | 3 lib/libzfs_core/libzfs_core.c | 44 lib/libzfs_core/libzfs_core_impl.h | 36 lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c | 3 lib/libzfs_core/os/linux/libzfs_core_ioctl.c | 3 lib/libzfsbootenv/Makefile.am | 1 lib/libzpool/Makefile.am | 3 lib/libzpool/include/Makefile.am | 4 lib/libzpool/include/sys/abd_impl_os.h | 42 lib/libzpool/include/sys/abd_os.h | 48 lib/libzpool/kernel.c | 17 lib/libzstd/Makefile.am | 1 lib/libzutil/Makefile.am | 1 lib/libzutil/os/linux/zutil_device_path_os.c | 16 lib/libzutil/zutil_device_path.c | 2 man/Makefile.am | 2 man/man1/zhack.1 | 81 man/man4/zfs.4 | 235 man/man7/zfsprops.7 | 3 man/man8/zdb.8 | 12 man/man8/zfs-rewrite.8 | 76 man/man8/zfs-rollback.8 | 4 man/man8/zfs.8 | 8 man/man8/zpool-events.8 | 10 man/man8/zpool-iostat.8 | 5 man/man8/zpool-status.8 | 80 module/Kbuild.in | 50 module/Makefile.bsd | 31 module/Makefile.in | 4 module/icp/algs/aes/aes_impl.c | 2 module/icp/algs/modes/gcm.c | 2 module/icp/algs/modes/modes.c | 4 module/icp/algs/sha2/sha2_generic.c | 41 module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S | 4 module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S | 4 module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S | 17 module/icp/asm-x86_64/sha2/sha256-x86_64.S | 17 module/icp/asm-x86_64/sha2/sha512-x86_64.S | 13 module/nvpair/nvpair.c | 99 module/os/freebsd/spl/spl_cmn_err.c | 10 module/os/freebsd/spl/spl_misc.c | 9 module/os/freebsd/spl/spl_policy.c | 14 module/os/freebsd/spl/spl_vm.c | 1 module/os/freebsd/zfs/vdev_geom.c | 3 module/os/freebsd/zfs/zfs_acl.c | 2 module/os/freebsd/zfs/zfs_file_os.c | 10 module/os/freebsd/zfs/zfs_vnops_os.c | 120 module/os/freebsd/zfs/zfs_znode_os.c | 19 module/os/freebsd/zfs/zio_crypt.c | 19 module/os/freebsd/zfs/zvol_os.c | 12 module/os/linux/spl/spl-generic.c | 23 module/os/linux/spl/spl-kmem-cache.c | 8 module/os/linux/spl/spl-kmem.c | 10 module/os/linux/spl/spl-taskq.c | 28 module/os/linux/spl/spl-thread.c | 12 module/os/linux/spl/spl-zone.c | 19 module/os/linux/zfs/abd_os.c | 28 module/os/linux/zfs/kasan_compat.c | 48 module/os/linux/zfs/policy.c | 73 module/os/linux/zfs/vdev_disk.c | 93 module/os/linux/zfs/zfs_ctldir.c | 2 module/os/linux/zfs/zfs_file_os.c | 8 module/os/linux/zfs/zfs_uio.c | 34 module/os/linux/zfs/zfs_vfsops.c | 395 module/os/linux/zfs/zfs_vnops_os.c | 186 module/os/linux/zfs/zfs_znode_os.c | 33 module/os/linux/zfs/zpl_ctldir.c | 106 module/os/linux/zfs/zpl_file.c | 314 module/os/linux/zfs/zpl_file_range.c | 82 module/os/linux/zfs/zpl_inode.c | 44 module/os/linux/zfs/zpl_super.c | 881 module/os/linux/zfs/zvol_os.c | 107 module/zcommon/zfs_valstr.c | 2 module/zfs/abd.c | 21 module/zfs/arc.c | 646 module/zfs/dataset_kstats.c | 2 module/zfs/dbuf.c | 168 module/zfs/ddt.c | 378 module/zfs/ddt_log.c | 8 module/zfs/dmu.c | 55 module/zfs/dmu_direct.c | 12 module/zfs/dmu_objset.c | 33 module/zfs/dmu_recv.c | 99 module/zfs/dmu_redact.c | 2 module/zfs/dmu_send.c | 8 module/zfs/dmu_traverse.c | 6 module/zfs/dmu_tx.c | 161 module/zfs/dnode.c | 128 module/zfs/dnode_sync.c | 105 module/zfs/dsl_bookmark.c | 18 module/zfs/dsl_crypt.c | 53 module/zfs/dsl_dataset.c | 32 module/zfs/dsl_dir.c | 108 module/zfs/dsl_pool.c | 22 module/zfs/dsl_scan.c | 25 module/zfs/dsl_synctask.c | 21 module/zfs/fm.c | 3 module/zfs/gzip.c | 8 module/zfs/lz4_zfs.c | 15 module/zfs/metaslab.c | 180 module/zfs/mmp.c | 242 module/zfs/multilist.c | 4 module/zfs/range_tree.c | 98 module/zfs/sa.c | 4 module/zfs/spa.c | 1018 module/zfs/spa_config.c | 12 module/zfs/spa_errlog.c | 2 module/zfs/spa_log_spacemap.c | 5 module/zfs/spa_misc.c | 79 module/zfs/txg.c | 47 module/zfs/vdev.c | 157 module/zfs/vdev_draid.c | 86 module/zfs/vdev_file.c | 9 module/zfs/vdev_indirect.c | 5 module/zfs/vdev_initialize.c | 9 module/zfs/vdev_label.c | 13 module/zfs/vdev_mirror.c | 17 module/zfs/vdev_missing.c | 4 module/zfs/vdev_queue.c | 10 module/zfs/vdev_raidz.c | 71 module/zfs/vdev_raidz_math.c | 2 module/zfs/vdev_raidz_math_aarch64_neon_common.h | 18 module/zfs/vdev_rebuild.c | 65 module/zfs/vdev_removal.c | 51 module/zfs/vdev_root.c | 4 module/zfs/vdev_trim.c | 28 module/zfs/zap_leaf.c | 106 module/zfs/zcp.c | 12 module/zfs/zcp_get.c | 32 module/zfs/zcp_synctask.c | 2 module/zfs/zfeature.c | 5 module/zfs/zfs_chksum.c | 85 module/zfs/zfs_ioctl.c | 35 module/zfs/zfs_log.c | 22 module/zfs/zfs_quota.c | 8 module/zfs/zfs_vnops.c | 197 module/zfs/zil.c | 65 module/zfs/zio.c | 168 module/zfs/zio_compress.c | 2 module/zfs/zvol.c | 31 module/zstd/include/aarch64_compat.h | 38 module/zstd/lib/common/compiler.h | 3 module/zstd/lib/common/zstd_internal.h | 9 module/zstd/zfs_zstd.c | 17 rpm/Makefile.am | 1 rpm/generic/zfs.spec.in | 20 rpm/redhat/zfs.spec.in | 20 scripts/Makefile.am | 1 scripts/commitcheck.sh | 4 scripts/cstyle.pl | 35 scripts/objtool-wrapper.in | 36 scripts/update_authors.pl | 102 scripts/zfs-tests.sh | 25 tests/Makefile.am | 1 tests/runfiles/common.run | 52 tests/runfiles/linux.run | 41 tests/runfiles/sanity.run | 6 tests/test-runner/bin/test-runner.py.in | 111 tests/test-runner/bin/zts-report.py.in | 14 tests/test-runner/include/logapi.shlib | 21 tests/zfs-tests/Makefile.am | 1 tests/zfs-tests/callbacks/zfs_dbgmsg.ksh | 2 tests/zfs-tests/callbacks/zfs_dmesg.ksh | 7 tests/zfs-tests/callbacks/zfs_mmp.ksh | 2 tests/zfs-tests/cmd/Makefile.am | 8 tests/zfs-tests/cmd/clone_after_trunc.c | 117 tests/zfs-tests/cmd/ctime.c | 2 tests/zfs-tests/cmd/draid.c | 2 tests/zfs-tests/cmd/libzfs_input_check.c | 172 tests/zfs-tests/cmd/mmap_ftruncate.c | 85 tests/zfs-tests/cmd/setlease.c | 126 tests/zfs-tests/cmd/statx.c | 3 tests/zfs-tests/cmd/threadsappend.c | 8 tests/zfs-tests/include/commands.cfg | 10 tests/zfs-tests/include/libtest.shlib | 23 tests/zfs-tests/include/tunables.cfg | 4 tests/zfs-tests/tests/Makefile.am | 57 tests/zfs-tests/tests/Makefile.in | 168 tests/zfs-tests/tests/functional/acl/acl_common.kshlib | 1 tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh | 1 tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh | 1 tests/zfs-tests/tests/functional/acl/posix/posix_005_pos.ksh | 71 tests/zfs-tests/tests/functional/bclone/bclone_common.kshlib | 7 tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases.ksh | 4 tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases_limited.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_crossfs_data.ksh | 4 tests/zfs-tests/tests/functional/bclone/bclone_crossfs_embedded.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_crossfs_hole.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_diffprops_all.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_diffprops_checksum.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_diffprops_compress.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_diffprops_copies.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_diffprops_recordsize.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_prop_sync.ksh | 1 tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases.ksh | 5 tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases_limited.ksh | 2 tests/zfs-tests/tests/functional/bclone/bclone_samefs_data.ksh | 5 tests/zfs-tests/tests/functional/bclone/bclone_samefs_embedded.ksh | 2 tests/zfs-tests/tests/functional/bclone/bclone_samefs_hole.ksh | 2 tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_device_removal.ksh | 65 tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_trunc.ksh | 31 tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_cached.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_write.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh | 25 tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_partial.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_disabled_copyfilerange.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_large_offset.ksh | 4 tests/zfs-tests/tests/functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh | 7 tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh | 7 tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh | 7 tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.ksh | 43 tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.zcp | 23 tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh | 9 tests/zfs-tests/tests/functional/cli_root/zfs_list/cleanup.ksh | 30 tests/zfs-tests/tests/functional/cli_root/zfs_list/setup.ksh | 32 tests/zfs-tests/tests/functional/cli_root/zfs_list/zfs_list_009_pos.ksh | 69 tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh | 80 tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/cleanup.ksh | 26 tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/setup.ksh | 28 tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite.ksh | 104 tests/zfs-tests/tests/functional/cli_root/zhack/zhack_metaslab_leak.ksh | 70 tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib | 42 tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_010_pos.ksh | 211 tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_create.ksh | 143 tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh | 195 tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh | 117 tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh | 71 tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh | 103 tests/zfs-tests/tests/functional/cli_root/zpool_get/vdev_get_all.ksh | 92 tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh | 4 tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh | 2 tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_003_pos.ksh | 2 tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_004_pos.ksh | 2 tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_009_pos.ksh | 89 tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh | 5 tests/zfs-tests/tests/functional/ctime/cleanup.ksh | 35 tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh | 45 tests/zfs-tests/tests/functional/ctime/setup.ksh | 36 tests/zfs-tests/tests/functional/dedup/dedup_bclone_pruned.ksh | 152 tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh | 2 tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh | 2 tests/zfs-tests/tests/functional/dedup/dedup_fdt_pacing.ksh | 112 tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh | 2 tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh | 2 tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh | 2 tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh | 2 tests/zfs-tests/tests/functional/dedup/dedup_prune.ksh | 5 tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh | 86 tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh | 30 tests/zfs-tests/tests/functional/dedup/dedup_zap_shrink.ksh | 5 tests/zfs-tests/tests/functional/device_access/cleanup.ksh | 21 tests/zfs-tests/tests/functional/device_access/device_access.kshlib | 68 tests/zfs-tests/tests/functional/device_access/device_access_add.ksh | 63 tests/zfs-tests/tests/functional/device_access/device_access_attach.ksh | 63 tests/zfs-tests/tests/functional/device_access/device_access_create.ksh | 62 tests/zfs-tests/tests/functional/device_access/device_access_import.ksh | 69 tests/zfs-tests/tests/functional/device_access/setup.ksh | 23 tests/zfs-tests/tests/functional/devices/devices_common.kshlib | 12 tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh | 25 tests/zfs-tests/tests/functional/direct/dio_write_verify.ksh | 12 tests/zfs-tests/tests/functional/events/events_common.kshlib | 2 tests/zfs-tests/tests/functional/events/zed_cksum_reported.ksh | 2 tests/zfs-tests/tests/functional/fallocate/fallocate_extend_timestamps.ksh | 77 tests/zfs-tests/tests/functional/fault/auto_spare_double.ksh | 122 tests/zfs-tests/tests/functional/gang_blocks/cleanup.ksh | 32 tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib | 121 tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_redundant.ksh | 89 tests/zfs-tests/tests/functional/gang_blocks/setup.ksh | 31 tests/zfs-tests/tests/functional/io/io_uring.ksh | 7 tests/zfs-tests/tests/functional/lease/cleanup.ksh | 26 tests/zfs-tests/tests/functional/lease/lease_setlease.ksh | 44 tests/zfs-tests/tests/functional/lease/setup.ksh | 27 tests/zfs-tests/tests/functional/migration/setup.ksh | 20 tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh | 80 tests/zfs-tests/tests/functional/mmp/mmp.cfg | 6 tests/zfs-tests/tests/functional/mmp/mmp.kshlib | 81 tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh | 42 tests/zfs-tests/tests/functional/mmp/mmp_concurrent_import.ksh | 133 tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh | 159 tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh | 54 tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh | 8 tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh | 62 tests/zfs-tests/tests/functional/mmp/mmp_on_off.ksh | 4 tests/zfs-tests/tests/functional/mmp/mmp_on_thread.ksh | 4 tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh | 14 tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh | 3 tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh | 8 tests/zfs-tests/tests/functional/mmp/mmp_write_distribution.ksh | 2 tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh | 4 tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh | 305 tests/zfs-tests/tests/functional/mmp/multihost_history.ksh | 2 tests/zfs-tests/tests/functional/mount/mount_loopback.ksh | 112 tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh | 11 tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh | 7 tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh | 9 tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh | 5 tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh | 2 tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib | 3 tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh | 2 tests/zfs-tests/tests/functional/redacted_send/redacted_max_blkid.ksh | 118 tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib | 71 tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh | 12 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged1.ksh | 7 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged2.ksh | 14 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded1.ksh | 136 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded2.ksh | 152 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh | 13 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh | 8 tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh | 28 tests/zfs-tests/tests/functional/removal/removal_with_missing_log.ksh | 95 tests/zfs-tests/tests/functional/replacement/resilver_restart_001.ksh | 21 tests/zfs-tests/tests/functional/rsend/rsend.kshlib | 34 tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh | 7 tests/zfs-tests/tests/functional/rsend/send_leak_keymaps.ksh | 82 tests/zfs-tests/tests/functional/rsend/send_partial_dataset.ksh | 4 tests/zfs-tests/tests/functional/slog/slog_006_pos.ksh | 3 tests/zfs-tests/tests/functional/syncfs/syncfs_suspend.ksh | 115 tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_sys_config.ksh | 46 tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_zinject.ksh | 46 tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_fua.ksh | 40 tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_trim.ksh | 7 tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress.ksh | 3 tests/zfs-tests/tests/perf/perf.shlib | 136 udev/Makefile.am | 1 udev/rules.d/69-vdev.rules.in | 1 udev/vdev_id | 42 udev/zvol_id.c | 2 zfs_config.h.in | 124 712 files changed, 44591 insertions(+), 28524 deletions(-) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpc_r5x0aj/zfs-linux_2.3.2-2.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmpc_r5x0aj/zfs-linux_2.3.9-0+deb13u1.dsc: no acceptable signature found diff: /srv/release.debian.org/tmp/r3TGsmbcuP/zfs-linux-2.3.2/debian/zfs-zed.zfs-zed.init: No such file or directory diff: /srv/release.debian.org/tmp/zH3Kbd1cs4/zfs-linux-2.3.9/debian/zfs-zed.zfs-zed.init: No such file or directory diff: /srv/release.debian.org/tmp/r3TGsmbcuP/zfs-linux-2.3.2/debian/zfsutils-linux.zfs-import.init: No such file or directory diff: /srv/release.debian.org/tmp/zH3Kbd1cs4/zfs-linux-2.3.9/debian/zfsutils-linux.zfs-import.init: No such file or directory diff: /srv/release.debian.org/tmp/r3TGsmbcuP/zfs-linux-2.3.2/debian/zfsutils-linux.zfs-load-key.init: No such file or directory diff: /srv/release.debian.org/tmp/zH3Kbd1cs4/zfs-linux-2.3.9/debian/zfsutils-linux.zfs-load-key.init: No such file or directory diff: /srv/release.debian.org/tmp/r3TGsmbcuP/zfs-linux-2.3.2/debian/zfsutils-linux.zfs-mount.init: No such file or directory diff: /srv/release.debian.org/tmp/zH3Kbd1cs4/zfs-linux-2.3.9/debian/zfsutils-linux.zfs-mount.init: No such file or directory diff: /srv/release.debian.org/tmp/r3TGsmbcuP/zfs-linux-2.3.2/debian/zfsutils-linux.zfs-share.init: No such file or directory diff: /srv/release.debian.org/tmp/zH3Kbd1cs4/zfs-linux-2.3.9/debian/zfsutils-linux.zfs-share.init: No such file or directory diff -Nru zfs-linux-2.3.2/AUTHORS zfs-linux-2.3.9/AUTHORS --- zfs-linux-2.3.2/AUTHORS 2025-05-01 18:23:23.708214388 +0000 +++ zfs-linux-2.3.9/AUTHORS 2026-08-21 20:57:12.279006161 +0000 @@ -29,6 +29,7 @@ Alejandro Colomar Alejandro R. Sedeño Alek Pinchuk + Aleksandr Liber Aleksa Sarai Alexander Eremin Alexander Lobakin @@ -81,6 +82,7 @@ Arne Jansen Aron Xu Arshad Hussain + Artem Arun KV Arvind Sankar Attila Fülöp @@ -227,10 +229,12 @@ Fedor Uporov Felix Dörre Felix Neumärker + Felix Schmidt Feng Sun Finix Yan Francesco Mazzoli Frederik Wessels + Friedrich Weber Frédéric Vanniere Gabriel A. Devenyi Garrett D'Amore @@ -484,7 +488,7 @@ Olaf Faaland Oleg Drokin Oleg Stepura - Olivier Certner + Olivier Certner Olivier Mazouffre omni Orivej Desh @@ -522,6 +526,7 @@ P.SCH Qiuhao Chen Quartz + Quentin Thébault Quentin Zdanis Rafael Kitover RageLtMan @@ -573,6 +578,7 @@ Scot W. Stevenson Sean Eric Fagan Sebastian Gottschall + Sebastian Pauka Sebastian Wuerl Sebastien Roy Sen Haerens @@ -589,6 +595,7 @@ Shen Yan Sietse Simon Guest + Simon Howard Simon Klinkert Sowrabha Gopal Spencer Kinny @@ -610,6 +617,7 @@ Stéphane Lesimple Suman Chakravartula Sydney Vanda + Syed Shahrukh Hussain Sören Tempel Tamas TEVESZ Teodor Spæren diff -Nru zfs-linux-2.3.2/META zfs-linux-2.3.9/META --- zfs-linux-2.3.2/META 2025-05-01 18:45:26.227744059 +0000 +++ zfs-linux-2.3.9/META 2026-08-21 21:15:51.372492357 +0000 @@ -1,10 +1,10 @@ Meta: 1 Name: zfs Branch: 1.0 -Version: 2.3.2 +Version: 2.3.9 Release: 1 Release-Tags: relext License: CDDL Author: OpenZFS -Linux-Maximum: 6.14 +Linux-Maximum: 7.2 Linux-Minimum: 4.18 diff -Nru zfs-linux-2.3.2/Makefile.am zfs-linux-2.3.9/Makefile.am --- zfs-linux-2.3.2/Makefile.am 2025-05-01 18:23:23.708214388 +0000 +++ zfs-linux-2.3.9/Makefile.am 2026-08-21 20:57:12.279006161 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 CLEANFILES = dist_noinst_DATA = INSTALL_DATA_HOOKS = diff -Nru zfs-linux-2.3.2/Makefile.in zfs-linux-2.3.9/Makefile.in --- zfs-linux-2.3.2/Makefile.in 2025-05-01 18:45:11.023846280 +0000 +++ zfs-linux-2.3.9/Makefile.in 2026-08-21 21:15:40.013627112 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,15 +14,18 @@ @SET_MAKE@ +# SPDX-License-Identifier: CDDL-1.0 # # Default build rules for all user space components, every Makefile.am # should include these rules and override or extend them as needed. # +# SPDX-License-Identifier: CDDL-1.0 # # cppcheck for userspace – nodist_*_SOURCES are kernel code and cppcheck goes crazy on them. # +# SPDX-License-Identifier: CDDL-1.0 # Global ShellCheck exclusions: # # ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090] @@ -33,6 +36,9 @@ # In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions # In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions +# SPDX-License-Identifier: CDDL-1.0 + +# SPDX-License-Identifier: CDDL-1.0 # # Shown below is a simplified dependency graph of the OpenZFS provided # libraries. Administrative commands (`zfs`, `zpool`, etc) interface with @@ -86,6 +92,7 @@ # a mechanism for suppressing harmless warnings. # +# SPDX-License-Identifier: CDDL-1.0 ############################################################################### # Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. # Copyright (C) 2007 The Regents of the University of California. @@ -183,6 +190,8 @@ @BUILD_FREEBSD_TRUE@ -Wl,--fatal-warnings \ @BUILD_FREEBSD_TRUE@ -Wl,--warn-shared-textrel -lm @CONFIG_USER_FALSE@am__append_5 = $(scripts_scripts) + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@am__append_6 = \ @BUILD_LINUX_TRUE@ rpm/generic/zfs-dkms.spec.in \ @BUILD_LINUX_TRUE@ rpm/generic/zfs-kmod.spec.in \ @@ -239,6 +248,12 @@ @CONFIG_USER_TRUE@ contrib/pyzfs/setup.py @CONFIG_USER_TRUE@am__append_29 = contrib/bash_completion.d/zpool @CONFIG_USER_TRUE@am__append_30 = $(COMPLETION_FILES) + +# SPDX-License-Identifier: CDDL-1.0 + +# SPDX-License-Identifier: CDDL-1.0 + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@am__append_31 = contrib/debian/changelog.in \ @CONFIG_USER_TRUE@ contrib/debian/clean contrib/debian/control \ @CONFIG_USER_TRUE@ contrib/debian/control.modules.in \ @@ -290,6 +305,8 @@ @CONFIG_USER_TRUE@ contrib/pyzfs/docs contrib/zcp/autosnap.lua @CONFIG_USER_TRUE@@PYZFS_ENABLED_TRUE@am__append_32 = pyzfs-all-local @CONFIG_USER_TRUE@@PYZFS_ENABLED_TRUE@am__append_33 = pyzfs-clean-local + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_34 = contrib/bpftrace/taskqlatency.bt \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/bpftrace/zfs-trace.sh \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/dracut/README.md \ @@ -303,29 +320,28 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(pkgdracut_90_SCRIPTS) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(pkgdracut_90_DATA) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(i_t_hooks_SCRIPTS) -@CONFIG_USER_TRUE@am__append_37 = $(sudoersd_DATA) +@CONFIG_USER_TRUE@am__append_37 = $(sysconf_zfs_DATA) @CONFIG_USER_TRUE@am__append_38 = $(sysconf_zfs_DATA) -@CONFIG_USER_TRUE@am__append_39 = $(sysconf_zfs_DATA) +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_39 = $(initconf_DATA) @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_40 = $(initconf_DATA) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_41 = $(initconf_DATA) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSV_TRUE@am__append_42 = etc/init.d/README.md +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSV_TRUE@am__append_41 = etc/init.d/README.md +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSV_TRUE@am__append_42 = $(init_SCRIPTS) @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSV_TRUE@am__append_43 = $(init_SCRIPTS) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSV_TRUE@am__append_44 = $(init_SCRIPTS) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@am__append_45 = $(systemdunit_DATA) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@am__append_46 = systemd-install-data-hook +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@am__append_44 = $(systemdunit_DATA) +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@am__append_45 = systemd-install-data-hook @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@systemdgenerator_PROGRAMS = etc/systemd/system-generators/zfs-mount-generator$(EXEEXT) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@am__append_47 = $(systemdgenerator_PROGRAMS) -@CONFIG_USER_TRUE@@TARGET_CPU_AARCH64_TRUE@am__append_48 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@am__append_46 = $(systemdgenerator_PROGRAMS) +@CONFIG_USER_TRUE@@TARGET_CPU_AARCH64_TRUE@am__append_47 = \ @CONFIG_USER_TRUE@@TARGET_CPU_AARCH64_TRUE@ module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S \ @CONFIG_USER_TRUE@@TARGET_CPU_AARCH64_TRUE@ module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S \ @CONFIG_USER_TRUE@@TARGET_CPU_AARCH64_TRUE@ module/icp/asm-aarch64/sha2/sha256-armv8.S \ @CONFIG_USER_TRUE@@TARGET_CPU_AARCH64_TRUE@ module/icp/asm-aarch64/sha2/sha512-armv8.S -@CONFIG_USER_TRUE@@TARGET_CPU_ARM_TRUE@am__append_49 = \ +@CONFIG_USER_TRUE@@TARGET_CPU_ARM_TRUE@am__append_48 = \ @CONFIG_USER_TRUE@@TARGET_CPU_ARM_TRUE@ module/icp/asm-arm/sha2/sha256-armv7.S \ @CONFIG_USER_TRUE@@TARGET_CPU_ARM_TRUE@ module/icp/asm-arm/sha2/sha512-armv7.S -@CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@am__append_50 = \ +@CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@am__append_49 = \ @CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@ module/icp/asm-ppc64/blake3/b3_ppc64le_sse2.S \ @CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@ module/icp/asm-ppc64/blake3/b3_ppc64le_sse41.S \ @CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@ module/icp/asm-ppc64/sha2/sha256-ppc.S \ @@ -333,7 +349,7 @@ @CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@ module/icp/asm-ppc64/sha2/sha256-p8.S \ @CONFIG_USER_TRUE@@TARGET_CPU_POWERPC_TRUE@ module/icp/asm-ppc64/sha2/sha512-p8.S -@CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@am__append_51 = \ +@CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@am__append_50 = \ @CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@ module/icp/asm-x86_64/aes/aeskey.c \ @CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@ module/icp/asm-x86_64/aes/aes_amd64.S \ @CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@ module/icp/asm-x86_64/aes/aes_aesni.S \ @@ -347,12 +363,12 @@ @CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@ module/icp/asm-x86_64/blake3/blake3_sse2.S \ @CONFIG_USER_TRUE@@TARGET_CPU_X86_64_TRUE@ module/icp/asm-x86_64/blake3/blake3_sse41.S -@CONFIG_USER_TRUE@am__append_52 = libnvpair.la libshare.la \ +@CONFIG_USER_TRUE@am__append_51 = libnvpair.la libshare.la \ @CONFIG_USER_TRUE@ libspl_assert.la libspl.la libtpool.la \ @CONFIG_USER_TRUE@ libuutil.la libzfs_core.la libzfs.la \ @CONFIG_USER_TRUE@ libzfsbootenv.la libzpool.la libzutil.la -@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_53 = -Wl,-z,defs -@CONFIG_USER_TRUE@am__append_54 = lib/libnvpair/libnvpair.abi \ +@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_52 = -Wl,-z,defs +@CONFIG_USER_TRUE@am__append_53 = lib/libnvpair/libnvpair.abi \ @CONFIG_USER_TRUE@ lib/libnvpair/libnvpair.suppr \ @CONFIG_USER_TRUE@ lib/libuutil/libuutil.abi \ @CONFIG_USER_TRUE@ lib/libuutil/libuutil.suppr \ @@ -366,18 +382,18 @@ @CONFIG_USER_TRUE@ lib/libzfsbootenv/libzfsbootenv.suppr \ @CONFIG_USER_TRUE@ $(dist_noinst_man_MANS) $(dist_man_MANS) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/file/file_common.h -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_55 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_54 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libshare/os/linux/nfs.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libshare/os/linux/smb.c -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_56 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_55 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libshare/os/freebsd/nfs.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libshare/os/freebsd/smb.c -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_57 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_56 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/fcntl.h -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_58 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_57 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/byteorder.h \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/errno.h \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/mnttab.h \ @@ -385,9 +401,10 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/param.h \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/stat.h \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/sysmacros.h \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/vfs.h \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/linux/sys/zfs_context_os.h -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_59 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_58 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/sys/byteorder.h \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/sys/fcntl.h \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/sys/file.h \ @@ -399,78 +416,80 @@ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/sys/vfs.h \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/sys/zfs_context_os.h -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_60 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_59 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/linux/getexecname.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/linux/gethostid.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/linux/getmntany.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/linux/zone.c -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_61 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_60 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/freebsd/getexecname.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/freebsd/gethostid.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/freebsd/getmntany.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/freebsd/mnttab.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/os/freebsd/zone.c -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_62 = -lpthread -@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_63 = -Wl,-z,defs -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_64 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_61 = -lpthread +@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_62 = -Wl,-z,defs +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_63 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzfs_core/os/linux/libzfs_core_ioctl.c -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_65 = -Iinclude/os/freebsd/zfs -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_66 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_64 = -Iinclude/os/freebsd/zfs +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_65 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c -@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_67 = -Wl,-z,defs -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_68 = -lutil -lgeom -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_69 = \ +@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_66 = -Wl,-z,defs +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_67 = -lutil -lgeom +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_68 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libzfs/os/freebsd/libzfs_compat.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libzfs/os/freebsd/libzfs_zmount.c -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_70 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_69 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzfs/os/linux/libzfs_mount_os.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzfs/os/linux/libzfs_pool_os.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzfs/os/linux/libzfs_util_os.c -@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_71 = -Wl,-z,defs -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_72 = -lutil -lgeom +@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_70 = -Wl,-z,defs +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_71 = -lutil -lgeom +@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_72 = -Wl,-z,defs @ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_73 = -Wl,-z,defs -@ASAN_ENABLED_FALSE@@CONFIG_USER_TRUE@am__append_74 = -Wl,-z,defs -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_75 = -lgeom -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_76 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_74 = -lgeom +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_75 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzutil/os/linux/zutil_setproctitle.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzutil/os/linux/zutil_device_path_os.c \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libzutil/os/linux/zutil_import_os.c -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_77 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_76 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libzutil/os/freebsd/zutil_device_path_os.c \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libzutil/os/freebsd/zutil_import_os.c -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_78 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_77 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ libefi.la \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ -lrt -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_79 = libefi.la -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_80 = libefi.la \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_78 = libefi.la +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_79 = libefi.la \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ udev/zvol_id -@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_81 = \ +@BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@am__append_80 = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ man/man8/zfs-jail.8 \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ man/man8/zfs-unjail.8 -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_82 = \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_81 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ man/man8/zfs-unzone.8 \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ man/man8/zfs-zone.8 -@CONFIG_USER_TRUE@am__append_83 = $(nodist_man_MANS) \ +@CONFIG_USER_TRUE@am__append_82 = $(nodist_man_MANS) \ @CONFIG_USER_TRUE@ $(nodist_scripts_zfs_tests_include_DATA) \ @CONFIG_USER_TRUE@ $(scripts_test_runner_bin_SCRIPTS) -@CONFIG_USER_TRUE@am__append_84 = mancheck +@CONFIG_USER_TRUE@am__append_83 = mancheck # The manual pager in most Linux distros defaults to "BSD" when .Os is blank, # but leaving it blank makes things a lot easier on # FreeBSD when OpenZFS is vendored in the base system. -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_85 = man-install-data-hook -@CONFIG_USER_TRUE@am__append_86 = tests/zfs-tests/tests +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_84 = man-install-data-hook + +# SPDX-License-Identifier: CDDL-1.0 +@CONFIG_USER_TRUE@am__append_85 = tests/zfs-tests/tests @CONFIG_USER_TRUE@scripts_zfs_tests_bin_PROGRAMS = \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/chg_usr_exec$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/clonefile$(EXEEXT) \ @@ -488,6 +507,7 @@ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/badsend$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/btree_test$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/crypto_test$(EXEEXT) \ +@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/clone_after_trunc$(EXEEXT) \ @CONFIG_USER_TRUE@ $(am__EXEEXT_3) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/draid$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/file_append$(EXEEXT) \ @@ -503,6 +523,7 @@ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mkfiles$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mktree$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mmap_exec$(EXEEXT) \ +@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mmap_ftruncate$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mmap_seek$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mmap_sync$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/mmapwrite$(EXEEXT) \ @@ -519,20 +540,21 @@ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/sha2_test$(EXEEXT) \ @CONFIG_USER_TRUE@ tests/zfs-tests/cmd/blake3_test$(EXEEXT) \ @CONFIG_USER_TRUE@ $(am__EXEEXT_5) -@CONFIG_USER_TRUE@@WANT_DEVNAME2DEVID_TRUE@am__append_87 = tests/zfs-tests/cmd/devname2devid -@CONFIG_USER_TRUE@@WANT_MMAP_LIBAIO_TRUE@am__append_88 = tests/zfs-tests/cmd/mmap_libaio -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_89 = tests/zfs-tests/cmd/getversion \ +@CONFIG_USER_TRUE@@WANT_DEVNAME2DEVID_TRUE@am__append_86 = tests/zfs-tests/cmd/devname2devid +@CONFIG_USER_TRUE@@WANT_MMAP_LIBAIO_TRUE@am__append_87 = tests/zfs-tests/cmd/mmap_libaio +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_88 = tests/zfs-tests/cmd/getversion \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/user_ns_exec \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/renameat2 \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/statx \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/xattrtest \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/zed_fd_spill-zedlet \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/idmap_util \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/setlease \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/read_dos_attributes \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/write_dos_attributes \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/randfree_file \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/file_fadvise -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_90 = tests/zfs-tests/cmd/linux_dos_attributes/dos_attributes.h +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_89 = tests/zfs-tests/cmd/linux_dos_attributes/dos_attributes.h @CONFIG_USER_TRUE@scripts_zfs_tests_functional_libzfs_PROGRAMS = tests/zfs-tests/tests/functional/libzfs/many_fds$(EXEEXT) @CONFIG_USER_TRUE@scripts_zfs_tests_functional_hkdf_PROGRAMS = tests/zfs-tests/tests/functional/hkdf/hkdf_test$(EXEEXT) @CONFIG_USER_TRUE@scripts_zfs_tests_functional_vdev_disk_PROGRAMS = tests/zfs-tests/tests/functional/vdev_disk/page_alignment$(EXEEXT) @@ -542,13 +564,13 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/tests/functional/tmpfile/tmpfile_003_pos$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/tests/functional/tmpfile/tmpfile_stat_mode$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/tests/functional/tmpfile/tmpfile_test$(EXEEXT) -@CONFIG_USER_TRUE@am__append_91 = tests/README.md -@CONFIG_USER_TRUE@am__append_92 = $(shell find $(srcdir)/tests -name '*.sh') -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_93 = $(udevrule_DATA) +@CONFIG_USER_TRUE@am__append_90 = tests/README.md +@CONFIG_USER_TRUE@am__append_91 = $(shell find $(srcdir)/tests -name '*.sh') +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_92 = $(udevrule_DATA) @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@udev_PROGRAMS = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ udev/zvol_id$(EXEEXT) -@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_94 = udev -@CONFIG_KERNEL_TRUE@am__append_95 = module +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__append_93 = udev +@CONFIG_KERNEL_TRUE@am__append_94 = module subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/always-arch.m4 \ @@ -582,17 +604,22 @@ $(top_srcdir)/config/kernel-block-device-operations.m4 \ $(top_srcdir)/config/kernel-commit-metadata.m4 \ $(top_srcdir)/config/kernel-config-defined.m4 \ - $(top_srcdir)/config/kernel-copy-from-user-inatomic.m4 \ $(top_srcdir)/config/kernel-cpu_has_feature.m4 \ $(top_srcdir)/config/kernel-declare-event-class.m4 \ + $(top_srcdir)/config/kernel-dentry-alias.m4 \ + $(top_srcdir)/config/kernel-dentry-operations.m4 \ $(top_srcdir)/config/kernel-discard-granularity.m4 \ + $(top_srcdir)/config/kernel-drop-inode.m4 \ $(top_srcdir)/config/kernel-file.m4 \ + $(top_srcdir)/config/kernel-filelock.m4 \ $(top_srcdir)/config/kernel-filemap-splice-read.m4 \ $(top_srcdir)/config/kernel-flush_dcache_page.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ - $(top_srcdir)/config/kernel-follow-down-one.m4 \ + $(top_srcdir)/config/kernel-follow-down.m4 \ $(top_srcdir)/config/kernel-fpu.m4 \ - $(top_srcdir)/config/kernel-fst-mount.m4 \ + $(top_srcdir)/config/kernel-free-inode.m4 \ + $(top_srcdir)/config/kernel-fs-context.m4 \ + $(top_srcdir)/config/kernel-fs-parse.m4 \ $(top_srcdir)/config/kernel-fsync-bdev.m4 \ $(top_srcdir)/config/kernel-generic_fadvise.m4 \ $(top_srcdir)/config/kernel-generic_fillattr.m4 \ @@ -600,15 +627,18 @@ $(top_srcdir)/config/kernel-genhd-flags.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-iattr-vfsid.m4 \ + $(top_srcdir)/config/kernel-idmap.m4 \ $(top_srcdir)/config/kernel-idmap_mnt_api.m4 \ $(top_srcdir)/config/kernel-inode-create.m4 \ $(top_srcdir)/config/kernel-inode-getattr.m4 \ $(top_srcdir)/config/kernel-inode-lookup.m4 \ $(top_srcdir)/config/kernel-inode-permission.m4 \ $(top_srcdir)/config/kernel-inode-setattr.m4 \ + $(top_srcdir)/config/kernel-inode-state.m4 \ $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \ $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \ + $(top_srcdir)/config/kernel-kasan-enabled.m4 \ $(top_srcdir)/config/kernel-kmap-atomic-args.m4 \ $(top_srcdir)/config/kernel-kmap-local-page.m4 \ $(top_srcdir)/config/kernel-kmem.m4 \ @@ -621,23 +651,24 @@ $(top_srcdir)/config/kernel-mknod.m4 \ $(top_srcdir)/config/kernel-mm-page-flags.m4 \ $(top_srcdir)/config/kernel-mm-pagemap.m4 \ + $(top_srcdir)/config/kernel-namespace.m4 \ $(top_srcdir)/config/kernel-objtool.m4 \ $(top_srcdir)/config/kernel-pagemap-folio_wait_bit.m4 \ + $(top_srcdir)/config/kernel-pagemap-readahead-page.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ $(top_srcdir)/config/kernel-percpu.m4 \ $(top_srcdir)/config/kernel-pin-user-pages.m4 \ $(top_srcdir)/config/kernel-proc-operations.m4 \ - $(top_srcdir)/config/kernel-readpages.m4 \ $(top_srcdir)/config/kernel-reclaim_state.m4 \ $(top_srcdir)/config/kernel-register_sysctl_table.m4 \ $(top_srcdir)/config/kernel-rename.m4 \ $(top_srcdir)/config/kernel-revalidate-disk-size.m4 \ $(top_srcdir)/config/kernel-sb-dying.m4 \ + $(top_srcdir)/config/kernel-sb-wb-err.m4 \ $(top_srcdir)/config/kernel-sched.m4 \ $(top_srcdir)/config/kernel-security-inode-init.m4 \ $(top_srcdir)/config/kernel-set-nlink.m4 \ $(top_srcdir)/config/kernel-setattr-prepare.m4 \ - $(top_srcdir)/config/kernel-sget-args.m4 \ $(top_srcdir)/config/kernel-show-options.m4 \ $(top_srcdir)/config/kernel-shrink.m4 \ $(top_srcdir)/config/kernel-siginfo.m4 \ @@ -645,6 +676,7 @@ $(top_srcdir)/config/kernel-strlcpy.m4 \ $(top_srcdir)/config/kernel-symlink.m4 \ $(top_srcdir)/config/kernel-sysfs.m4 \ + $(top_srcdir)/config/kernel-timer.m4 \ $(top_srcdir)/config/kernel-tmpfile.m4 \ $(top_srcdir)/config/kernel-totalhigh_pages.m4 \ $(top_srcdir)/config/kernel-totalram-pages-func.m4 \ @@ -658,8 +690,11 @@ $(top_srcdir)/config/kernel-vfs-migrate_folio.m4 \ $(top_srcdir)/config/kernel-vfs-migratepage.m4 \ $(top_srcdir)/config/kernel-vfs-read_folio.m4 \ + $(top_srcdir)/config/kernel-vfs-readpages.m4 \ $(top_srcdir)/config/kernel-vfs-set_page_dirty.m4 \ - $(top_srcdir)/config/kernel-writepage_t.m4 \ + $(top_srcdir)/config/kernel-vfs-writepage.m4 \ + $(top_srcdir)/config/kernel-workqueue.m4 \ + $(top_srcdir)/config/kernel-writeback.m4 \ $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel-zero_page.m4 \ $(top_srcdir)/config/kernel.m4 $(top_srcdir)/config/lib-ld.m4 \ @@ -673,6 +708,7 @@ $(top_srcdir)/config/mount-helper.m4 \ $(top_srcdir)/config/nls.m4 $(top_srcdir)/config/pkg.m4 \ $(top_srcdir)/config/po.m4 $(top_srcdir)/config/progtest.m4 \ + $(top_srcdir)/config/toolchain-cfi.m4 \ $(top_srcdir)/config/toolchain-simd.m4 \ $(top_srcdir)/config/user-aio.h.m4 \ $(top_srcdir)/config/user-backtrace.m4 \ @@ -690,8 +726,10 @@ $(top_srcdir)/config/user-libunwind.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-makedev.m4 \ + $(top_srcdir)/config/user-mount-setattr.m4 \ $(top_srcdir)/config/user-pam.m4 \ $(top_srcdir)/config/user-runstatedir.m4 \ + $(top_srcdir)/config/user-statx.m4 \ $(top_srcdir)/config/user-systemd.m4 \ $(top_srcdir)/config/user-sysvinit.m4 \ $(top_srcdir)/config/user-udev.m4 \ @@ -724,8 +762,7 @@ $(am__dist_zpoolcompat_DATA_DIST) $(am__extra_HEADERS_DIST) \ $(am__libspl_HEADERS_DIST) $(am__libspl_ia32_HEADERS_DIST) \ $(am__libspl_rpc_HEADERS_DIST) $(am__libspl_sys_HEADERS_DIST) \ - $(am__libspl_sys_dktp_HEADERS_DIST) \ - $(am__libzpool_HEADERS_DIST) $(am__DIST_COMMON) + $(am__libspl_sys_dktp_HEADERS_DIST) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -736,7 +773,7 @@ module/Makefile rpm/generic/zfs-dkms.spec \ rpm/generic/zfs-kmod.spec rpm/generic/zfs.spec \ rpm/redhat/zfs-dkms.spec rpm/redhat/zfs-kmod.spec \ - rpm/redhat/zfs.spec zfs.release + rpm/redhat/zfs.spec zfs.release scripts/objtool-wrapper CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mounthelperdir)" \ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scripts_zfs_tests_bindir)" \ @@ -772,12 +809,11 @@ "$(DESTDIR)$(initconfdir)" "$(DESTDIR)$(bashcompletiondir)" \ "$(DESTDIR)$(scripts_zfs_tests_includedir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdracut_90dir)" \ - "$(DESTDIR)$(sudoersddir)" "$(DESTDIR)$(sysconf_zfsdir)" \ - "$(DESTDIR)$(systemdunitdir)" "$(DESTDIR)$(udevruledir)" \ - "$(DESTDIR)$(extradir)" "$(DESTDIR)$(libspldir)" \ - "$(DESTDIR)$(libspl_ia32dir)" "$(DESTDIR)$(libspl_rpcdir)" \ - "$(DESTDIR)$(libspl_sysdir)" "$(DESTDIR)$(libspl_sys_dktpdir)" \ - "$(DESTDIR)$(libzpooldir)" + "$(DESTDIR)$(sysconf_zfsdir)" "$(DESTDIR)$(systemdunitdir)" \ + "$(DESTDIR)$(udevruledir)" "$(DESTDIR)$(extradir)" \ + "$(DESTDIR)$(libspldir)" "$(DESTDIR)$(libspl_ia32dir)" \ + "$(DESTDIR)$(libspl_rpcdir)" "$(DESTDIR)$(libspl_sysdir)" \ + "$(DESTDIR)$(libspl_sys_dktpdir)" @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__EXEEXT_1 = mount.zfs$(EXEEXT) @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__EXEEXT_2 = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ zgenhostid$(EXEEXT) \ @@ -791,6 +827,7 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/xattrtest$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/zed_fd_spill-zedlet$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/idmap_util$(EXEEXT) \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/setlease$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/read_dos_attributes$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/write_dos_attributes$(EXEEXT) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ tests/zfs-tests/cmd/randfree_file$(EXEEXT) \ @@ -1137,6 +1174,7 @@ @CONFIG_USER_TRUE@libzfs_core_la_DEPENDENCIES = libnvpair.la libspl.la \ @CONFIG_USER_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__libzfs_core_la_SOURCES_DIST = lib/libzfs_core/libzfs_core.c \ + lib/libzfs_core/libzfs_core_impl.h \ lib/libzfs_core/os/linux/libzfs_core_ioctl.c \ lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@am__objects_11 = lib/libzfs_core/os/linux/libzfs_core_la-libzfs_core_ioctl.lo @@ -1463,6 +1501,11 @@ tests_zfs_tests_cmd_chg_usr_exec_OBJECTS = \ tests/zfs-tests/cmd/chg_usr_exec.$(OBJEXT) tests_zfs_tests_cmd_chg_usr_exec_LDADD = $(LDADD) +tests_zfs_tests_cmd_clone_after_trunc_SOURCES = \ + tests/zfs-tests/cmd/clone_after_trunc.c +tests_zfs_tests_cmd_clone_after_trunc_OBJECTS = \ + tests/zfs-tests/cmd/clone_after_trunc.$(OBJEXT) +tests_zfs_tests_cmd_clone_after_trunc_DEPENDENCIES = tests_zfs_tests_cmd_clone_mmap_cached_SOURCES = \ tests/zfs-tests/cmd/clone_mmap_cached.c tests_zfs_tests_cmd_clone_mmap_cached_OBJECTS = \ @@ -1618,6 +1661,11 @@ tests_zfs_tests_cmd_mmap_exec_OBJECTS = \ tests/zfs-tests/cmd/mmap_exec.$(OBJEXT) tests_zfs_tests_cmd_mmap_exec_LDADD = $(LDADD) +tests_zfs_tests_cmd_mmap_ftruncate_SOURCES = \ + tests/zfs-tests/cmd/mmap_ftruncate.c +tests_zfs_tests_cmd_mmap_ftruncate_OBJECTS = \ + tests/zfs-tests/cmd/mmap_ftruncate.$(OBJEXT) +tests_zfs_tests_cmd_mmap_ftruncate_LDADD = $(LDADD) tests_zfs_tests_cmd_mmap_libaio_SOURCES = \ tests/zfs-tests/cmd/mmap_libaio.c tests_zfs_tests_cmd_mmap_libaio_OBJECTS = \ @@ -1690,6 +1738,10 @@ tests/zfs-tests/cmd/send_doall.$(OBJEXT) @CONFIG_USER_TRUE@tests_zfs_tests_cmd_send_doall_DEPENDENCIES = \ @CONFIG_USER_TRUE@ libzfs_core.la libzfs.la libnvpair.la +tests_zfs_tests_cmd_setlease_SOURCES = tests/zfs-tests/cmd/setlease.c +tests_zfs_tests_cmd_setlease_OBJECTS = \ + tests/zfs-tests/cmd/setlease.$(OBJEXT) +tests_zfs_tests_cmd_setlease_LDADD = $(LDADD) am__tests_zfs_tests_cmd_sha2_test_SOURCES_DIST = \ tests/zfs-tests/cmd/checksum/sha2_test.c @CONFIG_USER_TRUE@am_tests_zfs_tests_cmd_sha2_test_OBJECTS = tests/zfs-tests/cmd/checksum/sha2_test.$(OBJEXT) @@ -2401,6 +2453,7 @@ tests/zfs-tests/cmd/$(DEPDIR)/badsend.Po \ tests/zfs-tests/cmd/$(DEPDIR)/btree_test-btree_test.Po \ tests/zfs-tests/cmd/$(DEPDIR)/chg_usr_exec.Po \ + tests/zfs-tests/cmd/$(DEPDIR)/clone_after_trunc.Po \ tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_cached.Po \ tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_write.Po \ tests/zfs-tests/cmd/$(DEPDIR)/clonefile.Po \ @@ -2422,6 +2475,7 @@ tests/zfs-tests/cmd/$(DEPDIR)/mkfiles.Po \ tests/zfs-tests/cmd/$(DEPDIR)/mktree.Po \ tests/zfs-tests/cmd/$(DEPDIR)/mmap_exec.Po \ + tests/zfs-tests/cmd/$(DEPDIR)/mmap_ftruncate.Po \ tests/zfs-tests/cmd/$(DEPDIR)/mmap_libaio-mmap_libaio.Po \ tests/zfs-tests/cmd/$(DEPDIR)/mmap_seek.Po \ tests/zfs-tests/cmd/$(DEPDIR)/mmap_sync.Po \ @@ -2432,6 +2486,7 @@ tests/zfs-tests/cmd/$(DEPDIR)/renameat2.Po \ tests/zfs-tests/cmd/$(DEPDIR)/rm_lnkcnt_zero_file.Po \ tests/zfs-tests/cmd/$(DEPDIR)/send_doall.Po \ + tests/zfs-tests/cmd/$(DEPDIR)/setlease.Po \ tests/zfs-tests/cmd/$(DEPDIR)/statx.Po \ tests/zfs-tests/cmd/$(DEPDIR)/stride_dd.Po \ tests/zfs-tests/cmd/$(DEPDIR)/suid_write_to_file.Po \ @@ -2512,6 +2567,7 @@ $(tests_zfs_tests_cmd_blake3_test_SOURCES) \ tests/zfs-tests/cmd/btree_test.c \ tests/zfs-tests/cmd/chg_usr_exec.c \ + tests/zfs-tests/cmd/clone_after_trunc.c \ tests/zfs-tests/cmd/clone_mmap_cached.c \ tests/zfs-tests/cmd/clone_mmap_write.c \ tests/zfs-tests/cmd/clonefile.c tests/zfs-tests/cmd/cp_files.c \ @@ -2537,6 +2593,7 @@ tests/zfs-tests/cmd/mkbusy.c tests/zfs-tests/cmd/mkfile.c \ tests/zfs-tests/cmd/mkfiles.c tests/zfs-tests/cmd/mktree.c \ tests/zfs-tests/cmd/mmap_exec.c \ + tests/zfs-tests/cmd/mmap_ftruncate.c \ tests/zfs-tests/cmd/mmap_libaio.c \ tests/zfs-tests/cmd/mmap_seek.c \ tests/zfs-tests/cmd/mmap_sync.c \ @@ -2550,6 +2607,7 @@ tests/zfs-tests/cmd/renameat2.c \ tests/zfs-tests/cmd/rm_lnkcnt_zero_file.c \ tests/zfs-tests/cmd/send_doall.c \ + tests/zfs-tests/cmd/setlease.c \ $(tests_zfs_tests_cmd_sha2_test_SOURCES) \ $(tests_zfs_tests_cmd_skein_test_SOURCES) \ tests/zfs-tests/cmd/statx.c tests/zfs-tests/cmd/stride_dd.c \ @@ -2592,6 +2650,7 @@ $(am__tests_zfs_tests_cmd_blake3_test_SOURCES_DIST) \ tests/zfs-tests/cmd/btree_test.c \ tests/zfs-tests/cmd/chg_usr_exec.c \ + tests/zfs-tests/cmd/clone_after_trunc.c \ tests/zfs-tests/cmd/clone_mmap_cached.c \ tests/zfs-tests/cmd/clone_mmap_write.c \ tests/zfs-tests/cmd/clonefile.c tests/zfs-tests/cmd/cp_files.c \ @@ -2617,6 +2676,7 @@ tests/zfs-tests/cmd/mkbusy.c tests/zfs-tests/cmd/mkfile.c \ tests/zfs-tests/cmd/mkfiles.c tests/zfs-tests/cmd/mktree.c \ tests/zfs-tests/cmd/mmap_exec.c \ + tests/zfs-tests/cmd/mmap_ftruncate.c \ tests/zfs-tests/cmd/mmap_libaio.c \ tests/zfs-tests/cmd/mmap_seek.c \ tests/zfs-tests/cmd/mmap_sync.c \ @@ -2630,6 +2690,7 @@ tests/zfs-tests/cmd/renameat2.c \ tests/zfs-tests/cmd/rm_lnkcnt_zero_file.c \ tests/zfs-tests/cmd/send_doall.c \ + tests/zfs-tests/cmd/setlease.c \ $(am__tests_zfs_tests_cmd_sha2_test_SOURCES_DIST) \ $(am__tests_zfs_tests_cmd_skein_test_SOURCES_DIST) \ tests/zfs-tests/cmd/statx.c tests/zfs-tests/cmd/stride_dd.c \ @@ -2706,6 +2767,7 @@ etc/systemd/system/zfs-import-scan.service.in \ etc/systemd/system/zfs-import.target.in \ etc/systemd/system/zfs-mount.service.in \ + etc/systemd/system/zfs-mount@.service.in \ etc/systemd/system/zfs-scrub-monthly@.timer.in \ etc/systemd/system/zfs-scrub-weekly@.timer.in \ etc/systemd/system/zfs-scrub@.service.in \ @@ -2778,10 +2840,10 @@ contrib/pyzfs/LICENSE contrib/pyzfs/docs \ contrib/zcp/autosnap.lua contrib/bpftrace/taskqlatency.bt \ contrib/bpftrace/zfs-trace.sh contrib/dracut/README.md \ - contrib/initramfs/README.md etc/sudoers.d/zfs \ - etc/init.d/README.md lib/libnvpair/libnvpair.abi \ - lib/libnvpair/libnvpair.suppr lib/libuutil/libuutil.abi \ - lib/libuutil/libuutil.suppr lib/libzfs_core/libzfs_core.abi \ + contrib/initramfs/README.md etc/init.d/README.md \ + lib/libnvpair/libnvpair.abi lib/libnvpair/libnvpair.suppr \ + lib/libuutil/libuutil.abi lib/libuutil/libuutil.suppr \ + lib/libzfs_core/libzfs_core.abi \ lib/libzfs_core/libzfs_core.suppr lib/libzfs/libzfs.abi \ lib/libzfs/libzfs.suppr lib/libzfs/THIRDPARTYLICENSE.openssl \ lib/libzfs/THIRDPARTYLICENSE.openssl.descrip \ @@ -2806,34 +2868,34 @@ man/man8/zfs-projectspace.8 man/man8/zfs-promote.8 \ man/man8/zfs-receive.8 man/man8/zfs-recv.8 \ man/man8/zfs-redact.8 man/man8/zfs-release.8 \ - man/man8/zfs-rename.8 man/man8/zfs-rollback.8 \ - man/man8/zfs-send.8 man/man8/zfs-set.8 man/man8/zfs-share.8 \ - man/man8/zfs-snapshot.8 man/man8/zfs-unallow.8 \ - man/man8/zfs-unload-key.8 man/man8/zfs-unmount.8 \ - man/man8/zfs-upgrade.8 man/man8/zfs-userspace.8 \ - man/man8/zfs-wait.8 man/man8/zfs_ids_to_path.8 \ - man/man8/zgenhostid.8 man/man8/zinject.8 man/man8/zpool.8 \ - man/man8/zpool-add.8 man/man8/zpool-attach.8 \ - man/man8/zpool-checkpoint.8 man/man8/zpool-clear.8 \ - man/man8/zpool-create.8 man/man8/zpool-destroy.8 \ - man/man8/zpool-detach.8 man/man8/zpool-ddtprune.8 \ - man/man8/zpool-events.8 man/man8/zpool-export.8 \ - man/man8/zpool-get.8 man/man8/zpool-history.8 \ - man/man8/zpool-import.8 man/man8/zpool-initialize.8 \ - man/man8/zpool-iostat.8 man/man8/zpool-labelclear.8 \ - man/man8/zpool-list.8 man/man8/zpool-offline.8 \ - man/man8/zpool-online.8 man/man8/zpool-prefetch.8 \ - man/man8/zpool-reguid.8 man/man8/zpool-remove.8 \ - man/man8/zpool-reopen.8 man/man8/zpool-replace.8 \ - man/man8/zpool-resilver.8 man/man8/zpool-scrub.8 \ - man/man8/zpool-set.8 man/man8/zpool-split.8 \ - man/man8/zpool-status.8 man/man8/zpool-sync.8 \ - man/man8/zpool-trim.8 man/man8/zpool-upgrade.8 \ - man/man8/zpool-wait.8 man/man8/zstream.8 \ - man/man8/zstreamdump.8 man/man8/zpool_influxdb.8 \ - man/man8/zfs-jail.8 man/man8/zfs-unjail.8 \ - man/man8/zfs-unzone.8 man/man8/zfs-zone.8 \ - tests/zfs-tests/cmd/file/file_common.h \ + man/man8/zfs-rename.8 man/man8/zfs-rewrite.8 \ + man/man8/zfs-rollback.8 man/man8/zfs-send.8 man/man8/zfs-set.8 \ + man/man8/zfs-share.8 man/man8/zfs-snapshot.8 \ + man/man8/zfs-unallow.8 man/man8/zfs-unload-key.8 \ + man/man8/zfs-unmount.8 man/man8/zfs-upgrade.8 \ + man/man8/zfs-userspace.8 man/man8/zfs-wait.8 \ + man/man8/zfs_ids_to_path.8 man/man8/zgenhostid.8 \ + man/man8/zinject.8 man/man8/zpool.8 man/man8/zpool-add.8 \ + man/man8/zpool-attach.8 man/man8/zpool-checkpoint.8 \ + man/man8/zpool-clear.8 man/man8/zpool-create.8 \ + man/man8/zpool-destroy.8 man/man8/zpool-detach.8 \ + man/man8/zpool-ddtprune.8 man/man8/zpool-events.8 \ + man/man8/zpool-export.8 man/man8/zpool-get.8 \ + man/man8/zpool-history.8 man/man8/zpool-import.8 \ + man/man8/zpool-initialize.8 man/man8/zpool-iostat.8 \ + man/man8/zpool-labelclear.8 man/man8/zpool-list.8 \ + man/man8/zpool-offline.8 man/man8/zpool-online.8 \ + man/man8/zpool-prefetch.8 man/man8/zpool-reguid.8 \ + man/man8/zpool-remove.8 man/man8/zpool-reopen.8 \ + man/man8/zpool-replace.8 man/man8/zpool-resilver.8 \ + man/man8/zpool-scrub.8 man/man8/zpool-set.8 \ + man/man8/zpool-split.8 man/man8/zpool-status.8 \ + man/man8/zpool-sync.8 man/man8/zpool-trim.8 \ + man/man8/zpool-upgrade.8 man/man8/zpool-wait.8 \ + man/man8/zstream.8 man/man8/zstreamdump.8 \ + man/man8/zpool_influxdb.8 man/man8/zfs-jail.8 \ + man/man8/zfs-unjail.8 man/man8/zfs-unzone.8 \ + man/man8/zfs-zone.8 tests/zfs-tests/cmd/file/file_common.h \ tests/zfs-tests/cmd/linux_dos_attributes/dos_attributes.h \ tests/README.md autogen.sh copy-builtin AUTHORS \ CODE_OF_CONDUCT.md COPYRIGHT LICENSE META NEWS NOTICE \ @@ -2912,8 +2974,8 @@ $(dist_zedconf_DATA) $(dist_zpoolcompat_DATA) $(initconf_DATA) \ $(nodist_bashcompletion_DATA) \ $(nodist_scripts_zfs_tests_include_DATA) $(pkgconfig_DATA) \ - $(pkgdracut_90_DATA) $(sudoersd_DATA) $(sysconf_zfs_DATA) \ - $(systemdunit_DATA) $(udevrule_DATA) + $(pkgdracut_90_DATA) $(sysconf_zfs_DATA) $(systemdunit_DATA) \ + $(udevrule_DATA) am__extra_HEADERS_DIST = zfs.release.in zfs_config.h.in am__libspl_HEADERS_DIST = lib/libspl/include/assert.h \ lib/libspl/include/atomic.h lib/libspl/include/libgen.h \ @@ -2926,8 +2988,9 @@ lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h \ lib/libspl/include/os/linux/sys/ia32/asm_linkage.h am__libspl_rpc_HEADERS_DIST = lib/libspl/include/rpc/xdr.h -am__libspl_sys_HEADERS_DIST = lib/libspl/include/sys/acl.h \ - lib/libspl/include/sys/acl_impl.h \ +am__libspl_sys_HEADERS_DIST = lib/libspl/include/sys/abd_os.h \ + lib/libspl/include/sys/abd_impl_os.h \ + lib/libspl/include/sys/acl.h lib/libspl/include/sys/acl_impl.h \ lib/libspl/include/sys/asm_linkage.h \ lib/libspl/include/sys/backtrace.h \ lib/libspl/include/sys/callb.h \ @@ -2963,6 +3026,7 @@ lib/libspl/include/os/linux/sys/param.h \ lib/libspl/include/os/linux/sys/stat.h \ lib/libspl/include/os/linux/sys/sysmacros.h \ + lib/libspl/include/os/linux/sys/vfs.h \ lib/libspl/include/os/linux/sys/zfs_context_os.h \ lib/libspl/include/os/freebsd/sys/byteorder.h \ lib/libspl/include/os/freebsd/sys/fcntl.h \ @@ -2976,11 +3040,9 @@ lib/libspl/include/os/freebsd/sys/zfs_context_os.h am__libspl_sys_dktp_HEADERS_DIST = \ lib/libspl/include/sys/dktp/fdisk.h -am__libzpool_HEADERS_DIST = lib/libzpool/include/sys/abd_os.h \ - lib/libzpool/include/sys/abd_impl_os.h HEADERS = $(extra_HEADERS) $(libspl_HEADERS) $(libspl_ia32_HEADERS) \ $(libspl_rpc_HEADERS) $(libspl_sys_HEADERS) \ - $(libspl_sys_dktp_HEADERS) $(libzpool_HEADERS) + $(libspl_sys_dktp_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -3007,6 +3069,9 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = include tests/zfs-tests/tests module am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ $(srcdir)/cmd/Makefile.am $(srcdir)/cmd/raidz_test/Makefile.am \ @@ -3042,7 +3107,6 @@ $(srcdir)/lib/libzfs_core/Makefile.am \ $(srcdir)/lib/libzfsbootenv/Makefile.am \ $(srcdir)/lib/libzpool/Makefile.am \ - $(srcdir)/lib/libzpool/include/Makefile.am \ $(srcdir)/lib/libzstd/Makefile.am \ $(srcdir)/lib/libzutil/Makefile.am $(srcdir)/man/Makefile.am \ $(srcdir)/rpm/Makefile.am $(srcdir)/tests/Makefile.am \ @@ -3071,7 +3135,8 @@ $(top_srcdir)/rpm/redhat/zfs-dkms.spec.in \ $(top_srcdir)/rpm/redhat/zfs-kmod.spec.in \ $(top_srcdir)/rpm/redhat/zfs.spec.in \ - $(top_srcdir)/scripts/Makefile.am AUTHORS NEWS README.md \ + $(top_srcdir)/scripts/Makefile.am \ + $(top_srcdir)/scripts/objtool-wrapper.in AUTHORS NEWS \ config/compile config/config.guess config/config.rpath \ config/config.sub config/depcomp config/install-sh \ config/ltmain.sh config/missing @@ -3113,8 +3178,6 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip -# Exists only to be overridden by the user if desired. -AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -3154,11 +3217,10 @@ CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ +CPP = @CPP@ CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPU_COUNT = @CPU_COUNT@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEBUGINFO_ZFS = @DEBUGINFO_ZFS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ @@ -3188,10 +3250,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ FORMAT_OVERFLOW = @FORMAT_OVERFLOW@ FRAME_LARGER_THAN = @FRAME_LARGER_THAN@ GCOV = @GCOV@ @@ -3213,6 +3273,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ IS_SYSV_RC = @IS_SYSV_RC@ KERNEL_ARCH = @KERNEL_ARCH@ KERNEL_CC = @KERNEL_CC@ @@ -3285,6 +3346,7 @@ NO_OMIT_FRAME_POINTER = @NO_OMIT_FRAME_POINTER@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OBJTOOL_DISABLE_WERROR = @OBJTOOL_DISABLE_WERROR@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -3368,6 +3430,7 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_PC = @ZLIB_PC@ abs_builddir = @abs_builddir@ +abs_objtool_binary = @abs_objtool_binary@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ @@ -3447,6 +3510,8 @@ udevdir = @udevdir@ udevruledir = @udevruledir@ zfsexecdir = @zfsexecdir@ + +# SPDX-License-Identifier: CDDL-1.0 CLEANFILES = $(SUBSTFILES) scripts/common.sh $(am__append_8) \ $(am__append_26) $(am__append_29) $(GITREV) @@ -3455,10 +3520,10 @@ scripts/update_authors.pl scripts/zfs2zol-patch.sed \ scripts/zol2zfs-patch.sed $(am__append_6) $(am__append_9) \ $(am__append_23) $(am__append_27) $(am__append_31) \ - $(am__append_34) $(am__append_37) $(am__append_42) \ - $(am__append_54) $(am__append_90) $(am__append_91) autogen.sh \ - copy-builtin AUTHORS CODE_OF_CONDUCT.md COPYRIGHT LICENSE META \ - NEWS NOTICE README.md RELEASES.md module/lua/README.zfs \ + $(am__append_34) $(am__append_41) $(am__append_53) \ + $(am__append_89) $(am__append_90) autogen.sh copy-builtin \ + AUTHORS CODE_OF_CONDUCT.md COPYRIGHT LICENSE META NEWS NOTICE \ + README.md RELEASES.md module/lua/README.zfs \ module/os/linux/spl/README.md \ module/icp/algs/skein/THIRDPARTYLICENSE \ module/icp/algs/skein/THIRDPARTYLICENSE.descrip \ @@ -3475,13 +3540,17 @@ module/zfs/THIRDPARTYLICENSE.cityhash \ module/zfs/THIRDPARTYLICENSE.cityhash.descrip INSTALL_DATA_HOOKS = scripts-install-data-hook $(am__append_15) \ - $(am__append_24) $(am__append_46) $(am__append_85) + $(am__append_24) $(am__append_45) $(am__append_84) ALL_LOCAL = scripts-all-local $(am__append_32) CLEAN_LOCAL = scripts-clean-local $(am__append_33) -CHECKS = shellcheck checkbashisms $(am__append_84) spdxcheck cstyle \ +CHECKS = shellcheck checkbashisms $(am__append_83) spdxcheck cstyle \ testscheck vcscheck zstdcheck flake8 + +# SPDX-License-Identifier: CDDL-1.0 + +# SPDX-License-Identifier: CDDL-1.0 PHONY = cppcheck shellcheck checkbashisms $(am__append_16) \ - $(am__append_94) gitrev install-data-hook \ + $(am__append_93) gitrev install-data-hook \ $(INSTALL_DATA_HOOKS) maintainer-clean-local distclean-local \ $(CLEAN_LOCAL) $(ALL_LOCAL) codecheck $(CHECKS) checkstyle \ commitcheck lint paxcheck regen-tests ctags etags cscopelist \ @@ -3496,9 +3565,9 @@ -I$(top_srcdir)/module/icp/include \ -I$(top_srcdir)/lib/libspl/include \ -I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@ \ - -I$(top_srcdir)/lib/libzpool/include -D_GNU_SOURCE \ - -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ - -DLIBEXECDIR=\"$(libexecdir)\" -DZFSEXECDIR=\"$(zfsexecdir)\" \ + -D_GNU_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ + -D_LARGEFILE64_SOURCE -DLIBEXECDIR=\"$(libexecdir)\" \ + -DZFSEXECDIR=\"$(zfsexecdir)\" \ -DRUNSTATEDIR=\"$(runstatedir)\" -DSBINDIR=\"$(sbindir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" -DPKGDATADIR=\"$(pkgdatadir)\" \ $(DEBUG_CPPFLAGS) $(CODE_COVERAGE_CPPFLAGS) \ @@ -3529,13 +3598,13 @@ CPPCHECKFLAGS = --std=c99 --quiet --max-configs=1 --error-exitcode=2 \ --inline-suppr -U_KERNEL CPPCHECKDIRS = module -CPPCHECKTARGETS = $(am__append_10) $(am__append_18) $(am__append_47) \ - $(am__append_52) $(am__append_80) +CPPCHECKTARGETS = $(am__append_10) $(am__append_18) $(am__append_46) \ + $(am__append_51) $(am__append_79) _CTGT = $(subst cppcheck-for-,,$@) SHELLCHECKSCRIPTS = $(dist_scripts_SCRIPTS) $(dist_noinst_SCRIPTS) \ $(am__append_7) $(am__append_21) $(am__append_30) \ - $(am__append_35) $(am__append_39) $(am__append_41) \ - $(am__append_44) $(am__append_92) autogen.sh + $(am__append_35) $(am__append_38) $(am__append_40) \ + $(am__append_43) $(am__append_91) autogen.sh JUST_SHELLCHECK_OPTS = $(addprefix shellcheck-here-,$(subst /,^,$(1))) JUST_CHECKBASHISMS_OPTS = $(addprefix checkbashisms-here-,$(subst /,^,$(1))) SHELLCHECK_OPTS = $(call JUST_SHELLCHECK_OPTS,$(1)) $(call JUST_CHECKBASHISMS_OPTS,$(1)) @@ -3543,6 +3612,8 @@ # command -v *is* specified by POSIX and every shell in existence supports it _BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@)) + +# SPDX-License-Identifier: CDDL-1.0 subst_sed_cmd = \ -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ @@ -3572,8 +3643,10 @@ -e 's|@VERSION[@]|$(VERSION)|g' SUBSTFILES = $(am__append_22) $(am__append_28) $(am__append_36) \ - $(am__append_38) $(am__append_40) $(am__append_43) \ - $(am__append_45) $(am__append_83) $(am__append_93) + $(am__append_37) $(am__append_39) $(am__append_42) \ + $(am__append_44) $(am__append_82) $(am__append_92) + +# SPDX-License-Identifier: CDDL-1.0 scriptsdir = $(datadir)/$(PACKAGE) dist_noinst_SCRIPTS = scripts/commitcheck.sh scripts/common.sh.in \ scripts/dkms.mkconf scripts/dkms.postbuild scripts/kmodtool \ @@ -3592,7 +3665,9 @@ @CONFIG_USER_TRUE@ scripts/zfs_prepare_disk ACLOCAL_AMFLAGS = -I config -SUBDIRS = include $(am__append_86) $(am__append_95) +SUBDIRS = include $(am__append_85) $(am__append_94) + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@bin_SCRIPTS = $(am__append_25) @CONFIG_USER_TRUE@sbin_SCRIPTS = fsck.zfs @CONFIG_USER_TRUE@dist_bin_SCRIPTS = $(am__append_20) @@ -3619,6 +3694,8 @@ @CONFIG_USER_TRUE@ztest_LDADD = libzpool.la libzfs_core.la \ @CONFIG_USER_TRUE@ libnvpair.la -lm @CONFIG_USER_TRUE@ztest_LDFLAGS = -pthread + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@raidz_test_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) @CONFIG_USER_TRUE@raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) @CONFIG_USER_TRUE@raidz_test_SOURCES = \ @@ -3627,6 +3704,8 @@ @CONFIG_USER_TRUE@ cmd/raidz_test/raidz_test.h @CONFIG_USER_TRUE@raidz_test_LDADD = libzpool.la libzfs_core.la -lm + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@zdb_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) @CONFIG_USER_TRUE@zdb_CFLAGS = $(AM_CFLAGS) $(LIBCRYPTO_CFLAGS) @CONFIG_USER_TRUE@zdb_SOURCES = \ @@ -3656,6 +3735,8 @@ @CONFIG_USER_TRUE@ libzfs_core.la \ @CONFIG_USER_TRUE@ libnvpair.la + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@zpool_CFLAGS = $(AM_CFLAGS) $(LIBBLKID_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBUUID_CFLAGS) @CONFIG_USER_TRUE@zpool_CPPFLAGS = $(AM_CPPFLAGS) \ @@ -3828,6 +3909,8 @@ @CONFIG_USER_TRUE@ libnvpair.la \ @CONFIG_USER_TRUE@ libzfs.la + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@zstream_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) @CONFIG_USER_TRUE@zstream_SOURCES = \ @CONFIG_USER_TRUE@ cmd/zstream/zstream.c \ @@ -3853,6 +3936,8 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@zgenhostid_SOURCES = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ cmd/zgenhostid.c + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@zedconfdir = $(sysconfdir)/zfs/zed.d @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@dist_zedconf_DATA = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ cmd/zed/zed.d/zed-functions.sh \ @@ -3894,6 +3979,8 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ vdev_attach-led.sh \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ vdev_clear-led.sh + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@zed_CFLAGS = $(AM_CFLAGS) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(LIBUDEV_CFLAGS) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(LIBUUID_CFLAGS) @@ -3932,9 +4019,13 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(LIBUDEV_LIBS) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(LIBUUID_LIBS) @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@zed_LDFLAGS = -pthread + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@nodist_bashcompletion_DATA = contrib/bash_completion.d/zfs contrib/bash_completion.d/zpool @CONFIG_USER_TRUE@COMPLETION_FILES = contrib/bash_completion.d/zfs @CONFIG_USER_TRUE@@PYZFS_ENABLED_TRUE@pyzfs_V_1 = -v + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@pkgdracut_02dir = $(dracutdir)/modules.d/02zfsexpandknowledge @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@pkgdracut_02_SCRIPTS = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/dracut/02zfsexpandknowledge/module-setup.sh @@ -3957,6 +4048,8 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/dracut/90zfs/zfs-rollback-bootfs.service \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/dracut/90zfs/zfs-snapshot-bootfs.service + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@i_tdir = /usr/share/initramfs-tools @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@dist_i_t_SCRIPTS = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/initramfs/zfsunlock @@ -3983,6 +4076,8 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ contrib/initramfs/scripts/local-top/zfs @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@i_t_check_scripts = $(dist_i_t_SCRIPTS) $(i_t_hooks_SCRIPTS) $(dist_i_t_scripts_SCRIPTS) $(dist_i_t_scripts_localtop_SCRIPTS) + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@@PAM_ZFS_ENABLED_TRUE@contrib_pam_zfs_key_pam_zfs_key_la_CFLAGS = \ @CONFIG_USER_TRUE@@PAM_ZFS_ENABLED_TRUE@ $(AM_CFLAGS) \ @CONFIG_USER_TRUE@@PAM_ZFS_ENABLED_TRUE@ $(LIBCRYPTO_CFLAGS) @@ -3995,10 +4090,6 @@ @CONFIG_USER_TRUE@@PAM_ZFS_ENABLED_TRUE@ $(LIBCRYPTO_LIBS) @CONFIG_USER_TRUE@@PAM_ZFS_ENABLED_TRUE@contrib_pam_zfs_key_pam_zfs_key_la_LDFLAGS = -version-info 1:0:0 -avoid-version -module -shared @CONFIG_USER_TRUE@@PAM_ZFS_ENABLED_TRUE@dist_pamconfigs_DATA = contrib/pam_zfs_key/zfs_key -@CONFIG_USER_TRUE@sudoersddir = $(sysconfdir)/sudoers.d -@CONFIG_USER_TRUE@sudoersd_DATA = \ -@CONFIG_USER_TRUE@ etc/sudoers.d/zfs - @CONFIG_USER_TRUE@sysconf_zfsdir = $(sysconfdir)/zfs @CONFIG_USER_TRUE@dist_sysconf_zfs_DATA = \ @CONFIG_USER_TRUE@ etc/zfs/vdev_id.conf.alias.example \ @@ -4028,6 +4119,7 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-import-scan.service \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-import.target \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-mount.service \ +@BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-mount@.service \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-scrub-monthly@.timer \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-scrub-weekly@.timer \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSTEMD_TRUE@ etc/systemd/system/zfs-scrub@.service \ @@ -4053,18 +4145,22 @@ @CONFIG_USER_TRUE@noinst_LTLIBRARIES = libavl.la libicp.la libshare.la \ @CONFIG_USER_TRUE@ libspl_assert.la libspl.la libtpool.la \ @CONFIG_USER_TRUE@ libunicode.la libzdb.la libzstd.la \ -@CONFIG_USER_TRUE@ libzutil.la $(am__append_79) +@CONFIG_USER_TRUE@ libzutil.la $(am__append_78) @CONFIG_USER_TRUE@lib_LTLIBRARIES = libnvpair.la libuutil.la \ @CONFIG_USER_TRUE@ libzfs_core.la libzfs.la libzfsbootenv.la \ @CONFIG_USER_TRUE@ libzpool.la @CONFIG_USER_TRUE@pkgconfig_DATA = lib/libzfs_core/libzfs_core.pc \ @CONFIG_USER_TRUE@ lib/libzfs/libzfs.pc \ @CONFIG_USER_TRUE@ lib/libzfsbootenv/libzfsbootenv.pc + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libavl_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBRARY_CFLAGS) -fvisibility=hidden @CONFIG_USER_TRUE@nodist_libavl_la_SOURCES = \ @CONFIG_USER_TRUE@ module/avl/avl.c + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libicp_la_CCASFLAGS = $(AM_CCASFLAGS) @CONFIG_USER_TRUE@libicp_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS) @CONFIG_USER_TRUE@nodist_libicp_la_SOURCES = module/icp/spi/kcf_spi.c \ @@ -4098,9 +4194,11 @@ @CONFIG_USER_TRUE@ module/icp/core/kcf_callprov.c \ @CONFIG_USER_TRUE@ module/icp/core/kcf_mech_tabs.c \ @CONFIG_USER_TRUE@ module/icp/core/kcf_prov_tabs.c \ -@CONFIG_USER_TRUE@ module/zfs/zfs_impl.c $(am__append_48) \ -@CONFIG_USER_TRUE@ $(am__append_49) $(am__append_50) \ -@CONFIG_USER_TRUE@ $(am__append_51) +@CONFIG_USER_TRUE@ module/zfs/zfs_impl.c $(am__append_47) \ +@CONFIG_USER_TRUE@ $(am__append_48) $(am__append_49) \ +@CONFIG_USER_TRUE@ $(am__append_50) + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libnvpair_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBRARY_CFLAGS) $(LIBTIRPC_CFLAGS) \ @CONFIG_USER_TRUE@ -fvisibility=hidden @@ -4116,7 +4214,7 @@ @CONFIG_USER_TRUE@libnvpair_la_LIBADD = libspl_assert.la \ @CONFIG_USER_TRUE@ $(LIBTIRPC_LIBS) $(LTLIBINTL) -@CONFIG_USER_TRUE@libnvpair_la_LDFLAGS = $(am__append_53) \ +@CONFIG_USER_TRUE@libnvpair_la_LDFLAGS = $(am__append_52) \ @CONFIG_USER_TRUE@ -version-info 3:0:0 @CONFIG_USER_TRUE@libshare_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) \ @CONFIG_USER_TRUE@ -fvisibility=hidden @@ -4125,7 +4223,9 @@ @CONFIG_USER_TRUE@libshare_la_SOURCES = lib/libshare/libshare_impl.h \ @CONFIG_USER_TRUE@ lib/libshare/libshare.c lib/libshare/nfs.c \ @CONFIG_USER_TRUE@ lib/libshare/nfs.h lib/libshare/smb.h \ -@CONFIG_USER_TRUE@ $(am__append_55) $(am__append_56) +@CONFIG_USER_TRUE@ $(am__append_54) $(am__append_55) + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libspldir = $(includedir)/libspl @CONFIG_USER_TRUE@libspl_HEADERS = lib/libspl/include/assert.h \ @CONFIG_USER_TRUE@ lib/libspl/include/atomic.h \ @@ -4136,13 +4236,16 @@ @CONFIG_USER_TRUE@ lib/libspl/include/string.h \ @CONFIG_USER_TRUE@ lib/libspl/include/umem.h \ @CONFIG_USER_TRUE@ lib/libspl/include/unistd.h \ -@CONFIG_USER_TRUE@ lib/libspl/include/zone.h $(am__append_57) +@CONFIG_USER_TRUE@ lib/libspl/include/zone.h $(am__append_56) @CONFIG_USER_TRUE@libspl_rpcdir = $(libspldir)/rpc @CONFIG_USER_TRUE@libspl_rpc_HEADERS = \ @CONFIG_USER_TRUE@ lib/libspl/include/rpc/xdr.h @CONFIG_USER_TRUE@libspl_sysdir = $(libspldir)/sys -@CONFIG_USER_TRUE@libspl_sys_HEADERS = lib/libspl/include/sys/acl.h \ +@CONFIG_USER_TRUE@libspl_sys_HEADERS = \ +@CONFIG_USER_TRUE@ lib/libspl/include/sys/abd_os.h \ +@CONFIG_USER_TRUE@ lib/libspl/include/sys/abd_impl_os.h \ +@CONFIG_USER_TRUE@ lib/libspl/include/sys/acl.h \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/acl_impl.h \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/asm_linkage.h \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/backtrace.h \ @@ -4180,7 +4283,7 @@ @CONFIG_USER_TRUE@ lib/libspl/include/sys/vnode.h \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/wmsum.h \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/zone.h \ -@CONFIG_USER_TRUE@ $(am__append_58) $(am__append_59) +@CONFIG_USER_TRUE@ $(am__append_57) $(am__append_58) @CONFIG_USER_TRUE@libspl_ia32dir = $(libspldir)/sys/ia32 @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@libspl_ia32_HEADERS = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ lib/libspl/include/os/freebsd/sys/ia32/asm_linkage.h @@ -4192,6 +4295,8 @@ @CONFIG_USER_TRUE@libspl_sys_dktp_HEADERS = \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/dktp/fdisk.h + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libspl_assert_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) $(LIBUNWIND_CFLAGS) @CONFIG_USER_TRUE@libspl_la_CFLAGS = $(libspl_assert_la_CFLAGS) @CONFIG_USER_TRUE@libspl_assert_la_SOURCES = \ @@ -4205,11 +4310,11 @@ @CONFIG_USER_TRUE@ lib/libspl/strlcpy.c lib/libspl/timestamp.c \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/list.h \ @CONFIG_USER_TRUE@ lib/libspl/include/sys/list_impl.h \ -@CONFIG_USER_TRUE@ $(am__append_60) $(am__append_61) +@CONFIG_USER_TRUE@ $(am__append_59) $(am__append_60) @CONFIG_USER_TRUE@libspl_la_LIBADD = libspl_assert.la \ @CONFIG_USER_TRUE@ $(LIBATOMIC_LIBS) $(LIBCLOCK_GETTIME) @CONFIG_USER_TRUE@libspl_assert_la_LIBADD = $(BACKTRACE_LIBS) \ -@CONFIG_USER_TRUE@ $(LIBUNWIND_LIBS) $(am__append_62) +@CONFIG_USER_TRUE@ $(LIBUNWIND_LIBS) $(am__append_61) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61118 @CONFIG_USER_TRUE@libtpool_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) \ @CONFIG_USER_TRUE@ -fvisibility=hidden $(NO_CLOBBERED) @@ -4233,27 +4338,34 @@ @CONFIG_USER_TRUE@libuutil_la_LIBADD = libavl.la libspl.la \ @CONFIG_USER_TRUE@ $(LTLIBINTL) -@CONFIG_USER_TRUE@libuutil_la_LDFLAGS = -pthread $(am__append_63) \ +@CONFIG_USER_TRUE@libuutil_la_LDFLAGS = -pthread $(am__append_62) \ @CONFIG_USER_TRUE@ -version-info 3:0:0 + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libzdb_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) \ @CONFIG_USER_TRUE@ -fvisibility=hidden @CONFIG_USER_TRUE@libzdb_la_SOURCES = \ @CONFIG_USER_TRUE@ lib/libzdb/libzdb.c + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libzfs_core_la_CFLAGS = $(AM_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBRARY_CFLAGS) -fvisibility=hidden +@CONFIG_USER_TRUE@libzfs_core_la_CPPFLAGS = $(AM_CPPFLAGS) \ +@CONFIG_USER_TRUE@ -I$(srcdir)/lib/libzfs_core $(am__append_64) @CONFIG_USER_TRUE@libzfs_core_la_SOURCES = \ @CONFIG_USER_TRUE@ lib/libzfs_core/libzfs_core.c \ -@CONFIG_USER_TRUE@ $(am__append_64) $(am__append_66) -@CONFIG_USER_TRUE@libzfs_core_la_CPPFLAGS = $(AM_CPPFLAGS) \ -@CONFIG_USER_TRUE@ $(am__append_65) +@CONFIG_USER_TRUE@ lib/libzfs_core/libzfs_core_impl.h \ +@CONFIG_USER_TRUE@ $(am__append_63) $(am__append_65) @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@nodist_libzfs_core_la_SOURCES = \ @BUILD_FREEBSD_TRUE@@CONFIG_USER_TRUE@ module/os/freebsd/zfs/zfs_ioctl_compat.c @CONFIG_USER_TRUE@libzfs_core_la_LIBADD = libnvpair.la libspl.la \ -@CONFIG_USER_TRUE@ $(LTLIBINTL) $(am__append_68) -@CONFIG_USER_TRUE@libzfs_core_la_LDFLAGS = -pthread $(am__append_67) \ +@CONFIG_USER_TRUE@ $(LTLIBINTL) $(am__append_67) +@CONFIG_USER_TRUE@libzfs_core_la_LDFLAGS = -pthread $(am__append_66) \ @CONFIG_USER_TRUE@ -version-info 3:0:0 + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libzfs_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBCRYPTO_CFLAGS) $(ZLIB_CFLAGS) \ @CONFIG_USER_TRUE@ -fvisibility=hidden @@ -4269,8 +4381,8 @@ @CONFIG_USER_TRUE@ lib/libzfs/libzfs_pool.c \ @CONFIG_USER_TRUE@ lib/libzfs/libzfs_sendrecv.c \ @CONFIG_USER_TRUE@ lib/libzfs/libzfs_status.c \ -@CONFIG_USER_TRUE@ lib/libzfs/libzfs_util.c $(am__append_69) \ -@CONFIG_USER_TRUE@ $(am__append_70) +@CONFIG_USER_TRUE@ lib/libzfs/libzfs_util.c $(am__append_68) \ +@CONFIG_USER_TRUE@ $(am__append_69) @CONFIG_USER_TRUE@nodist_libzfs_la_SOURCES = \ @CONFIG_USER_TRUE@ module/zcommon/cityhash.c \ @CONFIG_USER_TRUE@ module/zcommon/zfeature_common.c \ @@ -4293,9 +4405,11 @@ @CONFIG_USER_TRUE@ libnvpair.la libzutil.la libuutil.la -lrt \ @CONFIG_USER_TRUE@ -lm $(LIBCRYPTO_LIBS) $(ZLIB_LIBS) \ @CONFIG_USER_TRUE@ $(LIBFETCH_LIBS) $(LTLIBINTL) \ -@CONFIG_USER_TRUE@ $(am__append_72) -@CONFIG_USER_TRUE@libzfs_la_LDFLAGS = -pthread $(am__append_71) \ +@CONFIG_USER_TRUE@ $(am__append_71) +@CONFIG_USER_TRUE@libzfs_la_LDFLAGS = -pthread $(am__append_70) \ @CONFIG_USER_TRUE@ -version-info 6:0:0 + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libzfsbootenv_la_CFLAGS = $(AM_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBRARY_CFLAGS) -fvisibility=hidden @CONFIG_USER_TRUE@libzfsbootenv_la_CPPFLAGS = $(AM_CPPFLAGS) \ @@ -4309,13 +4423,10 @@ @CONFIG_USER_TRUE@ libzfs.la \ @CONFIG_USER_TRUE@ libnvpair.la -@CONFIG_USER_TRUE@libzfsbootenv_la_LDFLAGS = $(am__append_73) \ +@CONFIG_USER_TRUE@libzfsbootenv_la_LDFLAGS = $(am__append_72) \ @CONFIG_USER_TRUE@ -version-info 1:0:0 -@CONFIG_USER_TRUE@libzpooldir = $(includedir)/libzpool -@CONFIG_USER_TRUE@libzpool_HEADERS = \ -@CONFIG_USER_TRUE@ lib/libzpool/include/sys/abd_os.h \ -@CONFIG_USER_TRUE@ lib/libzpool/include/sys/abd_impl_os.h +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libzpool_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBRARY_CFLAGS) $(ZLIB_CFLAGS) @CONFIG_USER_TRUE@libzpool_la_CPPFLAGS = $(AM_CPPFLAGS) \ @@ -4508,10 +4619,12 @@ @CONFIG_USER_TRUE@libzpool_la_LIBADD = libicp.la libunicode.la \ @CONFIG_USER_TRUE@ libnvpair.la libzstd.la libzutil.la \ @CONFIG_USER_TRUE@ $(LIBCLOCK_GETTIME) $(ZLIB_LIBS) -ldl -lm \ -@CONFIG_USER_TRUE@ $(am__append_75) -@CONFIG_USER_TRUE@libzpool_la_LDFLAGS = -pthread $(am__append_74) \ +@CONFIG_USER_TRUE@ $(am__append_74) +@CONFIG_USER_TRUE@libzpool_la_LDFLAGS = -pthread $(am__append_73) \ @CONFIG_USER_TRUE@ -version-info 6:0:0 +# SPDX-License-Identifier: CDDL-1.0 + # -fno-tree-vectorize is set for gcc in zstd/common/compiler.h # Set it for other compilers, too. @CONFIG_USER_TRUE@libzstd_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) \ @@ -4543,6 +4656,8 @@ @CONFIG_USER_TRUE@ module/zstd/lib/decompress/zstd_decompress_block.c \ @CONFIG_USER_TRUE@ module/zstd/zfs_zstd.c + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@libzutil_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) \ @CONFIG_USER_TRUE@ $(LIBBLKID_CFLAGS) $(LIBUDEV_CFLAGS) \ @CONFIG_USER_TRUE@ -fvisibility=hidden @@ -4553,11 +4668,13 @@ @CONFIG_USER_TRUE@ lib/libzutil/zutil_import.c \ @CONFIG_USER_TRUE@ lib/libzutil/zutil_import.h \ @CONFIG_USER_TRUE@ lib/libzutil/zutil_nicenum.c \ -@CONFIG_USER_TRUE@ lib/libzutil/zutil_pool.c $(am__append_76) \ -@CONFIG_USER_TRUE@ $(am__append_77) +@CONFIG_USER_TRUE@ lib/libzutil/zutil_pool.c $(am__append_75) \ +@CONFIG_USER_TRUE@ $(am__append_76) @CONFIG_USER_TRUE@libzutil_la_LIBADD = libavl.la libtpool.la \ -@CONFIG_USER_TRUE@ libnvpair.la libspl.la $(am__append_78) -lm \ +@CONFIG_USER_TRUE@ libnvpair.la libspl.la $(am__append_77) -lm \ @CONFIG_USER_TRUE@ $(LIBBLKID_LIBS) $(LIBUDEV_LIBS) + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@libefi_la_CFLAGS = $(AM_CFLAGS) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(LIBRARY_CFLAGS) \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ $(LIBUUID_CFLAGS) \ @@ -4567,6 +4684,8 @@ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ lib/libefi/rdwr_efi.c @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@libefi_la_LIBADD = $(LIBUUID_LIBS) $(ZLIB_LIBS) + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@dist_noinst_man_MANS = \ @CONFIG_USER_TRUE@ man/man1/cstyle.1 @@ -4595,7 +4714,7 @@ @CONFIG_USER_TRUE@ man/man8/zfs-promote.8 \ @CONFIG_USER_TRUE@ man/man8/zfs-receive.8 man/man8/zfs-recv.8 \ @CONFIG_USER_TRUE@ man/man8/zfs-redact.8 man/man8/zfs-release.8 \ -@CONFIG_USER_TRUE@ man/man8/zfs-rename.8 \ +@CONFIG_USER_TRUE@ man/man8/zfs-rename.8 man/man8/zfs-rewrite.8 \ @CONFIG_USER_TRUE@ man/man8/zfs-rollback.8 man/man8/zfs-send.8 \ @CONFIG_USER_TRUE@ man/man8/zfs-set.8 man/man8/zfs-share.8 \ @CONFIG_USER_TRUE@ man/man8/zfs-snapshot.8 \ @@ -4637,13 +4756,15 @@ @CONFIG_USER_TRUE@ man/man8/zpool-upgrade.8 \ @CONFIG_USER_TRUE@ man/man8/zpool-wait.8 man/man8/zstream.8 \ @CONFIG_USER_TRUE@ man/man8/zstreamdump.8 \ -@CONFIG_USER_TRUE@ man/man8/zpool_influxdb.8 $(am__append_81) \ -@CONFIG_USER_TRUE@ $(am__append_82) +@CONFIG_USER_TRUE@ man/man8/zpool_influxdb.8 $(am__append_80) \ +@CONFIG_USER_TRUE@ $(am__append_81) @CONFIG_USER_TRUE@nodist_man_MANS = \ @CONFIG_USER_TRUE@ man/man8/zed.8 \ @CONFIG_USER_TRUE@ man/man8/zfs-mount-generator.8 \ @CONFIG_USER_TRUE@ man/man8/zfs_prepare_disk.8 + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@scripts_zfs_tests_bindir = $(datadir)/$(PACKAGE)/zfs-tests/bin @CONFIG_USER_TRUE@tests_zfs_tests_cmd_badsend_LDADD = \ @CONFIG_USER_TRUE@ libzfs_core.la \ @@ -4657,6 +4778,7 @@ @CONFIG_USER_TRUE@tests_zfs_tests_cmd_crypto_test_SOURCES = tests/zfs-tests/cmd/crypto_test.c @CONFIG_USER_TRUE@tests_zfs_tests_cmd_crypto_test_LDADD = libzpool.la +@CONFIG_USER_TRUE@tests_zfs_tests_cmd_clone_after_trunc_LDADD = -lpthread @CONFIG_USER_TRUE@@WANT_DEVNAME2DEVID_TRUE@tests_zfs_tests_cmd_devname2devid_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) @CONFIG_USER_TRUE@@WANT_DEVNAME2DEVID_TRUE@tests_zfs_tests_cmd_devname2devid_LDADD = $(LIBUDEV_LIBS) @CONFIG_USER_TRUE@tests_zfs_tests_cmd_draid_CFLAGS = $(AM_CFLAGS) $(ZLIB_CFLAGS) @@ -4743,6 +4865,8 @@ @CONFIG_USER_TRUE@nodist_scripts_zfs_tests_include_DATA = \ @CONFIG_USER_TRUE@ tests/zfs-tests/include/default.cfg + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@scripts_test_runner_bindir = $(datadir)/$(PACKAGE)/test-runner/bin @CONFIG_USER_TRUE@scripts_test_runner_bin_SCRIPTS = \ @CONFIG_USER_TRUE@ tests/test-runner/bin/test-runner.py \ @@ -4763,6 +4887,8 @@ @CONFIG_USER_TRUE@ tests/runfiles/sanity.run \ @CONFIG_USER_TRUE@ tests/runfiles/sunos.run + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@udevrule_DATA = \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ udev/rules.d/69-vdev.rules \ @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@ udev/rules.d/60-zvol.rules \ @@ -4782,7 +4908,7 @@ .SUFFIXES: .S .c .lo .o .obj am--refresh: Makefile @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Rules.am $(top_srcdir)/config/CppCheck.am $(top_srcdir)/config/Shellcheck.am $(top_srcdir)/config/Substfiles.am $(top_srcdir)/scripts/Makefile.am $(srcdir)/rpm/Makefile.am $(srcdir)/cmd/Makefile.am $(srcdir)/cmd/raidz_test/Makefile.am $(srcdir)/cmd/zdb/Makefile.am $(srcdir)/cmd/zfs/Makefile.am $(srcdir)/cmd/zinject/Makefile.am $(srcdir)/cmd/zpool/Makefile.am $(srcdir)/cmd/zpool_influxdb/Makefile.am $(srcdir)/cmd/zstream/Makefile.am $(srcdir)/cmd/zed/Makefile.am $(srcdir)/cmd/zed/zed.d/Makefile.am $(srcdir)/contrib/Makefile.am $(srcdir)/contrib/bash_completion.d/Makefile.am $(srcdir)/contrib/debian/Makefile.am $(srcdir)/contrib/pyzfs/Makefile.am $(srcdir)/contrib/zcp/Makefile.am $(srcdir)/contrib/bpftrace/Makefile.am $(srcdir)/contrib/dracut/Makefile.am $(srcdir)/contrib/initramfs/Makefile.am $(srcdir)/contrib/pam_zfs_key/Makefile.am $(srcdir)/etc/Makefile.am $(srcdir)/lib/Makefile.am $(srcdir)/lib/libavl/Makefile.am $(srcdir)/lib/libicp/Makefile.am $(srcdir)/lib/libnvpair/Makefile.am $(srcdir)/lib/libshare/Makefile.am $(srcdir)/lib/libspl/Makefile.am $(srcdir)/lib/libspl/include/Makefile.am $(srcdir)/lib/libtpool/Makefile.am $(srcdir)/lib/libunicode/Makefile.am $(srcdir)/lib/libuutil/Makefile.am $(srcdir)/lib/libzdb/Makefile.am $(srcdir)/lib/libzfs_core/Makefile.am $(srcdir)/lib/libzfs/Makefile.am $(srcdir)/lib/libzfsbootenv/Makefile.am $(srcdir)/lib/libzpool/Makefile.am $(srcdir)/lib/libzpool/include/Makefile.am $(srcdir)/lib/libzstd/Makefile.am $(srcdir)/lib/libzutil/Makefile.am $(srcdir)/lib/libefi/Makefile.am $(srcdir)/man/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/tests/zfs-tests/Makefile.am $(srcdir)/tests/zfs-tests/cmd/Makefile.am $(srcdir)/udev/Makefile.am $(srcdir)/config/rpm.am $(srcdir)/config/deb.am $(srcdir)/config/tgz.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Rules.am $(top_srcdir)/config/CppCheck.am $(top_srcdir)/config/Shellcheck.am $(top_srcdir)/config/Substfiles.am $(top_srcdir)/scripts/Makefile.am $(srcdir)/rpm/Makefile.am $(srcdir)/cmd/Makefile.am $(srcdir)/cmd/raidz_test/Makefile.am $(srcdir)/cmd/zdb/Makefile.am $(srcdir)/cmd/zfs/Makefile.am $(srcdir)/cmd/zinject/Makefile.am $(srcdir)/cmd/zpool/Makefile.am $(srcdir)/cmd/zpool_influxdb/Makefile.am $(srcdir)/cmd/zstream/Makefile.am $(srcdir)/cmd/zed/Makefile.am $(srcdir)/cmd/zed/zed.d/Makefile.am $(srcdir)/contrib/Makefile.am $(srcdir)/contrib/bash_completion.d/Makefile.am $(srcdir)/contrib/debian/Makefile.am $(srcdir)/contrib/pyzfs/Makefile.am $(srcdir)/contrib/zcp/Makefile.am $(srcdir)/contrib/bpftrace/Makefile.am $(srcdir)/contrib/dracut/Makefile.am $(srcdir)/contrib/initramfs/Makefile.am $(srcdir)/contrib/pam_zfs_key/Makefile.am $(srcdir)/etc/Makefile.am $(srcdir)/lib/Makefile.am $(srcdir)/lib/libavl/Makefile.am $(srcdir)/lib/libicp/Makefile.am $(srcdir)/lib/libnvpair/Makefile.am $(srcdir)/lib/libshare/Makefile.am $(srcdir)/lib/libspl/Makefile.am $(srcdir)/lib/libspl/include/Makefile.am $(srcdir)/lib/libtpool/Makefile.am $(srcdir)/lib/libunicode/Makefile.am $(srcdir)/lib/libuutil/Makefile.am $(srcdir)/lib/libzdb/Makefile.am $(srcdir)/lib/libzfs_core/Makefile.am $(srcdir)/lib/libzfs/Makefile.am $(srcdir)/lib/libzfsbootenv/Makefile.am $(srcdir)/lib/libzpool/Makefile.am $(srcdir)/lib/libzstd/Makefile.am $(srcdir)/lib/libzutil/Makefile.am $(srcdir)/lib/libefi/Makefile.am $(srcdir)/man/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/tests/zfs-tests/Makefile.am $(srcdir)/tests/zfs-tests/cmd/Makefile.am $(srcdir)/udev/Makefile.am $(srcdir)/config/rpm.am $(srcdir)/config/deb.am $(srcdir)/config/tgz.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -4804,7 +4930,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; -$(top_srcdir)/config/Rules.am $(top_srcdir)/config/CppCheck.am $(top_srcdir)/config/Shellcheck.am $(top_srcdir)/config/Substfiles.am $(top_srcdir)/scripts/Makefile.am $(srcdir)/rpm/Makefile.am $(srcdir)/cmd/Makefile.am $(srcdir)/cmd/raidz_test/Makefile.am $(srcdir)/cmd/zdb/Makefile.am $(srcdir)/cmd/zfs/Makefile.am $(srcdir)/cmd/zinject/Makefile.am $(srcdir)/cmd/zpool/Makefile.am $(srcdir)/cmd/zpool_influxdb/Makefile.am $(srcdir)/cmd/zstream/Makefile.am $(srcdir)/cmd/zed/Makefile.am $(srcdir)/cmd/zed/zed.d/Makefile.am $(srcdir)/contrib/Makefile.am $(srcdir)/contrib/bash_completion.d/Makefile.am $(srcdir)/contrib/debian/Makefile.am $(srcdir)/contrib/pyzfs/Makefile.am $(srcdir)/contrib/zcp/Makefile.am $(srcdir)/contrib/bpftrace/Makefile.am $(srcdir)/contrib/dracut/Makefile.am $(srcdir)/contrib/initramfs/Makefile.am $(srcdir)/contrib/pam_zfs_key/Makefile.am $(srcdir)/etc/Makefile.am $(srcdir)/lib/Makefile.am $(srcdir)/lib/libavl/Makefile.am $(srcdir)/lib/libicp/Makefile.am $(srcdir)/lib/libnvpair/Makefile.am $(srcdir)/lib/libshare/Makefile.am $(srcdir)/lib/libspl/Makefile.am $(srcdir)/lib/libspl/include/Makefile.am $(srcdir)/lib/libtpool/Makefile.am $(srcdir)/lib/libunicode/Makefile.am $(srcdir)/lib/libuutil/Makefile.am $(srcdir)/lib/libzdb/Makefile.am $(srcdir)/lib/libzfs_core/Makefile.am $(srcdir)/lib/libzfs/Makefile.am $(srcdir)/lib/libzfsbootenv/Makefile.am $(srcdir)/lib/libzpool/Makefile.am $(srcdir)/lib/libzpool/include/Makefile.am $(srcdir)/lib/libzstd/Makefile.am $(srcdir)/lib/libzutil/Makefile.am $(srcdir)/lib/libefi/Makefile.am $(srcdir)/man/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/tests/zfs-tests/Makefile.am $(srcdir)/tests/zfs-tests/cmd/Makefile.am $(srcdir)/udev/Makefile.am $(srcdir)/config/rpm.am $(srcdir)/config/deb.am $(srcdir)/config/tgz.am $(am__empty): +$(top_srcdir)/config/Rules.am $(top_srcdir)/config/CppCheck.am $(top_srcdir)/config/Shellcheck.am $(top_srcdir)/config/Substfiles.am $(top_srcdir)/scripts/Makefile.am $(srcdir)/rpm/Makefile.am $(srcdir)/cmd/Makefile.am $(srcdir)/cmd/raidz_test/Makefile.am $(srcdir)/cmd/zdb/Makefile.am $(srcdir)/cmd/zfs/Makefile.am $(srcdir)/cmd/zinject/Makefile.am $(srcdir)/cmd/zpool/Makefile.am $(srcdir)/cmd/zpool_influxdb/Makefile.am $(srcdir)/cmd/zstream/Makefile.am $(srcdir)/cmd/zed/Makefile.am $(srcdir)/cmd/zed/zed.d/Makefile.am $(srcdir)/contrib/Makefile.am $(srcdir)/contrib/bash_completion.d/Makefile.am $(srcdir)/contrib/debian/Makefile.am $(srcdir)/contrib/pyzfs/Makefile.am $(srcdir)/contrib/zcp/Makefile.am $(srcdir)/contrib/bpftrace/Makefile.am $(srcdir)/contrib/dracut/Makefile.am $(srcdir)/contrib/initramfs/Makefile.am $(srcdir)/contrib/pam_zfs_key/Makefile.am $(srcdir)/etc/Makefile.am $(srcdir)/lib/Makefile.am $(srcdir)/lib/libavl/Makefile.am $(srcdir)/lib/libicp/Makefile.am $(srcdir)/lib/libnvpair/Makefile.am $(srcdir)/lib/libshare/Makefile.am $(srcdir)/lib/libspl/Makefile.am $(srcdir)/lib/libspl/include/Makefile.am $(srcdir)/lib/libtpool/Makefile.am $(srcdir)/lib/libunicode/Makefile.am $(srcdir)/lib/libuutil/Makefile.am $(srcdir)/lib/libzdb/Makefile.am $(srcdir)/lib/libzfs_core/Makefile.am $(srcdir)/lib/libzfs/Makefile.am $(srcdir)/lib/libzfsbootenv/Makefile.am $(srcdir)/lib/libzpool/Makefile.am $(srcdir)/lib/libzstd/Makefile.am $(srcdir)/lib/libzutil/Makefile.am $(srcdir)/lib/libefi/Makefile.am $(srcdir)/man/Makefile.am $(srcdir)/tests/Makefile.am $(srcdir)/tests/zfs-tests/Makefile.am $(srcdir)/tests/zfs-tests/cmd/Makefile.am $(srcdir)/udev/Makefile.am $(srcdir)/config/rpm.am $(srcdir)/config/deb.am $(srcdir)/config/tgz.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -4857,6 +4983,8 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ zfs.release: $(top_builddir)/config.status $(srcdir)/zfs.release.in cd $(top_builddir) && $(SHELL) ./config.status $@ +scripts/objtool-wrapper: $(top_builddir)/config.status $(top_srcdir)/scripts/objtool-wrapper.in + cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -6842,6 +6970,13 @@ tests/zfs-tests/cmd/chg_usr_exec$(EXEEXT): $(tests_zfs_tests_cmd_chg_usr_exec_OBJECTS) $(tests_zfs_tests_cmd_chg_usr_exec_DEPENDENCIES) $(EXTRA_tests_zfs_tests_cmd_chg_usr_exec_DEPENDENCIES) tests/zfs-tests/cmd/$(am__dirstamp) @rm -f tests/zfs-tests/cmd/chg_usr_exec$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_zfs_tests_cmd_chg_usr_exec_OBJECTS) $(tests_zfs_tests_cmd_chg_usr_exec_LDADD) $(LIBS) +tests/zfs-tests/cmd/clone_after_trunc.$(OBJEXT): \ + tests/zfs-tests/cmd/$(am__dirstamp) \ + tests/zfs-tests/cmd/$(DEPDIR)/$(am__dirstamp) + +tests/zfs-tests/cmd/clone_after_trunc$(EXEEXT): $(tests_zfs_tests_cmd_clone_after_trunc_OBJECTS) $(tests_zfs_tests_cmd_clone_after_trunc_DEPENDENCIES) $(EXTRA_tests_zfs_tests_cmd_clone_after_trunc_DEPENDENCIES) tests/zfs-tests/cmd/$(am__dirstamp) + @rm -f tests/zfs-tests/cmd/clone_after_trunc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tests_zfs_tests_cmd_clone_after_trunc_OBJECTS) $(tests_zfs_tests_cmd_clone_after_trunc_LDADD) $(LIBS) tests/zfs-tests/cmd/clone_mmap_cached.$(OBJEXT): \ tests/zfs-tests/cmd/$(am__dirstamp) \ tests/zfs-tests/cmd/$(DEPDIR)/$(am__dirstamp) @@ -7044,6 +7179,13 @@ tests/zfs-tests/cmd/mmap_exec$(EXEEXT): $(tests_zfs_tests_cmd_mmap_exec_OBJECTS) $(tests_zfs_tests_cmd_mmap_exec_DEPENDENCIES) $(EXTRA_tests_zfs_tests_cmd_mmap_exec_DEPENDENCIES) tests/zfs-tests/cmd/$(am__dirstamp) @rm -f tests/zfs-tests/cmd/mmap_exec$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_zfs_tests_cmd_mmap_exec_OBJECTS) $(tests_zfs_tests_cmd_mmap_exec_LDADD) $(LIBS) +tests/zfs-tests/cmd/mmap_ftruncate.$(OBJEXT): \ + tests/zfs-tests/cmd/$(am__dirstamp) \ + tests/zfs-tests/cmd/$(DEPDIR)/$(am__dirstamp) + +tests/zfs-tests/cmd/mmap_ftruncate$(EXEEXT): $(tests_zfs_tests_cmd_mmap_ftruncate_OBJECTS) $(tests_zfs_tests_cmd_mmap_ftruncate_DEPENDENCIES) $(EXTRA_tests_zfs_tests_cmd_mmap_ftruncate_DEPENDENCIES) tests/zfs-tests/cmd/$(am__dirstamp) + @rm -f tests/zfs-tests/cmd/mmap_ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tests_zfs_tests_cmd_mmap_ftruncate_OBJECTS) $(tests_zfs_tests_cmd_mmap_ftruncate_LDADD) $(LIBS) tests/zfs-tests/cmd/mmap_libaio-mmap_libaio.$(OBJEXT): \ tests/zfs-tests/cmd/$(am__dirstamp) \ tests/zfs-tests/cmd/$(DEPDIR)/$(am__dirstamp) @@ -7141,6 +7283,13 @@ tests/zfs-tests/cmd/send_doall$(EXEEXT): $(tests_zfs_tests_cmd_send_doall_OBJECTS) $(tests_zfs_tests_cmd_send_doall_DEPENDENCIES) $(EXTRA_tests_zfs_tests_cmd_send_doall_DEPENDENCIES) tests/zfs-tests/cmd/$(am__dirstamp) @rm -f tests/zfs-tests/cmd/send_doall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_zfs_tests_cmd_send_doall_OBJECTS) $(tests_zfs_tests_cmd_send_doall_LDADD) $(LIBS) +tests/zfs-tests/cmd/setlease.$(OBJEXT): \ + tests/zfs-tests/cmd/$(am__dirstamp) \ + tests/zfs-tests/cmd/$(DEPDIR)/$(am__dirstamp) + +tests/zfs-tests/cmd/setlease$(EXEEXT): $(tests_zfs_tests_cmd_setlease_OBJECTS) $(tests_zfs_tests_cmd_setlease_DEPENDENCIES) $(EXTRA_tests_zfs_tests_cmd_setlease_DEPENDENCIES) tests/zfs-tests/cmd/$(am__dirstamp) + @rm -f tests/zfs-tests/cmd/setlease$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tests_zfs_tests_cmd_setlease_OBJECTS) $(tests_zfs_tests_cmd_setlease_LDADD) $(LIBS) tests/zfs-tests/cmd/checksum/sha2_test.$(OBJEXT): \ tests/zfs-tests/cmd/checksum/$(am__dirstamp) \ tests/zfs-tests/cmd/checksum/$(DEPDIR)/$(am__dirstamp) @@ -8684,6 +8833,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/badsend.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/btree_test-btree_test.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/chg_usr_exec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/clone_after_trunc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_cached.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_write.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/clonefile.Po@am__quote@ # am--include-marker @@ -8705,6 +8855,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mkfiles.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mktree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mmap_exec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mmap_ftruncate.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mmap_libaio-mmap_libaio.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mmap_seek.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/mmap_sync.Po@am__quote@ # am--include-marker @@ -8715,6 +8866,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/renameat2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/rm_lnkcnt_zero_file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/send_doall.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/setlease.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/statx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/stride_dd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tests/zfs-tests/cmd/$(DEPDIR)/suid_write_to_file.Po@am__quote@ # am--include-marker @@ -12379,27 +12531,6 @@ @list='$(pkgdracut_90_DATA)'; test -n "$(pkgdracut_90dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdracut_90dir)'; $(am__uninstall_files_from_dir) -install-sudoersdDATA: $(sudoersd_DATA) - @$(NORMAL_INSTALL) - @list='$(sudoersd_DATA)'; test -n "$(sudoersddir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(sudoersddir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(sudoersddir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sudoersddir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(sudoersddir)" || exit $$?; \ - done - -uninstall-sudoersdDATA: - @$(NORMAL_UNINSTALL) - @list='$(sudoersd_DATA)'; test -n "$(sudoersddir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(sudoersddir)'; $(am__uninstall_files_from_dir) install-sysconf_zfsDATA: $(sysconf_zfs_DATA) @$(NORMAL_INSTALL) @list='$(sysconf_zfs_DATA)'; test -n "$(sysconf_zfsdir)" || list=; \ @@ -12589,27 +12720,6 @@ @list='$(libspl_sys_dktp_HEADERS)'; test -n "$(libspl_sys_dktpdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libspl_sys_dktpdir)'; $(am__uninstall_files_from_dir) -install-libzpoolHEADERS: $(libzpool_HEADERS) - @$(NORMAL_INSTALL) - @list='$(libzpool_HEADERS)'; test -n "$(libzpooldir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(libzpooldir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libzpooldir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libzpooldir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libzpooldir)" || exit $$?; \ - done - -uninstall-libzpoolHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libzpool_HEADERS)'; test -n "$(libzpooldir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(libzpooldir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -12713,6 +12823,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -12862,7 +12973,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -12919,33 +13030,9 @@ $(HEADERS) zfs_config.h all-local install-binPROGRAMS: install-libLTLIBRARIES -install-mounthelperPROGRAMS: install-libLTLIBRARIES - -install-sbinPROGRAMS: install-libLTLIBRARIES - -install-scriptszfstestsbinPROGRAMS: install-libLTLIBRARIES - -install-scriptszfstestsfunctionalcpfilesPROGRAMS: install-libLTLIBRARIES - -install-scriptszfstestsfunctionalhkdfPROGRAMS: install-libLTLIBRARIES - -install-scriptszfstestsfunctionallibzfsPROGRAMS: install-libLTLIBRARIES - -install-scriptszfstestsfunctionaltmpfilePROGRAMS: install-libLTLIBRARIES - -install-scriptszfstestsfunctionalvdevdiskPROGRAMS: install-libLTLIBRARIES - -install-systemdgeneratorPROGRAMS: install-libLTLIBRARIES - -install-udevPROGRAMS: install-libLTLIBRARIES - -install-zfsexecPROGRAMS: install-libLTLIBRARIES - -install-pammoduleLTLIBRARIES: install-libLTLIBRARIES - installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mounthelperdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scripts_zfs_tests_bindir)" "$(DESTDIR)$(scripts_zfs_tests_functional_cp_filesdir)" "$(DESTDIR)$(scripts_zfs_tests_functional_hkdfdir)" "$(DESTDIR)$(scripts_zfs_tests_functional_libzfsdir)" "$(DESTDIR)$(scripts_zfs_tests_functional_tmpfiledir)" "$(DESTDIR)$(scripts_zfs_tests_functional_vdev_diskdir)" "$(DESTDIR)$(systemdgeneratordir)" "$(DESTDIR)$(udevdir)" "$(DESTDIR)$(zfsexecdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pammoduledir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(i_tdir)" "$(DESTDIR)$(i_t_scriptsdir)" "$(DESTDIR)$(i_t_scripts_localtopdir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(scripts_zfs_tests_callbacksdir)" "$(DESTDIR)$(udevdir)" "$(DESTDIR)$(zedexecdir)" "$(DESTDIR)$(zfsexecdir)" "$(DESTDIR)$(zpoolexecdir)" "$(DESTDIR)$(i_t_hooksdir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(zedexecdir)" "$(DESTDIR)$(pkgdracut_02dir)" "$(DESTDIR)$(pkgdracut_90dir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scripts_test_runner_bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(i_t_conf_ddir)" "$(DESTDIR)$(i_t_confhooks_ddir)" "$(DESTDIR)$(modulesloaddir)" "$(DESTDIR)$(pamconfigsdir)" "$(DESTDIR)$(scripts_runfilesdir)" "$(DESTDIR)$(scripts_test_runner_includedir)" "$(DESTDIR)$(scripts_zfs_tests_includedir)" "$(DESTDIR)$(sysconf_zfsdir)" "$(DESTDIR)$(systemdpresetdir)" "$(DESTDIR)$(zedconfdir)" "$(DESTDIR)$(zpoolcompatdir)" "$(DESTDIR)$(initconfdir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(scripts_zfs_tests_includedir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdracut_90dir)" "$(DESTDIR)$(sudoersddir)" "$(DESTDIR)$(sysconf_zfsdir)" "$(DESTDIR)$(systemdunitdir)" "$(DESTDIR)$(udevruledir)" "$(DESTDIR)$(extradir)" "$(DESTDIR)$(libspldir)" "$(DESTDIR)$(libspl_ia32dir)" "$(DESTDIR)$(libspl_rpcdir)" "$(DESTDIR)$(libspl_sysdir)" "$(DESTDIR)$(libspl_sys_dktpdir)" "$(DESTDIR)$(libzpooldir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mounthelperdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scripts_zfs_tests_bindir)" "$(DESTDIR)$(scripts_zfs_tests_functional_cp_filesdir)" "$(DESTDIR)$(scripts_zfs_tests_functional_hkdfdir)" "$(DESTDIR)$(scripts_zfs_tests_functional_libzfsdir)" "$(DESTDIR)$(scripts_zfs_tests_functional_tmpfiledir)" "$(DESTDIR)$(scripts_zfs_tests_functional_vdev_diskdir)" "$(DESTDIR)$(systemdgeneratordir)" "$(DESTDIR)$(udevdir)" "$(DESTDIR)$(zfsexecdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pammoduledir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(i_tdir)" "$(DESTDIR)$(i_t_scriptsdir)" "$(DESTDIR)$(i_t_scripts_localtopdir)" "$(DESTDIR)$(scriptsdir)" "$(DESTDIR)$(scripts_zfs_tests_callbacksdir)" "$(DESTDIR)$(udevdir)" "$(DESTDIR)$(zedexecdir)" "$(DESTDIR)$(zfsexecdir)" "$(DESTDIR)$(zpoolexecdir)" "$(DESTDIR)$(i_t_hooksdir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(zedexecdir)" "$(DESTDIR)$(pkgdracut_02dir)" "$(DESTDIR)$(pkgdracut_90dir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(scripts_test_runner_bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(i_t_conf_ddir)" "$(DESTDIR)$(i_t_confhooks_ddir)" "$(DESTDIR)$(modulesloaddir)" "$(DESTDIR)$(pamconfigsdir)" "$(DESTDIR)$(scripts_runfilesdir)" "$(DESTDIR)$(scripts_test_runner_includedir)" "$(DESTDIR)$(scripts_zfs_tests_includedir)" "$(DESTDIR)$(sysconf_zfsdir)" "$(DESTDIR)$(systemdpresetdir)" "$(DESTDIR)$(zedconfdir)" "$(DESTDIR)$(zpoolcompatdir)" "$(DESTDIR)$(initconfdir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(scripts_zfs_tests_includedir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdracut_90dir)" "$(DESTDIR)$(sysconf_zfsdir)" "$(DESTDIR)$(systemdunitdir)" "$(DESTDIR)$(udevruledir)" "$(DESTDIR)$(extradir)" "$(DESTDIR)$(libspldir)" "$(DESTDIR)$(libspl_ia32dir)" "$(DESTDIR)$(libspl_rpcdir)" "$(DESTDIR)$(libspl_sysdir)" "$(DESTDIR)$(libspl_sys_dktpdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -13547,6 +13634,7 @@ -rm -f tests/zfs-tests/cmd/$(DEPDIR)/badsend.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/btree_test-btree_test.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/chg_usr_exec.Po + -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clone_after_trunc.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_cached.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_write.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clonefile.Po @@ -13568,6 +13656,7 @@ -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mkfiles.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mktree.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_exec.Po + -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_ftruncate.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_libaio-mmap_libaio.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_seek.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_sync.Po @@ -13578,6 +13667,7 @@ -rm -f tests/zfs-tests/cmd/$(DEPDIR)/renameat2.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/rm_lnkcnt_zero_file.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/send_doall.Po + -rm -f tests/zfs-tests/cmd/$(DEPDIR)/setlease.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/statx.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/stride_dd.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/suid_write_to_file.Po @@ -13643,8 +13733,8 @@ install-initconfDATA install-libsplHEADERS \ install-libspl_ia32HEADERS install-libspl_rpcHEADERS \ install-libspl_sysHEADERS install-libspl_sys_dktpHEADERS \ - install-libzpoolHEADERS install-man \ - install-mounthelperPROGRAMS install-nodist_bashcompletionDATA \ + install-man install-mounthelperPROGRAMS \ + install-nodist_bashcompletionDATA \ install-nodist_scripts_zfs_tests_includeDATA \ install-pammoduleLTLIBRARIES install-pkgconfigDATA \ install-pkgdracut_02SCRIPTS install-pkgdracut_90DATA \ @@ -13656,9 +13746,9 @@ install-scripts_zfs_tests_functional_libzfsPROGRAMS \ install-scripts_zfs_tests_functional_tmpfilePROGRAMS \ install-scripts_zfs_tests_functional_vdev_diskPROGRAMS \ - install-sudoersdDATA install-sysconf_zfsDATA \ - install-systemdgeneratorPROGRAMS install-systemdunitDATA \ - install-udevPROGRAMS install-udevruleDATA + install-sysconf_zfsDATA install-systemdgeneratorPROGRAMS \ + install-systemdunitDATA install-udevPROGRAMS \ + install-udevruleDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive @@ -14090,6 +14180,7 @@ -rm -f tests/zfs-tests/cmd/$(DEPDIR)/badsend.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/btree_test-btree_test.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/chg_usr_exec.Po + -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clone_after_trunc.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_cached.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clone_mmap_write.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/clonefile.Po @@ -14111,6 +14202,7 @@ -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mkfiles.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mktree.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_exec.Po + -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_ftruncate.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_libaio-mmap_libaio.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_seek.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/mmap_sync.Po @@ -14121,6 +14213,7 @@ -rm -f tests/zfs-tests/cmd/$(DEPDIR)/renameat2.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/rm_lnkcnt_zero_file.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/send_doall.Po + -rm -f tests/zfs-tests/cmd/$(DEPDIR)/setlease.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/statx.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/stride_dd.Po -rm -f tests/zfs-tests/cmd/$(DEPDIR)/suid_write_to_file.Po @@ -14192,8 +14285,8 @@ uninstall-initconfDATA uninstall-libLTLIBRARIES \ uninstall-libsplHEADERS uninstall-libspl_ia32HEADERS \ uninstall-libspl_rpcHEADERS uninstall-libspl_sysHEADERS \ - uninstall-libspl_sys_dktpHEADERS uninstall-libzpoolHEADERS \ - uninstall-man uninstall-mounthelperPROGRAMS \ + uninstall-libspl_sys_dktpHEADERS uninstall-man \ + uninstall-mounthelperPROGRAMS \ uninstall-nodist_bashcompletionDATA \ uninstall-nodist_scripts_zfs_tests_includeDATA \ uninstall-nodist_zedexecSCRIPTS uninstall-pammoduleLTLIBRARIES \ @@ -14207,10 +14300,9 @@ uninstall-scripts_zfs_tests_functional_libzfsPROGRAMS \ uninstall-scripts_zfs_tests_functional_tmpfilePROGRAMS \ uninstall-scripts_zfs_tests_functional_vdev_diskPROGRAMS \ - uninstall-sudoersdDATA uninstall-sysconf_zfsDATA \ - uninstall-systemdgeneratorPROGRAMS uninstall-systemdunitDATA \ - uninstall-udevPROGRAMS uninstall-udevruleDATA \ - uninstall-zfsexecPROGRAMS + uninstall-sysconf_zfsDATA uninstall-systemdgeneratorPROGRAMS \ + uninstall-systemdunitDATA uninstall-udevPROGRAMS \ + uninstall-udevruleDATA uninstall-zfsexecPROGRAMS uninstall-man: uninstall-man1 uninstall-man4 uninstall-man5 \ uninstall-man7 uninstall-man8 @@ -14260,10 +14352,9 @@ install-initconfDATA install-libLTLIBRARIES \ install-libsplHEADERS install-libspl_ia32HEADERS \ install-libspl_rpcHEADERS install-libspl_sysHEADERS \ - install-libspl_sys_dktpHEADERS install-libzpoolHEADERS \ - install-man install-man1 install-man4 install-man5 \ - install-man7 install-man8 install-mounthelperPROGRAMS \ - install-nodist_bashcompletionDATA \ + install-libspl_sys_dktpHEADERS install-man install-man1 \ + install-man4 install-man5 install-man7 install-man8 \ + install-mounthelperPROGRAMS install-nodist_bashcompletionDATA \ install-nodist_scripts_zfs_tests_includeDATA \ install-nodist_zedexecSCRIPTS install-pammoduleLTLIBRARIES \ install-pdf install-pdf-am install-pkgconfigDATA \ @@ -14277,7 +14368,7 @@ install-scripts_zfs_tests_functional_libzfsPROGRAMS \ install-scripts_zfs_tests_functional_tmpfilePROGRAMS \ install-scripts_zfs_tests_functional_vdev_diskPROGRAMS \ - install-strip install-sudoersdDATA install-sysconf_zfsDATA \ + install-strip install-sysconf_zfsDATA \ install-systemdgeneratorPROGRAMS install-systemdunitDATA \ install-udevPROGRAMS install-udevruleDATA \ install-zfsexecPROGRAMS installcheck installcheck-am \ @@ -14306,9 +14397,9 @@ uninstall-initconfDATA uninstall-libLTLIBRARIES \ uninstall-libsplHEADERS uninstall-libspl_ia32HEADERS \ uninstall-libspl_rpcHEADERS uninstall-libspl_sysHEADERS \ - uninstall-libspl_sys_dktpHEADERS uninstall-libzpoolHEADERS \ - uninstall-man uninstall-man1 uninstall-man4 uninstall-man5 \ - uninstall-man7 uninstall-man8 uninstall-mounthelperPROGRAMS \ + uninstall-libspl_sys_dktpHEADERS uninstall-man uninstall-man1 \ + uninstall-man4 uninstall-man5 uninstall-man7 uninstall-man8 \ + uninstall-mounthelperPROGRAMS \ uninstall-nodist_bashcompletionDATA \ uninstall-nodist_scripts_zfs_tests_includeDATA \ uninstall-nodist_zedexecSCRIPTS uninstall-pammoduleLTLIBRARIES \ @@ -14322,10 +14413,9 @@ uninstall-scripts_zfs_tests_functional_libzfsPROGRAMS \ uninstall-scripts_zfs_tests_functional_tmpfilePROGRAMS \ uninstall-scripts_zfs_tests_functional_vdev_diskPROGRAMS \ - uninstall-sudoersdDATA uninstall-sysconf_zfsDATA \ - uninstall-systemdgeneratorPROGRAMS uninstall-systemdunitDATA \ - uninstall-udevPROGRAMS uninstall-udevruleDATA \ - uninstall-zfsexecPROGRAMS + uninstall-sysconf_zfsDATA uninstall-systemdgeneratorPROGRAMS \ + uninstall-systemdunitDATA uninstall-udevPROGRAMS \ + uninstall-udevruleDATA uninstall-zfsexecPROGRAMS .PRECIOUS: Makefile @@ -14485,6 +14575,8 @@ # Provided by /bin/sleep, and, again, every implementation of that supports this @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@$(call SHELLCHECK_OPTS,$(pkgdracut_90_SCRIPTS)): CHECKBASHISMS_IGNORE = -e 'sleep only takes one integer' -e 'sleep 0.' @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@$(call SHELLCHECK_OPTS,$(i_t_check_scripts)): SHELLCHECK_SHELL = sh + +# SPDX-License-Identifier: CDDL-1.0 @CONFIG_USER_TRUE@$(call SHELLCHECK_OPTS,$(sysconf_zfs_DATA)): SHELLCHECK_SHELL = sh @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@$(call SHELLCHECK_OPTS,$(initconf_DATA)): SHELLCHECK_SHELL = sh @BUILD_LINUX_TRUE@@CONFIG_USER_TRUE@@INIT_SYSV_TRUE@$(call SHELLCHECK_OPTS,$(init_SCRIPTS)): SHELLCHECK_SHELL = sh @@ -14825,18 +14917,18 @@ cp -r contrib/debian debian; chmod +x debian/rules; native-deb-utils: native-deb-local debian - while [ -f debian/deb-build.lock ]; do sleep 1; done; \ - echo "native-deb-utils" > debian/deb-build.lock; \ - cp contrib/debian/control debian/control; \ - $(DPKGBUILD) -b -rfakeroot -us -uc; \ - $(RM) -f debian/deb-build.lock + while [ -f debian/deb-build.lock ]; do sleep 1; done && \ + echo "native-deb-utils" > debian/deb-build.lock && \ + trap '$(RM) -f debian/deb-build.lock' EXIT && \ + cp contrib/debian/control debian/control && \ + $(DPKGBUILD) -b -rfakeroot -us -uc native-deb-kmod: native-deb-local debian - while [ -f debian/deb-build.lock ]; do sleep 1; done; \ - echo "native-deb-kmod" > debian/deb-build.lock; \ - sh scripts/make_gitrev.sh; \ - fakeroot debian/rules override_dh_binary-modules; \ - $(RM) -f debian/deb-build.lock + while [ -f debian/deb-build.lock ]; do sleep 1; done && \ + echo "native-deb-kmod" > debian/deb-build.lock && \ + trap '$(RM) -f debian/deb-build.lock' EXIT && \ + sh scripts/make_gitrev.sh && \ + fakeroot debian/rules override_dh_binary-modules native-deb: native-deb-utils native-deb-kmod diff -Nru zfs-linux-2.3.2/README.md zfs-linux-2.3.9/README.md --- zfs-linux-2.3.2/README.md 2025-05-01 18:23:23.708214388 +0000 +++ zfs-linux-2.3.9/README.md 2026-08-21 20:57:12.279006161 +0000 @@ -30,6 +30,42 @@ OpenZFS is released under a CDDL license. For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197` -# Supported Kernels - * The `META` file contains the officially recognized supported Linux kernel versions. - * Supported FreeBSD versions are any supported branches and releases starting from 13.0-RELEASE. +# Supported Kernels and Distributions + +## Linux + +Given the wide variety of Linux environments, we prioritize development and testing on stable, supported kernels and distributions. + +### Kernel ([kernel.org](https://kernel.org)) + +All **longterm** kernels from [kernel.org](https://kernel.org) are supported. **stable** kernels are usually supported in the next OpenZFS release. + +**Supported longterm kernels**: **6.18**, **6.12**, **6.6**, **6.1**, **5.15**, **5.10**. + +### Red Hat Enterprise Linux (RHEL) + +All RHEL (and compatible systems: AlmaLinux OS, Rocky Linux, etc) on the **full** or **maintenance** support tracks are supported. + +**Supported RHEL releases**: **8.10**, **9.7**, **10.1**. + +### Ubuntu + +All Ubuntu **LTS** releases are supported. + +**Supported Ubuntu releases**: **26.04 “Resolute”**, **24.04 “Noble”**, **22.04 “Jammy”**. + +### Debian + +All Debian **stable** and **LTS** releases are supported. + +**Supported Debian releases**: **13 “Trixie”**, **12 “Bookworm”**, **11 “Bullseye”**. + +### Other Distributions + +Generally, if a distribution is following an LTS kernel, it should work well with OpenZFS. + +## FreeBSD + +All FreeBSD releases receiving **security support** are supported by OpenZFS. + +**Supported FreeBSD releases**: **15.1**, **14.4**. diff -Nru zfs-linux-2.3.2/aclocal.m4 zfs-linux-2.3.9/aclocal.m4 --- zfs-linux-2.3.2/aclocal.m4 2025-05-01 18:45:07.300440663 +0000 +++ zfs-linux-2.3.9/aclocal.m4 2026-08-21 21:15:36.342670662 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,79 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, -[m4_warning([this file was generated for autoconf 2.71. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# intlmacosx.m4 serial 8 (gettext-0.20.2) +dnl Copyright (C) 2004-2014, 2016, 2019-2020 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on Mac OS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in Mac OS X 10.4. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + [gt_cv_func_CFPreferencesCopyAppValue], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent, + dnl because in macOS 10.13.4 it has the following behaviour: + dnl When two or more languages are specified in the + dnl "System Preferences > Language & Region > Preferred Languages" panel, + dnl it returns en_CC where CC is the territory (even when English is not among + dnl the preferred languages!). What we want instead is what + dnl CFLocaleCopyCurrent returned in earlier macOS releases and what + dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the + dnl first among the preferred languages and CC is the territory. + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) + +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +101,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.5], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +117,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.5])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +144,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -130,7 +196,7 @@ # AM_COND_IF -*- Autoconf -*- -# Copyright (C) 2008-2021 Free Software Foundation, Inc. +# Copyright (C) 2008-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -167,7 +233,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -198,7 +264,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -389,7 +455,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -457,7 +523,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -485,10 +551,6 @@ # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -m4_ifdef([_$0_ALREADY_INIT], - [m4_fatal([$0 expanded multiple times -]m4_defn([_$0_ALREADY_INIT]))], - [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -525,7 +587,7 @@ [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -577,20 +639,6 @@ [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi -AC_SUBST([CTAGS]) -if test -z "$ETAGS"; then - ETAGS=etags -fi -AC_SUBST([ETAGS]) -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi -AC_SUBST([CSCOPE]) - AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -672,7 +720,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -693,7 +741,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -715,7 +763,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -750,7 +798,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -793,7 +841,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,7 +862,12 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -827,7 +880,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -856,7 +909,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -903,7 +956,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -938,6 +991,7 @@ dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 dnl + python3.15 python3.14 python3.13 python3.12 python3.11 python3.10 dnl python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl python3.2 python3.1 python3.0 dnl python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl @@ -982,7 +1036,7 @@ ]) if test "$PYTHON" = :; then - dnl Run any user-specified action, or abort. + dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else @@ -991,132 +1045,27 @@ dnl trailing zero was eliminated. So now we output just the major dnl and minor version numbers, as numbers. Apparently the tertiary dnl version is not of interest. - dnl + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], - [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`]) + [am_cv_python_version=`$PYTHON -c "import sys; print('%u.%u' % sys.version_info[[:2]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) - dnl At times, e.g., when building shared libraries, you may want + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. - dnl + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) - dnl emacs-page - dnl If --with-python-sys-prefix is given, use the values of sys.prefix - dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX - dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and - dnl ${exec_prefix} variables. - dnl - dnl The two are made distinct variables so they can be overridden if - dnl need be, although general consensus is that you shouldn't need - dnl this separation. - dnl - dnl Also allow directly setting the prefixes via configure options, - dnl overriding any default. - dnl - if test "x$prefix" = xNONE; then - am__usable_prefix=$ac_default_prefix - else - am__usable_prefix=$prefix - fi - - # Allow user to request using sys.* values from Python, - # instead of the GNU $prefix values. - AC_ARG_WITH([python-sys-prefix], - [AS_HELP_STRING([--with-python-sys-prefix], - [use Python's sys.prefix and sys.exec_prefix values])], - [am_use_python_sys=:], - [am_use_python_sys=false]) - - # Allow user to override whatever the default Python prefix is. - AC_ARG_WITH([python_prefix], - [AS_HELP_STRING([--with-python_prefix], - [override the default PYTHON_PREFIX])], - [am_python_prefix_subst=$withval - am_cv_python_prefix=$withval - AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix]) - AC_MSG_RESULT([$am_cv_python_prefix])], - [ - if $am_use_python_sys; then - # using python sys.prefix value, not GNU - AC_CACHE_CHECK([for python default $am_display_PYTHON prefix], - [am_cv_python_prefix], - [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`]) - - dnl If sys.prefix is a subdir of $prefix, replace the literal value of - dnl $prefix with a variable reference so it can be overridden. - case $am_cv_python_prefix in - $am__usable_prefix*) - am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` - am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` - ;; - *) - am_python_prefix_subst=$am_cv_python_prefix - ;; - esac - else # using GNU prefix value, not python sys.prefix - am_python_prefix_subst='${prefix}' - am_python_prefix=$am_python_prefix_subst - AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix]) - AC_MSG_RESULT([$am_python_prefix]) - fi]) - # Substituting python_prefix_subst value. - AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst]) - - # emacs-page Now do it all over again for Python exec_prefix, but with yet - # another conditional: fall back to regular prefix if that was specified. - AC_ARG_WITH([python_exec_prefix], - [AS_HELP_STRING([--with-python_exec_prefix], - [override the default PYTHON_EXEC_PREFIX])], - [am_python_exec_prefix_subst=$withval - am_cv_python_exec_prefix=$withval - AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix]) - AC_MSG_RESULT([$am_cv_python_exec_prefix])], - [ - # no explicit --with-python_exec_prefix, but if - # --with-python_prefix was given, use its value for python_exec_prefix too. - AS_IF([test -n "$with_python_prefix"], - [am_python_exec_prefix_subst=$with_python_prefix - am_cv_python_exec_prefix=$with_python_prefix - AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix]) - AC_MSG_RESULT([$am_cv_python_exec_prefix])], - [ - # Set am__usable_exec_prefix whether using GNU or Python values, - # since we use that variable for pyexecdir. - if test "x$exec_prefix" = xNONE; then - am__usable_exec_prefix=$am__usable_prefix - else - am__usable_exec_prefix=$exec_prefix - fi - # - if $am_use_python_sys; then # using python sys.exec_prefix, not GNU - AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix], - [am_cv_python_exec_prefix], - [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`]) - dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the - dnl literal value of $exec_prefix with a variable reference so it can - dnl be overridden. - case $am_cv_python_exec_prefix in - $am__usable_exec_prefix*) - am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` - am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` - ;; - *) - am_python_exec_prefix_subst=$am_cv_python_exec_prefix - ;; - esac - else # using GNU $exec_prefix, not python sys.exec_prefix - am_python_exec_prefix_subst='${exec_prefix}' - am_python_exec_prefix=$am_python_exec_prefix_subst - AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix]) - AC_MSG_RESULT([$am_python_exec_prefix]) - fi])]) - # Substituting python_exec_prefix_subst. - AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst]) - - # Factor out some code duplication into this shell variable. + # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility @@ -1136,95 +1085,96 @@ except ImportError: pass" - dnl emacs-page Set up 4 directories: + dnl Set up 4 directories: - dnl 1. pythondir: where to install python scripts. This is the - dnl site-packages directory, not the python standard library - dnl directory like in previous automake betas. This behavior - dnl is more consistent with lispdir.m4 for example. + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. - dnl - AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)], - [am_cv_python_pythondir], - [if test "x$am_cv_python_prefix" = x; then - am_py_prefix=$am__usable_prefix - else - am_py_prefix=$am_cv_python_prefix - fi - am_cv_python_pythondir=`$PYTHON -c " + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` - # - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` - ;; - *) - case $am_py_prefix in - /usr|/System*) ;; - *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" - ;; + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac - ;; - esac - ]) + ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) - dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was - dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is - dnl more consistent with the rest of automake. - dnl + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) - dnl 3. pyexecdir: directory for installing python extension modules - dnl (shared libraries). + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) dnl Query distutils for this directory. - dnl - AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)], - [am_cv_python_pyexecdir], - [if test "x$am_cv_python_exec_prefix" = x; then - am_py_exec_prefix=$am__usable_exec_prefix - else - am_py_exec_prefix=$am_cv_python_exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c " + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` - # - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` - ;; - *) - case $am_py_exec_prefix in - /usr|/System*) ;; - *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" - ;; + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac - ;; - esac - ]) + ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) - dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE) - dnl + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi + ]) @@ -1247,7 +1197,7 @@ sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1266,7 +1216,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1347,7 +1297,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1407,7 +1357,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1435,7 +1385,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2021 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1454,7 +1404,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1616,17 +1566,22 @@ m4_include([config/kernel-block-device-operations.m4]) m4_include([config/kernel-commit-metadata.m4]) m4_include([config/kernel-config-defined.m4]) -m4_include([config/kernel-copy-from-user-inatomic.m4]) m4_include([config/kernel-cpu_has_feature.m4]) m4_include([config/kernel-declare-event-class.m4]) +m4_include([config/kernel-dentry-alias.m4]) +m4_include([config/kernel-dentry-operations.m4]) m4_include([config/kernel-discard-granularity.m4]) +m4_include([config/kernel-drop-inode.m4]) m4_include([config/kernel-file.m4]) +m4_include([config/kernel-filelock.m4]) m4_include([config/kernel-filemap-splice-read.m4]) m4_include([config/kernel-flush_dcache_page.m4]) m4_include([config/kernel-fmode-t.m4]) -m4_include([config/kernel-follow-down-one.m4]) +m4_include([config/kernel-follow-down.m4]) m4_include([config/kernel-fpu.m4]) -m4_include([config/kernel-fst-mount.m4]) +m4_include([config/kernel-free-inode.m4]) +m4_include([config/kernel-fs-context.m4]) +m4_include([config/kernel-fs-parse.m4]) m4_include([config/kernel-fsync-bdev.m4]) m4_include([config/kernel-generic_fadvise.m4]) m4_include([config/kernel-generic_fillattr.m4]) @@ -1634,15 +1589,18 @@ m4_include([config/kernel-genhd-flags.m4]) m4_include([config/kernel-get-disk-ro.m4]) m4_include([config/kernel-iattr-vfsid.m4]) +m4_include([config/kernel-idmap.m4]) m4_include([config/kernel-idmap_mnt_api.m4]) m4_include([config/kernel-inode-create.m4]) m4_include([config/kernel-inode-getattr.m4]) m4_include([config/kernel-inode-lookup.m4]) m4_include([config/kernel-inode-permission.m4]) m4_include([config/kernel-inode-setattr.m4]) +m4_include([config/kernel-inode-state.m4]) m4_include([config/kernel-inode-times.m4]) m4_include([config/kernel-insert-inode-locked.m4]) m4_include([config/kernel-is_owner_or_cap.m4]) +m4_include([config/kernel-kasan-enabled.m4]) m4_include([config/kernel-kmap-atomic-args.m4]) m4_include([config/kernel-kmap-local-page.m4]) m4_include([config/kernel-kmem.m4]) @@ -1655,23 +1613,24 @@ m4_include([config/kernel-mknod.m4]) m4_include([config/kernel-mm-page-flags.m4]) m4_include([config/kernel-mm-pagemap.m4]) +m4_include([config/kernel-namespace.m4]) m4_include([config/kernel-objtool.m4]) m4_include([config/kernel-pagemap-folio_wait_bit.m4]) +m4_include([config/kernel-pagemap-readahead-page.m4]) m4_include([config/kernel-pde-data.m4]) m4_include([config/kernel-percpu.m4]) m4_include([config/kernel-pin-user-pages.m4]) m4_include([config/kernel-proc-operations.m4]) -m4_include([config/kernel-readpages.m4]) m4_include([config/kernel-reclaim_state.m4]) m4_include([config/kernel-register_sysctl_table.m4]) m4_include([config/kernel-rename.m4]) m4_include([config/kernel-revalidate-disk-size.m4]) m4_include([config/kernel-sb-dying.m4]) +m4_include([config/kernel-sb-wb-err.m4]) m4_include([config/kernel-sched.m4]) m4_include([config/kernel-security-inode-init.m4]) m4_include([config/kernel-set-nlink.m4]) m4_include([config/kernel-setattr-prepare.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-siginfo.m4]) @@ -1679,6 +1638,7 @@ m4_include([config/kernel-strlcpy.m4]) m4_include([config/kernel-symlink.m4]) m4_include([config/kernel-sysfs.m4]) +m4_include([config/kernel-timer.m4]) m4_include([config/kernel-tmpfile.m4]) m4_include([config/kernel-totalhigh_pages.m4]) m4_include([config/kernel-totalram-pages-func.m4]) @@ -1692,8 +1652,11 @@ m4_include([config/kernel-vfs-migrate_folio.m4]) m4_include([config/kernel-vfs-migratepage.m4]) m4_include([config/kernel-vfs-read_folio.m4]) +m4_include([config/kernel-vfs-readpages.m4]) m4_include([config/kernel-vfs-set_page_dirty.m4]) -m4_include([config/kernel-writepage_t.m4]) +m4_include([config/kernel-vfs-writepage.m4]) +m4_include([config/kernel-workqueue.m4]) +m4_include([config/kernel-writeback.m4]) m4_include([config/kernel-xattr-handler.m4]) m4_include([config/kernel-zero_page.m4]) m4_include([config/kernel.m4]) @@ -1710,6 +1673,7 @@ m4_include([config/pkg.m4]) m4_include([config/po.m4]) m4_include([config/progtest.m4]) +m4_include([config/toolchain-cfi.m4]) m4_include([config/toolchain-simd.m4]) m4_include([config/user-aio.h.m4]) m4_include([config/user-backtrace.m4]) @@ -1727,8 +1691,10 @@ m4_include([config/user-libunwind.m4]) m4_include([config/user-libuuid.m4]) m4_include([config/user-makedev.m4]) +m4_include([config/user-mount-setattr.m4]) m4_include([config/user-pam.m4]) m4_include([config/user-runstatedir.m4]) +m4_include([config/user-statx.m4]) m4_include([config/user-systemd.m4]) m4_include([config/user-sysvinit.m4]) m4_include([config/user-udev.m4]) diff -Nru zfs-linux-2.3.2/autogen.sh zfs-linux-2.3.9/autogen.sh --- zfs-linux-2.3.2/autogen.sh 2025-05-01 18:23:23.708214388 +0000 +++ zfs-linux-2.3.9/autogen.sh 2026-08-21 20:57:12.279006161 +0000 @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: CDDL-1.0 [ "${0%/*}" = "$0" ] || cd "${0%/*}" || exit # %reldir%/%canon_reldir% (%D%/%C%) only appeared in automake 1.14, but RHEL/CentOS 7 has 1.13.4 diff -Nru zfs-linux-2.3.2/cmd/Makefile.am zfs-linux-2.3.9/cmd/Makefile.am --- zfs-linux-2.3.2/cmd/Makefile.am 2025-05-01 18:23:23.708214388 +0000 +++ zfs-linux-2.3.9/cmd/Makefile.am 2026-08-21 20:57:12.280006147 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 bin_SCRIPTS = bin_PROGRAMS = sbin_SCRIPTS = diff -Nru zfs-linux-2.3.2/cmd/arc_summary zfs-linux-2.3.9/cmd/arc_summary --- zfs-linux-2.3.2/cmd/arc_summary 2025-05-01 18:23:23.709214402 +0000 +++ zfs-linux-2.3.9/cmd/arc_summary 2026-08-21 20:57:12.280006147 +0000 @@ -559,6 +559,7 @@ print() compressed_size = arc_stats['compressed_size'] + uncompressed_size = arc_stats['uncompressed_size'] overhead_size = arc_stats['overhead_size'] bonus_size = arc_stats['bonus_size'] dnode_size = arc_stats['dnode_size'] @@ -671,6 +672,8 @@ print() print('ARC misc:') + prt_i2('Uncompressed size:', f_perc(uncompressed_size, compressed_size), + f_bytes(uncompressed_size)) prt_i1('Memory throttles:', arc_stats['memory_throttle_count']) prt_i1('Memory direct reclaims:', arc_stats['memory_direct_count']) prt_i1('Memory indirect reclaims:', arc_stats['memory_indirect_count']) @@ -853,7 +856,10 @@ # The L2ARC statistics live in the same section as the normal ARC stuff arc_stats = isolate_section('arcstats', kstats_dict) - if arc_stats['l2_size'] == '0': + # Skip the section only when no cache device is attached. Fall back to + # l2_size for older kernels that do not export l2_ndev. + if arc_stats.get('l2_ndev', '0') == '0' and \ + arc_stats['l2_size'] == '0': print('L2ARC not detected, skipping section\n') return diff -Nru zfs-linux-2.3.2/cmd/arcstat.in zfs-linux-2.3.9/cmd/arcstat.in --- zfs-linux-2.3.2/cmd/arcstat.in 2025-05-01 18:23:23.709214402 +0000 +++ zfs-linux-2.3.9/cmd/arcstat.in 2026-08-21 20:57:12.280006147 +0000 @@ -564,10 +564,10 @@ update_hdr_intr() - # check if L2ARC exists + # check if L2ARC exists; fall back to l2_size for older kernels that + # do not export l2_ndev snap_stats() - l2_size = cur.get("l2_size") - if l2_size: + if cur.get("l2_ndev") or cur.get("l2_size"): l2exist = True if desired_cols: @@ -735,13 +735,14 @@ v[group["percent"]] if v[group["percent"]] > 0 else 0 if l2exist: + l2asize = cur["l2_asize"] v["l2hits"] = d["l2_hits"] / sint v["l2miss"] = d["l2_misses"] / sint v["l2read"] = v["l2hits"] + v["l2miss"] v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0 v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0 - v["l2asize"] = cur["l2_asize"] + v["l2asize"] = l2asize v["l2size"] = cur["l2_size"] v["l2bytes"] = d["l2_read_bytes"] / sint v["l2wbytes"] = d["l2_write_bytes"] / sint @@ -751,11 +752,11 @@ v["l2mru"] = cur["l2_mru_asize"] v["l2data"] = cur["l2_bufc_data_asize"] v["l2meta"] = cur["l2_bufc_metadata_asize"] - v["l2pref%"] = 100 * v["l2pref"] / v["l2asize"] - v["l2mfu%"] = 100 * v["l2mfu"] / v["l2asize"] - v["l2mru%"] = 100 * v["l2mru"] / v["l2asize"] - v["l2data%"] = 100 * v["l2data"] / v["l2asize"] - v["l2meta%"] = 100 * v["l2meta"] / v["l2asize"] + v["l2pref%"] = 100 * v["l2pref"] / l2asize if l2asize > 0 else 0 + v["l2mfu%"] = 100 * v["l2mfu"] / l2asize if l2asize > 0 else 0 + v["l2mru%"] = 100 * v["l2mru"] / l2asize if l2asize > 0 else 0 + v["l2data%"] = 100 * v["l2data"] / l2asize if l2asize > 0 else 0 + v["l2meta%"] = 100 * v["l2meta"] / l2asize if l2asize > 0 else 0 v["grow"] = 0 if cur["arc_no_grow"] else 1 v["need"] = cur["arc_need_free"] diff -Nru zfs-linux-2.3.2/cmd/raidz_test/Makefile.am zfs-linux-2.3.9/cmd/raidz_test/Makefile.am --- zfs-linux-2.3.2/cmd/raidz_test/Makefile.am 2025-05-01 18:23:23.709214402 +0000 +++ zfs-linux-2.3.9/cmd/raidz_test/Makefile.am 2026-08-21 20:57:12.280006147 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 raidz_test_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) diff -Nru zfs-linux-2.3.2/cmd/raidz_test/raidz_test.c zfs-linux-2.3.9/cmd/raidz_test/raidz_test.c --- zfs-linux-2.3.2/cmd/raidz_test/raidz_test.c 2025-05-01 18:23:23.709214402 +0000 +++ zfs-linux-2.3.9/cmd/raidz_test/raidz_test.c 2026-08-21 20:57:12.280991400 +0000 @@ -265,8 +265,20 @@ static int init_rand(void *data, size_t size, void *private) { + size_t *offsetp = (size_t *)private; + size_t offset = *offsetp; + + VERIFY3U(offset + size, <=, SPA_MAXBLOCKSIZE); + memcpy(data, (char *)rand_data + offset, size); + *offsetp = offset + size; + return (0); +} + +static int +corrupt_rand_fill(void *data, size_t size, void *private) +{ (void) private; - memcpy(data, rand_data, size); + memset(data, 0xAA, size); return (0); } @@ -278,7 +290,7 @@ for (int i = 0; i < cnt; i++) { raidz_col_t *col = &rr->rr_col[tgts[i]]; abd_iterate_func(col->rc_abd, 0, col->rc_size, - init_rand, NULL); + corrupt_rand_fill, NULL); } } } @@ -286,7 +298,8 @@ void init_zio_abd(zio_t *zio) { - abd_iterate_func(zio->io_abd, 0, zio->io_size, init_rand, NULL); + size_t offset = 0; + abd_iterate_func(zio->io_abd, 0, zio->io_size, init_rand, &offset); } static void @@ -373,7 +386,7 @@ *zio = umem_zalloc(sizeof (zio_t), UMEM_NOFAIL); - (*zio)->io_offset = 0; + (*zio)->io_offset = opts->rto_offset; (*zio)->io_size = alloc_dsize; (*zio)->io_abd = raidz_alloc(alloc_dsize); init_zio_abd(*zio); @@ -834,6 +847,8 @@ err = run_test(NULL); } + mprotect(rand_data, SPA_MAXBLOCKSIZE, PROT_READ | PROT_WRITE); + umem_free(rand_data, SPA_MAXBLOCKSIZE); kernel_fini(); diff -Nru zfs-linux-2.3.2/cmd/raidz_test/raidz_test.h zfs-linux-2.3.9/cmd/raidz_test/raidz_test.h --- zfs-linux-2.3.2/cmd/raidz_test/raidz_test.h 2025-05-01 18:23:23.709214402 +0000 +++ zfs-linux-2.3.9/cmd/raidz_test/raidz_test.h 2026-08-21 20:57:12.280991400 +0000 @@ -72,7 +72,7 @@ static const raidz_test_opts_t rto_opts_defaults = { .rto_ashift = 9, - .rto_offset = 1ULL << 0, + .rto_offset = 0, .rto_dcols = 8, .rto_dsize = 1<<19, .rto_v = D_ALL, diff -Nru zfs-linux-2.3.2/cmd/zdb/Makefile.am zfs-linux-2.3.9/cmd/zdb/Makefile.am --- zfs-linux-2.3.2/cmd/zdb/Makefile.am 2025-05-01 18:23:23.709214402 +0000 +++ zfs-linux-2.3.9/cmd/zdb/Makefile.am 2026-08-21 20:57:12.280991400 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 zdb_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) zdb_CFLAGS = $(AM_CFLAGS) $(LIBCRYPTO_CFLAGS) diff -Nru zfs-linux-2.3.2/cmd/zdb/zdb.c zfs-linux-2.3.9/cmd/zdb/zdb.c --- zfs-linux-2.3.2/cmd/zdb/zdb.c 2025-05-01 18:23:23.710214416 +0000 +++ zfs-linux-2.3.9/cmd/zdb/zdb.c 2026-08-21 20:57:12.281209055 +0000 @@ -36,6 +36,7 @@ * Copyright (c) 2021 Toomas Soome * Copyright (c) 2023, 2024, Klara Inc. * Copyright (c) 2023, Rob Norris + * Copyright 2026 Edgecast Cloud LLC. */ #include @@ -107,7 +108,9 @@ extern uint_t zfs_btree_verify_intensity; static const char cmdname[] = "zdb"; -uint8_t dump_opt[256]; +uint8_t dump_opt[512]; + +#define ALLOCATED_OPT 256 typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size); @@ -381,7 +384,7 @@ sublivelist_verify_block_t svb = {{{0}}}; DVA_SET_VDEV(&svb.svb_dva, mv->mv_vdid); DVA_SET_OFFSET(&svb.svb_dva, offset); - DVA_SET_ASIZE(&svb.svb_dva, size); + DVA_SET_ASIZE(&svb.svb_dva, 0); zfs_btree_index_t where; uint64_t end_offset = offset + size; @@ -619,8 +622,9 @@ metaslab_calculate_range_tree_type(vd, m, &start, &shift); metaslab_verify_t mv; - mv.mv_allocated = zfs_range_tree_create(NULL, - type, NULL, start, shift); + mv.mv_allocated = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + 0, "livelist_metaslab_validate:mv_allocated"); mv.mv_vdid = vd->vdev_id; mv.mv_msid = m->ms_id; mv.mv_start = m->ms_start; @@ -1400,10 +1404,10 @@ zap_attribute_free(attrp); } -static int +static uint64_t get_dtl_refcount(vdev_t *vd) { - int refcount = 0; + uint64_t refcount = 0; if (vd->vdev_ops->vdev_op_leaf) { space_map_t *sm = vd->vdev_dtl_sm; @@ -1419,10 +1423,10 @@ return (refcount); } -static int +static uint64_t get_metaslab_refcount(vdev_t *vd) { - int refcount = 0; + uint64_t refcount = 0; if (vd->vdev_top == vd) { for (uint64_t m = 0; m < vd->vdev_ms_count; m++) { @@ -1439,11 +1443,11 @@ return (refcount); } -static int +static uint64_t get_obsolete_refcount(vdev_t *vd) { uint64_t obsolete_sm_object; - int refcount = 0; + uint64_t refcount = 0; VERIFY0(vdev_obsolete_sm_object(vd, &obsolete_sm_object)); if (vd->vdev_top == vd && obsolete_sm_object != 0) { @@ -1464,7 +1468,7 @@ return (refcount); } -static int +static uint64_t get_prev_obsolete_spacemap_refcount(spa_t *spa) { uint64_t prev_obj = @@ -1479,10 +1483,10 @@ return (0); } -static int +static uint64_t get_checkpoint_refcount(vdev_t *vd) { - int refcount = 0; + uint64_t refcount = 0; if (vd->vdev_top == vd && vd->vdev_top_zap != 0 && zap_contains(spa_meta_objset(vd->vdev_spa), @@ -1495,7 +1499,7 @@ return (refcount); } -static int +static uint64_t get_log_spacemap_refcount(spa_t *spa) { return (avl_numnodes(&spa->spa_sm_logs_by_txg)); @@ -1505,23 +1509,37 @@ verify_spacemap_refcounts(spa_t *spa) { uint64_t expected_refcount = 0; - uint64_t actual_refcount; + uint64_t actual_refcount = 0; + uint64_t dtl_refcount, metaslab_refcount, obsolete_refcount, + prev_obsolete_refcount, checkpoint_refcount, log_spacemap_refcount; (void) feature_get_refcount(spa, &spa_feature_table[SPA_FEATURE_SPACEMAP_HISTOGRAM], &expected_refcount); - actual_refcount = get_dtl_refcount(spa->spa_root_vdev); - actual_refcount += get_metaslab_refcount(spa->spa_root_vdev); - actual_refcount += get_obsolete_refcount(spa->spa_root_vdev); - actual_refcount += get_prev_obsolete_spacemap_refcount(spa); - actual_refcount += get_checkpoint_refcount(spa->spa_root_vdev); - actual_refcount += get_log_spacemap_refcount(spa); + dtl_refcount = get_dtl_refcount(spa->spa_root_vdev); + metaslab_refcount = get_metaslab_refcount(spa->spa_root_vdev); + obsolete_refcount = get_obsolete_refcount(spa->spa_root_vdev); + prev_obsolete_refcount = get_prev_obsolete_spacemap_refcount(spa); + checkpoint_refcount = get_checkpoint_refcount(spa->spa_root_vdev); + log_spacemap_refcount = get_log_spacemap_refcount(spa); + actual_refcount = dtl_refcount + metaslab_refcount + + obsolete_refcount + prev_obsolete_refcount + + checkpoint_refcount + log_spacemap_refcount; if (expected_refcount != actual_refcount) { - (void) printf("space map refcount mismatch: expected %lld != " - "actual %lld\n", - (longlong_t)expected_refcount, - (longlong_t)actual_refcount); + (void) printf("space map refcount mismatch: expected %llu != " + "actual %llu\n", + (u_longlong_t)expected_refcount, + (u_longlong_t)actual_refcount); + (void) printf("\tDTL: %llu, metaslab: %llu, obsolete: %llu, " + "prev obsolete: %llu, checkpoint: %llu, " + "log spacemap: %llu\n", + (u_longlong_t)dtl_refcount, + (u_longlong_t)metaslab_refcount, + (u_longlong_t)obsolete_refcount, + (u_longlong_t)prev_obsolete_refcount, + (u_longlong_t)checkpoint_refcount, + (u_longlong_t)log_spacemap_refcount); return (2); } return (0); @@ -1651,6 +1669,16 @@ } static void +dump_allocated(void *arg, uint64_t start, uint64_t size) +{ + uint64_t *off = arg; + if (*off != start) + (void) printf("ALLOC: %"PRIu64" %"PRIu64"\n", *off, + start - *off); + *off = start + size; +} + +static void dump_metaslab(metaslab_t *msp) { vdev_t *vd = msp->ms_group->mg_vd; @@ -1666,13 +1694,24 @@ (u_longlong_t)msp->ms_id, (u_longlong_t)msp->ms_start, (u_longlong_t)space_map_object(sm), freebuf); - if (dump_opt['m'] > 2 && !dump_opt['L']) { + if (dump_opt[ALLOCATED_OPT] || + (dump_opt['m'] > 2 && !dump_opt['L'])) { mutex_enter(&msp->ms_lock); VERIFY0(metaslab_load(msp)); + } + + if (dump_opt['m'] > 2 && !dump_opt['L']) { zfs_range_tree_stat_verify(msp->ms_allocatable); dump_metaslab_stats(msp); - metaslab_unload(msp); - mutex_exit(&msp->ms_lock); + } + + if (dump_opt[ALLOCATED_OPT]) { + uint64_t off = msp->ms_start; + zfs_range_tree_walk(msp->ms_allocatable, dump_allocated, + &off); + if (off != msp->ms_start + msp->ms_size) + (void) printf("ALLOC: %"PRIu64" %"PRIu64"\n", off, + msp->ms_size - off); } if (dump_opt['m'] > 1 && sm != NULL && @@ -1687,6 +1726,12 @@ SPACE_MAP_HISTOGRAM_SIZE, sm->sm_shift); } + if (dump_opt[ALLOCATED_OPT] || + (dump_opt['m'] > 2 && !dump_opt['L'])) { + metaslab_unload(msp); + mutex_exit(&msp->ms_lock); + } + if (vd->vdev_ops == &vdev_draid_ops) ASSERT3U(msp->ms_size, <=, 1ULL << vd->vdev_ms_shift); else @@ -1723,8 +1768,9 @@ } } - (void) printf("\tvdev %10llu %s", - (u_longlong_t)vd->vdev_id, bias_str); + (void) printf("\tvdev %10llu\t%s metaslab shift %4llu", + (u_longlong_t)vd->vdev_id, bias_str, + (u_longlong_t)vd->vdev_ms_shift); if (ms_flush_data_obj != 0) { (void) printf(" ms_unflushed_phys object %llu", @@ -2545,12 +2591,14 @@ blkbuf[0] = '\0'; - for (i = 0; i < ndvas; i++) + for (i = 0; i < ndvas; i++) { (void) snprintf(blkbuf + strlen(blkbuf), - buflen - strlen(blkbuf), "%llu:%llx:%llx ", + buflen - strlen(blkbuf), "%llu:%llx:%llx%s ", (u_longlong_t)DVA_GET_VDEV(&dva[i]), (u_longlong_t)DVA_GET_OFFSET(&dva[i]), - (u_longlong_t)DVA_GET_ASIZE(&dva[i])); + (u_longlong_t)DVA_GET_ASIZE(&dva[i]), + (DVA_GET_GANG(&dva[i]) ? "G" : "")); + } if (BP_IS_HOLE(bp)) { (void) snprintf(blkbuf + strlen(blkbuf), @@ -5822,22 +5870,15 @@ dmu_object_type_t type) { int i; + boolean_t claimed = B_FALSE; + boolean_t ddt_block = B_FALSE; + boolean_t brt_block = B_FALSE; ASSERT(type < ZDB_OT_TOTAL); if (zilog && zil_bp_tree_add(zilog, bp) != 0) return; - /* - * This flag controls if we will issue a claim for the block while - * counting it, to ensure that all blocks are referenced in space maps. - * We don't issue claims if we're not doing leak tracking, because it's - * expensive if the user isn't interested. We also don't claim the - * second or later occurences of cloned or dedup'd blocks, because we - * already claimed them the first time. - */ - boolean_t do_claim = !dump_opt['L']; - spa_config_enter(zcb->zcb_spa, SCL_CONFIG, FTAG, RW_READER); blkptr_t tempbp; @@ -5868,22 +5909,31 @@ ddt_entry_t *dde = ddt_lookup(ddt, bp, B_TRUE); /* - * ddt_lookup() can return NULL if this block didn't exist - * in the DDT and creating it would take the DDT over its - * quota. Since we got the block from disk, it must exist in - * the DDT, so this can't happen. However, when unique entries - * are pruned, the dedup bit can be set with no corresponding - * entry in the DDT. + * ddt_lookup() can return NULL when unique entries are pruned + * from the DDT. */ if (dde == NULL) { ddt_exit(ddt); - goto skipped; + goto ddt_done; } /* Get the phys for this variant */ ddt_phys_variant_t v = ddt_phys_select(ddt, dde, bp); /* + * DDT_PHYS_NONE means the block has the dedup bit set but + * its DVA doesn't match any phys in the entry. This can + * happen when a DVA was evicted from the DDT and re-added + * on a hash collision. The block may still have a BRT entry. + */ + if (v == DDT_PHYS_NONE) { + ddt_exit(ddt); + goto ddt_done; + } + + ddt_block = B_TRUE; + + /* * This entry may have multiple sets of DVAs. We must claim * each set the first time we see them in a real block on disk, * or count them on subsequent occurences. We don't have a @@ -5897,8 +5947,14 @@ dde->dde_io = (void *)(((uintptr_t)dde->dde_io) | (1 << v)); - /* Consume a reference for this block. */ - if (ddt_phys_total_refcnt(ddt, dde->dde_phys) > 0) + /* + * Consume a reference. If this variant's refcount is already + * zero, the DDT tracking is exhausted — more filesystem + * references exist than the DDT accounts for. + */ + boolean_t ddt_refcnt_exhausted = + (ddt_phys_refcnt(dde->dde_phys, v) == 0); + if (!ddt_refcnt_exhausted) ddt_phys_decref(dde->dde_phys, v); /* @@ -5927,20 +5983,21 @@ bp = &tempbp; } - if (seen) { + if (seen && !ddt_refcnt_exhausted) { /* * The second or later time we see this block, * it's a duplicate and we count it. */ zcb->zcb_dedup_asize += BP_GET_ASIZE(bp); zcb->zcb_dedup_blocks++; - - /* Already claimed, don't do it again. */ - do_claim = B_FALSE; + claimed = B_TRUE; } ddt_exit(ddt); - } else if (zcb->zcb_brt_is_active && + } + +ddt_done: + if (!claimed && zcb->zcb_brt_is_active && brt_maybe_exists(zcb->zcb_spa, bp)) { /* * Cloned blocks are special. We need to count them, so we can @@ -5948,10 +6005,8 @@ * only claim them once. * * To do this, we keep our own in-memory BRT. For each block - * we haven't seen before, we look it up in the real BRT and - * if its there, we note it and its refcount then proceed as - * normal. If we see the block again, we count it as a clone - * and then give it no further consideration. + * we haven't seen before, we look it up in the real BRT. If + * we see the block again, we count it as a clone. */ zdb_brt_entry_t zbre_search, *zbre; avl_index_t where; @@ -5959,36 +6014,27 @@ zbre_search.zbre_dva = bp->blk_dva[0]; zbre = avl_find(&zcb->zcb_brt, &zbre_search, &where); if (zbre == NULL) { - /* Not seen before; track it */ uint64_t refcnt = brt_entry_get_refcount(zcb->zcb_spa, bp); if (refcnt > 0) { + brt_block = B_TRUE; zbre = umem_zalloc(sizeof (zdb_brt_entry_t), UMEM_NOFAIL); zbre->zbre_dva = bp->blk_dva[0]; zbre->zbre_refcount = refcnt; avl_insert(&zcb->zcb_brt, zbre, where); } - } else { - /* - * Second or later occurrence, count it and take a - * refcount. - */ - zcb->zcb_clone_asize += BP_GET_ASIZE(bp); - zcb->zcb_clone_blocks++; - - zbre->zbre_refcount--; - if (zbre->zbre_refcount == 0) { - avl_remove(&zcb->zcb_brt, zbre); - umem_free(zbre, sizeof (zdb_brt_entry_t)); + } else { + brt_block = B_TRUE; + if (zbre->zbre_refcount > 0) { + zcb->zcb_clone_asize += BP_GET_ASIZE(bp); + zcb->zcb_clone_blocks++; + zbre->zbre_refcount--; + claimed = B_TRUE; } - - /* Already claimed, don't do it again. */ - do_claim = B_FALSE; } } -skipped: for (i = 0; i < 4; i++) { int l = (i < 2) ? BP_GET_LEVEL(bp) : ZB_TOTAL; int t = (i & 1) ? type : ZDB_OT_TOTAL; @@ -6091,12 +6137,21 @@ zcb->zcb_asize_len[bin] += BP_GET_ASIZE(bp); zcb->zcb_asize_total += BP_GET_ASIZE(bp); - if (!do_claim) + if (claimed || dump_opt['L']) return; - VERIFY0(zio_wait(zio_claim(NULL, zcb->zcb_spa, + int claim_err = zio_wait(zio_claim(NULL, zcb->zcb_spa, spa_min_claim_txg(zcb->zcb_spa), bp, NULL, NULL, - ZIO_FLAG_CANFAIL))); + ZIO_FLAG_CANFAIL)); + if (claim_err != 0) { + char blkbuf[BP_SPRINTF_LEN]; + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); + (void) printf("block claim error %d%s%s: %s\n", + claim_err, brt_block ? " (BRT)" : "", + ddt_block ? " (DDT)" : "", blkbuf); + zcb->zcb_haderrors = 1; + zcb->zcb_errors[claim_err]++; + } } static void @@ -6320,8 +6375,9 @@ ASSERT0(zfs_range_tree_space(svr->svr_allocd_segs)); - zfs_range_tree_t *allocs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + zfs_range_tree_t *allocs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + 0, "zdb_claim_removing:allocs"); for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) { metaslab_t *msp = vd->vdev_ms[msi]; @@ -6870,10 +6926,66 @@ static boolean_t zdb_leak_fini(spa_t *spa, zdb_cb_t *zcb) { + boolean_t leaks = B_FALSE; + + /* + * Report leaked BRT entries whose refcount was not fully consumed by + * the traversal. + */ + if (zcb->zcb_brt_is_active) { + void *cookie = NULL; + zdb_brt_entry_t *zbre; + while ((zbre = avl_destroy_nodes( + &zcb->zcb_brt, &cookie)) != NULL) { + if (!dump_opt['L'] && zbre->zbre_refcount != 0) { + (void) printf("BRT leak: vdev %llu, " + "offset 0x%llx, refcount %llu\n", + (u_longlong_t)DVA_GET_VDEV( + &zbre->zbre_dva), + (u_longlong_t)DVA_GET_OFFSET( + &zbre->zbre_dva), + (u_longlong_t)zbre->zbre_refcount); + leaks = B_TRUE; + } + umem_free(zbre, sizeof (zdb_brt_entry_t)); + } + avl_destroy(&zcb->zcb_brt); + } + if (dump_opt['L']) - return (B_FALSE); + return (leaks); + + /* + * Report leaked DDT entries whose refcount was not fully consumed by + * the traversal. Entries in the DDT ZAP that were never looked up + * are not detected here. + */ + for (enum zio_checksum c = 0; c < ZIO_CHECKSUM_FUNCTIONS; c++) { + ddt_t *ddt = spa->spa_ddt[c]; + if (ddt == NULL) + continue; + ddt_enter(ddt); + for (ddt_entry_t *dde = avl_first(&ddt->ddt_tree); dde != NULL; + dde = AVL_NEXT(&ddt->ddt_tree, dde)) { + for (int p = 0; p < DDT_NPHYS(ddt); p++) { + ddt_phys_variant_t v = DDT_PHYS_VARIANT(ddt, p); + uint64_t refcnt = ddt_phys_refcnt(dde->dde_phys, + v); + if (refcnt == 0) + continue; + blkptr_t blk; + char blkbuf[BP_SPRINTF_LEN]; + ddt_bp_create(ddt->ddt_checksum, &dde->dde_key, + dde->dde_phys, v, &blk); + snprintf_blkptr(blkbuf, sizeof (blkbuf), &blk); + (void) printf("DDT leak: refcount %llu %s\n", + (u_longlong_t)refcnt, blkbuf); + leaks = B_TRUE; + } + } + ddt_exit(ddt); + } - boolean_t leaks = B_FALSE; vdev_t *rvd = spa->spa_root_vdev; for (unsigned c = 0; c < rvd->vdev_children; c++) { vdev_t *vd = rvd->vdev_child[c]; @@ -7704,7 +7816,8 @@ * applies to the new_path parameter if allocated. */ static char * -import_checkpointed_state(char *target, nvlist_t *cfg, char **new_path) +import_checkpointed_state(char *target, nvlist_t *cfg, boolean_t target_is_spa, + char **new_path) { int error = 0; char *poolname, *bogus_name = NULL; @@ -7712,11 +7825,11 @@ /* If the target is not a pool, the extract the pool name */ char *path_start = strchr(target, '/'); - if (path_start != NULL) { + if (target_is_spa || path_start == NULL) { + poolname = target; + } else { size_t poolname_len = path_start - target; poolname = strndup(target, poolname_len); - } else { - poolname = target; } if (cfg == NULL) { @@ -7747,10 +7860,11 @@ "with error %d\n", bogus_name, error); } - if (new_path != NULL && path_start != NULL) { - if (asprintf(new_path, "%s%s", bogus_name, path_start) == -1) { + if (new_path != NULL && !target_is_spa) { + if (asprintf(new_path, "%s%s", bogus_name, + path_start != NULL ? path_start : "") == -1) { free(bogus_name); - if (path_start != NULL) + if (!target_is_spa && path_start != NULL) free(poolname); return (NULL); } @@ -7979,7 +8093,7 @@ * name) so we can do verification on it against the current state * of the pool. */ - checkpoint_pool = import_checkpointed_state(spa->spa_name, NULL, + checkpoint_pool = import_checkpointed_state(spa->spa_name, NULL, B_TRUE, NULL); ASSERT(strcmp(spa->spa_name, checkpoint_pool) != 0); @@ -8449,8 +8563,9 @@ if (dump_opt['d'] || dump_opt['i']) { spa_feature_t f; - mos_refd_objs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + mos_refd_objs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + 0, "dump_zpool:mos_refd_objs"); dump_objset(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { @@ -8981,7 +9096,7 @@ DVA_SET_VDEV(&dva[0], vd->vdev_id); DVA_SET_OFFSET(&dva[0], offset); - DVA_SET_GANG(&dva[0], !!(flags & ZDB_FLAG_GBH)); + DVA_SET_GANG(&dva[0], 0); DVA_SET_ASIZE(&dva[0], vdev_psize_to_asize(vd, psize)); BP_SET_BIRTH(bp, TXG_INITIAL, TXG_INITIAL); @@ -8996,7 +9111,7 @@ BP_SET_BYTEORDER(bp, ZFS_HOST_BYTEORDER); spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); - zio = zio_root(spa, NULL, NULL, 0); + zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); if (vd == vd->vdev_top) { /* @@ -9118,7 +9233,7 @@ ck_zio->io_offset = DVA_GET_OFFSET(&bp->blk_dva[0]); ck_zio->io_bp = bp; - zio_checksum_compute(ck_zio, ck, pabd, lsize); + zio_checksum_compute(ck_zio, ck, pabd, psize); printf( "%12s\t" "cksum=%016llx:%016llx:%016llx:%016llx\n", @@ -9311,6 +9426,8 @@ {"all-reconstruction", no_argument, NULL, 'Y'}, {"livelist", no_argument, NULL, 'y'}, {"zstd-headers", no_argument, NULL, 'Z'}, + {"allocated-map", no_argument, NULL, + ALLOCATED_OPT}, {0, 0, 0, 0} }; @@ -9341,6 +9458,7 @@ case 'u': case 'y': case 'Z': + case ALLOCATED_OPT: dump_opt[c]++; dump_all = 0; break; @@ -9487,7 +9605,7 @@ * Automate cachefile */ if (!spa_config_path_env && !config_path_console && target && - libzfs_core_init() == 0) { + !dump_opt['l'] && libzfs_core_init() == 0) { char *pname = strdup(target); const char *value; nvlist_t *pnvl = NULL; @@ -9695,7 +9813,7 @@ char *checkpoint_target = NULL; if (dump_opt['k']) { checkpoint_pool = import_checkpointed_state(target, cfg, - &checkpoint_target); + target_is_spa, &checkpoint_target); if (checkpoint_target != NULL) target = checkpoint_target; diff -Nru zfs-linux-2.3.2/cmd/zdb/zdb.h zfs-linux-2.3.9/cmd/zdb/zdb.h --- zfs-linux-2.3.2/cmd/zdb/zdb.h 2025-05-01 18:23:23.711214430 +0000 +++ zfs-linux-2.3.9/cmd/zdb/zdb.h 2026-08-21 20:57:12.282006119 +0000 @@ -29,6 +29,6 @@ #define _ZDB_H void dump_intent_log(zilog_t *); -extern uint8_t dump_opt[256]; +extern uint8_t dump_opt[512]; #endif /* _ZDB_H */ diff -Nru zfs-linux-2.3.2/cmd/zdb/zdb_il.c zfs-linux-2.3.9/cmd/zdb/zdb_il.c --- zfs-linux-2.3.2/cmd/zdb/zdb_il.c 2025-05-01 18:23:23.711214430 +0000 +++ zfs-linux-2.3.9/cmd/zdb/zdb_il.c 2026-08-21 20:57:12.282006119 +0000 @@ -48,8 +48,6 @@ #include "zdb.h" -extern uint8_t dump_opt[256]; - static char tab_prefix[4] = "\t\t\t"; static void diff -Nru zfs-linux-2.3.2/cmd/zed/Makefile.am zfs-linux-2.3.9/cmd/zed/Makefile.am --- zfs-linux-2.3.2/cmd/zed/Makefile.am 2025-05-01 18:23:23.711214430 +0000 +++ zfs-linux-2.3.9/cmd/zed/Makefile.am 2026-08-21 20:57:12.282641227 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 include $(srcdir)/%D%/zed.d/Makefile.am zed_CFLAGS = $(AM_CFLAGS) diff -Nru zfs-linux-2.3.2/cmd/zed/agents/zfs_agents.c zfs-linux-2.3.9/cmd/zed/agents/zfs_agents.c --- zfs-linux-2.3.2/cmd/zed/agents/zfs_agents.c 2025-05-01 18:23:23.711214430 +0000 +++ zfs-linux-2.3.9/cmd/zed/agents/zfs_agents.c 2026-08-21 20:57:12.282727365 +0000 @@ -134,11 +134,13 @@ * of blkid cache and L2ARC VDEV does not contain pool guid in its * blkid, so this is a special case for L2ARC VDEV. */ - else if (gsp->gs_vdev_guid != 0 && gsp->gs_devid == NULL && + else if (gsp->gs_vdev_guid != 0 && nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID, &vdev_guid) == 0 && gsp->gs_vdev_guid == vdev_guid) { - (void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID, - &gsp->gs_devid); + if (gsp->gs_devid == NULL) { + (void) nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID, + &gsp->gs_devid); + } (void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_EXPANSION_TIME, &gsp->gs_vdev_expandtime); return (B_TRUE); @@ -156,22 +158,28 @@ /* * For each vdev in this pool, look for a match by devid */ - if ((config = zpool_get_config(zhp, NULL)) != NULL) { - if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, - &nvl) == 0) { - (void) zfs_agent_iter_vdev(zhp, nvl, gsp); - } - } - /* - * if a match was found then grab the pool guid - */ - if (gsp->gs_vdev_guid && gsp->gs_devid) { - (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, - &gsp->gs_pool_guid); - } + boolean_t found = B_FALSE; + uint64_t pool_guid; + + /* Get pool configuration and extract pool GUID */ + if ((config = zpool_get_config(zhp, NULL)) == NULL || + nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, + &pool_guid) != 0) + goto out; + + /* Skip this pool if we're looking for a specific pool */ + if (gsp->gs_pool_guid != 0 && pool_guid != gsp->gs_pool_guid) + goto out; + + if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvl) == 0) + found = zfs_agent_iter_vdev(zhp, nvl, gsp); + if (found && gsp->gs_pool_guid == 0) + gsp->gs_pool_guid = pool_guid; + +out: zpool_close(zhp); - return (gsp->gs_devid != NULL && gsp->gs_vdev_guid != 0); + return (found); } void @@ -233,20 +241,17 @@ * For multipath, spare and l2arc devices ZFS_EV_VDEV_GUID or * ZFS_EV_POOL_GUID may be missing so find them. */ - if (devid == NULL || pool_guid == 0 || vdev_guid == 0) { - if (devid == NULL) - search.gs_vdev_guid = vdev_guid; - else - search.gs_devid = devid; - zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search); - if (devid == NULL) - devid = search.gs_devid; - if (pool_guid == 0) - pool_guid = search.gs_pool_guid; - if (vdev_guid == 0) - vdev_guid = search.gs_vdev_guid; - devtype = search.gs_vdev_type; - } + search.gs_devid = devid; + search.gs_vdev_guid = vdev_guid; + search.gs_pool_guid = pool_guid; + zpool_iter(g_zfs_hdl, zfs_agent_iter_pool, &search); + if (devid == NULL) + devid = search.gs_devid; + if (pool_guid == 0) + pool_guid = search.gs_pool_guid; + if (vdev_guid == 0) + vdev_guid = search.gs_vdev_guid; + devtype = search.gs_vdev_type; /* * We want to avoid reporting "remove" events coming from diff -Nru zfs-linux-2.3.2/cmd/zed/agents/zfs_mod.c zfs-linux-2.3.9/cmd/zed/agents/zfs_mod.c --- zfs-linux-2.3.2/cmd/zed/agents/zfs_mod.c 2025-05-01 18:23:23.712214444 +0000 +++ zfs-linux-2.3.9/cmd/zed/agents/zfs_mod.c 2026-08-21 20:57:12.282727365 +0000 @@ -1080,8 +1080,63 @@ zed_log_msg(LOG_INFO, "zfsdle_vdev_online: searching for '%s' in '%s'", devname, zpool_get_name(zhp)); - if ((tgt = zpool_find_vdev_by_physpath(zhp, devname, - &avail_spare, &l2cache, NULL)) != NULL) { + tgt = zpool_find_vdev_by_physpath(zhp, devname, + &avail_spare, &l2cache, NULL); + + /* + * A whole-disk event carries no vdev guid (the label lives on + * the partition), and udev provides no ID_PATH on some buses, + * so neither lookup above can match. Identify the vdev by + * reading the label off the whole-disk partition instead: the + * pool and vdev guids stored there don't depend on which name + * the pool was imported with (by-id, by-path or a bare device + * node), and they can't be forged by a stale config path left + * behind in an unrelated pool. + */ + if (tgt == NULL && nvlist_lookup_uint64(udev_nvl, ZFS_EV_VDEV_GUID, + &guid) != 0 && nvlist_lookup_string(udev_nvl, DEV_NAME, + &tmp_devname) == 0 && !nvlist_exists(udev_nvl, DEV_IS_PART)) { + nvlist_t *label = NULL; + uint64_t label_pool_guid = 0, label_vdev_guid = 0; + int fd; + + strlcpy(devname, tmp_devname, MAXPATHLEN); + zfs_append_partition(devname, MAXPATHLEN); + + if ((fd = open(devname, O_RDONLY | O_CLOEXEC)) >= 0) { + if (zpool_read_label(fd, &label, NULL) == 0 && + label != NULL && + nvlist_lookup_uint64(label, + ZPOOL_CONFIG_POOL_GUID, &label_pool_guid) == 0 && + nvlist_lookup_uint64(label, ZPOOL_CONFIG_GUID, + &label_vdev_guid) == 0 && + label_pool_guid == zpool_get_prop_int(zhp, + ZPOOL_PROP_GUID, NULL)) { + zed_log_msg(LOG_INFO, "zfsdle_vdev_online: " + "matched vdev %llu by the label on '%s'", + (u_longlong_t)label_vdev_guid, devname); + + (void) snprintf(devname, MAXPATHLEN, "%llu", + (u_longlong_t)label_vdev_guid); + tgt = zpool_find_vdev(zhp, devname, + &avail_spare, &l2cache, NULL); + if (tgt != NULL && (avail_spare || l2cache)) + tgt = NULL; + if (tgt != NULL) { + uint64_t wd = 0; + + (void) nvlist_lookup_uint64(tgt, + ZPOOL_CONFIG_WHOLE_DISK, &wd); + if (!wd) + tgt = NULL; + } + } + nvlist_free(label); + (void) close(fd); + } + } + + if (tgt != NULL) { const char *path; char fullpath[MAXPATHLEN]; uint64_t wholedisk = 0; diff -Nru zfs-linux-2.3.2/cmd/zed/zed.d/Makefile.am zfs-linux-2.3.9/cmd/zed/zed.d/Makefile.am --- zfs-linux-2.3.2/cmd/zed/zed.d/Makefile.am 2025-05-01 18:23:23.712214444 +0000 +++ zfs-linux-2.3.9/cmd/zed/zed.d/Makefile.am 2026-08-21 20:57:12.283578120 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 zedconfdir = $(sysconfdir)/zfs/zed.d dist_zedconf_DATA = \ %D%/zed-functions.sh \ diff -Nru zfs-linux-2.3.2/cmd/zed/zed.d/zed-functions.sh zfs-linux-2.3.9/cmd/zed/zed.d/zed-functions.sh --- zfs-linux-2.3.2/cmd/zed/zed.d/zed-functions.sh 2025-05-01 18:23:23.713214458 +0000 +++ zfs-linux-2.3.9/cmd/zed/zed.d/zed-functions.sh 2026-08-21 20:57:12.283578120 +0000 @@ -441,8 +441,9 @@ "${pathname}")" # Construct the JSON message for posting. + # shellcheck disable=SC2016 # - msg_json="$(printf '{"text": "*%s*\\n%s"}' "${subject}" "${msg_body}" )" + msg_json="$(printf '{"text": "*%s*\\n```%s```"}' "${subject}" "${msg_body}" )" # Send the POST request and check for errors. # diff -Nru zfs-linux-2.3.2/cmd/zed/zed_disk_event.c zfs-linux-2.3.9/cmd/zed/zed_disk_event.c --- zfs-linux-2.3.2/cmd/zed/zed_disk_event.c 2025-05-01 18:23:23.713214458 +0000 +++ zfs-linux-2.3.9/cmd/zed/zed_disk_event.c 2026-08-21 20:57:12.283578120 +0000 @@ -242,6 +242,9 @@ part != NULL && part[0] != '\0') { const char *devname = udev_device_get_property_value(dev, "DEVNAME"); + const char *resize = + udev_device_get_property_value(dev, "RESIZE"); + const char *dev_action = udev_device_get_action(dev); if (strcmp(part, "atari") == 0) { zed_log_msg(LOG_INFO, @@ -249,6 +252,19 @@ "but we're going to assume it's a false " "positive and still use it (issue #13497)", __func__, devname); + } else if (dev_action != NULL && + strcmp(dev_action, "change") == 0 && + resize != NULL && strcmp(resize, "1") == 0) { + /* + * A capacity change is reported on the disk + * itself, not on its partitions, so this is + * the only chance to notice it. Pass the + * event on for a possible autoexpand of a + * whole-disk vdev (issue #12505). + */ + zed_log_msg(LOG_INFO, + "%s: %s capacity change on partitioned " + "disk", __func__, devname); } else { zed_log_msg(LOG_INFO, "%s: skip %s since it has a %s partition " diff -Nru zfs-linux-2.3.2/cmd/zed/zed_event.c zfs-linux-2.3.9/cmd/zed/zed_event.c --- zfs-linux-2.3.2/cmd/zed/zed_event.c 2025-05-01 18:23:23.713214458 +0000 +++ zfs-linux-2.3.9/cmd/zed/zed_event.c 2026-08-21 20:57:12.284006091 +0000 @@ -238,7 +238,7 @@ NULL }; const char **pp; - char *p; + const char *p; if (!name) return (0); diff -Nru zfs-linux-2.3.2/cmd/zfs/Makefile.am zfs-linux-2.3.9/cmd/zfs/Makefile.am --- zfs-linux-2.3.2/cmd/zfs/Makefile.am 2025-05-01 18:23:23.713214458 +0000 +++ zfs-linux-2.3.9/cmd/zfs/Makefile.am 2026-08-21 20:57:12.284006091 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 sbin_PROGRAMS += zfs CPPCHECKTARGETS += zfs diff -Nru zfs-linux-2.3.2/cmd/zfs/zfs_main.c zfs-linux-2.3.9/cmd/zfs/zfs_main.c --- zfs-linux-2.3.2/cmd/zfs/zfs_main.c 2025-05-01 18:23:23.715214486 +0000 +++ zfs-linux-2.3.9/cmd/zfs/zfs_main.c 2026-08-21 20:57:12.285006077 +0000 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -121,6 +122,7 @@ static int zfs_do_project(int argc, char **argv); static int zfs_do_version(int argc, char **argv); static int zfs_do_redact(int argc, char **argv); +static int zfs_do_rewrite(int argc, char **argv); static int zfs_do_wait(int argc, char **argv); #ifdef __FreeBSD__ @@ -193,6 +195,7 @@ HELP_CHANGE_KEY, HELP_VERSION, HELP_REDACT, + HELP_REWRITE, HELP_JAIL, HELP_UNJAIL, HELP_WAIT, @@ -227,7 +230,7 @@ { "promote", zfs_do_promote, HELP_PROMOTE }, { "rename", zfs_do_rename, HELP_RENAME }, { "bookmark", zfs_do_bookmark, HELP_BOOKMARK }, - { "program", zfs_do_channel_program, HELP_CHANNEL_PROGRAM }, + { "diff", zfs_do_diff, HELP_DIFF }, { NULL }, { "list", zfs_do_list, HELP_LIST }, { NULL }, @@ -249,27 +252,31 @@ { NULL }, { "send", zfs_do_send, HELP_SEND }, { "receive", zfs_do_receive, HELP_RECEIVE }, + { "redact", zfs_do_redact, HELP_REDACT }, { NULL }, { "allow", zfs_do_allow, HELP_ALLOW }, - { NULL }, { "unallow", zfs_do_unallow, HELP_UNALLOW }, { NULL }, { "hold", zfs_do_hold, HELP_HOLD }, { "holds", zfs_do_holds, HELP_HOLDS }, { "release", zfs_do_release, HELP_RELEASE }, - { "diff", zfs_do_diff, HELP_DIFF }, + { NULL }, { "load-key", zfs_do_load_key, HELP_LOAD_KEY }, { "unload-key", zfs_do_unload_key, HELP_UNLOAD_KEY }, { "change-key", zfs_do_change_key, HELP_CHANGE_KEY }, - { "redact", zfs_do_redact, HELP_REDACT }, + { NULL }, + { "program", zfs_do_channel_program, HELP_CHANNEL_PROGRAM }, + { "rewrite", zfs_do_rewrite, HELP_REWRITE }, { "wait", zfs_do_wait, HELP_WAIT }, #ifdef __FreeBSD__ + { NULL }, { "jail", zfs_do_jail, HELP_JAIL }, { "unjail", zfs_do_unjail, HELP_UNJAIL }, #endif #ifdef __linux__ + { NULL }, { "zone", zfs_do_zone, HELP_ZONE }, { "unzone", zfs_do_unzone, HELP_UNZONE }, #endif @@ -432,6 +439,9 @@ case HELP_REDACT: return (gettext("\tredact " " ...\n")); + case HELP_REWRITE: + return (gettext("\trewrite [-rvx] [-o ] [-l ] " + "\n")); case HELP_JAIL: return (gettext("\tjail \n")); case HELP_UNJAIL: @@ -920,19 +930,15 @@ } /* - * Return a default volblocksize for the pool which always uses more than - * half of the data sectors. This primarily applies to dRAID which always - * writes full stripe widths. + * Calculate the minimum allocation size based on the top-level vdevs. */ static uint64_t -default_volblocksize(zpool_handle_t *zhp, nvlist_t *props) +calculate_volblocksize(nvlist_t *config) { - uint64_t volblocksize, asize = SPA_MINBLOCKSIZE; + uint64_t asize = SPA_MINBLOCKSIZE; nvlist_t *tree, **vdevs; uint_t nvdevs; - nvlist_t *config = zpool_get_config(zhp, NULL); - if (nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &tree) != 0 || nvlist_lookup_nvlist_array(tree, ZPOOL_CONFIG_CHILDREN, &vdevs, &nvdevs) != 0) { @@ -963,6 +969,24 @@ } } + return (asize); +} + +/* + * Return a default volblocksize for the pool which always uses more than + * half of the data sectors. This primarily applies to dRAID which always + * writes full stripe widths. + */ +static uint64_t +default_volblocksize(zpool_handle_t *zhp, nvlist_t *props) +{ + uint64_t volblocksize, asize = SPA_MINBLOCKSIZE; + + nvlist_t *config = zpool_get_config(zhp, NULL); + + if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_MAX_ALLOC, &asize) != 0) + asize = calculate_volblocksize(config); + /* * Calculate the target volblocksize such that more than half * of the asize is used. The following table is for 4k sectors. @@ -4440,7 +4464,7 @@ if (cb.cb_create > 0) min_txg = cb.cb_create; - if ((ret = zfs_iter_snapshots_v2(zhp, 0, rollback_check, &cb, + if ((ret = zfs_iter_snapshots_sorted_v2(zhp, 0, rollback_check, &cb, min_txg, 0)) != 0) goto out; if ((ret = zfs_iter_bookmarks_v2(zhp, 0, rollback_check, &cb)) != 0) @@ -6883,7 +6907,7 @@ if (cbp->cb_recursive) { const char *snapname; - char *delim = strchr(zname, '@'); + const char *delim = strchr(zname, '@'); if (delim == NULL) return (0); @@ -7716,6 +7740,7 @@ struct extmnttab entry; const char *cmdname = (op == OP_SHARE) ? "unshare" : "unmount"; ino_t path_inode; + char *zfs_mntpnt, *entry_mntpnt; /* * Search for the given (major,minor) pair in the mount table. @@ -7729,6 +7754,8 @@ } (void) fprintf(stderr, gettext("warning: %s not in" "/proc/self/mounts\n"), path); + /* libzfs-internal flags; umount2(2) rejects them */ + flags &= ~(MS_CRYPT | MS_OVERLAY); if ((ret = umount2(path, flags)) != 0) (void) fprintf(stderr, gettext("%s: %s\n"), path, strerror(errno)); @@ -7757,6 +7784,24 @@ goto out; } + /* + * If the filesystem is mounted, check that the mountpoint matches + * the one in the mnttab entry w.r.t. provided path. If it doesn't, + * then we should not proceed further. + */ + entry_mntpnt = strdup(entry.mnt_mountp); + if (zfs_is_mounted(zhp, &zfs_mntpnt)) { + if (strcmp(zfs_mntpnt, entry_mntpnt) != 0) { + (void) fprintf(stderr, gettext("cannot %s '%s': " + "not an original mountpoint\n"), cmdname, path); + free(zfs_mntpnt); + free(entry_mntpnt); + goto out; + } + free(zfs_mntpnt); + } + free(entry_mntpnt); + if (op == OP_SHARE) { char nfs_mnt_prop[ZFS_MAXPROPLEN]; char smbshare_prop[ZFS_MAXPROPLEN]; @@ -9012,6 +9057,192 @@ return (ret); } + +static int +zfs_rewrite_file(const char *path, boolean_t verbose, zfs_rewrite_args_t *args) +{ + int fd, ret = 0; + + fd = open(path, O_WRONLY); + if (fd < 0) { + ret = errno; + (void) fprintf(stderr, gettext("failed to open %s: %s\n"), + path, strerror(errno)); + return (ret); + } + + if (ioctl(fd, ZFS_IOC_REWRITE, args) < 0) { + ret = errno; + (void) fprintf(stderr, gettext("failed to rewrite %s: %s\n"), + path, strerror(errno)); + } else if (verbose) { + printf("%s\n", path); + } + + close(fd); + return (ret); +} + +static int +zfs_rewrite_dir(const char *path, boolean_t verbose, boolean_t xdev, dev_t dev, + zfs_rewrite_args_t *args, nvlist_t *dirs) +{ + struct dirent *ent; + DIR *dir; + int ret = 0, err; + + dir = opendir(path); + if (dir == NULL) { + if (errno == ENOENT) + return (0); + ret = errno; + (void) fprintf(stderr, gettext("failed to opendir %s: %s\n"), + path, strerror(errno)); + return (ret); + } + + size_t plen = strlen(path) + 1; + while ((ent = readdir(dir)) != NULL) { + char *fullname; + struct stat st; + + if (ent->d_type != DT_REG && ent->d_type != DT_DIR) + continue; + + if (strcmp(ent->d_name, ".") == 0 || + strcmp(ent->d_name, "..") == 0) + continue; + + if (plen + strlen(ent->d_name) >= PATH_MAX) { + (void) fprintf(stderr, gettext("path too long %s/%s\n"), + path, ent->d_name); + ret = ENAMETOOLONG; + continue; + } + + if (asprintf(&fullname, "%s/%s", path, ent->d_name) == -1) { + (void) fprintf(stderr, + gettext("failed to allocate memory\n")); + ret = ENOMEM; + continue; + } + + if (xdev) { + if (lstat(fullname, &st) < 0) { + ret = errno; + (void) fprintf(stderr, + gettext("failed to stat %s: %s\n"), + fullname, strerror(errno)); + free(fullname); + continue; + } + if (st.st_dev != dev) { + free(fullname); + continue; + } + } + + if (ent->d_type == DT_REG) { + err = zfs_rewrite_file(fullname, verbose, args); + if (err) + ret = err; + } else { /* DT_DIR */ + fnvlist_add_uint64(dirs, fullname, dev); + } + + free(fullname); + } + + closedir(dir); + return (ret); +} + +static int +zfs_rewrite_path(const char *path, boolean_t verbose, boolean_t recurse, + boolean_t xdev, zfs_rewrite_args_t *args, nvlist_t *dirs) +{ + struct stat st; + int ret = 0; + + if (lstat(path, &st) < 0) { + ret = errno; + (void) fprintf(stderr, gettext("failed to stat %s: %s\n"), + path, strerror(errno)); + return (ret); + } + + if (S_ISREG(st.st_mode)) { + ret = zfs_rewrite_file(path, verbose, args); + } else if (S_ISDIR(st.st_mode) && recurse) { + ret = zfs_rewrite_dir(path, verbose, xdev, st.st_dev, args, + dirs); + } + return (ret); +} + +static int +zfs_do_rewrite(int argc, char **argv) +{ + int ret = 0, err, c; + boolean_t recurse = B_FALSE, verbose = B_FALSE, xdev = B_FALSE; + + if (argc < 2) + usage(B_FALSE); + + zfs_rewrite_args_t args; + memset(&args, 0, sizeof (args)); + + while ((c = getopt(argc, argv, "l:o:rvx")) != -1) { + switch (c) { + case 'l': + args.len = strtoll(optarg, NULL, 0); + break; + case 'o': + args.off = strtoll(optarg, NULL, 0); + break; + case 'r': + recurse = B_TRUE; + break; + case 'v': + verbose = B_TRUE; + break; + case 'x': + xdev = B_TRUE; + break; + default: + (void) fprintf(stderr, gettext("invalid option '%c'\n"), + optopt); + usage(B_FALSE); + } + } + + argv += optind; + argc -= optind; + if (argc == 0) { + (void) fprintf(stderr, + gettext("missing file or directory target(s)\n")); + usage(B_FALSE); + } + + nvlist_t *dirs = fnvlist_alloc(); + for (int i = 0; i < argc; i++) { + err = zfs_rewrite_path(argv[i], verbose, recurse, xdev, &args, + dirs); + if (err) + ret = err; + } + nvpair_t *dir; + while ((dir = nvlist_next_nvpair(dirs, NULL)) != NULL) { + err = zfs_rewrite_dir(nvpair_name(dir), verbose, xdev, + fnvpair_value_uint64(dir), &args, dirs); + if (err) + ret = err; + fnvlist_remove_nvpair(dirs, dir); + } + fnvlist_free(dirs); + + return (ret); +} static int zfs_do_wait(int argc, char **argv) diff -Nru zfs-linux-2.3.2/cmd/zfs/zfs_project.c zfs-linux-2.3.9/cmd/zfs/zfs_project.c --- zfs-linux-2.3.2/cmd/zfs/zfs_project.c 2025-05-01 18:23:23.715214486 +0000 +++ zfs-linux-2.3.9/cmd/zfs/zfs_project.c 2026-08-21 20:57:12.285006077 +0000 @@ -145,11 +145,11 @@ switch (zpc->zpc_op) { case ZFS_PROJECT_OP_LIST: (void) printf("%5u %c %s\n", fsx.fsx_projid, - (fsx.fsx_xflags & ZFS_PROJINHERIT_FL) ? 'P' : '-', name); + (fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) ? 'P' : '-', name); goto out; case ZFS_PROJECT_OP_CHECK: if (fsx.fsx_projid == zpc->zpc_expected_projid && - fsx.fsx_xflags & ZFS_PROJINHERIT_FL) + fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) goto out; if (!zpc->zpc_newline) { @@ -164,29 +164,30 @@ "(%u/%u)\n", name, fsx.fsx_projid, (uint32_t)zpc->zpc_expected_projid); - if (!(fsx.fsx_xflags & ZFS_PROJINHERIT_FL)) + if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT)) (void) printf("%s - project inherit flag is not set\n", name); goto out; case ZFS_PROJECT_OP_CLEAR: - if (!(fsx.fsx_xflags & ZFS_PROJINHERIT_FL) && + if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) && (zpc->zpc_keep_projid || fsx.fsx_projid == ZFS_DEFAULT_PROJID)) goto out; - fsx.fsx_xflags &= ~ZFS_PROJINHERIT_FL; + fsx.fsx_xflags &= ~FS_XFLAG_PROJINHERIT; if (!zpc->zpc_keep_projid) fsx.fsx_projid = ZFS_DEFAULT_PROJID; break; case ZFS_PROJECT_OP_SET: if (fsx.fsx_projid == zpc->zpc_expected_projid && - (!zpc->zpc_set_flag || fsx.fsx_xflags & ZFS_PROJINHERIT_FL)) + (!zpc->zpc_set_flag || + fsx.fsx_xflags & FS_XFLAG_PROJINHERIT)) goto out; fsx.fsx_projid = zpc->zpc_expected_projid; if (zpc->zpc_set_flag) - fsx.fsx_xflags |= ZFS_PROJINHERIT_FL; + fsx.fsx_xflags |= FS_XFLAG_PROJINHERIT; break; default: ASSERT(0); @@ -194,11 +195,30 @@ } ret = ioctl(fd, ZFS_IOC_FSSETXATTR, &fsx); - if (ret) + if (ret) { (void) fprintf(stderr, gettext("failed to set xattr for %s: %s\n"), name, strerror(errno)); + if (errno == ENOTSUP) { + char *kver = zfs_version_kernel(); + /* + * Special case: a module/userspace version mismatch can + * return ENOTSUP due to us fixing the XFLAGs bits in + * #17884. In that case give a hint to the user that + * they should take action to make the versions match. + */ + if (strcmp(kver, ZFS_META_ALIAS) != 0) { + fprintf(stderr, + gettext("Warning: The zfs module version " + "(%s) and userspace\nversion (%s) do not " + "match up. This may be the\ncause of the " + "\"Operation not supported\" error.\n"), + kver, ZFS_META_ALIAS); + } + } + } + out: close(fd); return (ret); diff -Nru zfs-linux-2.3.2/cmd/zhack.c zfs-linux-2.3.9/cmd/zhack.c --- zfs-linux-2.3.2/cmd/zhack.c 2025-05-01 18:23:23.715214486 +0000 +++ zfs-linux-2.3.9/cmd/zhack.c 2026-08-21 20:57:12.286006063 +0000 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -52,12 +53,15 @@ #include #include #include +#include #include #include +#include static importargs_t g_importargs; static char *g_pool; static boolean_t g_readonly; +static boolean_t g_dump_dbgmsg; typedef enum { ZHACK_REPAIR_OP_UNKNOWN = 0, @@ -69,11 +73,23 @@ usage(void) { (void) fprintf(stderr, - "Usage: zhack [-c cachefile] [-d dir] ...\n" - "where is one of the following:\n" + "Usage: zhack [-o tunable] [-c cachefile] [-d dir] [-G] " + " ...\n" + " where is one of the following:\n" "\n"); (void) fprintf(stderr, + " global options:\n" + " -c reads config from the given cachefile\n" + " -d directory with vdevs for import\n" + " -o var=value... set global variable to an unsigned " + "32-bit integer\n" + " -G dump zfs_dbgmsg buffer before exiting\n" + "\n" + " action idle [-f] [-t seconds]\n" + " import the pool for a set time then export it\n" + " -t sets the time the pool is imported\n" + "\n" " feature stat \n" " print information about enabled features\n" " feature enable [-r] [-d desc] \n" @@ -93,10 +109,53 @@ " -c repair corrupted label checksums\n" " -u restore the label on a detached device\n" "\n" - " : path to vdev\n"); + " : path to vdev\n" + "\n" + " mmp reclaim \n" + " import a pool whose MMP claim cannot reach every mirror\n" + " leg the config still expects, then mark the unreachable\n" + " leaves offline so ordinary imports succeed. Manual\n" + " recovery: fence the peer first, this cannot see a\n" + " live host whose legs are all invisible from here\n" + "\n" + " metaslab leak \n" + " apply allocation map from zdb to specified pool\n"); exit(1); } +static void +dump_debug_buffer(void) +{ + ssize_t ret __attribute__((unused)); + + if (!g_dump_dbgmsg) + return; + + /* + * We use write() instead of printf() so that this function + * is safe to call from a signal handler. + */ + ret = write(STDERR_FILENO, "\n", 1); + zfs_dbgmsg_print(STDERR_FILENO, "zhack"); +} + +static void sig_handler(int signo) +{ + struct sigaction action; + + libspl_backtrace(STDERR_FILENO); + dump_debug_buffer(); + + /* + * Restore default action and re-raise signal so SIGSEGV and + * SIGABRT can trigger a core dump. + */ + action.sa_handler = SIG_DFL; + sigemptyset(&action.sa_mask); + action.sa_flags = 0; + (void) sigaction(signo, &action, NULL); + raise(signo); +} static __attribute__((format(printf, 3, 4))) __attribute__((noreturn)) void fatal(spa_t *spa, const void *tag, const char *fmt, ...) @@ -114,6 +173,8 @@ va_end(ap); (void) fputc('\n', stderr); + dump_debug_buffer(); + exit(1); } @@ -169,7 +230,7 @@ zfeature_checks_disable = B_TRUE; error = spa_import(target, config, props, - (readonly ? ZFS_IMPORT_SKIP_MMP : ZFS_IMPORT_NORMAL)); + (readonly ? ZFS_IMPORT_SKIP_MMP : ZFS_IMPORT_NORMAL)); fnvlist_free(config); zfeature_checks_disable = B_FALSE; if (error == EEXIST) @@ -363,10 +424,12 @@ zfeature_info_t *feature = arg; uint64_t refcount; + mutex_enter(&spa->spa_feat_stats_lock); VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount)); feature_sync(spa, feature, refcount + 1, tx); spa_history_log_internal(spa, "zhack feature incr", tx, "name=%s", feature->fi_guid); + mutex_exit(&spa->spa_feat_stats_lock); } static void @@ -376,10 +439,12 @@ zfeature_info_t *feature = arg; uint64_t refcount; + mutex_enter(&spa->spa_feat_stats_lock); VERIFY0(feature_get_refcount_from_disk(spa, feature, &refcount)); feature_sync(spa, feature, refcount - 1, tx); spa_history_log_internal(spa, "zhack feature decr", tx, "name=%s", feature->fi_guid); + mutex_exit(&spa->spa_feat_stats_lock); } static void @@ -496,6 +561,427 @@ return (0); } +static void +zhack_do_action_idle(int argc, char **argv) +{ + spa_t *spa; + char *target, *tmp; + int idle_time = 0; + int c; + + optind = 1; + while ((c = getopt(argc, argv, "+t:")) != -1) { + switch (c) { + case 't': + idle_time = strtol(optarg, &tmp, 0); + if (*tmp) { + (void) fprintf(stderr, "error: time must " + "be an integer in seconds: %s\n", tmp); + usage(); + } + if (idle_time < 0) { + (void) fprintf(stderr, "error: time must " + "not be negative: %d\n", idle_time); + usage(); + } + break; + default: + usage(); + break; + } + } + argc -= optind; + argv += optind; + + if (argc < 1) { + (void) fprintf(stderr, "error: missing pool name\n"); + usage(); + } + target = argv[0]; + + zhack_spa_open(target, B_FALSE, FTAG, &spa); + + fprintf(stdout, "Imported pool %s, idle for %d seconds\n", + target, idle_time); + sleep(idle_time); + + spa_close(spa, FTAG); +} + +/* + * Collect the mirror legs this host could not open. vdev_not_present is set + * during import for any leaf whose open failed (vdev.c), and a leg in that + * state is what the relaxed claim forgives, so it is also what has to be + * marked offline for the ordinary imports which follow to succeed. + */ +static void +zhack_collect_absent(vdev_t *vd, uint64_t *guids, uint_t *n, uint_t max) +{ + /* + * Skip the same subtrees mmp_claim_uberblock_sync() skips. The claim + * never counts these, so offlining them buys nothing, and offlining a + * log leg would drag in spa_reset_logs(). Pruned at the interior node + * because the log flag lives on the top-level vdev. + */ + if (vd->vdev_islog || vd->vdev_isspare || vd->vdev_isl2cache || + vd->vdev_ishole || vd->vdev_ops == &vdev_indirect_ops) + return; + + for (uint64_t c = 0; c < vd->vdev_children; c++) + zhack_collect_absent(vd->vdev_child[c], guids, n, max); + + if (!vd->vdev_ops->vdev_op_leaf || !vd->vdev_not_present) + return; + + /* + * Take only the legs the relaxed claim can forgive, which are the + * direct children of a top-level mirror: the relaxation lives in the + * nparity == 0 branch and walks that vdev's children. A raidz or + * draid member is required as parity+1 in aggregate and never demanded + * individually, so an absent one does not raise the requirement and + * offlining it would be a persistent change that buys nothing. + */ + if (vd->vdev_parent != vd->vdev_top || + vdev_get_nparity(vd->vdev_top) != 0) + return; + + VERIFY3U(*n, <, max); + guids[(*n)++] = vd->vdev_guid; +} + +static int +zhack_do_mmp_reclaim(int argc, char **argv) +{ + spa_t *spa; + char *target; + uint64_t *guids; + uint_t nguids = 0, max; + int c, failed = 0; + + optind = 1; + while ((c = getopt(argc, argv, "+")) != -1) { + switch (c) { + default: + usage(); + break; + } + } + argc -= optind; + argv += optind; + + if (argc < 1) { + (void) fprintf(stderr, "error: missing pool name\n"); + usage(); + } + target = argv[0]; + + /* + * Relax the claim for this import only. The write, the wait and the + * re-read are untouched, so a competing importer which shares any + * visibility with us is still refused. + */ + mmp_claim_relaxed = B_TRUE; + zhack_spa_open(target, B_FALSE, FTAG, &spa); + mmp_claim_relaxed = B_FALSE; + + /* + * Nothing to recover on a pool without multihost: no claim runs, so an + * ordinary import already succeeds with the absent leaves simply + * missing. Offlining them here would be a permanent change to a pool + * that never needed this tool. + */ + if (!spa_multihost(spa)) { + (void) fprintf(stderr, "%s: multihost is off, so no uberblock " + "claim runs and an ordinary import will succeed; refusing " + "to offline anything\n", target); + spa_close(spa, FTAG); + return (1); + } + + /* Takes SCL_VDEV itself, so size the array before we hold it. */ + max = MAX(vdev_count_leaves(spa), 1); + guids = umem_zalloc(max * sizeof (uint64_t), UMEM_NOFAIL); + + spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); + zhack_collect_absent(spa->spa_root_vdev, guids, &nguids, max); + spa_config_exit(spa, SCL_VDEV, FTAG); + + if (nguids == 0) { + (void) fprintf(stdout, "%s: imported, no absent leaves to " + "mark offline\n", target); + } + + for (uint_t i = 0; i < nguids; i++) { + int error = vdev_offline(spa, guids[i], 0); + + if (error == 0) { + (void) fprintf(stdout, "%s: marked absent leaf %llu " + "offline\n", target, (u_longlong_t)guids[i]); + continue; + } + + failed++; + if (error == EBUSY) { + (void) fprintf(stderr, "%s: leaf %llu holds data no " + "other leaf has, left online\n", target, + (u_longlong_t)guids[i]); + } else { + (void) fprintf(stderr, "%s: could not offline leaf " + "%llu: %s\n", target, (u_longlong_t)guids[i], + strerror(error)); + } + } + + if (failed != 0) { + /* + * Not "the pool still needs zhack": this run exports cleanly + * under our own hostid, so the next import here skips the + * activity check entirely. The cost lands on the next host + * to take the pool, whose claim will count the leaves left + * online and refuse. + */ + (void) fprintf(stderr, "%s: %d absent leaves are still " + "online; a later import from another host will count " + "them and be refused\n", target, failed); + } + + umem_free(guids, max * sizeof (uint64_t)); + spa_close(spa, FTAG); + + return (failed == 0 ? 0 : 1); +} + +static int +zhack_do_mmp(int argc, char **argv) +{ + char *subcommand; + + argc--; + argv++; + if (argc == 0) { + (void) fprintf(stderr, + "error: no mmp operation specified\n"); + usage(); + } + + subcommand = argv[0]; + if (strcmp(subcommand, "reclaim") == 0) { + return (zhack_do_mmp_reclaim(argc, argv)); + } else { + (void) fprintf(stderr, "error: unknown subcommand: %s\n", + subcommand); + usage(); + } + + return (0); +} + +static int +zhack_do_action(int argc, char **argv) +{ + char *subcommand; + + argc--; + argv++; + if (argc == 0) { + (void) fprintf(stderr, + "error: no import operation specified\n"); + usage(); + } + + subcommand = argv[0]; + if (strcmp(subcommand, "idle") == 0) { + zhack_do_action_idle(argc, argv); + } else { + (void) fprintf(stderr, "error: unknown subcommand: %s\n", + subcommand); + usage(); + } + + return (0); +} + + +static boolean_t +strstarts(const char *a, const char *b) +{ + return (strncmp(a, b, strlen(b)) == 0); +} + +static void +metaslab_force_alloc(metaslab_t *msp, uint64_t start, uint64_t size, + dmu_tx_t *tx) +{ + ASSERT(msp->ms_disabled); + ASSERT(MUTEX_HELD(&msp->ms_lock)); + uint64_t txg = dmu_tx_get_txg(tx); + + uint64_t off = start; + while (off < start + size) { + uint64_t ostart, osize; + boolean_t found = zfs_range_tree_find_in(msp->ms_allocatable, + off, start + size - off, &ostart, &osize); + if (!found) + break; + zfs_range_tree_remove(msp->ms_allocatable, ostart, osize); + + if (zfs_range_tree_is_empty(msp->ms_allocating[txg & TXG_MASK])) + vdev_dirty(msp->ms_group->mg_vd, VDD_METASLAB, msp, + txg); + + zfs_range_tree_add(msp->ms_allocating[txg & TXG_MASK], ostart, + osize); + msp->ms_allocating_total += osize; + off = ostart + osize; + } +} + +static void +zhack_do_metaslab_leak(int argc, char **argv) +{ + int c; + char *target; + spa_t *spa; + + optind = 1; + boolean_t force = B_FALSE; + while ((c = getopt(argc, argv, "f")) != -1) { + switch (c) { + case 'f': + force = B_TRUE; + break; + default: + usage(); + break; + } + } + + argc -= optind; + argv += optind; + + if (argc < 1) { + (void) fprintf(stderr, "error: missing pool name\n"); + usage(); + } + target = argv[0]; + + zhack_spa_open(target, B_FALSE, FTAG, &spa); + spa_config_enter(spa, SCL_VDEV | SCL_ALLOC, FTAG, RW_READER); + + char *line = NULL; + size_t cap = 0; + + vdev_t *vd = NULL; + metaslab_t *prev = NULL; + dmu_tx_t *tx = NULL; + while (getline(&line, &cap, stdin) > 0) { + if (strstarts(line, "\tvdev ")) { + uint64_t vdev_id, ms_shift; + if (sscanf(line, + "\tvdev %10"PRIu64"\t%*s metaslab shift %4"PRIu64, + &vdev_id, &ms_shift) == 1) { + VERIFY3U(sscanf(line, "\tvdev %"PRIu64 + "\t metaslab shift %4"PRIu64, + &vdev_id, &ms_shift), ==, 2); + } + vd = vdev_lookup_top(spa, vdev_id); + if (vd == NULL) { + fprintf(stderr, "error: no such vdev with " + "id %"PRIu64"\n", vdev_id); + break; + } + if (tx) { + dmu_tx_commit(tx); + mutex_exit(&prev->ms_lock); + metaslab_enable(prev, B_FALSE, B_FALSE); + tx = NULL; + prev = NULL; + } + if (vd->vdev_ms_shift != ms_shift) { + fprintf(stderr, "error: ms_shift mismatch: %" + PRIu64" != %"PRIu64"\n", vd->vdev_ms_shift, + ms_shift); + break; + } + } else if (strstarts(line, "\tmetaslabs ")) { + uint64_t ms_count; + VERIFY3U(sscanf(line, "\tmetaslabs %"PRIu64, &ms_count), + ==, 1); + ASSERT(vd); + if (!force && vd->vdev_ms_count != ms_count) { + fprintf(stderr, "error: ms_count mismatch: %" + PRIu64" != %"PRIu64"\n", vd->vdev_ms_count, + ms_count); + break; + } + } else if (strstarts(line, "ALLOC:")) { + uint64_t start, size; + VERIFY3U(sscanf(line, "ALLOC: %"PRIu64" %"PRIu64"\n", + &start, &size), ==, 2); + + ASSERT(vd); + metaslab_t *cur = + vd->vdev_ms[start >> vd->vdev_ms_shift]; + if (prev != cur) { + if (prev) { + dmu_tx_commit(tx); + mutex_exit(&prev->ms_lock); + metaslab_enable(prev, B_FALSE, B_FALSE); + } + ASSERT(cur); + metaslab_disable(cur); + mutex_enter(&cur->ms_lock); + metaslab_load(cur); + prev = cur; + tx = dmu_tx_create_dd( + spa_get_dsl(vd->vdev_spa)->dp_root_dir); + dmu_tx_assign(tx, DMU_TX_WAIT); + } + + metaslab_force_alloc(cur, start, size, tx); + } else { + continue; + } + } + if (tx) { + dmu_tx_commit(tx); + mutex_exit(&prev->ms_lock); + metaslab_enable(prev, B_FALSE, B_FALSE); + tx = NULL; + prev = NULL; + } + if (line) + free(line); + + spa_config_exit(spa, SCL_VDEV | SCL_ALLOC, FTAG); + spa_close(spa, FTAG); +} + +static int +zhack_do_metaslab(int argc, char **argv) +{ + char *subcommand; + + argc--; + argv++; + if (argc == 0) { + (void) fprintf(stderr, + "error: no metaslab operation specified\n"); + usage(); + } + + subcommand = argv[0]; + if (strcmp(subcommand, "leak") == 0) { + zhack_do_metaslab_leak(argc, argv); + } else { + (void) fprintf(stderr, "error: unknown subcommand: %s\n", + subcommand); + usage(); + } + + return (0); +} + #define ASHIFT_UBERBLOCK_SHIFT(ashift) \ MIN(MAX(ashift, UBERBLOCK_SHIFT), \ MAX_UBERBLOCK_SHIFT) @@ -971,17 +1457,35 @@ int main(int argc, char **argv) { + struct sigaction action; char *path[MAX_NUM_PATHS]; const char *subcommand; int rv = 0; int c; + /* + * Set up signal handlers, so if we crash due to bad on-disk data we + * can get more info. Unlike ztest, we don't bail out if we can't set + * up signal handlers, because zhack is very useful without them. + */ + action.sa_handler = sig_handler; + sigemptyset(&action.sa_mask); + action.sa_flags = 0; + if (sigaction(SIGSEGV, &action, NULL) < 0) { + (void) fprintf(stderr, "zhack: cannot catch SIGSEGV: %s\n", + strerror(errno)); + } + if (sigaction(SIGABRT, &action, NULL) < 0) { + (void) fprintf(stderr, "zhack: cannot catch SIGABRT: %s\n", + strerror(errno)); + } + g_importargs.path = path; dprintf_setup(&argc, argv); zfs_prop_init(); - while ((c = getopt(argc, argv, "+c:d:")) != -1) { + while ((c = getopt(argc, argv, "+c:d:Go:")) != -1) { switch (c) { case 'c': g_importargs.cachefile = optarg; @@ -990,6 +1494,13 @@ assert(g_importargs.paths < MAX_NUM_PATHS); g_importargs.path[g_importargs.paths++] = optarg; break; + case 'G': + g_dump_dbgmsg = B_TRUE; + break; + case 'o': + if (set_global_var(optarg) != 0) + exit(1); + break; default: usage(); break; @@ -1007,10 +1518,16 @@ subcommand = argv[0]; - if (strcmp(subcommand, "feature") == 0) { + if (strcmp(subcommand, "action") == 0) { + rv = zhack_do_action(argc, argv); + } else if (strcmp(subcommand, "feature") == 0) { rv = zhack_do_feature(argc, argv); + } else if (strcmp(subcommand, "mmp") == 0) { + rv = zhack_do_mmp(argc, argv); } else if (strcmp(subcommand, "label") == 0) { return (zhack_do_label(argc, argv)); + } else if (strcmp(subcommand, "metaslab") == 0) { + rv = zhack_do_metaslab(argc, argv); } else { (void) fprintf(stderr, "error: unknown subcommand: %s\n", subcommand); @@ -1022,6 +1539,9 @@ "changes may not be committed to disk\n"); } + if (g_dump_dbgmsg) + dump_debug_buffer(); + kernel_fini(); return (rv); diff -Nru zfs-linux-2.3.2/cmd/zinject/Makefile.am zfs-linux-2.3.9/cmd/zinject/Makefile.am --- zfs-linux-2.3.2/cmd/zinject/Makefile.am 2025-05-01 18:23:23.715214486 +0000 +++ zfs-linux-2.3.9/cmd/zinject/Makefile.am 2026-08-21 20:57:12.286006063 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 sbin_PROGRAMS += zinject CPPCHECKTARGETS += zinject diff -Nru zfs-linux-2.3.2/cmd/zpool/Makefile.am zfs-linux-2.3.9/cmd/zpool/Makefile.am --- zfs-linux-2.3.2/cmd/zpool/Makefile.am 2025-05-01 18:23:23.715214486 +0000 +++ zfs-linux-2.3.9/cmd/zpool/Makefile.am 2026-08-21 20:57:12.286648035 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 zpool_CFLAGS = $(AM_CFLAGS) zpool_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUUID_CFLAGS) diff -Nru zfs-linux-2.3.2/cmd/zpool/zpool_main.c zfs-linux-2.3.9/cmd/zpool/zpool_main.c --- zfs-linux-2.3.2/cmd/zpool/zpool_main.c 2025-05-01 18:23:23.719214543 +0000 +++ zfs-linux-2.3.9/cmd/zpool/zpool_main.c 2026-08-21 20:57:12.289006021 +0000 @@ -521,11 +521,11 @@ return (gettext("\ttrim [-dw] [-r ] [-c | -s] " "[ ...]\n")); case HELP_STATUS: - return (gettext("\tstatus [--power] [-j [--json-int, " - "--json-flat-vdevs, ...\n" - "\t --json-pool-key-guid]] [-c [script1,script2,...]] " - "[-dDegiLpPstvx] ...\n" - "\t [-T d|u] [pool] [interval [count]]\n")); + return (gettext("\tstatus [-DdegiLPpstvx] " + "[-c script1[,script2,...]] ...\n" + "\t [-j|--json [--json-flat-vdevs] [--json-int] " + "[--json-pool-key-guid]] ...\n" + "\t [-T d|u] [--power] [pool] [interval [count]]\n")); case HELP_UPGRADE: return (gettext("\tupgrade\n" "\tupgrade -v\n" @@ -3883,6 +3883,9 @@ hostid, ctime(×tamp)); } + if (getenv("ZFS_LOAD_INFO_DEBUG")) + dump_nvlist(nvinfo, 4); + return (1); } @@ -10432,10 +10435,9 @@ break; case ZPOOL_STATUS_REMOVED_DEV: - snprintf(status, ST_SIZE, gettext("One or more devices has " - "been removed by the administrator.\n\tSufficient " - "replicas exist for the pool to continue functioning in " - "a\n\tdegraded state.\n")); + snprintf(status, ST_SIZE, gettext("One or more devices have " + "been removed.\n\tSufficient replicas exist for the pool " + "to continue functioning in a\n\tdegraded state.\n")); snprintf(action, AC_SIZE, gettext("Online the device " "using zpool online' or replace the device with\n\t'zpool " "replace'.\n")); @@ -10980,28 +10982,30 @@ } /* - * zpool status [-c [script1,script2,...]] [-dDegiLpPstvx] [--power] ... - * [-T d|u] [pool] [interval [count]] + * zpool status [-dDegiLpPstvx] [-c [script1,script2,...]] ... + * [-j|--json [--json-flat-vdevs] [--json-int] ... + * [--json-pool-key-guid]] [--power] [-T d|u] ... + * [pool] [interval [count]] * * -c CMD For each vdev, run command CMD - * -d Display Direct I/O write verify errors * -D Display dedup status (undocumented) + * -d Display Direct I/O write verify errors * -e Display only unhealthy vdevs * -g Display guid for individual vdev name. * -i Display vdev initialization status. + * -j [...] Display output in JSON format + * --json-flat-vdevs Display vdevs in flat hierarchy + * --json-int Display numbers in integer format instead of string + * --json-pool-key-guid Use pool GUID as key for pool objects * -L Follow links when resolving vdev path name. - * -p Display values in parsable (exact) format. * -P Display full path for vdev name. + * -p Display values in parsable (exact) format. + * --power Display vdev enclosure slot power status * -s Display slow IOs column. - * -t Display vdev TRIM status. * -T Display a timestamp in date(1) or Unix format + * -t Display vdev TRIM status. * -v Display complete error logs * -x Display only pools with potential problems - * -j Display output in JSON format - * --power Display vdev enclosure slot power status - * --json-int Display numbers in inteeger format instead of string - * --json-flat-vdevs Display vdevs in flat hierarchy - * --json-pool-key-guid Use pool GUID as key for pool objects * * Describes the health status of all pools or some subset. */ diff -Nru zfs-linux-2.3.2/cmd/zpool/zpool_vdev.c zfs-linux-2.3.9/cmd/zpool/zpool_vdev.c --- zfs-linux-2.3.2/cmd/zpool/zpool_vdev.c 2025-05-01 18:23:23.719214543 +0000 +++ zfs-linux-2.3.9/cmd/zpool/zpool_vdev.c 2026-08-21 20:57:12.289006021 +0000 @@ -270,14 +270,13 @@ * draid* Virtual dRAID spare */ static nvlist_t * -make_leaf_vdev(nvlist_t *props, const char *arg, boolean_t is_primary) +make_leaf_vdev(const char *arg, boolean_t is_primary, uint64_t ashift) { char path[MAXPATHLEN]; struct stat64 statbuf; nvlist_t *vdev = NULL; const char *type = NULL; boolean_t wholedisk = B_FALSE; - uint64_t ashift = 0; int err; /* @@ -382,31 +381,6 @@ (uint64_t)wholedisk) == 0); /* - * Override defaults if custom properties are provided. - */ - if (props != NULL) { - const char *value = NULL; - - if (nvlist_lookup_string(props, - zpool_prop_to_name(ZPOOL_PROP_ASHIFT), &value) == 0) { - if (zfs_nicestrtonum(NULL, value, &ashift) != 0) { - (void) fprintf(stderr, - gettext("ashift must be a number.\n")); - return (NULL); - } - if (ashift != 0 && - (ashift < ASHIFT_MIN || ashift > ASHIFT_MAX)) { - (void) fprintf(stderr, - gettext("invalid 'ashift=%" PRIu64 "' " - "property: only values between %" PRId32 " " - "and %" PRId32 " are allowed.\n"), - ashift, ASHIFT_MIN, ASHIFT_MAX); - return (NULL); - } - } - } - - /* * If the device is known to incorrectly report its physical sector * size explicitly provide the known correct value. */ @@ -610,22 +584,28 @@ ZPOOL_CONFIG_PATH, &path) == 0); /* + * Skip active spares they should never cause + * the pool to be evaluated as inconsistent. + */ + if (is_spare(NULL, path)) + continue; + + /* * If we have a raidz/mirror that combines disks - * with files, report it as an error. + * with files, only report it as an error when + * fatal is set to ensure all the replication + * checks aren't skipped in check_replication(). */ - if (!dontreport && type != NULL && + if (fatal && !dontreport && type != NULL && strcmp(type, childtype) != 0) { if (ret != NULL) free(ret); ret = NULL; - if (fatal) - vdev_error(gettext( - "mismatched replication " - "level: %s contains both " - "files and devices\n"), - rep.zprl_type); - else - return (NULL); + vdev_error(gettext( + "mismatched replication " + "level: %s contains both " + "files and devices\n"), + rep.zprl_type); dontreport = B_TRUE; } @@ -1496,6 +1476,29 @@ const char *type, *fulltype; boolean_t is_log, is_special, is_dedup, is_spare; boolean_t seen_logs; + uint64_t ashift = 0; + + if (props != NULL) { + const char *value = NULL; + + if (nvlist_lookup_string(props, + zpool_prop_to_name(ZPOOL_PROP_ASHIFT), &value) == 0) { + if (zfs_nicestrtonum(NULL, value, &ashift) != 0) { + (void) fprintf(stderr, + gettext("ashift must be a number.\n")); + return (NULL); + } + if (ashift != 0 && + (ashift < ASHIFT_MIN || ashift > ASHIFT_MAX)) { + (void) fprintf(stderr, + gettext("invalid 'ashift=%" PRIu64 "' " + "property: only values between %" PRId32 " " + "and %" PRId32 " are allowed.\n"), + ashift, ASHIFT_MIN, ASHIFT_MAX); + return (NULL); + } + } + } top = NULL; toplevels = 0; @@ -1602,9 +1605,9 @@ children * sizeof (nvlist_t *)); if (child == NULL) zpool_no_memory(); - if ((nv = make_leaf_vdev(props, argv[c], + if ((nv = make_leaf_vdev(argv[c], !(is_log || is_special || is_dedup || - is_spare))) == NULL) { + is_spare), ashift)) == NULL) { for (c = 0; c < children - 1; c++) nvlist_free(child[c]); free(child); @@ -1668,6 +1671,10 @@ ZPOOL_CONFIG_ALLOCATION_BIAS, VDEV_ALLOC_BIAS_DEDUP) == 0); } + if (ashift > 0) { + fnvlist_add_uint64(nv, + ZPOOL_CONFIG_ASHIFT, ashift); + } if (strcmp(type, VDEV_TYPE_RAIDZ) == 0) { verify(nvlist_add_uint64(nv, ZPOOL_CONFIG_NPARITY, @@ -1695,8 +1702,9 @@ * We have a device. Pass off to make_leaf_vdev() to * construct the appropriate nvlist describing the vdev. */ - if ((nv = make_leaf_vdev(props, argv[0], !(is_log || - is_special || is_dedup || is_spare))) == NULL) + if ((nv = make_leaf_vdev(argv[0], !(is_log || + is_special || is_dedup || is_spare), + ashift)) == NULL) goto spec_out; verify(nvlist_add_uint64(nv, diff -Nru zfs-linux-2.3.2/cmd/zpool_influxdb/Makefile.am zfs-linux-2.3.9/cmd/zpool_influxdb/Makefile.am --- zfs-linux-2.3.2/cmd/zpool_influxdb/Makefile.am 2025-05-01 18:23:23.719214543 +0000 +++ zfs-linux-2.3.9/cmd/zpool_influxdb/Makefile.am 2026-08-21 20:57:12.289006021 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 zfsexec_PROGRAMS += zpool_influxdb CPPCHECKTARGETS += zpool_influxdb diff -Nru zfs-linux-2.3.2/cmd/zstream/Makefile.am zfs-linux-2.3.9/cmd/zstream/Makefile.am --- zfs-linux-2.3.2/cmd/zstream/Makefile.am 2025-05-01 18:23:23.720214557 +0000 +++ zfs-linux-2.3.9/cmd/zstream/Makefile.am 2026-08-21 20:57:12.290237349 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 zstream_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) sbin_PROGRAMS += zstream diff -Nru zfs-linux-2.3.2/cmd/ztest.c zfs-linux-2.3.9/cmd/ztest.c --- zfs-linux-2.3.2/cmd/ztest.c 2025-05-01 18:23:23.721214570 +0000 +++ zfs-linux-2.3.9/cmd/ztest.c 2026-08-21 20:57:12.291005993 +0000 @@ -3881,7 +3881,7 @@ * If newvd is too small, it should fail with EOVERFLOW. * * If newvd is a distributed spare and it's being attached to a - * dRAID which is not its parent it should fail with EINVAL. + * dRAID which is not its parent it should fail with ENOTSUP. */ if (pvd->vdev_ops != &vdev_mirror_ops && pvd->vdev_ops != &vdev_root_ops && (!replacing || @@ -3900,7 +3900,7 @@ else if (ashift > oldvd->vdev_top->vdev_ashift) expected_error = EDOM; else if (newvd_is_dspare && pvd != vdev_draid_spare_get_parent(newvd)) - expected_error = EINVAL; + expected_error = ENOTSUP; else expected_error = 0; @@ -7812,6 +7812,9 @@ ztest_dataset_name(name, ztest_opts.zo_pool, d); + if (ztest_opts.zo_verbose >= 6) + (void) printf("Opening %s\n", name); + (void) pthread_rwlock_rdlock(&ztest_name_lock); error = ztest_dataset_create(name); @@ -8307,41 +8310,44 @@ ztest_generic_run(ztest_shared_t *zs, spa_t *spa) { kthread_t **run_threads; - int t; + int i, ndatasets; run_threads = umem_zalloc(ztest_opts.zo_threads * sizeof (kthread_t *), UMEM_NOFAIL); /* - * Kick off all the tests that run in parallel. + * Actual number of datasets to be used. */ - for (t = 0; t < ztest_opts.zo_threads; t++) { - if (t < ztest_opts.zo_datasets && ztest_dataset_open(t) != 0) { - umem_free(run_threads, ztest_opts.zo_threads * - sizeof (kthread_t *)); - return; - } + ndatasets = MIN(ztest_opts.zo_datasets, ztest_opts.zo_threads); - run_threads[t] = thread_create(NULL, 0, ztest_thread, - (void *)(uintptr_t)t, 0, NULL, TS_RUN | TS_JOINABLE, + /* + * Prepare the datasets first. + */ + for (i = 0; i < ndatasets; i++) + VERIFY0(ztest_dataset_open(i)); + + /* + * Kick off all the tests that run in parallel. + */ + for (i = 0; i < ztest_opts.zo_threads; i++) { + run_threads[i] = thread_create(NULL, 0, ztest_thread, + (void *)(uintptr_t)i, 0, NULL, TS_RUN | TS_JOINABLE, defclsyspri); } /* * Wait for all of the tests to complete. */ - for (t = 0; t < ztest_opts.zo_threads; t++) - VERIFY0(thread_join(run_threads[t])); + for (i = 0; i < ztest_opts.zo_threads; i++) + VERIFY0(thread_join(run_threads[i])); /* * Close all datasets. This must be done after all the threads * are joined so we can be sure none of the datasets are in-use * by any of the threads. */ - for (t = 0; t < ztest_opts.zo_threads; t++) { - if (t < ztest_opts.zo_datasets) - ztest_dataset_close(t); - } + for (i = 0; i < ndatasets; i++) + ztest_dataset_close(i); txg_wait_synced(spa_get_dsl(spa), 0); @@ -8464,6 +8470,7 @@ int d = ztest_random(ztest_opts.zo_datasets); ztest_dataset_destroy(d); + txg_wait_synced(spa_get_dsl(spa), 0); } zs->zs_enospc_count = 0; diff -Nru zfs-linux-2.3.2/config/CppCheck.am zfs-linux-2.3.9/config/CppCheck.am --- zfs-linux-2.3.2/config/CppCheck.am 2025-05-01 18:23:23.721214570 +0000 +++ zfs-linux-2.3.9/config/CppCheck.am 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 # # cppcheck for userspace – nodist_*_SOURCES are kernel code and cppcheck goes crazy on them. # diff -Nru zfs-linux-2.3.2/config/Rules.am zfs-linux-2.3.9/config/Rules.am --- zfs-linux-2.3.2/config/Rules.am 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/Rules.am 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 # # Default build rules for all user space components, every Makefile.am # should include these rules and override or extend them as needed. @@ -10,8 +11,7 @@ -I$(top_srcdir)/include \ -I$(top_srcdir)/module/icp/include \ -I$(top_srcdir)/lib/libspl/include \ - -I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@ \ - -I$(top_srcdir)/lib/libzpool/include + -I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@ AM_LIBTOOLFLAGS = --silent diff -Nru zfs-linux-2.3.2/config/Shellcheck.am zfs-linux-2.3.9/config/Shellcheck.am --- zfs-linux-2.3.2/config/Shellcheck.am 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/Shellcheck.am 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 # Global ShellCheck exclusions: # # ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090] diff -Nru zfs-linux-2.3.2/config/Substfiles.am zfs-linux-2.3.9/config/Substfiles.am --- zfs-linux-2.3.2/config/Substfiles.am 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/Substfiles.am 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 subst_sed_cmd = \ -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ diff -Nru zfs-linux-2.3.2/config/always-arch.m4 zfs-linux-2.3.9/config/always-arch.m4 --- zfs-linux-2.3.2/config/always-arch.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-arch.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Set the target cpu architecture. This allows the dnl # following syntax to be used in a Makefile.am. diff -Nru zfs-linux-2.3.2/config/always-compiler-options.m4 zfs-linux-2.3.9/config/always-compiler-options.m4 --- zfs-linux-2.3.2/config/always-compiler-options.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-compiler-options.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Enabled -fsanitize=address if supported by $CC. dnl # diff -Nru zfs-linux-2.3.2/config/always-cppcheck.m4 zfs-linux-2.3.9/config/always-cppcheck.m4 --- zfs-linux-2.3.2/config/always-cppcheck.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-cppcheck.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check if cppcheck is available. dnl # diff -Nru zfs-linux-2.3.2/config/always-parallel.m4 zfs-linux-2.3.9/config/always-parallel.m4 --- zfs-linux-2.3.2/config/always-parallel.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-parallel.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check if GNU parallel is available. dnl # diff -Nru zfs-linux-2.3.2/config/always-python.m4 zfs-linux-2.3.9/config/always-python.m4 --- zfs-linux-2.3.2/config/always-python.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-python.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # The majority of the python scripts are written to be compatible dnl # with Python 3.6. This option is intended to diff -Nru zfs-linux-2.3.2/config/always-pyzfs.m4 zfs-linux-2.3.9/config/always-pyzfs.m4 --- zfs-linux-2.3.2/config/always-pyzfs.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-pyzfs.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # ZFS_AC_PYTHON_MODULE(module_name, [action-if-true], [action-if-false]) dnl # diff -Nru zfs-linux-2.3.2/config/always-sed.m4 zfs-linux-2.3.9/config/always-sed.m4 --- zfs-linux-2.3.2/config/always-sed.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-sed.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Set the flags used for sed in-place edits. dnl # diff -Nru zfs-linux-2.3.2/config/always-shellcheck.m4 zfs-linux-2.3.9/config/always-shellcheck.m4 --- zfs-linux-2.3.2/config/always-shellcheck.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-shellcheck.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check if shellcheck and/or checkbashisms are available. dnl # diff -Nru zfs-linux-2.3.2/config/always-system.m4 zfs-linux-2.3.9/config/always-system.m4 --- zfs-linux-2.3.2/config/always-system.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/always-system.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Set the target system dnl # diff -Nru zfs-linux-2.3.2/config/ax_compare_version.m4 zfs-linux-2.3.9/config/ax_compare_version.m4 --- zfs-linux-2.3.2/config/ax_compare_version.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/ax_compare_version.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFAP # =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_compare_version.html # =========================================================================== diff -Nru zfs-linux-2.3.2/config/ax_count_cpus.m4 zfs-linux-2.3.9/config/ax_count_cpus.m4 --- zfs-linux-2.3.2/config/ax_count_cpus.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/ax_count_cpus.m4 2026-08-21 20:57:12.291922262 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFAP # =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html # =========================================================================== diff -Nru zfs-linux-2.3.2/config/ax_python_devel.m4 zfs-linux-2.3.9/config/ax_python_devel.m4 --- zfs-linux-2.3.2/config/ax_python_devel.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/ax_python_devel.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-macro # =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_python_devel.html # =========================================================================== @@ -72,7 +73,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 36 +#serial 37 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ @@ -316,7 +317,7 @@ PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version" fi - if test -z "PYTHON_LIBS"; then + if test -z "$PYTHON_LIBS"; then AC_MSG_WARN([ Cannot determine location of your Python DSO. Please check it was installed with dynamic libraries enabled, or try setting PYTHON_LIBS by hand. diff -Nru zfs-linux-2.3.2/config/ax_restore_flags.m4 zfs-linux-2.3.9/config/ax_restore_flags.m4 --- zfs-linux-2.3.2/config/ax_restore_flags.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/ax_restore_flags.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFAP # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_restore_flags.html # =========================================================================== diff -Nru zfs-linux-2.3.2/config/ax_save_flags.m4 zfs-linux-2.3.9/config/ax_save_flags.m4 --- zfs-linux-2.3.2/config/ax_save_flags.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/ax_save_flags.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFAP # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_save_flags.html # =========================================================================== diff -Nru zfs-linux-2.3.2/config/compile zfs-linux-2.3.9/config/compile --- zfs-linux-2.3.2/config/compile 2025-05-01 18:45:10.277831854 +0000 +++ zfs-linux-2.3.9/config/compile 2026-08-21 21:15:39.467633590 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru zfs-linux-2.3.2/config/config.guess zfs-linux-2.3.9/config/config.guess --- zfs-linux-2.3.2/config/config.guess 2025-05-01 18:45:10.281831931 +0000 +++ zfs-linux-2.3.9/config/config.guess 2026-08-21 21:15:39.473633518 +0000 @@ -1,14 +1,12 @@ -#!/usr/bin/sh +#! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2023 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -# shellcheck disable=SC2006,SC2268 # see below for rationale - -timestamp='2023-06-23' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -29,25 +27,17 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . -# The "shellcheck disable" line above the timestamp inhibits complaints -# about features and limitations of the classic Bourne shell that were -# superseded or lifted in POSIX. However, this script identifies a wide -# variety of pre-POSIX systems that do not have POSIX shells at all, and -# even some reasonably current systems (Solaris 10 as case-in-point) still -# have a pre-POSIX /bin/sh. - - me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system '$me' is run on. +Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +50,13 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try '$me --help' for more information." +Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -94,28 +84,24 @@ exit 1 fi -# Just in case it came from the environment. -GUESS= - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still -# use 'HOST_CC' if defined, but it is deprecated. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 set_cc_for_build() { - # prevent multiple calls if $tmp is already set - test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039,SC3028 + # shellcheck disable=SC2039 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -125,7 +111,7 @@ ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=$driver + CC_FOR_BUILD="$driver" break fi done @@ -146,12 +132,14 @@ UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case $UNAME_SYSTEM in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - LIBC=unknown + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu set_cc_for_build cat <<-EOF > "$dummy.c" @@ -160,37 +148,24 @@ LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #elif defined(__GLIBC__) - LIBC=gnu #else - #include - /* First heuristic to detect musl libc. */ - #ifdef __DEFINED_va_list - LIBC=musl - #endif + LIBC=gnu #endif EOF - cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` - eval "$cc_set_libc" - - # Second heuristic to detect musl libc. - if [ "$LIBC" = unknown ] && - command -v ldd >/dev/null && - ldd --version 2>&1 | grep -q ^musl; then - LIBC=musl - fi + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - if [ "$LIBC" = unknown ]; then - LIBC=gnu + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. -case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -202,12 +177,12 @@ # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case $UNAME_MACHINE_ARCH in - aarch64eb) machine=aarch64_be-unknown ;; + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -216,13 +191,13 @@ earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + machine="${arch}${endian}"-unknown ;; - *) machine=$UNAME_MACHINE_ARCH-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case $UNAME_MACHINE_ARCH in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; @@ -243,7 +218,7 @@ ;; esac # Determine ABI tags. - case $UNAME_MACHINE_ARCH in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -254,7 +229,7 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case $UNAME_VERSION in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; @@ -265,57 +240,45 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - GUESS=$machine-${os}${release}${abi-} - ;; + echo "$machine-${os}${release}${abi-}" + exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE - ;; - *:SecBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; *:ekkoBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; *:SolidBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE - ;; - *:OS108:*:*) - GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) - GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE - ;; + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; *:MirBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; *:Sortix:*:*) - GUESS=$UNAME_MACHINE-unknown-sortix - ;; - *:Twizzler:*:*) - GUESS=$UNAME_MACHINE-unknown-twizzler - ;; + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; *:Redox:*:*) - GUESS=$UNAME_MACHINE-unknown-redox - ;; + echo "$UNAME_MACHINE"-unknown-redox + exit ;; mips:OSF1:*.*) - GUESS=mips-dec-osf1 - ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -329,7 +292,7 @@ # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case $ALPHA_CPU_TYPE in + case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -366,121 +329,112 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - GUESS=$UNAME_MACHINE-dec-osf$OSF_REL - ;; + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) - GUESS=m68k-unknown-sysv4 - ;; + echo m68k-unknown-sysv4 + exit ;; *:[Aa]miga[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-amigaos - ;; + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; *:[Mm]orph[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-morphos - ;; + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; *:OS/390:*:*) - GUESS=i370-ibm-openedition - ;; + echo i370-ibm-openedition + exit ;; *:z/VM:*:*) - GUESS=s390-ibm-zvmoe - ;; + echo s390-ibm-zvmoe + exit ;; *:OS400:*:*) - GUESS=powerpc-ibm-os400 - ;; + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - GUESS=arm-acorn-riscix$UNAME_RELEASE - ;; + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - GUESS=arm-unknown-riscos - ;; + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - GUESS=hppa1.1-hitachi-hiuxmpp - ;; + echo hppa1.1-hitachi-hiuxmpp + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - case `(/bin/universe) 2>/dev/null` in - att) GUESS=pyramid-pyramid-sysv3 ;; - *) GUESS=pyramid-pyramid-bsd ;; - esac - ;; + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; NILE*:*:*:dcosx) - GUESS=pyramid-pyramid-svr4 - ;; + echo pyramid-pyramid-svr4 + exit ;; DRS?6000:unix:4.0:6*) - GUESS=sparc-icl-nx6 - ;; + echo sparc-icl-nx6 + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) GUESS=sparc-icl-nx7 ;; - esac - ;; + sparc) echo sparc-icl-nx7; exit ;; + esac ;; s390x:SunOS:*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL - ;; + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; sun4H:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-hal-solaris2$SUN_REL - ;; + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris2$SUN_REL - ;; + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - GUESS=i386-pc-auroraux$UNAME_RELEASE - ;; + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=$SUN_ARCH-pc-solaris2$SUN_REL - ;; + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=sparc-sun-solaris3$SUN_REL - ;; + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; sun4*:SunOS:*:*) - case `/usr/bin/arch -k` in + case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like '4.1.3-JL'. - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` - GUESS=sparc-sun-sunos$SUN_REL - ;; + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; sun3*:SunOS:*:*) - GUESS=m68k-sun-sunos$UNAME_RELEASE - ;; + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case `/bin/arch` in + case "`/bin/arch`" in sun3) - GUESS=m68k-sun-sunos$UNAME_RELEASE + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - GUESS=sparc-sun-sunos$UNAME_RELEASE + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac - ;; + exit ;; aushp:SunOS:*:*) - GUESS=sparc-auspex-sunos$UNAME_RELEASE - ;; + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -490,41 +444,41 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - GUESS=m68k-atari-mint$UNAME_RELEASE - ;; + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - GUESS=m68k-milan-mint$UNAME_RELEASE - ;; + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - GUESS=m68k-hades-mint$UNAME_RELEASE - ;; + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - GUESS=m68k-unknown-mint$UNAME_RELEASE - ;; + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; m68k:machten:*:*) - GUESS=m68k-apple-machten$UNAME_RELEASE - ;; + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; powerpc:machten:*:*) - GUESS=powerpc-apple-machten$UNAME_RELEASE - ;; + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; RISC*:Mach:*:*) - GUESS=mips-dec-mach_bsd4.3 - ;; + echo mips-dec-mach_bsd4.3 + exit ;; RISC*:ULTRIX:*:*) - GUESS=mips-dec-ultrix$UNAME_RELEASE - ;; + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; VAX*:ULTRIX*:*:*) - GUESS=vax-dec-ultrix$UNAME_RELEASE - ;; + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - GUESS=clipper-intergraph-clix$UNAME_RELEASE - ;; + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -552,76 +506,75 @@ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - GUESS=mips-mips-riscos$UNAME_RELEASE - ;; + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; Motorola:PowerMAX_OS:*:*) - GUESS=powerpc-motorola-powermax - ;; + echo powerpc-motorola-powermax + exit ;; Motorola:*:4.3:PL8-*) - GUESS=powerpc-harris-powermax - ;; + echo powerpc-harris-powermax + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - GUESS=powerpc-harris-powermax - ;; + echo powerpc-harris-powermax + exit ;; Night_Hawk:Power_UNIX:*:*) - GUESS=powerpc-harris-powerunix - ;; + echo powerpc-harris-powerunix + exit ;; m88k:CX/UX:7*:*) - GUESS=m88k-harris-cxux7 - ;; + echo m88k-harris-cxux7 + exit ;; m88k:*:4*:R4*) - GUESS=m88k-motorola-sysv4 - ;; + echo m88k-motorola-sysv4 + exit ;; m88k:*:3*:R3*) - GUESS=m88k-motorola-sysv3 - ;; + echo m88k-motorola-sysv3 + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ - test "$TARGET_BINARY_INTERFACE"x = x + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - GUESS=m88k-dg-dgux$UNAME_RELEASE + echo m88k-dg-dgux"$UNAME_RELEASE" else - GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - GUESS=i586-dg-dgux$UNAME_RELEASE + echo i586-dg-dgux"$UNAME_RELEASE" fi - ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - GUESS=m88k-dolphin-sysv3 - ;; + echo m88k-dolphin-sysv3 + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - GUESS=m88k-motorola-sysv3 - ;; + echo m88k-motorola-sysv3 + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - GUESS=m88k-tektronix-sysv3 - ;; + echo m88k-tektronix-sysv3 + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - GUESS=m68k-tektronix-bsd - ;; + echo m68k-tektronix-bsd + exit ;; *:IRIX*:*:*) - IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` - GUESS=mips-sgi-irix$IRIX_REL - ;; + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id - ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - GUESS=i386-ibm-aix - ;; + echo i386-ibm-aix + exit ;; ia64:AIX:*:*) - if test -x /usr/bin/oslevel ; then + if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV - ;; + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -638,16 +591,16 @@ EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - GUESS=$SYSTEM_NAME + echo "$SYSTEM_NAME" else - GUESS=rs6000-ibm-aix3.2.5 + echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - GUESS=rs6000-ibm-aix3.2.4 + echo rs6000-ibm-aix3.2.4 else - GUESS=rs6000-ibm-aix3.2 + echo rs6000-ibm-aix3.2 fi - ;; + exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -655,56 +608,56 @@ else IBM_ARCH=powerpc fi - if test -x /usr/bin/lslpp ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - GUESS=$IBM_ARCH-ibm-aix$IBM_REV - ;; + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; *:AIX:*:*) - GUESS=rs6000-ibm-aix - ;; + echo rs6000-ibm-aix + exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - GUESS=romp-ibm-bsd4.4 - ;; + echo romp-ibm-bsd4.4 + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to - ;; # report: romp-ibm BSD 4.3 + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - GUESS=rs6000-bull-bosx - ;; + echo rs6000-bull-bosx + exit ;; DPX/2?00:B.O.S.:*:*) - GUESS=m68k-bull-sysv3 - ;; + echo m68k-bull-sysv3 + exit ;; 9000/[34]??:4.3bsd:1.*:*) - GUESS=m68k-hp-bsd - ;; + echo m68k-hp-bsd + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - GUESS=m68k-hp-bsd4.4 - ;; + echo m68k-hp-bsd4.4 + exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - case $UNAME_MACHINE in + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if test -x /usr/bin/getconf; then + if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case $sc_cpu_version in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case $sc_kernel_bits in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if test "$HP_ARCH" = ""; then + if [ "$HP_ARCH" = "" ]; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -743,7 +696,7 @@ test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if test "$HP_ARCH" = hppa2.0w + if [ "$HP_ARCH" = hppa2.0w ] then set_cc_for_build @@ -764,12 +717,12 @@ HP_ARCH=hppa64 fi fi - GUESS=$HP_ARCH-hp-hpux$HPUX_REV - ;; + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` - GUESS=ia64-hp-hpux$HPUX_REV - ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -799,36 +752,36 @@ EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - GUESS=unknown-hitachi-hiuxwe2 - ;; + echo unknown-hitachi-hiuxwe2 + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - GUESS=hppa1.1-hp-bsd - ;; + echo hppa1.1-hp-bsd + exit ;; 9000/8??:4.3bsd:*:*) - GUESS=hppa1.0-hp-bsd - ;; + echo hppa1.0-hp-bsd + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - GUESS=hppa1.0-hp-mpeix - ;; + echo hppa1.0-hp-mpeix + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - GUESS=hppa1.1-hp-osf - ;; + echo hppa1.1-hp-osf + exit ;; hp8??:OSF1:*:*) - GUESS=hppa1.0-hp-osf - ;; + echo hppa1.0-hp-osf + exit ;; i*86:OSF1:*:*) - if test -x /usr/sbin/sysversion ; then - GUESS=$UNAME_MACHINE-unknown-osf1mk + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk else - GUESS=$UNAME_MACHINE-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi - ;; + exit ;; parisc*:Lites*:*:*) - GUESS=hppa1.1-hp-lites - ;; + echo hppa1.1-hp-lites + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - GUESS=c1-convex-bsd - ;; + echo c1-convex-bsd + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -836,18 +789,17 @@ fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - GUESS=c34-convex-bsd - ;; + echo c34-convex-bsd + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - GUESS=c38-convex-bsd - ;; + echo c38-convex-bsd + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - GUESS=c4-convex-bsd - ;; + echo c4-convex-bsd + exit ;; CRAY*Y-MP:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=ymp-cray-unicos$CRAY_REL - ;; + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -855,135 +807,114 @@ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=t90-cray-unicos$CRAY_REL - ;; + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*T3E:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=alphaev5-cray-unicosmk$CRAY_REL - ;; + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; CRAY*SV1:*:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=sv1-cray-unicos$CRAY_REL - ;; + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; *:UNICOS/mp:*:*) - CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` - GUESS=craynv-cray-unicosmp$CRAY_REL - ;; + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} - ;; + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; sparc*:BSD/OS:*:*) - GUESS=sparc-unknown-bsdi$UNAME_RELEASE - ;; + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; *:BSD/OS:*:*) - GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi else - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf fi - ;; + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case $UNAME_PROCESSOR in + case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL - ;; + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; i*:CYGWIN*:*) - GUESS=$UNAME_MACHINE-pc-cygwin - ;; + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; *:MINGW64*:*) - GUESS=$UNAME_MACHINE-pc-mingw64 - ;; + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; *:MINGW*:*) - GUESS=$UNAME_MACHINE-pc-mingw32 - ;; + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; *:MSYS*:*) - GUESS=$UNAME_MACHINE-pc-msys - ;; + echo "$UNAME_MACHINE"-pc-msys + exit ;; i*:PW*:*) - GUESS=$UNAME_MACHINE-pc-pw32 - ;; - *:SerenityOS:*:*) - GUESS=$UNAME_MACHINE-pc-serenity - ;; + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; *:Interix*:*) - case $UNAME_MACHINE in + case "$UNAME_MACHINE" in x86) - GUESS=i586-pc-interix$UNAME_RELEASE - ;; + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; authenticamd | genuineintel | EM64T) - GUESS=x86_64-unknown-interix$UNAME_RELEASE - ;; + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; IA64) - GUESS=ia64-unknown-interix$UNAME_RELEASE - ;; + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; esac ;; i*:UWIN*:*) - GUESS=$UNAME_MACHINE-pc-uwin - ;; + echo "$UNAME_MACHINE"-pc-uwin + exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - GUESS=x86_64-pc-cygwin - ;; + echo x86_64-unknown-cygwin + exit ;; prep*:SunOS:5.*:*) - SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=powerpcle-unknown-solaris2$SUN_REL - ;; + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; *:GNU:*:*) # the GNU system - GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` - GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL - ;; + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` - GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC - ;; - x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-pc-managarm-mlibc" - ;; - *:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" - ;; + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; *:Minix:*:*) - GUESS=$UNAME_MACHINE-unknown-minix - ;; + echo "$UNAME_MACHINE"-unknown-minix + exit ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -994,236 +925,183 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi - ;; + exit ;; avr32*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; cris:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; crisv32:Linux:*:*) - GUESS=$UNAME_MACHINE-axis-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; e2k:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; frv:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; hexagon:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; i*86:Linux:*:*) - GUESS=$UNAME_MACHINE-pc-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; ia64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; k1om:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; - loongarch32:Linux:*:* | loongarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m32r*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m68*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= + CPU=${UNAME_MACHINE} #else - MIPS_ENDIAN= + CPU= #endif #endif EOF - cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` - eval "$cc_set_vars" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; openrisc*:Linux:*:*) - GUESS=or1k-unknown-linux-$LIBC - ;; + echo or1k-unknown-linux-"$LIBC" + exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; padre:Linux:*:*) - GUESS=sparc-unknown-linux-$LIBC - ;; + echo sparc-unknown-linux-"$LIBC" + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - GUESS=hppa64-unknown-linux-$LIBC - ;; + echo hppa64-unknown-linux-"$LIBC" + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; - PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; - *) GUESS=hppa-unknown-linux-$LIBC ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac - ;; + exit ;; ppc64:Linux:*:*) - GUESS=powerpc64-unknown-linux-$LIBC - ;; + echo powerpc64-unknown-linux-"$LIBC" + exit ;; ppc:Linux:*:*) - GUESS=powerpc-unknown-linux-$LIBC - ;; + echo powerpc-unknown-linux-"$LIBC" + exit ;; ppc64le:Linux:*:*) - GUESS=powerpc64le-unknown-linux-$LIBC - ;; + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; ppcle:Linux:*:*) - GUESS=powerpcle-unknown-linux-$LIBC - ;; - riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; s390:Linux:*:* | s390x:Linux:*:*) - GUESS=$UNAME_MACHINE-ibm-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; sh64*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; sh*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; tile*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; vax:Linux:*:*) - GUESS=$UNAME_MACHINE-dec-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; x86_64:Linux:*:*) - set_cc_for_build - CPU=$UNAME_MACHINE - LIBCABI=$LIBC - if test "$CC_FOR_BUILD" != no_compiler_found; then - ABI=64 - sed 's/^ //' << EOF > "$dummy.c" - #ifdef __i386__ - ABI=x86 - #else - #ifdef __ILP32__ - ABI=x32 - #endif - #endif -EOF - cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` - eval "$cc_set_abi" - case $ABI in - x86) CPU=i686 ;; - x32) LIBCABI=${LIBC}x32 ;; - esac - fi - GUESS=$CPU-pc-linux-$LIBCABI - ;; + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; xtensa*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC - ;; + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - GUESS=i386-sequent-sysv4 - ;; + echo i386-sequent-sysv4 + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION - ;; + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; i*86:OS/2:*:*) - # If we were able to find 'uname', then EMX Unix compatibility + # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - GUESS=$UNAME_MACHINE-pc-os2-emx - ;; + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; i*86:XTS-300:*:STOP) - GUESS=$UNAME_MACHINE-unknown-stop - ;; + echo "$UNAME_MACHINE"-unknown-stop + exit ;; i*86:atheos:*:*) - GUESS=$UNAME_MACHINE-unknown-atheos - ;; + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; i*86:syllable:*:*) - GUESS=$UNAME_MACHINE-pc-syllable - ;; + echo "$UNAME_MACHINE"-pc-syllable + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - GUESS=i386-unknown-lynxos$UNAME_RELEASE - ;; + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; i*86:*DOS:*:*) - GUESS=$UNAME_MACHINE-pc-msdosdjgpp - ;; + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi - ;; + exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1231,12 +1109,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - ;; + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1246,11 +1124,11 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - GUESS=$UNAME_MACHINE-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi - ;; + exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1258,31 +1136,31 @@ # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - GUESS=i586-pc-msdosdjgpp - ;; + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) - GUESS=i386-pc-mach3 - ;; + echo i386-pc-mach3 + exit ;; paragon:*:*:*) - GUESS=i860-intel-osf1 - ;; + echo i860-intel-osf1 + exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi - ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" - GUESS=m68010-convergent-sysv - ;; + echo m68010-convergent-sysv + exit ;; mc68k:UNIX:SYSTEM5:3.51m) - GUESS=m68k-convergent-sysv - ;; + echo m68k-convergent-sysv + exit ;; M680?0:D-NIX:5.3:*) - GUESS=m68k-diab-dnix - ;; + echo m68k-diab-dnix + exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1307,407 +1185,250 @@ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - GUESS=m68k-unknown-lynxos$UNAME_RELEASE - ;; + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; mc68030:UNIX_System_V:4.*:*) - GUESS=m68k-atari-sysv4 - ;; + echo m68k-atari-sysv4 + exit ;; TSUNAMI:LynxOS:2.*:*) - GUESS=sparc-unknown-lynxos$UNAME_RELEASE - ;; + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; rs6000:LynxOS:2.*:*) - GUESS=rs6000-unknown-lynxos$UNAME_RELEASE - ;; + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - GUESS=powerpc-unknown-lynxos$UNAME_RELEASE - ;; + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; SM[BE]S:UNIX_SV:*:*) - GUESS=mips-dde-sysv$UNAME_RELEASE - ;; + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; RM*:ReliantUNIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; + echo mips-sni-sysv4 + exit ;; RM*:SINIX-*:*:*) - GUESS=mips-sni-sysv4 - ;; + echo mips-sni-sysv4 + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - GUESS=$UNAME_MACHINE-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else - GUESS=ns32k-sni-sysv + echo ns32k-sni-sysv fi - ;; - PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - GUESS=i586-unisys-sysv4 - ;; + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - GUESS=hppa1.1-stratus-sysv4 - ;; + echo hppa1.1-stratus-sysv4 + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - GUESS=i860-stratus-sysv4 - ;; + echo i860-stratus-sysv4 + exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - GUESS=$UNAME_MACHINE-stratus-vos - ;; + echo "$UNAME_MACHINE"-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. - GUESS=hppa1.1-stratus-vos - ;; + echo hppa1.1-stratus-vos + exit ;; mc68*:A/UX:*:*) - GUESS=m68k-apple-aux$UNAME_RELEASE - ;; + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; news*:NEWS-OS:6*:*) - GUESS=mips-sony-newsos6 - ;; + echo mips-sony-newsos6 + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if test -d /usr/nec; then - GUESS=mips-nec-sysv$UNAME_RELEASE + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" else - GUESS=mips-unknown-sysv$UNAME_RELEASE + echo mips-unknown-sysv"$UNAME_RELEASE" fi - ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - GUESS=powerpc-be-beos - ;; + echo powerpc-be-beos + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - GUESS=powerpc-apple-beos - ;; + echo powerpc-apple-beos + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - GUESS=i586-pc-beos - ;; + echo i586-pc-beos + exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - GUESS=i586-pc-haiku - ;; - ppc:Haiku:*:*) # Haiku running on Apple PowerPC - GUESS=powerpc-apple-haiku - ;; - *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) - GUESS=$UNAME_MACHINE-unknown-haiku - ;; + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) - GUESS=sx4-nec-superux$UNAME_RELEASE - ;; + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; SX-5:SUPER-UX:*:*) - GUESS=sx5-nec-superux$UNAME_RELEASE - ;; + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; SX-6:SUPER-UX:*:*) - GUESS=sx6-nec-superux$UNAME_RELEASE - ;; + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; SX-7:SUPER-UX:*:*) - GUESS=sx7-nec-superux$UNAME_RELEASE - ;; + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; SX-8:SUPER-UX:*:*) - GUESS=sx8-nec-superux$UNAME_RELEASE - ;; + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; SX-8R:SUPER-UX:*:*) - GUESS=sx8r-nec-superux$UNAME_RELEASE - ;; + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; SX-ACE:SUPER-UX:*:*) - GUESS=sxace-nec-superux$UNAME_RELEASE - ;; + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; Power*:Rhapsody:*:*) - GUESS=powerpc-apple-rhapsody$UNAME_RELEASE - ;; + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; *:Rhapsody:*:*) - GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE - ;; - arm64:Darwin:*:*) - GUESS=aarch64-apple-darwin$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc fi - if test "$CC_FOR_BUILD" != no_compiler_found; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi - GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE - ;; + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE - ;; + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; *:QNX:*:4*) - GUESS=i386-pc-qnx - ;; + echo i386-pc-qnx + exit ;; NEO-*:NONSTOP_KERNEL:*:*) - GUESS=neo-tandem-nsk$UNAME_RELEASE - ;; + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; NSE-*:NONSTOP_KERNEL:*:*) - GUESS=nse-tandem-nsk$UNAME_RELEASE - ;; + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; NSR-*:NONSTOP_KERNEL:*:*) - GUESS=nsr-tandem-nsk$UNAME_RELEASE - ;; + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; NSV-*:NONSTOP_KERNEL:*:*) - GUESS=nsv-tandem-nsk$UNAME_RELEASE - ;; + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; NSX-*:NONSTOP_KERNEL:*:*) - GUESS=nsx-tandem-nsk$UNAME_RELEASE - ;; + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; *:NonStop-UX:*:*) - GUESS=mips-compaq-nonstopux - ;; + echo mips-compaq-nonstopux + exit ;; BS2000:POSIX*:*:*) - GUESS=bs2000-siemens-sysv - ;; + echo bs2000-siemens-sysv + exit ;; DS/*:UNIX_System_V:*:*) - GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE - ;; + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "${cputype-}" = 386; then + # shellcheck disable=SC2154 + if test "$cputype" = 386; then UNAME_MACHINE=i386 - elif test "x${cputype-}" != x; then - UNAME_MACHINE=$cputype + else + UNAME_MACHINE="$cputype" fi - GUESS=$UNAME_MACHINE-unknown-plan9 - ;; + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; *:TOPS-10:*:*) - GUESS=pdp10-unknown-tops10 - ;; + echo pdp10-unknown-tops10 + exit ;; *:TENEX:*:*) - GUESS=pdp10-unknown-tenex - ;; + echo pdp10-unknown-tenex + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - GUESS=pdp10-dec-tops20 - ;; + echo pdp10-dec-tops20 + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - GUESS=pdp10-xkl-tops20 - ;; + echo pdp10-xkl-tops20 + exit ;; *:TOPS-20:*:*) - GUESS=pdp10-unknown-tops20 - ;; + echo pdp10-unknown-tops20 + exit ;; *:ITS:*:*) - GUESS=pdp10-unknown-its - ;; + echo pdp10-unknown-its + exit ;; SEI:*:*:SEIUX) - GUESS=mips-sei-seiux$UNAME_RELEASE - ;; + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; *:DragonFly:*:*) - DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL - ;; + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case $UNAME_MACHINE in - A*) GUESS=alpha-dec-vms ;; - I*) GUESS=ia64-dec-vms ;; - V*) GUESS=vax-dec-vms ;; + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) - GUESS=i386-pc-xenix - ;; + echo i386-pc-xenix + exit ;; i*86:skyos:*:*) - SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` - GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL - ;; + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; i*86:rdos:*:*) - GUESS=$UNAME_MACHINE-pc-rdos - ;; - i*86:Fiwix:*:*) - GUESS=$UNAME_MACHINE-pc-fiwix - ;; - *:AROS:*:*) - GUESS=$UNAME_MACHINE-unknown-aros - ;; + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; x86_64:VMkernel:*:*) - GUESS=$UNAME_MACHINE-unknown-esx - ;; + echo "$UNAME_MACHINE"-unknown-esx + exit ;; amd64:Isilon\ OneFS:*:*) - GUESS=x86_64-unknown-onefs - ;; - *:Unleashed:*:*) - GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE - ;; + echo x86_64-unknown-onefs + exit ;; esac -# Do we have a guess based on uname results? -if test "x$GUESS" != x; then - echo "$GUESS" - exit -fi - -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" < -#include -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include -#if defined(_SIZE_T_) || defined(SIGLOST) -#include -#endif -#endif -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - echo "$0: unable to guess system type" >&2 -case $UNAME_MACHINE:$UNAME_SYSTEM in +case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 + echo "$me: invalid option $1$help" exit 1 ;; *local*) @@ -120,51 +111,49 @@ esac # Split fields of configuration type -# shellcheck disable=SC2162 -saved_IFS=$IFS -IFS="-" read field1 field2 field3 field4 <&2 + echo Invalid configuration \`"$1"\': more than four components >&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 - basic_os=$field3-$field4 + os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-* | uclinux-uclibc* \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) + | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 - basic_os=$maybe_os + os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - basic_os=linux-android + os=linux-android ;; *) basic_machine=$field1-$field2 - basic_os=$field3 + os=$field3 ;; esac ;; *-*) - # A lone config we happen to match not fitting any pattern + # A lone config we happen to match not fitting any patern case $field1-$field2 in decstation-3100) basic_machine=mips-dec - basic_os= + os= ;; *-*) # Second component is usually, but not always the OS @@ -172,11 +161,7 @@ # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 - basic_os=$field2 - ;; - zephyr*) - basic_machine=$field1-unknown - basic_os=$field2 + os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ @@ -189,11 +174,11 @@ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 - basic_os= + os= ;; *) basic_machine=$field1 - basic_os=$field2 + os=$field2 ;; esac ;; @@ -205,451 +190,450 @@ case $field1 in 386bsd) basic_machine=i386-pc - basic_os=bsd + os=bsd ;; a29khif) basic_machine=a29k-amd - basic_os=udi + os=udi ;; adobe68k) basic_machine=m68010-adobe - basic_os=scout + os=scout ;; alliant) basic_machine=fx80-alliant - basic_os= + os= ;; altos | altos3068) basic_machine=m68k-altos - basic_os= + os= ;; am29k) basic_machine=a29k-none - basic_os=bsd + os=bsd ;; amdahl) basic_machine=580-amdahl - basic_os=sysv + os=sysv ;; amiga) basic_machine=m68k-unknown - basic_os= + os= ;; amigaos | amigados) basic_machine=m68k-unknown - basic_os=amigaos + os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown - basic_os=sysv4 + os=sysv4 ;; apollo68) basic_machine=m68k-apollo - basic_os=sysv + os=sysv ;; apollo68bsd) basic_machine=m68k-apollo - basic_os=bsd + os=bsd ;; aros) basic_machine=i386-pc - basic_os=aros + os=aros ;; aux) basic_machine=m68k-apple - basic_os=aux + os=aux ;; balance) basic_machine=ns32k-sequent - basic_os=dynix + os=dynix ;; blackfin) basic_machine=bfin-unknown - basic_os=linux + os=linux ;; cegcc) basic_machine=arm-unknown - basic_os=cegcc + os=cegcc ;; convex-c1) basic_machine=c1-convex - basic_os=bsd + os=bsd ;; convex-c2) basic_machine=c2-convex - basic_os=bsd + os=bsd ;; convex-c32) basic_machine=c32-convex - basic_os=bsd + os=bsd ;; convex-c34) basic_machine=c34-convex - basic_os=bsd + os=bsd ;; convex-c38) basic_machine=c38-convex - basic_os=bsd + os=bsd ;; cray) basic_machine=j90-cray - basic_os=unicos + os=unicos ;; crds | unos) basic_machine=m68k-crds - basic_os= + os= ;; da30) basic_machine=m68k-da30 - basic_os= + os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec - basic_os= + os= ;; delta88) basic_machine=m88k-motorola - basic_os=sysv3 + os=sysv3 ;; dicos) basic_machine=i686-pc - basic_os=dicos + os=dicos ;; djgpp) basic_machine=i586-pc - basic_os=msdosdjgpp + os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd - basic_os=ebmon + os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson - basic_os=ose + os=ose ;; gmicro) basic_machine=tron-gmicro - basic_os=sysv + os=sysv ;; go32) basic_machine=i386-pc - basic_os=go32 + os=go32 ;; h8300hms) basic_machine=h8300-hitachi - basic_os=hms + os=hms ;; h8300xray) basic_machine=h8300-hitachi - basic_os=xray + os=xray ;; h8500hms) basic_machine=h8500-hitachi - basic_os=hms + os=hms ;; harris) basic_machine=m88k-harris - basic_os=sysv3 + os=sysv3 ;; - hp300 | hp300hpux) + hp300) basic_machine=m68k-hp - basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp - basic_os=bsd + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux ;; hppaosf) basic_machine=hppa1.1-hp - basic_os=osf + os=osf ;; hppro) basic_machine=hppa1.1-hp - basic_os=proelf + os=proelf ;; i386mach) basic_machine=i386-mach - basic_os=mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta ;; isi68 | isi) basic_machine=m68k-isi - basic_os=sysv + os=sysv ;; m68knommu) basic_machine=m68k-unknown - basic_os=linux + os=linux ;; magnum | m3230) basic_machine=mips-mips - basic_os=sysv + os=sysv ;; merlin) basic_machine=ns32k-utek - basic_os=sysv + os=sysv ;; mingw64) basic_machine=x86_64-pc - basic_os=mingw64 + os=mingw64 ;; mingw32) basic_machine=i686-pc - basic_os=mingw32 + os=mingw32 ;; mingw32ce) basic_machine=arm-unknown - basic_os=mingw32ce + os=mingw32ce ;; monitor) basic_machine=m68k-rom68k - basic_os=coff + os=coff ;; morphos) basic_machine=powerpc-unknown - basic_os=morphos + os=morphos ;; moxiebox) basic_machine=moxie-unknown - basic_os=moxiebox + os=moxiebox ;; msdos) basic_machine=i386-pc - basic_os=msdos + os=msdos ;; msys) basic_machine=i686-pc - basic_os=msys + os=msys ;; mvs) basic_machine=i370-ibm - basic_os=mvs + os=mvs ;; nacl) basic_machine=le32-unknown - basic_os=nacl + os=nacl ;; ncr3000) basic_machine=i486-ncr - basic_os=sysv4 + os=sysv4 ;; netbsd386) basic_machine=i386-pc - basic_os=netbsd + os=netbsd ;; netwinder) basic_machine=armv4l-rebel - basic_os=linux + os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony - basic_os=newsos + os=newsos ;; news1000) basic_machine=m68030-sony - basic_os=newsos + os=newsos ;; necv70) basic_machine=v70-nec - basic_os=sysv + os=sysv ;; nh3000) basic_machine=m68k-harris - basic_os=cxux + os=cxux ;; nh[45]000) basic_machine=m88k-harris - basic_os=cxux + os=cxux ;; nindy960) basic_machine=i960-intel - basic_os=nindy + os=nindy ;; mon960) basic_machine=i960-intel - basic_os=mon960 + os=mon960 ;; nonstopux) basic_machine=mips-compaq - basic_os=nonstopux + os=nonstopux ;; os400) basic_machine=powerpc-ibm - basic_os=os400 + os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson - basic_os=ose + os=ose ;; os68k) basic_machine=m68k-none - basic_os=os68k + os=os68k ;; paragon) basic_machine=i860-intel - basic_os=osf + os=osf ;; parisc) basic_machine=hppa-unknown - basic_os=linux - ;; - psp) - basic_machine=mipsallegrexel-sony - basic_os=psp + os=linux ;; pw32) basic_machine=i586-unknown - basic_os=pw32 + os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc - basic_os=rdos + os=rdos ;; rdos32) basic_machine=i386-pc - basic_os=rdos + os=rdos ;; rom68k) basic_machine=m68k-rom68k - basic_os=coff + os=coff ;; sa29200) basic_machine=a29k-amd - basic_os=udi + os=udi ;; sei) basic_machine=mips-sei - basic_os=seiux + os=seiux ;; sequent) basic_machine=i386-sequent - basic_os= + os= ;; sps7) basic_machine=m68k-bull - basic_os=sysv2 + os=sysv2 ;; st2000) basic_machine=m68k-tandem - basic_os= + os= ;; stratus) basic_machine=i860-stratus - basic_os=sysv4 + os=sysv4 ;; sun2) basic_machine=m68000-sun - basic_os= + os= ;; sun2os3) basic_machine=m68000-sun - basic_os=sunos3 + os=sunos3 ;; sun2os4) basic_machine=m68000-sun - basic_os=sunos4 + os=sunos4 ;; sun3) basic_machine=m68k-sun - basic_os= + os= ;; sun3os3) basic_machine=m68k-sun - basic_os=sunos3 + os=sunos3 ;; sun3os4) basic_machine=m68k-sun - basic_os=sunos4 + os=sunos4 ;; sun4) basic_machine=sparc-sun - basic_os= + os= ;; sun4os3) basic_machine=sparc-sun - basic_os=sunos3 + os=sunos3 ;; sun4os4) basic_machine=sparc-sun - basic_os=sunos4 + os=sunos4 ;; sun4sol2) basic_machine=sparc-sun - basic_os=solaris2 + os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun - basic_os= + os= ;; sv1) basic_machine=sv1-cray - basic_os=unicos + os=unicos ;; symmetry) basic_machine=i386-sequent - basic_os=dynix + os=dynix ;; t3e) basic_machine=alphaev5-cray - basic_os=unicos + os=unicos ;; t90) basic_machine=t90-cray - basic_os=unicos + os=unicos ;; toad1) basic_machine=pdp10-xkl - basic_os=tops20 + os=tops20 ;; tpf) basic_machine=s390x-ibm - basic_os=tpf + os=tpf ;; udi29k) basic_machine=a29k-amd - basic_os=udi + os=udi ;; ultra3) basic_machine=a29k-nyu - basic_os=sym1 + os=sym1 ;; v810 | necv810) basic_machine=v810-nec - basic_os=none + os=none ;; vaxv) basic_machine=vax-dec - basic_os=sysv + os=sysv ;; vms) basic_machine=vax-dec - basic_os=vms - ;; - vsta) - basic_machine=i386-pc - basic_os=vsta + os=vms ;; vxworks960) basic_machine=i960-wrs - basic_os=vxworks + os=vxworks ;; vxworks68) basic_machine=m68k-wrs - basic_os=vxworks + os=vxworks ;; vxworks29k) basic_machine=a29k-wrs - basic_os=vxworks + os=vxworks ;; xbox) basic_machine=i686-pc - basic_os=mingw32 + os=mingw32 ;; ymp) basic_machine=ymp-cray - basic_os=unicos + os=unicos ;; *) basic_machine=$1 - basic_os= + os= ;; esac ;; @@ -701,17 +685,17 @@ bluegene*) cpu=powerpc vendor=ibm - basic_os=cnk + os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec - basic_os=tops10 + os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec - basic_os=tops20 + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) @@ -721,7 +705,7 @@ dpx2*) cpu=m68k vendor=bull - basic_os=sysv3 + os=sysv3 ;; encore | umax | mmax) cpu=ns32k @@ -730,7 +714,7 @@ elxsi) cpu=elxsi vendor=elxsi - basic_os=${basic_os:-bsd} + os=${os:-bsd} ;; fx2800) cpu=i860 @@ -743,7 +727,7 @@ h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi - basic_os=hiuxwe2 + os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 @@ -786,36 +770,36 @@ i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - basic_os=sysv32 + os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - basic_os=sysv4 + os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - basic_os=sysv + os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc - basic_os=solaris2 + os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray - basic_os=${basic_os:-unicos} + os=${os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi - case $basic_os in + case $os in irix*) ;; *) - basic_os=irix4 + os=irix4 ;; esac ;; @@ -826,26 +810,24 @@ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari - basic_os=mint + os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony - basic_os=newsos + os=newsos ;; next | m*-next) cpu=m68k vendor=next - case $basic_os in - openstep*) - ;; - nextstep*) + case $os in + nextstep* ) ;; ns2*) - basic_os=nextstep2 + os=nextstep2 ;; *) - basic_os=nextstep3 + os=nextstep3 ;; esac ;; @@ -856,12 +838,12 @@ op50n-* | op60c-*) cpu=hppa1.1 vendor=oki - basic_os=proelf + os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi - basic_os=hiuxwe2 + os=hiuxwe2 ;; pbd) cpu=sparc @@ -898,12 +880,12 @@ sde) cpu=mipsisa32 vendor=sde - basic_os=${basic_os:-elf} + os=${os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs - basic_os=vxworks + os=vxworks ;; tower | tower-32) cpu=m68k @@ -920,7 +902,7 @@ w89k-*) cpu=hppa1.1 vendor=winbond - basic_os=proelf + os=proelf ;; none) cpu=none @@ -936,14 +918,11 @@ ;; *-*) - # shellcheck disable=SC2162 - saved_IFS=$IFS - IFS="-" read cpu vendor <&2 + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 exit 1 ;; esac @@ -1306,53 +1270,8 @@ # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if [ x$os != x ] then - -# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just -# set os. -case $basic_os in - gnu/linux*) - kernel=linux - os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` - ;; - os2-emx) - kernel=os2 - os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` - ;; - nto-qnx*) - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` - ;; - *-*) - # shellcheck disable=SC2162 - saved_IFS=$IFS - IFS="-" read kernel os <&2 + exit 1 ;; esac - else # Here we handle the default operating systems that come with various machines. @@ -1531,7 +1525,6 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -kernel= case $cpu-$vendor in score-*) os=elf @@ -1543,8 +1536,7 @@ os=riscix1.2 ;; arm*-rebel) - kernel=linux - os=gnu + os=linux ;; arm*-semi) os=aout @@ -1710,193 +1702,84 @@ os=none ;; esac - fi -# Now, validate our (potentially fixed-up) OS. -case $os in - # Sometimes we do "kernel-libc", so those need to count as OSes. - musl* | newlib* | relibc* | uclibc*) - ;; - # Likewise for "kernel-abi" - eabi* | gnueabi*) - ;; - # VxWorks passes extra cpu info in the 4th filed. - simlinux | simwindows | spe) - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ - | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ - | mpw* | magic* | mmixware* | mon960* | lnews* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* | twizzler* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | mirbsd* | netbsd* | dicos* | openedition* | ose* \ - | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ - | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ - | udi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* | serenity* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | mint* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ - | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* | mlibc* ) - ;; - # This one is extra strict with allowed versions - sco3.2v2 | sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - none) - ;; - kernel* ) - # Restricted further below - ;; - *) - echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 - exit 1 - ;; -esac - -# As a final step for OS-related things, validate the OS-kernel combination -# (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) - ;; - uclinux-uclibc* ) - ;; - managarm-mlibc* | managarm-kernel* ) - ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) - # These are just libc implementations, not actual OSes, and thus - # require a kernel. - echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - -kernel* ) - echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 - exit 1 - ;; - *-kernel* ) - echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 - exit 1 - ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) - ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) - ;; - nto-qnx*) - ;; - os2-emx) - ;; - *-eabi* | *-gnueabi*) - ;; - -*) - # Blank kernel with real OS is always fine. - ;; - *-*) - echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 - exit 1 - ;; -esac - # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) - case $cpu-$os in - *-riscix*) + case $os in + riscix*) vendor=acorn ;; - *-sunos*) + sunos*) vendor=sun ;; - *-cnk* | *-aix*) + cnk*|-aix*) vendor=ibm ;; - *-beos*) + beos*) vendor=be ;; - *-hpux*) + hpux*) vendor=hp ;; - *-mpeix*) + mpeix*) vendor=hp ;; - *-hiux*) + hiux*) vendor=hitachi ;; - *-unos*) + unos*) vendor=crds ;; - *-dgux*) + dgux*) vendor=dg ;; - *-luna*) + luna*) vendor=omron ;; - *-genix*) + genix*) vendor=ns ;; - *-clix*) + clix*) vendor=intergraph ;; - *-mvs* | *-opened*) - vendor=ibm - ;; - *-os400*) + mvs* | opened*) vendor=ibm ;; - s390-* | s390x-*) + os400*) vendor=ibm ;; - *-ptx*) + ptx*) vendor=sequent ;; - *-tpf*) + tpf*) vendor=ibm ;; - *-vxsim* | *-vxworks* | *-windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - *-aux*) + aux*) vendor=apple ;; - *-hms*) + hms*) vendor=hitachi ;; - *-mpw* | *-macos*) + mpw* | macos*) vendor=apple ;; - *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - *-vos*) + vos*) vendor=stratus ;; esac ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor-$os" exit # Local variables: diff -Nru zfs-linux-2.3.2/config/deb.am zfs-linux-2.3.9/config/deb.am --- zfs-linux-2.3.2/config/deb.am 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/deb.am 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 PHONY += deb-kmod deb-dkms deb-utils deb deb-local native-deb-local \ native-deb-utils native-deb-kmod native-deb @@ -93,17 +94,17 @@ cp -r contrib/debian debian; chmod +x debian/rules; native-deb-utils: native-deb-local debian - while [ -f debian/deb-build.lock ]; do sleep 1; done; \ - echo "native-deb-utils" > debian/deb-build.lock; \ - cp contrib/debian/control debian/control; \ - $(DPKGBUILD) -b -rfakeroot -us -uc; \ - $(RM) -f debian/deb-build.lock + while [ -f debian/deb-build.lock ]; do sleep 1; done && \ + echo "native-deb-utils" > debian/deb-build.lock && \ + trap '$(RM) -f debian/deb-build.lock' EXIT && \ + cp contrib/debian/control debian/control && \ + $(DPKGBUILD) -b -rfakeroot -us -uc native-deb-kmod: native-deb-local debian - while [ -f debian/deb-build.lock ]; do sleep 1; done; \ - echo "native-deb-kmod" > debian/deb-build.lock; \ - sh scripts/make_gitrev.sh; \ - fakeroot debian/rules override_dh_binary-modules; \ - $(RM) -f debian/deb-build.lock + while [ -f debian/deb-build.lock ]; do sleep 1; done && \ + echo "native-deb-kmod" > debian/deb-build.lock && \ + trap '$(RM) -f debian/deb-build.lock' EXIT && \ + sh scripts/make_gitrev.sh && \ + fakeroot debian/rules override_dh_binary-modules native-deb: native-deb-utils native-deb-kmod diff -Nru zfs-linux-2.3.2/config/depcomp zfs-linux-2.3.9/config/depcomp --- zfs-linux-2.3.2/config/depcomp 2025-05-01 18:45:10.494836050 +0000 +++ zfs-linux-2.3.9/config/depcomp 2026-08-21 21:15:39.631631644 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru zfs-linux-2.3.2/config/find_system_library.m4 zfs-linux-2.3.9/config/find_system_library.m4 --- zfs-linux-2.3.2/config/find_system_library.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/find_system_library.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 # find_system_lib.m4 - Macros to search for a system library. -*- Autoconf -*- dnl requires pkg.m4 from pkg-config diff -Nru zfs-linux-2.3.2/config/gettext.m4 zfs-linux-2.3.9/config/gettext.m4 --- zfs-linux-2.3.2/config/gettext.m4 2025-05-01 18:23:23.722214585 +0000 +++ zfs-linux-2.3.9/config/gettext.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # gettext.m4 serial 70 (gettext-0.20) dnl Copyright (C) 1995-2014, 2016, 2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/host-cpu-c-abi.m4 zfs-linux-2.3.9/config/host-cpu-c-abi.m4 --- zfs-linux-2.3.2/config/host-cpu-c-abi.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/host-cpu-c-abi.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # host-cpu-c-abi.m4 serial 11 dnl Copyright (C) 2002-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/iconv.m4 zfs-linux-2.3.9/config/iconv.m4 --- zfs-linux-2.3.2/config/iconv.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/iconv.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # iconv.m4 serial 21 dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation, dnl Inc. diff -Nru zfs-linux-2.3.2/config/install-sh zfs-linux-2.3.9/config/install-sh --- zfs-linux-2.3.2/config/install-sh 2025-05-01 18:45:10.286832028 +0000 +++ zfs-linux-2.3.9/config/install-sh 2026-08-21 21:15:39.477633471 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,11 +69,6 @@ # Desired mode of installed file. mode=0755 -# Create dirs (including intermediate dirs) using mode 755. -# This is like GNU 'install' as of coreutils 8.32 (2020). -mkdir_umask=22 - -backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -104,28 +99,18 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve data modification time) + -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. - -p pass -p to $cpprog. -s $stripprog installed files. - -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG - -By default, rm is invoked with -f; when overridden with RMPROG, -it's up to you to specify -f if you want it. - -If -S is not specified, no backups are attempted. - -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -152,13 +137,8 @@ -o) chowncmd="$chownprog $2" shift;; - -p) cpprog="$cpprog -p";; - -s) stripcmd=$stripprog;; - -S) backupsuffix="$2" - shift;; - -t) is_target_a_directory=always dst_arg=$2 @@ -275,10 +255,6 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? - # Don't chown directories that already exist. - if test $dstdir_status = 0; then - chowncmd="" - fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -325,6 +301,22 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -334,49 +326,52 @@ fi posix_mkdir=false - # The $RANDOM variable is not portable (e.g., dash). Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap ' - ret=$? - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null - exit $ret - ' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p'. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if @@ -387,7 +382,7 @@ then : else - # mkdir does not conform to POSIX, + # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -416,7 +411,7 @@ prefixes= else if $posix_mkdir; then - (umask $mkdir_umask && + (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -493,13 +488,6 @@ then rm -f "$dsttmp" else - # If $backupsuffix is set, and the file being installed - # already exists, attempt a backup. Don't worry if it fails, - # e.g., if mv doesn't support -f. - if test -n "$backupsuffix" && test -f "$dst"; then - $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null - fi - # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -514,9 +502,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd "$dst" 2>/dev/null || + $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff -Nru zfs-linux-2.3.2/config/kernel-access-ok-type.m4 zfs-linux-2.3.9/config/kernel-access-ok-type.m4 --- zfs-linux-2.3.2/config/kernel-access-ok-type.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-access-ok-type.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.0: access_ok() drops 'type' parameter: dnl # diff -Nru zfs-linux-2.3.2/config/kernel-acl.m4 zfs-linux-2.3.9/config/kernel-acl.m4 --- zfs-linux-2.3.2/config/kernel-acl.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-acl.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.1 API change, dnl # posix_acl_equiv_mode now wants an umode_t instead of a mode_t @@ -22,6 +23,35 @@ ]) dnl # +dnl # 7.0 API change +dnl # posix_acl_to_xattr() now allocates and returns the value. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_TO_XATTR_ALLOC], [ + ZFS_LINUX_TEST_SRC([posix_acl_to_xattr_alloc], [ + #include + #include + ], [ + struct user_namespace *ns = NULL; + struct posix_acl *acl = NULL; + size_t size = 0; + gfp_t gfp = 0; + void *xattr = NULL; + xattr = posix_acl_to_xattr(ns, acl, &size, gfp); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_TO_XATTR_ALLOC], [ + AC_MSG_CHECKING([whether posix_acl_to_xattr() allocates its result]); + ZFS_LINUX_TEST_RESULT([posix_acl_to_xattr_alloc], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_TO_XATTR_ALLOC, 1, + [posix_acl_to_xattr() allocates its result]) + ], [ + AC_MSG_RESULT(no) + ]) +]) + +dnl # dnl # 3.1 API change, dnl # Check if inode_operations contains the function get_acl dnl # @@ -173,12 +203,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [ ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T + ZFS_AC_KERNEL_SRC_POSIX_ACL_TO_XATTR_ALLOC ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL ]) AC_DEFUN([ZFS_AC_KERNEL_ACL], [ ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T + ZFS_AC_KERNEL_POSIX_ACL_TO_XATTR_ALLOC ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL ]) diff -Nru zfs-linux-2.3.2/config/kernel-add-disk.m4 zfs-linux-2.3.9/config/kernel-add-disk.m4 --- zfs-linux-2.3.2/config/kernel-add-disk.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-add-disk.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.16 API change dnl # add_disk grew a must-check return code diff -Nru zfs-linux-2.3.2/config/kernel-assign_str.m4 zfs-linux-2.3.9/config/kernel-assign_str.m4 --- zfs-linux-2.3.2/config/kernel-assign_str.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-assign_str.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 6.10 kernel, check number of args of __assign_str() for trace: dnl diff -Nru zfs-linux-2.3.2/config/kernel-automount.m4 zfs-linux-2.3.9/config/kernel-automount.m4 --- zfs-linux-2.3.2/config/kernel-automount.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-automount.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.37 API change dnl # The dops->d_automount() dentry operation was added as a clean diff -Nru zfs-linux-2.3.2/config/kernel-bio.m4 zfs-linux-2.3.9/config/kernel-bio.m4 --- zfs-linux-2.3.2/config/kernel-bio.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-bio.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 4.8 API, dnl # diff -Nru zfs-linux-2.3.2/config/kernel-bio_max_segs.m4 zfs-linux-2.3.9/config/kernel-bio_max_segs.m4 --- zfs-linux-2.3.2/config/kernel-bio_max_segs.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-bio_max_segs.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.12 API change removes BIO_MAX_PAGES in favor of bio_max_segs() dnl # which will handle the logic of setting the upper-bound to a diff -Nru zfs-linux-2.3.2/config/kernel-blk-queue.m4 zfs-linux-2.3.9/config/kernel-blk-queue.m4 --- zfs-linux-2.3.2/config/kernel-blk-queue.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-blk-queue.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.39 API change, dnl # blk_start_plug() and blk_finish_plug() @@ -226,6 +227,30 @@ ]) dnl # +dnl # 7.0 API change +dnl # blk_queue_rot() replaces blk_queue_nonrot() (inverted meaning) +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_ROT], [ + ZFS_LINUX_TEST_SRC([blk_queue_rot], [ + #include + ], [ + struct request_queue *q __attribute__ ((unused)) = NULL; + (void) blk_queue_rot(q); + ], []) +]) + +AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_ROT], [ + AC_MSG_CHECKING([whether blk_queue_rot() is available]) + ZFS_LINUX_TEST_RESULT([blk_queue_rot], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BLK_QUEUE_ROT, 1, + [blk_queue_rot() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # dnl # 2.6.34 API change dnl # blk_queue_max_segments() consolidates blk_queue_max_hw_segments() dnl # and blk_queue_max_phys_segments(). @@ -278,6 +303,7 @@ ZFS_AC_KERNEL_SRC_BLK_QUEUE_SECURE_ERASE ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_HW_SECTORS ZFS_AC_KERNEL_SRC_BLK_QUEUE_MAX_SEGMENTS + ZFS_AC_KERNEL_SRC_BLK_QUEUE_ROT ZFS_AC_KERNEL_SRC_BLK_MQ_RQ_HCTX ]) @@ -290,5 +316,6 @@ ZFS_AC_KERNEL_BLK_QUEUE_SECURE_ERASE ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS + ZFS_AC_KERNEL_BLK_QUEUE_ROT ZFS_AC_KERNEL_BLK_MQ_RQ_HCTX ]) diff -Nru zfs-linux-2.3.2/config/kernel-blkdev.m4 zfs-linux-2.3.9/config/kernel-blkdev.m4 --- zfs-linux-2.3.2/config/kernel-blkdev.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-blkdev.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.38 API change, dnl # Added blkdev_get_by_path() @@ -29,9 +30,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdev = blkdev_get_by_path(path, mode, holder, &h); + bdev = blkdev_get_by_path(path, mode, holder, NULL); ]) ]) @@ -48,9 +48,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdh = bdev_open_by_path(path, mode, holder, &h); + bdh = bdev_open_by_path(path, mode, holder, NULL); ]) ]) @@ -68,9 +67,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - file = bdev_file_open_by_path(path, mode, holder, &h); + file = bdev_file_open_by_path(path, mode, holder, NULL); ]) ]) diff -Nru zfs-linux-2.3.2/config/kernel-block-device-operations.m4 zfs-linux-2.3.9/config/kernel-block-device-operations.m4 --- zfs-linux-2.3.2/config/kernel-block-device-operations.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-block-device-operations.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.38 API change dnl # @@ -119,15 +120,49 @@ ]) ]) +dnl # +dnl # 6.18 API change +dnl # block_device_operation->getgeo takes struct gendisk* as first arg +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK], [ + ZFS_LINUX_TEST_SRC([block_device_operations_getgeo_gendisk], [ + #include + + static int blk_getgeo(struct gendisk *disk, struct hd_geometry *geo) + { + (void) disk, (void) geo; + return (0); + } + + static const struct block_device_operations + bops __attribute__ ((unused)) = { + .getgeo = blk_getgeo, + }; + ], [], []) +]) + +AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK], [ + AC_MSG_CHECKING([whether bops->getgeo() takes gendisk as first arg]) + ZFS_LINUX_TEST_RESULT([block_device_operations_getgeo_gendisk], [ + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK], [1], + [Define if getgeo() in block_device_operations takes struct gendisk * as its first arg]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS], [ ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK + ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK ]) AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS], [ ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK + ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK ]) diff -Nru zfs-linux-2.3.2/config/kernel-commit-metadata.m4 zfs-linux-2.3.9/config/kernel-commit-metadata.m4 --- zfs-linux-2.3.2/config/kernel-commit-metadata.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-commit-metadata.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.33 API change dnl # Added eops->commit_metadata() callback to allow the underlying diff -Nru zfs-linux-2.3.2/config/kernel-config-defined.m4 zfs-linux-2.3.9/config/kernel-config-defined.m4 --- zfs-linux-2.3.2/config/kernel-config-defined.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-config-defined.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Certain kernel build options are not supported. These must be dnl # detected at configure time and cause a build failure. Otherwise diff -Nru zfs-linux-2.3.2/config/kernel-copy-from-user-inatomic.m4 zfs-linux-2.3.9/config/kernel-copy-from-user-inatomic.m4 --- zfs-linux-2.3.2/config/kernel-copy-from-user-inatomic.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-copy-from-user-inatomic.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -dnl # -dnl # On certain architectures `__copy_from_user_inatomic` -dnl # is a GPL exported variable and cannot be used by OpenZFS. -dnl # - -dnl # -dnl # Checking if `__copy_from_user_inatomic` is available. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC], [ - ZFS_LINUX_TEST_SRC([__copy_from_user_inatomic], [ - #include - ], [ - int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0); - ], [], [ZFS_META_LICENSE]) -]) - -AC_DEFUN([ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC], [ - AC_MSG_CHECKING([whether __copy_from_user_inatomic is available]) - ZFS_LINUX_TEST_RESULT([__copy_from_user_inatomic_license], [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - *** The `__copy_from_user_inatomic()` Linux kernel function is - *** incompatible with the CDDL license and will prevent the module - *** linking stage from succeeding. OpenZFS cannot be compiled. - ]) - ]) -]) diff -Nru zfs-linux-2.3.2/config/kernel-cpu_has_feature.m4 zfs-linux-2.3.9/config/kernel-cpu_has_feature.m4 --- zfs-linux-2.3.2/config/kernel-cpu_has_feature.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-cpu_has_feature.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # cpu_has_feature() may referencing GPL-only cpu_feature_keys on powerpc dnl # diff -Nru zfs-linux-2.3.2/config/kernel-declare-event-class.m4 zfs-linux-2.3.9/config/kernel-declare-event-class.m4 --- zfs-linux-2.3.2/config/kernel-declare-event-class.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-declare-event-class.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Ensure the DECLARE_EVENT_CLASS macro is available to non-GPL modules. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-dentry-alias.m4 zfs-linux-2.3.9/config/kernel-dentry-alias.m4 --- zfs-linux-2.3.2/config/kernel-dentry-alias.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-dentry-alias.m4 2026-08-21 20:57:12.292005979 +0000 @@ -0,0 +1,32 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 7.1 API change +dnl # d_u union in struct dentry is now anonmymous, so d_alias must be +dnl # named directly +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY_ALIAS_D_U], [ + ZFS_LINUX_TEST_SRC([dentry_alias_d_u], [ + #include + #include + #include + ], [ + struct inode *inode __attribute__ ((unused)) = NULL; + struct dentry *dentry __attribute__ ((unused)) = NULL; + hlist_for_each_entry(dentry, &inode->i_dentry, + d_u.d_alias) { + d_drop(dentry); + } + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_DENTRY_ALIAS_D_U], [ + AC_MSG_CHECKING([whether dentry aliases are in d_u member]) + ZFS_LINUX_TEST_RESULT([dentry_alias_d_u], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DENTRY_D_U_ALIASES, 1, + [dentry aliases are in d_u member]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + diff -Nru zfs-linux-2.3.2/config/kernel-dentry-operations.m4 zfs-linux-2.3.9/config/kernel-dentry-operations.m4 --- zfs-linux-2.3.2/config/kernel-dentry-operations.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-dentry-operations.m4 2026-08-21 20:57:12.292005979 +0000 @@ -0,0 +1,83 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 2.6.28 API change +dnl # Added d_obtain_alias() helper function. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS], [ + ZFS_LINUX_TEST_SRC([d_obtain_alias], [ + #include + ], [ + d_obtain_alias(NULL); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_D_OBTAIN_ALIAS], [ + AC_MSG_CHECKING([whether d_obtain_alias() is available]) + ZFS_LINUX_TEST_RESULT_SYMBOL([d_obtain_alias], + [d_obtain_alias], [fs/dcache.c], [ + AC_MSG_RESULT(yes) + ], [ + ZFS_LINUX_TEST_ERROR([d_obtain_alias()]) + ]) +]) + +dnl # +dnl # 2.6.38 API change +dnl # Added d_set_d_op() helper function. +dnl # +dnl # 6.17 API change +dnl # d_set_d_op() removed. No direct replacement. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_D_SET_D_OP], [ + ZFS_LINUX_TEST_SRC([d_set_d_op], [ + #include + ], [ + d_set_d_op(NULL, NULL); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_D_SET_D_OP], [ + AC_MSG_CHECKING([whether d_set_d_op() is available]) + ZFS_LINUX_TEST_RESULT([d_set_d_op], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_D_SET_D_OP, 1, + [Define if d_set_d_op() is available]) + ], [ + AC_MSG_RESULT(no) + ]) +]) + +dnl # +dnl # 6.17 API change +dnl # sb->s_d_op removed; set_default_d_op(sb, dop) added +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_SET_DEFAULT_D_OP], [ + ZFS_LINUX_TEST_SRC([set_default_d_op], [ + #include + ], [ + set_default_d_op(NULL, NULL); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SET_DEFAULT_D_OP], [ + AC_MSG_CHECKING([whether set_default_d_op() is available]) + ZFS_LINUX_TEST_RESULT([set_default_d_op], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SET_DEFAULT_D_OP, 1, + [Define if set_default_d_op() is available]) + ], [ + AC_MSG_RESULT(no) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_DENTRY], [ + ZFS_AC_KERNEL_SRC_D_OBTAIN_ALIAS + ZFS_AC_KERNEL_SRC_D_SET_D_OP + ZFS_AC_KERNEL_SRC_SET_DEFAULT_D_OP +]) + +AC_DEFUN([ZFS_AC_KERNEL_DENTRY], [ + ZFS_AC_KERNEL_D_OBTAIN_ALIAS + ZFS_AC_KERNEL_D_SET_D_OP + ZFS_AC_KERNEL_SET_DEFAULT_D_OP +]) diff -Nru zfs-linux-2.3.2/config/kernel-discard-granularity.m4 zfs-linux-2.3.9/config/kernel-discard-granularity.m4 --- zfs-linux-2.3.2/config/kernel-discard-granularity.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-discard-granularity.m4 2026-08-21 20:57:12.292005979 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.33 API change dnl # Discard granularity and alignment restrictions may now be set. diff -Nru zfs-linux-2.3.2/config/kernel-drop-inode.m4 zfs-linux-2.3.9/config/kernel-drop-inode.m4 --- zfs-linux-2.3.2/config/kernel-drop-inode.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-drop-inode.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,25 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 6.18 API change +dnl # - generic_drop_inode() renamed to inode_generic_drop() +dnl # - generic_delete_inode() renamed to inode_just_drop() +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GENERIC_DROP], [ + ZFS_LINUX_TEST_SRC([inode_generic_drop], [ + #include + ],[ + struct inode *ip = NULL; + inode_generic_drop(ip); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_INODE_GENERIC_DROP], [ + AC_MSG_CHECKING([whether inode_generic_drop() exists]) + ZFS_LINUX_TEST_RESULT([inode_generic_drop], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_GENERIC_DROP, 1, + [inode_generic_drop() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-file.m4 zfs-linux-2.3.9/config/kernel-file.m4 --- zfs-linux-2.3.2/config/kernel-file.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-file.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 6.12 removed f_version from struct file dnl # diff -Nru zfs-linux-2.3.2/config/kernel-filelock.m4 zfs-linux-2.3.9/config/kernel-filelock.m4 --- zfs-linux-2.3.2/config/kernel-filelock.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-filelock.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,23 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 6.3 API change +dnl # locking support functions (eg generic_setlease) were moved out of +dnl # linux/fs.h to linux/filelock.h +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_FILELOCK_HEADER], [ + ZFS_LINUX_TEST_SRC([filelock_header], [ + #include + #include + ], []) +]) + +AC_DEFUN([ZFS_AC_KERNEL_FILELOCK_HEADER], [ + AC_MSG_CHECKING([for standalone filelock header]) + ZFS_LINUX_TEST_RESULT([filelock_header], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FILELOCK_HEADER, 1, [linux/filelock.h exists]) + ], [ + AC_MSG_RESULT(no) + ]) +]) + diff -Nru zfs-linux-2.3.2/config/kernel-filemap-splice-read.m4 zfs-linux-2.3.9/config/kernel-filemap-splice-read.m4 --- zfs-linux-2.3.2/config/kernel-filemap-splice-read.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-filemap-splice-read.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ], [ dnl # dnl # Kernel 6.5 - generic_file_splice_read was removed in favor diff -Nru zfs-linux-2.3.2/config/kernel-flush_dcache_page.m4 zfs-linux-2.3.9/config/kernel-flush_dcache_page.m4 --- zfs-linux-2.3.2/config/kernel-flush_dcache_page.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-flush_dcache_page.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Starting from Linux 5.13, flush_dcache_page() becomes an inline dnl # function and may indirectly referencing GPL-only symbols: diff -Nru zfs-linux-2.3.2/config/kernel-fmode-t.m4 zfs-linux-2.3.9/config/kernel-fmode-t.m4 --- zfs-linux-2.3.2/config/kernel-fmode-t.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-fmode-t.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.28 API change, dnl # check if fmode_t typedef is defined diff -Nru zfs-linux-2.3.2/config/kernel-follow-down-one.m4 zfs-linux-2.3.9/config/kernel-follow-down-one.m4 --- zfs-linux-2.3.2/config/kernel-follow-down-one.m4 2025-05-01 18:23:23.723214599 +0000 +++ zfs-linux-2.3.9/config/kernel-follow-down-one.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -dnl # -dnl # 2.6.38 API change -dnl # follow_down() renamed follow_down_one(). The original follow_down() -dnl # symbol still exists but will traverse down all the layers. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE], [ - ZFS_LINUX_TEST_SRC([follow_down_one], [ - #include - ],[ - struct path *p = NULL; - follow_down_one(p); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_DOWN_ONE], [ - AC_MSG_CHECKING([whether follow_down_one() is available]) - ZFS_LINUX_TEST_RESULT([follow_down_one], [ - AC_MSG_RESULT(yes) - ],[ - ZFS_LINUX_TEST_ERROR([follow_down_one()]) - ]) -]) diff -Nru zfs-linux-2.3.2/config/kernel-follow-down.m4 zfs-linux-2.3.9/config/kernel-follow-down.m4 --- zfs-linux-2.3.2/config/kernel-follow-down.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-follow-down.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,70 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 2.6.38 API change +dnl # follow_down() renamed follow_down_one(). The original follow_down() +dnl # symbol still exists but will traverse down all the layers. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE], [ + ZFS_LINUX_TEST_SRC([follow_down_one], [ + #include + ],[ + struct path *p = NULL; + follow_down_one(p); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_DOWN_ONE], [ + AC_MSG_CHECKING([whether follow_down_one() is available]) + ZFS_LINUX_TEST_RESULT([follow_down_one], [ + AC_MSG_RESULT(yes) + ],[ + ZFS_LINUX_TEST_ERROR([follow_down_one()]) + ]) +]) + +dnl # +dnl # 6.3: look_down() gains a second flags param. Before this, we need +dnl # vfs_path_lookup() to build an emulation. +dnl # +dnl # 3.12: vfs_path_lookup unpublished from linux/namei.h, remains exported +dnl # 6.4: vfs_path_lookup republished in linux/namei.h +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_FLAGS], [ + ZFS_LINUX_TEST_SRC([follow_down_flags], [ + #include + ],[ + struct path *p = NULL; + follow_down(p, 0); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_DOWN_FLAGS], [ + AC_MSG_CHECKING([whether follow_down() takes a flags parameter]) + ZFS_LINUX_TEST_RESULT([follow_down_flags], [ + AC_DEFINE(HAVE_FOLLOW_DOWN_FLAGS, 1, + [follow_down() takes a flags parameter]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING([whether vfs_path_lookup() is exported]) + ZFS_CHECK_SYMBOL_EXPORT( + [vfs_path_lookup], [fs/namei.c], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VFS_PATH_LOOKUP_EXPORTED, 1, + [vfs_path_lookup() is exported]) + ],[ + AC_MSG_RESULT(no) + ZFS_LINUX_TEST_ERROR([follow_down()]) + ]) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_FOLLOW_DOWN], [ + ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE + ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_FLAGS +]) + +AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_DOWN], [ + ZFS_AC_KERNEL_FOLLOW_DOWN_ONE + ZFS_AC_KERNEL_FOLLOW_DOWN_FLAGS +]) diff -Nru zfs-linux-2.3.2/config/kernel-fpu.m4 zfs-linux-2.3.9/config/kernel-fpu.m4 --- zfs-linux-2.3.2/config/kernel-fpu.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-fpu.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Handle differences in kernel FPU code. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-free-inode.m4 zfs-linux-2.3.9/config/kernel-free-inode.m4 --- zfs-linux-2.3.2/config/kernel-free-inode.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-free-inode.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,25 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Linux 5.2 API change +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE], [ + ZFS_LINUX_TEST_SRC([super_operations_free_inode], [ + #include + + static void free_inode(struct inode *) { } + + static struct super_operations sops __attribute__ ((unused)) = { + .free_inode = free_inode, + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SOPS_FREE_INODE], [ + AC_MSG_CHECKING([whether sops->free_inode() exists]) + ZFS_LINUX_TEST_RESULT([super_operations_free_inode], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SOPS_FREE_INODE, 1, [sops->free_inode() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-fs-context.m4 zfs-linux-2.3.9/config/kernel-fs-context.m4 --- zfs-linux-2.3.2/config/kernel-fs-context.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-fs-context.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,61 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 2.6.38 API change +dnl # The .get_sb callback has been replaced by a .mount callback +dnl # in the file_system_type structure. +dnl # +dnl # 5.2 API change +dnl # The new fs_context-based filesystem API is introduced, with the old +dnl # one (via file_system_type.mount) preserved as a compatibility shim. +dnl # +dnl # 7.0 API change +dnl # Compatibility shim removed, so all callers must go through the mount API. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_FS_CONTEXT], [ + ZFS_LINUX_TEST_SRC([fs_context], [ + #include + #include + ],[ + static struct fs_context fs __attribute__ ((unused)) = { 0 }; + static struct fs_context *fsp __attribute__ ((unused)); + fsp = vfs_dup_fs_context(&fs); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_FS_CONTEXT], [ + AC_MSG_CHECKING([whether fs_context exists]) + ZFS_LINUX_TEST_RESULT([fs_context], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FS_CONTEXT, 1, [fs_context exists]) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + *** This kernel does not have `struct fs_context`. OpenZFS cannot be compiled. + ]) + ]) +]) + +dnl # +dnl # 6.18 API change +dnl # vfs_parse_fs_string() 4th arg removed; length generated internally by +dnl # strlen(). +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_PARSE_FS_STRING_3ARGS], [ + ZFS_LINUX_TEST_SRC([vfs_parse_fs_string_3args], [ + #include + #include + ],[ + vfs_parse_fs_string(NULL, NULL, NULL); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_VFS_PARSE_FS_STRING_3ARGS], [ + AC_MSG_CHECKING([whether vfs_parse_fs_string() takes 3 args]) + ZFS_LINUX_TEST_RESULT([vfs_parse_fs_string_3args], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VFS_PARSE_FS_STRING_3ARGS, 1, + [vfs_parse_fs_string() takes 3 args]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-fs-parse.m4 zfs-linux-2.3.9/config/kernel-fs-parse.m4 --- zfs-linux-2.3.2/config/kernel-fs-parse.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-fs-parse.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,34 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 5.6 API change +dnl # Before 5.6, fs_parse() took a struct fs_parameter_description +dnl # which wraps the parameter specs with name and enum pointers. From 5.6, +dnl # the description struct was removed and fs_parse() accepts the +dnl # fs_parameter_spec directly. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_FS_PARSE], [ + ZFS_LINUX_TEST_SRC([fs_parse], [ + #include + #include + ],[ + static const struct fs_parameter_spec specs[] = { + {} + }; + int test __attribute__ ((unused)); + struct fs_context *fc __attribute__ ((unused)) = NULL; + struct fs_parameter param __attribute__ ((unused)); + struct fs_parse_result result __attribute__ ((unused)); + test = fs_parse(fc, specs, ¶m, &result); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_FS_PARSE], [ + AC_MSG_CHECKING([whether fs_parse() takes fs_parameter_spec directly]) + ZFS_LINUX_TEST_RESULT([fs_parse], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FS_PARSE_TAKES_SPEC, 1, + [fs_parse() takes fs_parameter_spec directly]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-fst-mount.m4 zfs-linux-2.3.9/config/kernel-fst-mount.m4 --- zfs-linux-2.3.2/config/kernel-fst-mount.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-fst-mount.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -dnl # -dnl # 2.6.38 API change -dnl # The .get_sb callback has been replaced by a .mount callback -dnl # in the file_system_type structure. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_FST_MOUNT], [ - ZFS_LINUX_TEST_SRC([file_system_type_mount], [ - #include - - static struct dentry * - mount(struct file_system_type *fs_type, int flags, - const char *osname, void *data) { - struct dentry *d = NULL; - return (d); - } - - static struct file_system_type fst __attribute__ ((unused)) = { - .mount = mount, - }; - ],[]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_FST_MOUNT], [ - AC_MSG_CHECKING([whether fst->mount() exists]) - ZFS_LINUX_TEST_RESULT([file_system_type_mount], [ - AC_MSG_RESULT(yes) - ],[ - ZFS_LINUX_TEST_ERROR([fst->mount()]) - ]) -]) diff -Nru zfs-linux-2.3.2/config/kernel-fsync-bdev.m4 zfs-linux-2.3.9/config/kernel-fsync-bdev.m4 --- zfs-linux-2.3.2/config/kernel-fsync-bdev.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-fsync-bdev.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 6.6 API change, dnl # fsync_bdev was removed in favor of sync_blockdev diff -Nru zfs-linux-2.3.2/config/kernel-generic_fadvise.m4 zfs-linux-2.3.9/config/kernel-generic_fadvise.m4 --- zfs-linux-2.3.2/config/kernel-generic_fadvise.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-generic_fadvise.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.3 API change dnl # The generic_fadvise() function is present since 4.19 kernel diff -Nru zfs-linux-2.3.2/config/kernel-generic_fillattr.m4 zfs-linux-2.3.9/config/kernel-generic_fillattr.m4 --- zfs-linux-2.3.2/config/kernel-generic_fillattr.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-generic_fillattr.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.12 API dnl # diff -Nru zfs-linux-2.3.2/config/kernel-generic_io_acct.m4 zfs-linux-2.3.9/config/kernel-generic_io_acct.m4 --- zfs-linux-2.3.2/config/kernel-generic_io_acct.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-generic_io_acct.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for generic io accounting interface. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-genhd-flags.m4 zfs-linux-2.3.9/config/kernel-genhd-flags.m4 --- zfs-linux-2.3.2/config/kernel-genhd-flags.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-genhd-flags.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.17 API change, dnl # diff -Nru zfs-linux-2.3.2/config/kernel-get-disk-ro.m4 zfs-linux-2.3.9/config/kernel-get-disk-ro.m4 --- zfs-linux-2.3.2/config/kernel-get-disk-ro.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-get-disk-ro.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.x API change dnl # diff -Nru zfs-linux-2.3.2/config/kernel-iattr-vfsid.m4 zfs-linux-2.3.9/config/kernel-iattr-vfsid.m4 --- zfs-linux-2.3.2/config/kernel-iattr-vfsid.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-iattr-vfsid.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 6.0 API change dnl # struct iattr has two unions for the uid and gid diff -Nru zfs-linux-2.3.2/config/kernel-idmap.m4 zfs-linux-2.3.9/config/kernel-idmap.m4 --- zfs-linux-2.3.2/config/kernel-idmap.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-idmap.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,64 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +AC_DEFUN([ZFS_AC_KERNEL_SRC_IDMAP], [ + dnl # + dnl # 6.3 API change + dnl # The first arg is changed to struct mnt_idmap * + dnl # + ZFS_LINUX_TEST_SRC([generic_permission_idmap_mntidmap], [ + #include + ], [ + struct mnt_idmap *idmap = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(idmap, inode, mask); + (void) ret; + ]) + + dnl # + dnl # 5.12 API change that added the struct user_namespace* arg + dnl # to the front of this function type's arg list. + dnl # + ZFS_LINUX_TEST_SRC([generic_permission_idmap_userns], [ + #include + ], [ + struct user_namespace *userns = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(userns, inode, mask); + (void) ret; + ]) + + dnl # + dnl # Before 5.12 user namespace was part of kcred + dnl # + ZFS_LINUX_TEST_SRC([generic_permission_idmap_none], [ + #include + ], [ + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(inode, mask); + (void) ret; + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_IDMAP], [ + AC_MSG_CHECKING([for id mapping mechanism]) + ZFS_LINUX_TEST_RESULT([generic_permission_idmap_mntidmap], [ + AC_MSG_RESULT([mnt_idmap]) + AC_DEFINE(HAVE_IDMAP_MNTIDMAP, 1, + [id mapping mechanism is mnt_idmap]) + ],[ + ZFS_LINUX_TEST_RESULT([generic_permission_idmap_userns], [ + AC_MSG_RESULT([user_namespace]) + AC_DEFINE(HAVE_IDMAP_USERNS, 1, + [id mapping mechanism is user_namespace]) + ],[ + ZFS_LINUX_TEST_RESULT([generic_permission_idmap_none], [ + AC_MSG_RESULT([none]) + ],[ + AC_MSG_RESULT([unknown]) + ZFS_LINUX_TEST_ERROR([generic_permission]) + ]) + ]) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-idmap_mnt_api.m4 zfs-linux-2.3.9/config/kernel-idmap_mnt_api.m4 --- zfs-linux-2.3.2/config/kernel-idmap_mnt_api.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-idmap_mnt_api.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.12 API dnl # diff -Nru zfs-linux-2.3.2/config/kernel-inode-create.m4 zfs-linux-2.3.9/config/kernel-inode-create.m4 --- zfs-linux-2.3.2/config/kernel-inode-create.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-create.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [ dnl # dnl # 6.3 API change diff -Nru zfs-linux-2.3.2/config/kernel-inode-getattr.m4 zfs-linux-2.3.9/config/kernel-inode-getattr.m4 --- zfs-linux-2.3.2/config/kernel-inode-getattr.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-getattr.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [ dnl # dnl # Linux 6.3 API diff -Nru zfs-linux-2.3.2/config/kernel-inode-lookup.m4 zfs-linux-2.3.9/config/kernel-inode-lookup.m4 --- zfs-linux-2.3.2/config/kernel-inode-lookup.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-lookup.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.6 API change dnl # diff -Nru zfs-linux-2.3.2/config/kernel-inode-permission.m4 zfs-linux-2.3.9/config/kernel-inode-permission.m4 --- zfs-linux-2.3.2/config/kernel-inode-permission.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-permission.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_PERMISSION], [ dnl # dnl # 6.3 API change diff -Nru zfs-linux-2.3.2/config/kernel-inode-setattr.m4 zfs-linux-2.3.9/config/kernel-inode-setattr.m4 --- zfs-linux-2.3.2/config/kernel-inode-setattr.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-setattr.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [ dnl # dnl # Linux 6.3 API diff -Nru zfs-linux-2.3.2/config/kernel-inode-state.m4 zfs-linux-2.3.9/config/kernel-inode-state.m4 --- zfs-linux-2.3.2/config/kernel-inode-state.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-state.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,24 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 6.19 API change. inode->i_state no longer accessible directly; helper +dnl # functions exist. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_STATE_READ_ONCE], [ + ZFS_LINUX_TEST_SRC([inode_state_read_once], [ + #include + ], [ + struct inode i = {}; + inode_state_read_once(&i); + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_INODE_STATE_READ_ONCE], [ + AC_MSG_CHECKING([whether inode_state_read_once() exists]) + ZFS_LINUX_TEST_RESULT([inode_state_read_once], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_STATE_READ_ONCE, 1, + [inode_state_read_once() exists]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-inode-times.m4 zfs-linux-2.3.9/config/kernel-inode-times.m4 --- zfs-linux-2.3.2/config/kernel-inode-times.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-inode-times.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [ dnl # diff -Nru zfs-linux-2.3.2/config/kernel-insert-inode-locked.m4 zfs-linux-2.3.9/config/kernel-insert-inode-locked.m4 --- zfs-linux-2.3.2/config/kernel-insert-inode-locked.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-insert-inode-locked.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.28 API change dnl # Added insert_inode_locked() helper function. diff -Nru zfs-linux-2.3.2/config/kernel-is_owner_or_cap.m4 zfs-linux-2.3.9/config/kernel-is_owner_or_cap.m4 --- zfs-linux-2.3.2/config/kernel-is_owner_or_cap.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-is_owner_or_cap.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.39 API change, dnl # The is_owner_or_cap() macro was renamed to inode_owner_or_capable(), diff -Nru zfs-linux-2.3.2/config/kernel-kasan-enabled.m4 zfs-linux-2.3.9/config/kernel-kasan-enabled.m4 --- zfs-linux-2.3.2/config/kernel-kasan-enabled.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-kasan-enabled.m4 2026-08-21 20:57:12.293005965 +0000 @@ -0,0 +1,24 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 6.18: some architectures and config option causes the kasan_ inline +dnl # functions to reference the GPL-only symbol 'kasan_flag_enabled', +dnl # breaking the build. Detect this and work +dnl # around it. +AC_DEFUN([ZFS_AC_KERNEL_SRC_KASAN_ENABLED], [ + ZFS_LINUX_TEST_SRC([kasan_enabled], [ + #include + ], [ + kasan_enabled(); + ], [], [ZFS_META_LICENSE]) +]) +AC_DEFUN([ZFS_AC_KERNEL_KASAN_ENABLED], [ + AC_MSG_CHECKING([whether kasan_enabled() is GPL-only]) + ZFS_LINUX_TEST_RESULT([kasan_enabled_license], [ + AC_MSG_RESULT(no) + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KASAN_ENABLED_GPL_ONLY, 1, + [kasan_enabled() is GPL-only]) + ]) +]) + diff -Nru zfs-linux-2.3.2/config/kernel-kmap-atomic-args.m4 zfs-linux-2.3.9/config/kernel-kmap-atomic-args.m4 --- zfs-linux-2.3.2/config/kernel-kmap-atomic-args.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-kmap-atomic-args.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.37 API change dnl # kmap_atomic changed from assigning hard-coded named slot to using @@ -7,7 +8,7 @@ ZFS_LINUX_TEST_SRC([kmap_atomic], [ #include ],[ - struct page page; + struct page page = {}; kmap_atomic(&page); ]) ]) diff -Nru zfs-linux-2.3.2/config/kernel-kmap-local-page.m4 zfs-linux-2.3.9/config/kernel-kmap-local-page.m4 --- zfs-linux-2.3.2/config/kernel-kmap-local-page.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-kmap-local-page.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.11 API change dnl # kmap_atomic() was deprecated in favor of kmap_local_page() diff -Nru zfs-linux-2.3.2/config/kernel-kmem.m4 zfs-linux-2.3.9/config/kernel-kmem.m4 --- zfs-linux-2.3.2/config/kernel-kmem.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-kmem.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Enabled by default it provides a minimal level of memory tracking. dnl # A total count of bytes allocated is kept for each alloc and free. diff -Nru zfs-linux-2.3.2/config/kernel-kthread.m4 zfs-linux-2.3.9/config/kernel-kthread.m4 --- zfs-linux-2.3.2/config/kernel-kthread.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-kthread.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_KTHREAD_COMPLETE_AND_EXIT], [ dnl # dnl # 5.17 API, diff -Nru zfs-linux-2.3.2/config/kernel-kuid-helpers.m4 zfs-linux-2.3.9/config/kernel-kuid-helpers.m4 --- zfs-linux-2.3.2/config/kernel-kuid-helpers.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-kuid-helpers.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.5 API change, dnl # Since usernamespaces were introduced in kernel version 3.5, it diff -Nru zfs-linux-2.3.2/config/kernel-kuidgid.m4 zfs-linux-2.3.9/config/kernel-kuidgid.m4 --- zfs-linux-2.3.2/config/kernel-kuidgid.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-kuidgid.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.8 API change, dnl # User namespaces, use kuid_t in place of uid_t where available. diff -Nru zfs-linux-2.3.2/config/kernel-make-request-fn.m4 zfs-linux-2.3.9/config/kernel-make-request-fn.m4 --- zfs-linux-2.3.2/config/kernel-make-request-fn.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-make-request-fn.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for make_request_fn interface. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-misc-minor.m4 zfs-linux-2.3.9/config/kernel-misc-minor.m4 --- zfs-linux-2.3.2/config/kernel-misc-minor.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-misc-minor.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Determine an available miscellaneous minor number which can be used dnl # for the /dev/zfs device. This is needed because kernel module diff -Nru zfs-linux-2.3.2/config/kernel-mkdir.m4 zfs-linux-2.3.9/config/kernel-mkdir.m4 --- zfs-linux-2.3.2/config/kernel-mkdir.m4 2025-05-01 18:23:23.724214613 +0000 +++ zfs-linux-2.3.9/config/kernel-mkdir.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,8 +1,25 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Supported mkdir() interfaces checked newest to oldest. dnl # AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [ dnl # + dnl # 6.15 API change + dnl # mkdir() returns struct dentry * + dnl # + ZFS_LINUX_TEST_SRC([mkdir_return_dentry], [ + #include + + static struct dentry *mkdir(struct mnt_idmap *idmap, + struct inode *inode, struct dentry *dentry, + umode_t umode) { return dentry; } + static const struct inode_operations + iops __attribute__ ((unused)) = { + .mkdir = mkdir, + }; + ],[]) + + dnl # dnl # 6.3 API change dnl # mkdir() takes struct mnt_idmap * as the first arg dnl # @@ -59,29 +76,40 @@ AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [ dnl # - dnl # 6.3 API change - dnl # mkdir() takes struct mnt_idmap * as the first arg + dnl # 6.15 API change + dnl # mkdir() returns struct dentry * dnl # - AC_MSG_CHECKING([whether iops->mkdir() takes struct mnt_idmap*]) - ZFS_LINUX_TEST_RESULT([mkdir_mnt_idmap], [ + AC_MSG_CHECKING([whether iops->mkdir() returns struct dentry*]) + ZFS_LINUX_TEST_RESULT([mkdir_return_dentry], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOPS_MKDIR_IDMAP, 1, - [iops->mkdir() takes struct mnt_idmap*]) + AC_DEFINE(HAVE_IOPS_MKDIR_DENTRY, 1, + [iops->mkdir() returns struct dentry*]) ],[ - AC_MSG_RESULT(no) - dnl # - dnl # 5.12 API change - dnl # The struct user_namespace arg was added as the first argument to - dnl # mkdir() of the iops structure. + dnl # 6.3 API change + dnl # mkdir() takes struct mnt_idmap * as the first arg dnl # - AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*]) - ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [ + AC_MSG_CHECKING([whether iops->mkdir() takes struct mnt_idmap*]) + ZFS_LINUX_TEST_RESULT([mkdir_mnt_idmap], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1, - [iops->mkdir() takes struct user_namespace*]) + AC_DEFINE(HAVE_IOPS_MKDIR_IDMAP, 1, + [iops->mkdir() takes struct mnt_idmap*]) ],[ AC_MSG_RESULT(no) + + dnl # + dnl # 5.12 API change + dnl # The struct user_namespace arg was added as the first argument to + dnl # mkdir() of the iops structure. + dnl # + AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*]) + ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1, + [iops->mkdir() takes struct user_namespace*]) + ],[ + AC_MSG_RESULT(no) + ]) ]) ]) ]) diff -Nru zfs-linux-2.3.2/config/kernel-mknod.m4 zfs-linux-2.3.9/config/kernel-mknod.m4 --- zfs-linux-2.3.2/config/kernel-mknod.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-mknod.m4 2026-08-21 20:57:12.293005965 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [ dnl # dnl # 6.3 API change diff -Nru zfs-linux-2.3.2/config/kernel-mm-page-flags.m4 zfs-linux-2.3.9/config/kernel-mm-page-flags.m4 --- zfs-linux-2.3.2/config/kernel-mm-page-flags.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-mm-page-flags.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_FLAG_ERROR], [ ZFS_LINUX_TEST_SRC([mm_page_flag_error], [ #include @@ -16,9 +17,36 @@ ]) ]) +dnl # +dnl # Linux 6.18+ uses a struct typedef (memdesc_flags_t) instead of an +dnl # 'unsigned long' for the 'flags' field in 'struct page'. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_FLAGS_STRUCT], [ + ZFS_LINUX_TEST_SRC([mm_page_flags_struct], [ + #include + + static const struct page p __attribute__ ((unused)) = { + .flags = { .f = 0 } + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_MM_PAGE_FLAGS_STRUCT], [ + AC_MSG_CHECKING([whether 'flags' in 'struct page' is a struct]) + ZFS_LINUX_TEST_RESULT([mm_page_flags_struct], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_MM_PAGE_FLAGS_STRUCT, 1, + ['flags' in 'struct page' is a struct]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_FLAGS], [ ZFS_AC_KERNEL_SRC_MM_PAGE_FLAG_ERROR + ZFS_AC_KERNEL_SRC_MM_PAGE_FLAGS_STRUCT ]) AC_DEFUN([ZFS_AC_KERNEL_MM_PAGE_FLAGS], [ ZFS_AC_KERNEL_MM_PAGE_FLAG_ERROR + ZFS_AC_KERNEL_MM_PAGE_FLAGS_STRUCT ]) diff -Nru zfs-linux-2.3.2/config/kernel-mm-pagemap.m4 zfs-linux-2.3.9/config/kernel-mm-pagemap.m4 --- zfs-linux-2.3.2/config/kernel-mm-pagemap.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-mm-pagemap.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_SIZE], [ ZFS_LINUX_TEST_SRC([page_size], [ #include diff -Nru zfs-linux-2.3.2/config/kernel-namespace.m4 zfs-linux-2.3.9/config/kernel-namespace.m4 --- zfs-linux-2.3.2/config/kernel-namespace.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-namespace.m4 2026-08-21 20:57:12.294005951 +0000 @@ -0,0 +1,32 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 6.18 API change +dnl # ns->ops->type was moved to ns->ns.ns_type (struct ns_common) +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_NS_COMMON_TYPE], [ + ZFS_LINUX_TEST_SRC([ns_common_type], [ + #include + ],[ + struct user_namespace ns; + ns.ns.ns_type = 0; + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_NS_COMMON_TYPE], [ + AC_MSG_CHECKING([whether ns_type is accessible through ns_common]) + ZFS_LINUX_TEST_RESULT([ns_common_type], [ + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_NS_COMMON_TYPE], 1, + [Define if ns_type is accessible through ns_common]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_NAMESPACE], [ + ZFS_AC_KERNEL_SRC_NS_COMMON_TYPE +]) + +AC_DEFUN([ZFS_AC_KERNEL_NAMESPACE], [ + ZFS_AC_KERNEL_NS_COMMON_TYPE +]) diff -Nru zfs-linux-2.3.2/config/kernel-objtool.m4 zfs-linux-2.3.9/config/kernel-objtool.m4 --- zfs-linux-2.3.2/config/kernel-objtool.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-objtool.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Detect objtool functionality. dnl # @@ -11,10 +12,12 @@ #include ],[ ],[ + objtool_header=$LINUX/include/linux/objtool.h AC_DEFINE(HAVE_KERNEL_OBJTOOL_HEADER, 1, [kernel has linux/objtool.h]) AC_MSG_RESULT(linux/objtool.h) ],[ + objtool_header=$LINUX/include/linux/frame.h AC_MSG_RESULT(linux/frame.h) ]) ]) @@ -47,6 +50,15 @@ #error "STACK_FRAME_NON_STANDARD is not defined." #endif ]) + + dnl # 6.15 made CONFIG_OBJTOOL_WERROR=y the default. We need to handle + dnl # this or our build will fail. + ZFS_LINUX_TEST_SRC([config_objtool_werror], [ + #if !defined(CONFIG_OBJTOOL_WERROR) + #error "CONFIG_OBJTOOL_WERROR is not defined." + #endif + ]) + ]) AC_DEFUN([ZFS_AC_KERNEL_OBJTOOL], [ @@ -62,6 +74,31 @@ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STACK_FRAME_NON_STANDARD, 1, [STACK_FRAME_NON_STANDARD is defined]) + + dnl # Needed for kernels missing the asm macro. We grep + dnl # for it in the header file since there is currently + dnl # no test to check the result of assembling a file. + AC_MSG_CHECKING( + [whether STACK_FRAME_NON_STANDARD asm macro is defined]) + dnl # Escape square brackets. + sp='@<:@@<:@:space:@:>@@:>@' + dotmacro='@<:@.@:>@macro' + regexp="^$sp*$dotmacro$sp+STACK_FRAME_NON_STANDARD$sp" + AS_IF([$EGREP -s -q "$regexp" $objtool_header],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_STACK_FRAME_NON_STANDARD_ASM, 1, + [STACK_FRAME_NON_STANDARD asm macro is defined]) + ],[ + AC_MSG_RESULT(no) + ]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([whether CONFIG_OBJTOOL_WERROR is defined]) + ZFS_LINUX_TEST_RESULT([config_objtool_werror],[ + AC_MSG_RESULT(yes) + CONFIG_OBJTOOL_WERROR_DEFINED=yes ],[ AC_MSG_RESULT(no) ]) diff -Nru zfs-linux-2.3.2/config/kernel-pagemap-folio_wait_bit.m4 zfs-linux-2.3.9/config/kernel-pagemap-folio_wait_bit.m4 --- zfs-linux-2.3.2/config/kernel-pagemap-folio_wait_bit.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-pagemap-folio_wait_bit.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.16 no longer allows directly calling wait_on_page_bit, and dnl # instead requires you to call folio-specific functions. In this case, diff -Nru zfs-linux-2.3.2/config/kernel-pagemap-readahead-page.m4 zfs-linux-2.3.9/config/kernel-pagemap-readahead-page.m4 --- zfs-linux-2.3.2/config/kernel-pagemap-readahead-page.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-pagemap-readahead-page.m4 2026-08-21 20:57:12.294005951 +0000 @@ -0,0 +1,24 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Linux 6.16 removed readahead_page +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_PAGEMAP_READAHEAD_PAGE], [ + ZFS_LINUX_TEST_SRC([pagemap_has_readahead_page], [ + #include + ], [ + struct page *p __attribute__ ((unused)) = NULL; + struct readahead_control *ractl __attribute__ ((unused)) = NULL; + p = readahead_page(ractl); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_PAGEMAP_READAHEAD_PAGE], [ + AC_MSG_CHECKING([whether readahead_page() exists]) + ZFS_LINUX_TEST_RESULT([pagemap_has_readahead_page], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_PAGEMAP_READAHEAD_PAGE, 1, + [readahead_page() exists]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-pde-data.m4 zfs-linux-2.3.9/config/kernel-pde-data.m4 --- zfs-linux-2.3.2/config/kernel-pde-data.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-pde-data.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.17 API: PDE_DATA() renamed to pde_data(), dnl # 359745d78351c6f5442435f81549f0207ece28aa ("proc: remove PDE_DATA() completely") diff -Nru zfs-linux-2.3.2/config/kernel-percpu.m4 zfs-linux-2.3.9/config/kernel-percpu.m4 --- zfs-linux-2.3.2/config/kernel-percpu.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-percpu.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.10 API change, dnl # The "count" was moved into ref->data, from ref diff -Nru zfs-linux-2.3.2/config/kernel-pin-user-pages.m4 zfs-linux-2.3.9/config/kernel-pin-user-pages.m4 --- zfs-linux-2.3.2/config/kernel-pin-user-pages.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-pin-user-pages.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for pin_user_pages_unlocked(). dnl # diff -Nru zfs-linux-2.3.2/config/kernel-proc-operations.m4 zfs-linux-2.3.9/config/kernel-proc-operations.m4 --- zfs-linux-2.3.2/config/kernel-proc-operations.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-proc-operations.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.6 API Change dnl # The proc_ops structure was introduced to replace the use of diff -Nru zfs-linux-2.3.2/config/kernel-readpages.m4 zfs-linux-2.3.9/config/kernel-readpages.m4 --- zfs-linux-2.3.2/config/kernel-readpages.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-readpages.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -dnl # -dnl # Linux 5.18 removes address_space_operations ->readpages in favour of -dnl # ->readahead -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_READPAGES], [ - ZFS_LINUX_TEST_SRC([vfs_has_readpages], [ - #include - - static const struct address_space_operations - aops __attribute__ ((unused)) = { - .readpages = NULL, - }; - ],[]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_VFS_READPAGES], [ - AC_MSG_CHECKING([whether aops->readpages exists]) - ZFS_LINUX_TEST_RESULT([vfs_has_readpages], [ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_VFS_READPAGES, 1, - [address_space_operations->readpages exists]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) diff -Nru zfs-linux-2.3.2/config/kernel-reclaim_state.m4 zfs-linux-2.3.9/config/kernel-reclaim_state.m4 --- zfs-linux-2.3.2/config/kernel-reclaim_state.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-reclaim_state.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_RECLAIMED], [ dnl # dnl # 6.4 API change diff -Nru zfs-linux-2.3.2/config/kernel-register_sysctl_table.m4 zfs-linux-2.3.9/config/kernel-register_sysctl_table.m4 --- zfs-linux-2.3.2/config/kernel-register_sysctl_table.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-register_sysctl_table.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 6.5 removes register_sysctl_table dnl # diff -Nru zfs-linux-2.3.2/config/kernel-rename.m4 zfs-linux-2.3.9/config/kernel-rename.m4 --- zfs-linux-2.3.2/config/kernel-rename.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-rename.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,23 +1,6 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [ dnl # - dnl # 4.9 API change, - dnl # - dnl # iops->rename2() merged into iops->rename(), and iops->rename() now - dnl # wants flags. - dnl # - ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [ - #include - static int rename_fn(struct inode *sip, struct dentry *sdp, - struct inode *tip, struct dentry *tdp, - unsigned int flags) { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .rename = rename_fn, - }; - ],[]) - - dnl # dnl # 5.12 API change, dnl # dnl # Linux 5.12 introduced passing struct user_namespace* as the first @@ -67,15 +50,6 @@ [iops->rename() takes struct user_namespace*]) ],[ AC_MSG_RESULT(no) - - AC_MSG_CHECKING([whether iops->rename() wants flags]) - ZFS_LINUX_TEST_RESULT([inode_operations_rename_flags], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1, - [iops->rename() wants flags]) - ],[ - AC_MSG_RESULT(no) - ]) ]) ]) ]) diff -Nru zfs-linux-2.3.2/config/kernel-revalidate-disk-size.m4 zfs-linux-2.3.9/config/kernel-revalidate-disk-size.m4 --- zfs-linux-2.3.2/config/kernel-revalidate-disk-size.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-revalidate-disk-size.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.11 API change dnl # revalidate_disk_size() has been removed entirely. diff -Nru zfs-linux-2.3.2/config/kernel-sb-dying.m4 zfs-linux-2.3.9/config/kernel-sb-dying.m4 --- zfs-linux-2.3.2/config/kernel-sb-dying.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-sb-dying.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # SB_DYING exists since Linux 6.6 dnl # diff -Nru zfs-linux-2.3.2/config/kernel-sb-wb-err.m4 zfs-linux-2.3.9/config/kernel-sb-wb-err.m4 --- zfs-linux-2.3.2/config/kernel-sb-wb-err.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-sb-wb-err.m4 2026-08-21 20:57:12.294005951 +0000 @@ -0,0 +1,28 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +# dnl +# dnl 5.8 (735e4ae5ba28) introduced a superblock scoped errseq_t to use to +# dnl record writeback errors for syncfs() to return. Up until 5.17, when +# dnl sync_fs errors were returned directly, this is the only way for us to +# dnl report an error from syncfs(). +# dnl +AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR], [ + ZFS_LINUX_TEST_SRC([super_block_s_wb_err], [ + #include + + static const struct super_block + sb __attribute__ ((unused)) = { + .s_wb_err = 0, + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR], [ + AC_MSG_CHECKING([whether super_block has s_wb_err]) + ZFS_LINUX_TEST_RESULT([super_block_s_wb_err], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SUPER_BLOCK_S_WB_ERR, 1, + [have super_block s_wb_err]) + ],[ + AC_MSG_RESULT(no) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-sched.m4 zfs-linux-2.3.9/config/kernel-sched.m4 --- zfs-linux-2.3.2/config/kernel-sched.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-sched.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.9 API change, dnl # Moved things from linux/sched.h to linux/sched/rt.h diff -Nru zfs-linux-2.3.2/config/kernel-security-inode-init.m4 zfs-linux-2.3.9/config/kernel-security-inode-init.m4 --- zfs-linux-2.3.2/config/kernel-security-inode-init.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-security-inode-init.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.2 API change dnl # The security_inode_init_security() API has been changed to include diff -Nru zfs-linux-2.3.2/config/kernel-set-nlink.m4 zfs-linux-2.3.9/config/kernel-set-nlink.m4 --- zfs-linux-2.3.2/config/kernel-set-nlink.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-set-nlink.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 3.2 API change dnl # set_nlink() diff -Nru zfs-linux-2.3.2/config/kernel-setattr-prepare.m4 zfs-linux-2.3.9/config/kernel-setattr-prepare.m4 --- zfs-linux-2.3.2/config/kernel-setattr-prepare.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-setattr-prepare.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_SETATTR_PREPARE], [ dnl # dnl # 4.9 API change diff -Nru zfs-linux-2.3.2/config/kernel-sget-args.m4 zfs-linux-2.3.9/config/kernel-sget-args.m4 --- zfs-linux-2.3.2/config/kernel-sget-args.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-sget-args.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -dnl # -dnl # 3.6 API change, -dnl # 'sget' now takes the mount flags as an argument. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_SGET], [ - ZFS_LINUX_TEST_SRC([sget_5args], [ - #include - ],[ - struct file_system_type *type = NULL; - int (*test)(struct super_block *,void *) = NULL; - int (*set)(struct super_block *,void *) = NULL; - int flags = 0; - void *data = NULL; - (void) sget(type, test, set, flags, data); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_SGET], [ - AC_MSG_CHECKING([whether sget() wants 5 args]) - ZFS_LINUX_TEST_RESULT([sget_5args], [ - AC_MSG_RESULT(yes) - ],[ - ZFS_LINUX_TEST_ERROR([sget()]) - ]) -]) diff -Nru zfs-linux-2.3.2/config/kernel-show-options.m4 zfs-linux-2.3.9/config/kernel-show-options.m4 --- zfs-linux-2.3.2/config/kernel-show-options.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-show-options.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 3.3 API dnl # diff -Nru zfs-linux-2.3.2/config/kernel-shrink.m4 zfs-linux-2.3.9/config/kernel-shrink.m4 --- zfs-linux-2.3.2/config/kernel-shrink.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-shrink.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.1 API change dnl # The super_block structure now stores a per-filesystem shrinker. diff -Nru zfs-linux-2.3.2/config/kernel-siginfo.m4 zfs-linux-2.3.9/config/kernel-siginfo.m4 --- zfs-linux-2.3.2/config/kernel-siginfo.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-siginfo.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 4.20 API change dnl # Added kernel_siginfo_t diff -Nru zfs-linux-2.3.2/config/kernel-stdarg.m4 zfs-linux-2.3.9/config/kernel-stdarg.m4 --- zfs-linux-2.3.2/config/kernel-stdarg.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-stdarg.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.15 gets rid of -isystem and external inclusion dnl # and ships its own . Check if this header file does diff -Nru zfs-linux-2.3.2/config/kernel-strlcpy.m4 zfs-linux-2.3.9/config/kernel-strlcpy.m4 --- zfs-linux-2.3.2/config/kernel-strlcpy.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-strlcpy.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 6.8 removed strlcpy. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-symlink.m4 zfs-linux-2.3.9/config/kernel-symlink.m4 --- zfs-linux-2.3.2/config/kernel-symlink.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-symlink.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [ dnl # dnl # 6.3 API change that changed the first arg diff -Nru zfs-linux-2.3.2/config/kernel-sysfs.m4 zfs-linux-2.3.9/config/kernel-sysfs.m4 --- zfs-linux-2.3.2/config/kernel-sysfs.m4 2025-05-01 18:23:23.725214627 +0000 +++ zfs-linux-2.3.9/config/kernel-sysfs.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.2/5.18 API dnl # diff -Nru zfs-linux-2.3.2/config/kernel-timer.m4 zfs-linux-2.3.9/config/kernel-timer.m4 --- zfs-linux-2.3.2/config/kernel-timer.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-timer.m4 2026-08-21 20:57:12.294005951 +0000 @@ -0,0 +1,33 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 6.2: timer_delete_sync introduced, del_timer_sync deprecated and made +dnl # into a simple wrapper +dnl # 6.15: del_timer_sync removed +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC], [ + ZFS_LINUX_TEST_SRC([timer_delete_sync], [ + #include + ],[ + struct timer_list *timer __attribute__((unused)) = NULL; + timer_delete_sync(timer); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_TIMER_DELETE_SYNC], [ + AC_MSG_CHECKING([whether timer_delete_sync() is available]) + ZFS_LINUX_TEST_RESULT([timer_delete_sync], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_TIMER_DELETE_SYNC, 1, + [timer_delete_sync is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER], [ + ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC +]) + +AC_DEFUN([ZFS_AC_KERNEL_TIMER], [ + ZFS_AC_KERNEL_TIMER_DELETE_SYNC +]) diff -Nru zfs-linux-2.3.2/config/kernel-tmpfile.m4 zfs-linux-2.3.9/config/kernel-tmpfile.m4 --- zfs-linux-2.3.2/config/kernel-tmpfile.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-tmpfile.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 3.11 API change dnl # Add support for i_op->tmpfile diff -Nru zfs-linux-2.3.2/config/kernel-totalhigh_pages.m4 zfs-linux-2.3.9/config/kernel-totalhigh_pages.m4 --- zfs-linux-2.3.2/config/kernel-totalhigh_pages.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-totalhigh_pages.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 5.0 API change dnl # diff -Nru zfs-linux-2.3.2/config/kernel-totalram-pages-func.m4 zfs-linux-2.3.9/config/kernel-totalram-pages-func.m4 --- zfs-linux-2.3.2/config/kernel-totalram-pages-func.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-totalram-pages-func.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.0: totalram_pages is no longer a global variable, and must be dnl # read via the totalram_pages() helper function. diff -Nru zfs-linux-2.3.2/config/kernel-truncate-setsize.m4 zfs-linux-2.3.9/config/kernel-truncate-setsize.m4 --- zfs-linux-2.3.2/config/kernel-truncate-setsize.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-truncate-setsize.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.35 API change dnl # Added truncate_setsize() helper function. diff -Nru zfs-linux-2.3.2/config/kernel-types.m4 zfs-linux-2.3.9/config/kernel-types.m4 --- zfs-linux-2.3.2/config/kernel-types.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-types.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # check if kernel provides definitions for given types dnl # diff -Nru zfs-linux-2.3.2/config/kernel-usleep_range.m4 zfs-linux-2.3.9/config/kernel-usleep_range.m4 --- zfs-linux-2.3.2/config/kernel-usleep_range.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-usleep_range.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.36 API compatibility- Added usleep_range timer. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-vfs-file_range.m4 zfs-linux-2.3.9/config/kernel-vfs-file_range.m4 --- zfs-linux-2.3.2/config/kernel-vfs-file_range.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-file_range.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # The *_file_range APIs have a long history: dnl # diff -Nru zfs-linux-2.3.2/config/kernel-vfs-filemap_dirty_folio.m4 zfs-linux-2.3.9/config/kernel-vfs-filemap_dirty_folio.m4 --- zfs-linux-2.3.2/config/kernel-vfs-filemap_dirty_folio.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-filemap_dirty_folio.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.18 uses filemap_dirty_folio in lieu of dnl # ___set_page_dirty_nobuffers diff -Nru zfs-linux-2.3.2/config/kernel-vfs-fsync.m4 zfs-linux-2.3.9/config/kernel-vfs-fsync.m4 --- zfs-linux-2.3.2/config/kernel-vfs-fsync.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-fsync.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.35 API change, dnl # Unused 'struct dentry *' removed from vfs_fsync() prototype. diff -Nru zfs-linux-2.3.2/config/kernel-vfs-iov_iter.m4 zfs-linux-2.3.9/config/kernel-vfs-iov_iter.m4 --- zfs-linux-2.3.2/config/kernel-vfs-iov_iter.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-iov_iter.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for available iov_iter functionality. dnl # diff -Nru zfs-linux-2.3.2/config/kernel-vfs-migrate_folio.m4 zfs-linux-2.3.9/config/kernel-vfs-migrate_folio.m4 --- zfs-linux-2.3.2/config/kernel-vfs-migrate_folio.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-migrate_folio.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 6.0 uses migrate_folio in lieu of migrate_page dnl # diff -Nru zfs-linux-2.3.2/config/kernel-vfs-migratepage.m4 zfs-linux-2.3.9/config/kernel-vfs-migratepage.m4 --- zfs-linux-2.3.2/config/kernel-vfs-migratepage.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-migratepage.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 6.0 gets rid of address_space_operations.migratepage dnl # diff -Nru zfs-linux-2.3.2/config/kernel-vfs-read_folio.m4 zfs-linux-2.3.9/config/kernel-vfs-read_folio.m4 --- zfs-linux-2.3.2/config/kernel-vfs-read_folio.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-read_folio.m4 2026-08-21 20:57:12.294005951 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.19 uses read_folio in lieu of readpage dnl # diff -Nru zfs-linux-2.3.2/config/kernel-vfs-readpages.m4 zfs-linux-2.3.9/config/kernel-vfs-readpages.m4 --- zfs-linux-2.3.2/config/kernel-vfs-readpages.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-readpages.m4 2026-08-21 20:57:12.294005951 +0000 @@ -0,0 +1,26 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Linux 5.18 removes address_space_operations ->readpages in favour of +dnl # ->readahead +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_READPAGES], [ + ZFS_LINUX_TEST_SRC([vfs_has_readpages], [ + #include + + static const struct address_space_operations + aops __attribute__ ((unused)) = { + .readpages = NULL, + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_VFS_READPAGES], [ + AC_MSG_CHECKING([whether aops->readpages exists]) + ZFS_LINUX_TEST_RESULT([vfs_has_readpages], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_VFS_READPAGES, 1, + [address_space_operations->readpages exists]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-vfs-set_page_dirty.m4 zfs-linux-2.3.9/config/kernel-vfs-set_page_dirty.m4 --- zfs-linux-2.3.2/config/kernel-vfs-set_page_dirty.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-set_page_dirty.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Linux 5.14 adds a change to require set_page_dirty to be manually dnl # wired up in struct address_space_operations. Determine if this needs diff -Nru zfs-linux-2.3.2/config/kernel-vfs-writepage.m4 zfs-linux-2.3.9/config/kernel-vfs-writepage.m4 --- zfs-linux-2.3.2/config/kernel-vfs-writepage.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-vfs-writepage.m4 2026-08-21 20:57:12.295005937 +0000 @@ -0,0 +1,25 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Linux 6.16 removes address_space_operations ->writepage +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_WRITEPAGE], [ + ZFS_LINUX_TEST_SRC([vfs_has_writepage], [ + #include + + static const struct address_space_operations + aops __attribute__ ((unused)) = { + .writepage = NULL, + }; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_VFS_WRITEPAGE], [ + AC_MSG_CHECKING([whether aops->writepage exists]) + ZFS_LINUX_TEST_RESULT([vfs_has_writepage], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_VFS_WRITEPAGE, 1, + [address_space_operations->writepage exists]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff -Nru zfs-linux-2.3.2/config/kernel-workqueue.m4 zfs-linux-2.3.9/config/kernel-workqueue.m4 --- zfs-linux-2.3.2/config/kernel-workqueue.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-workqueue.m4 2026-08-21 20:57:12.295005937 +0000 @@ -0,0 +1,77 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # 5.19 API change +dnl # flush_workqueue() will no longer compile for system/global workqueues, +dnl # __flush_workqueue() introduced with no restrictions. +dnl # +dnl # 6.17 API change +dnl # schedule_delayed_work() now queues to system_percpu_wq, system_wq +dnl # deprecated. +dnl # +dnl # We cannot simply test for system_percpu_wq, as it has been backported +dnl # to LTS kernels where it is _not_ used for the delay queue. However, +dnl # the same commit that introduced it on mainline (a2be943b46b4a) also +dnl # added system_percpu_wq to the flush_workqueue() macro as one of the +dnl # global workqueues to reject at compiletime, and removed system_wq. +dnl # That part however, was _not_ backported, so we can use it to determine +dnl # which waitqueue is used for delay - if __flush_workqueue() accepts it, +dnl # but flush_workqueue() does not, then it is the delay workqueue. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_SRC_FLUSH_DELAY_WORKQUEUE], [ + ZFS_LINUX_TEST_SRC([flush_workqueue_system], [ + #include + ], [ + flush_workqueue(system_wq); + ]) + ZFS_LINUX_TEST_SRC([flush_workqueue_percpu], [ + #include + ], [ + flush_workqueue(system_percpu_wq); + ]) + ZFS_LINUX_TEST_SRC([flush_workqueue_internal_system], [ + #include + ], [ + __flush_workqueue(system_wq); + ]) + ZFS_LINUX_TEST_SRC([flush_workqueue_internal_percpu], [ + #include + ], [ + __flush_workqueue(system_percpu_wq); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_FLUSH_DELAY_WORKQUEUE], [ + AC_MSG_CHECKING([how to flush delay workqueue]) + ZFS_LINUX_TEST_RESULT([flush_workqueue_internal_percpu], [ + dnl system_percpu_wq exists. the flush_workqueue() + dnl macro will reject the one used for delay + ZFS_LINUX_TEST_RESULT([flush_workqueue_percpu], [ + AC_MSG_RESULT([internal+system]) + AC_DEFINE(HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL, 1, + [use __flush_workqueue() to flush delay workqueue]) + ], [ + AC_MSG_RESULT([internal+percpu]) + AC_DEFINE(HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL, 1, + [use __flush_workqueue() to flush delay workqueue]) + AC_DEFINE(HAVE_FLUSH_DELAY_WORKQUEUE_PERCPU, 1, + [use system_delay_wq for delay workqueue]) + ]) + ], [ + dnl system_percpu_wq does not exist. use whichever did + dnl not reject it + ZFS_LINUX_TEST_RESULT([flush_workqueue_internal_system], [ + AC_MSG_RESULT([internal+system]) + AC_DEFINE(HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL, 1, + [use __flush_workqueue() to flush delay workqueue]) + ], [ + AC_MSG_RESULT([system]) + ]) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_WORKQUEUE], [ + ZFS_AC_KERNEL_SRC_FLUSH_DELAY_WORKQUEUE +]) +AC_DEFUN([ZFS_AC_KERNEL_WORKQUEUE], [ + ZFS_AC_KERNEL_FLUSH_DELAY_WORKQUEUE +]) diff -Nru zfs-linux-2.3.2/config/kernel-writeback.m4 zfs-linux-2.3.9/config/kernel-writeback.m4 --- zfs-linux-2.3.2/config/kernel-writeback.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/kernel-writeback.m4 2026-08-21 20:57:12.295005937 +0000 @@ -0,0 +1,59 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [ + dnl # + dnl # 6.3 API change + dnl # The writepage_t function type now has its first argument as + dnl # struct folio* instead of struct page* + dnl # + ZFS_LINUX_TEST_SRC([writepage_t_folio], [ + #include + static int putpage(struct folio *folio, + struct writeback_control *wbc, void *data) + { return 0; } + writepage_t func = putpage; + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_WRITEPAGE_T], [ + AC_MSG_CHECKING([whether int (*writepage_t)() takes struct folio*]) + ZFS_LINUX_TEST_RESULT([writepage_t_folio], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WRITEPAGE_T_FOLIO, 1, + [int (*writepage_t)() takes struct folio*]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITE_CACHE_PAGES], [ + dnl # + dnl # 6.18 API change + dnl # write_cache_pages() has been removed. + dnl # + ZFS_LINUX_TEST_SRC([write_cache_pages], [ + #include + ], [ + (void) write_cache_pages(NULL, NULL, NULL, NULL); + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_WRITE_CACHE_PAGES], [ + AC_MSG_CHECKING([whether write_cache_pages() is available]) + ZFS_LINUX_TEST_RESULT([write_cache_pages], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_WRITE_CACHE_PAGES, 1, + [write_cache_pages() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEBACK], [ + ZFS_AC_KERNEL_SRC_WRITEPAGE_T + ZFS_AC_KERNEL_SRC_WRITE_CACHE_PAGES +]) + +AC_DEFUN([ZFS_AC_KERNEL_WRITEBACK], [ + ZFS_AC_KERNEL_WRITEPAGE_T + ZFS_AC_KERNEL_WRITE_CACHE_PAGES +]) diff -Nru zfs-linux-2.3.2/config/kernel-writepage_t.m4 zfs-linux-2.3.9/config/kernel-writepage_t.m4 --- zfs-linux-2.3.2/config/kernel-writepage_t.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-writepage_t.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [ - dnl # - dnl # 6.3 API change - dnl # The writepage_t function type now has its first argument as - dnl # struct folio* instead of struct page* - dnl # - ZFS_LINUX_TEST_SRC([writepage_t_folio], [ - #include - static int putpage(struct folio *folio, - struct writeback_control *wbc, void *data) - { return 0; } - writepage_t func = putpage; - ],[]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_WRITEPAGE_T], [ - AC_MSG_CHECKING([whether int (*writepage_t)() takes struct folio*]) - ZFS_LINUX_TEST_RESULT([writepage_t_folio], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WRITEPAGE_T_FOLIO, 1, - [int (*writepage_t)() takes struct folio*]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - diff -Nru zfs-linux-2.3.2/config/kernel-xattr-handler.m4 zfs-linux-2.3.9/config/kernel-xattr-handler.m4 --- zfs-linux-2.3.2/config/kernel-xattr-handler.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-xattr-handler.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # 2.6.35 API change, dnl # The 'struct xattr_handler' was constified in the generic diff -Nru zfs-linux-2.3.2/config/kernel-zero_page.m4 zfs-linux-2.3.9/config/kernel-zero_page.m4 --- zfs-linux-2.3.2/config/kernel-zero_page.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel-zero_page.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # ZERO_PAGE() is an alias for emtpy_zero_page. On certain architectures dnl # this is a GPL exported variable. diff -Nru zfs-linux-2.3.2/config/kernel.m4 zfs-linux-2.3.9/config/kernel.m4 --- zfs-linux-2.3.2/config/kernel.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/kernel.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Default ZFS kernel configuration dnl # @@ -59,10 +60,12 @@ ZFS_AC_KERNEL_SRC_ACL ZFS_AC_KERNEL_SRC_INODE_SETATTR ZFS_AC_KERNEL_SRC_INODE_GETATTR + ZFS_AC_KERNEL_SRC_INODE_STATE_READ_ONCE ZFS_AC_KERNEL_SRC_SHOW_OPTIONS ZFS_AC_KERNEL_SRC_SHRINKER ZFS_AC_KERNEL_SRC_MKDIR ZFS_AC_KERNEL_SRC_LOOKUP_FLAGS + ZFS_AC_KERNEL_SRC_IDMAP ZFS_AC_KERNEL_SRC_CREATE ZFS_AC_KERNEL_SRC_PERMISSION ZFS_AC_KERNEL_SRC_TMPFILE @@ -70,18 +73,22 @@ ZFS_AC_KERNEL_SRC_COMMIT_METADATA ZFS_AC_KERNEL_SRC_SETATTR_PREPARE ZFS_AC_KERNEL_SRC_INSERT_INODE_LOCKED + ZFS_AC_KERNEL_SRC_DENTRY + ZFS_AC_KERNEL_SRC_DENTRY_ALIAS_D_U ZFS_AC_KERNEL_SRC_TRUNCATE_SETSIZE ZFS_AC_KERNEL_SRC_SECURITY_INODE - ZFS_AC_KERNEL_SRC_FST_MOUNT + ZFS_AC_KERNEL_SRC_FS_CONTEXT + ZFS_AC_KERNEL_SRC_FS_PARSE + ZFS_AC_KERNEL_SRC_VFS_PARSE_FS_STRING_3ARGS ZFS_AC_KERNEL_SRC_SB_DYING ZFS_AC_KERNEL_SRC_SET_NLINK - ZFS_AC_KERNEL_SRC_SGET ZFS_AC_KERNEL_SRC_VFS_FILEMAP_DIRTY_FOLIO ZFS_AC_KERNEL_SRC_VFS_READ_FOLIO ZFS_AC_KERNEL_SRC_VFS_MIGRATE_FOLIO ZFS_AC_KERNEL_SRC_VFS_MIGRATEPAGE ZFS_AC_KERNEL_SRC_VFS_FSYNC_2ARGS ZFS_AC_KERNEL_SRC_VFS_READPAGES + ZFS_AC_KERNEL_SRC_VFS_WRITEPAGE ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS ZFS_AC_KERNEL_SRC_VFS_IOV_ITER ZFS_AC_KERNEL_SRC_VFS_GENERIC_COPY_FILE_RANGE @@ -91,7 +98,7 @@ ZFS_AC_KERNEL_SRC_VFS_DEDUPE_FILE_RANGE ZFS_AC_KERNEL_SRC_KMAP_ATOMIC_ARGS ZFS_AC_KERNEL_SRC_KMAP_LOCAL_PAGE - ZFS_AC_KERNEL_SRC_FOLLOW_DOWN_ONE + ZFS_AC_KERNEL_SRC_FOLLOW_DOWN ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN ZFS_AC_KERNEL_SRC_GENERIC_IO_ACCT ZFS_AC_KERNEL_SRC_FPU @@ -111,14 +118,14 @@ ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG ZFS_AC_KERNEL_SRC_STRLCPY ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT + ZFS_AC_KERNEL_SRC_PAGEMAP_READAHEAD_PAGE ZFS_AC_KERNEL_SRC_ADD_DISK ZFS_AC_KERNEL_SRC_KTHREAD ZFS_AC_KERNEL_SRC_ZERO_PAGE - ZFS_AC_KERNEL_SRC___COPY_FROM_USER_INATOMIC ZFS_AC_KERNEL_SRC_IDMAP_MNT_API ZFS_AC_KERNEL_SRC_IDMAP_NO_USERNS ZFS_AC_KERNEL_SRC_IATTR_VFSID - ZFS_AC_KERNEL_SRC_WRITEPAGE_T + ZFS_AC_KERNEL_SRC_WRITEBACK ZFS_AC_KERNEL_SRC_RECLAIMED ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_SZ @@ -130,6 +137,14 @@ ZFS_AC_KERNEL_SRC_MM_PAGE_MAPPING ZFS_AC_KERNEL_SRC_FILE ZFS_AC_KERNEL_SRC_PIN_USER_PAGES + ZFS_AC_KERNEL_SRC_TIMER + ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_WB_ERR + ZFS_AC_KERNEL_SRC_SOPS_FREE_INODE + ZFS_AC_KERNEL_SRC_NAMESPACE + ZFS_AC_KERNEL_SRC_INODE_GENERIC_DROP + ZFS_AC_KERNEL_SRC_KASAN_ENABLED + ZFS_AC_KERNEL_SRC_FILELOCK_HEADER + ZFS_AC_KERNEL_SRC_WORKQUEUE case "$host_cpu" in powerpc*) ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE @@ -140,9 +155,7 @@ ;; esac - AC_MSG_CHECKING([for available kernel interfaces]) - ZFS_LINUX_TEST_COMPILE_ALL([kabi]) - AC_MSG_RESULT([done]) + ZFS_LINUX_TEST_COMPILE_ALL([kabi], [for available kernel interfaces]) ]) dnl # @@ -172,10 +185,12 @@ ZFS_AC_KERNEL_ACL ZFS_AC_KERNEL_INODE_SETATTR ZFS_AC_KERNEL_INODE_GETATTR + ZFS_AC_KERNEL_INODE_STATE_READ_ONCE ZFS_AC_KERNEL_SHOW_OPTIONS ZFS_AC_KERNEL_SHRINKER ZFS_AC_KERNEL_MKDIR ZFS_AC_KERNEL_LOOKUP_FLAGS + ZFS_AC_KERNEL_IDMAP ZFS_AC_KERNEL_CREATE ZFS_AC_KERNEL_PERMISSION ZFS_AC_KERNEL_TMPFILE @@ -183,18 +198,22 @@ ZFS_AC_KERNEL_COMMIT_METADATA ZFS_AC_KERNEL_SETATTR_PREPARE ZFS_AC_KERNEL_INSERT_INODE_LOCKED + ZFS_AC_KERNEL_DENTRY + ZFS_AC_KERNEL_DENTRY_ALIAS_D_U ZFS_AC_KERNEL_TRUNCATE_SETSIZE ZFS_AC_KERNEL_SECURITY_INODE - ZFS_AC_KERNEL_FST_MOUNT + ZFS_AC_KERNEL_FS_CONTEXT + ZFS_AC_KERNEL_FS_PARSE + ZFS_AC_KERNEL_VFS_PARSE_FS_STRING_3ARGS ZFS_AC_KERNEL_SB_DYING ZFS_AC_KERNEL_SET_NLINK - ZFS_AC_KERNEL_SGET ZFS_AC_KERNEL_VFS_FILEMAP_DIRTY_FOLIO ZFS_AC_KERNEL_VFS_READ_FOLIO ZFS_AC_KERNEL_VFS_MIGRATE_FOLIO ZFS_AC_KERNEL_VFS_MIGRATEPAGE ZFS_AC_KERNEL_VFS_FSYNC_2ARGS ZFS_AC_KERNEL_VFS_READPAGES + ZFS_AC_KERNEL_VFS_WRITEPAGE ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS ZFS_AC_KERNEL_VFS_IOV_ITER ZFS_AC_KERNEL_VFS_GENERIC_COPY_FILE_RANGE @@ -204,7 +223,7 @@ ZFS_AC_KERNEL_VFS_DEDUPE_FILE_RANGE ZFS_AC_KERNEL_KMAP_ATOMIC_ARGS ZFS_AC_KERNEL_KMAP_LOCAL_PAGE - ZFS_AC_KERNEL_FOLLOW_DOWN_ONE + ZFS_AC_KERNEL_FOLLOW_DOWN ZFS_AC_KERNEL_MAKE_REQUEST_FN ZFS_AC_KERNEL_GENERIC_IO_ACCT ZFS_AC_KERNEL_FPU @@ -224,14 +243,14 @@ ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG ZFS_AC_KERNEL_STRLCPY ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT + ZFS_AC_KERNEL_PAGEMAP_READAHEAD_PAGE ZFS_AC_KERNEL_ADD_DISK ZFS_AC_KERNEL_KTHREAD ZFS_AC_KERNEL_ZERO_PAGE - ZFS_AC_KERNEL___COPY_FROM_USER_INATOMIC ZFS_AC_KERNEL_IDMAP_MNT_API ZFS_AC_KERNEL_IDMAP_NO_USERNS ZFS_AC_KERNEL_IATTR_VFSID - ZFS_AC_KERNEL_WRITEPAGE_T + ZFS_AC_KERNEL_WRITEBACK ZFS_AC_KERNEL_RECLAIMED ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE ZFS_AC_KERNEL_REGISTER_SYSCTL_SZ @@ -244,6 +263,14 @@ ZFS_AC_KERNEL_1ARG_ASSIGN_STR ZFS_AC_KERNEL_FILE ZFS_AC_KERNEL_PIN_USER_PAGES + ZFS_AC_KERNEL_TIMER + ZFS_AC_KERNEL_SUPER_BLOCK_S_WB_ERR + ZFS_AC_KERNEL_SOPS_FREE_INODE + ZFS_AC_KERNEL_NAMESPACE + ZFS_AC_KERNEL_INODE_GENERIC_DROP + ZFS_AC_KERNEL_KASAN_ENABLED + ZFS_AC_KERNEL_FILELOCK_HEADER + ZFS_AC_KERNEL_WORKQUEUE case "$host_cpu" in powerpc*) ZFS_AC_KERNEL_CPU_HAS_FEATURE @@ -427,13 +454,6 @@ AC_MSG_RESULT([$kernsrcver]) - AX_COMPARE_VERSION([$kernsrcver], [ge], [$ZFS_META_KVER_MIN], [], [ - AC_MSG_ERROR([ - *** Cannot build against kernel version $kernsrcver. - *** The minimum supported kernel version is $ZFS_META_KVER_MIN. - ]) - ]) - AC_ARG_ENABLE([linux-experimental], AS_HELP_STRING([--enable-linux-experimental], [Allow building against some unsupported kernel versions])) @@ -736,6 +756,108 @@ ]) dnl # +dnl # Progress output for ZFS_LINUX_TEST_COMPILE_ALL +dnl # +dnl # From clean, we currently have ~250 kernel tests to compile. This can +dnl # take anywhere from a few seconds to a few minutes while we wait for +dnl # the module build invocation to complete (see ZFS_LINUX_COMPILE). +dnl # +dnl # To show some progress in the main set of tests, we start a background +dnl # job to monitor the build progress and update the output. +dnl # +AC_DEFUN([_ZFS_LINUX_TEST_COMPILE_PROGRESS_START], [ + dnl # normal "checking for..." output + AC_MSG_CHECKING([$2]) + + dnl # don't start the background job if configure was called with + dnl # --silent or --quiet, or if configure's output stream is not + dnl # attached to a terminal + AS_IF([test "x$silent" != "xyes" -a -t AS_MESSAGE_FD], [ + dnl # save "checking" message for cleanup later + _zfs_linux_test_progress_text="$2" + + dnl # new shell job in background + ( + dnl # ZFS_LINUX_CONFTEST_MAKEFILE adds one line per + dnl # test to the top Makefile, so the line count + dnl # is our target + total=$(wc -l < $1/Makefile) + count=0 + + dnl # eject if our parent process has gone away. this + dnl # is protection against the parent being killed. + dnl # (we can't use trap because autoconf generates + dnl # that and doesn't provide an easy way to hook it). + while kill -0 $$ 2>/dev/null ; do + + dnl # ZFS_LINUX_TEST_COMPILE_ALL has a short + dnl # second stage for modpost, where build.log + dnl # recreated. we make some effort to both + dnl # detect that and handle it, mostly by + dnl # making sure the counter never goes + dnl # backwards. + if test "$count" -lt "$total" ; then + dnl # if build.log went away, then + dnl # we never got to do a last count, + dnl # so we can assume they're all + dnl # finished and just bump the count + dnl # to the total + if ! test -f $1/build.log ; then + count=$total + else + dnl # look for compilation lines + dnl # (CC) for .o files that + dnl # are in a dir (so not + dnl # whole-of-build artifacts) + dnl # and only have a a single + dnl # period (so not .mod.o + dnl # link artifacts) + count_n=$(awk '/CC/ && /\/[[^\.]]+\.o$/ { c++ } END { print c }' $1/build.log 2>/dev/null) + if test "x$count_n" != "x" ; then + dnl # empty output + dnl # means awk failed, + dnl # likely build.log + dnl # went away. use + dnl # the current count + count=$count_n + fi + fi + + dnl # re-output the entire message with + dnl # the new counts + printf '\rchecking %s... %d/%d' "$2" "$count" "$total" >&6 + fi + + dnl # yield before loop + sleep 0.5 + done + ) & + + dnl # save the pid so we can kill it later + _zfs_linux_test_progress_pid=$! + ]) +]) + +AC_DEFUN([_ZFS_LINUX_TEST_COMPILE_PROGRESS_DONE], [ + dnl # only do cleanup if we actually started the job + AS_IF([test "x$_zfs_linux_test_progress_pid" != "x"], [ + dnl # kill it; no-op if it already died + kill $_zfs_linux_test_progress_pid 2>/dev/null + dnl # wait for it to really go away and clean it up + wait $_zfs_linux_test_progress_pid 2>/dev/null + dnl # reprint the original checking line. the control code + dnl # is ANSI "erase entire line" + printf '\r\033\1332Kchecking %s... ' "$_zfs_linux_test_progress_text" >&AS_MESSAGE_FD + dnl # cleanup for next run + _zfs_linux_test_progress_pid= + _zfs_linux_test_progress_text= + ]) + + dnl # normal final output for screen and config.log + AC_MSG_RESULT([$1]) +]) + +dnl # dnl # Perform the compilation of the test cases in two phases. dnl # dnl # Phase 1) attempt to build the object files for all of the tests @@ -753,6 +875,10 @@ dnl # TEST_JOBS environment variable. Otherwise, it default to $(nproc). dnl # AC_DEFUN([ZFS_LINUX_TEST_COMPILE_ALL], [ + AS_IF([test "x$2" != "x"], [ + _ZFS_LINUX_TEST_COMPILE_PROGRESS_START([build], [$2]) + ]) + dnl # Phase 1 - Compilation only, final linking is skipped. ZFS_LINUX_TEST_COMPILE([$1], [build]) @@ -800,6 +926,10 @@ ]) done ]) + + AS_IF([test "x$2" != "x"], [ + _ZFS_LINUX_TEST_COMPILE_PROGRESS_DONE([done]) + ]) ]) dnl # @@ -875,7 +1005,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX ]) ]) @@ -1046,7 +1176,7 @@ *** APIs. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX ]) ], [ AC_MSG_RESULT(no) diff -Nru zfs-linux-2.3.2/config/lib-ld.m4 zfs-linux-2.3.9/config/lib-ld.m4 --- zfs-linux-2.3.2/config/lib-ld.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/lib-ld.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # lib-ld.m4 serial 9 dnl Copyright (C) 1996-2003, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/lib-link.m4 zfs-linux-2.3.9/config/lib-link.m4 --- zfs-linux-2.3.2/config/lib-link.m4 2025-05-01 18:23:23.726214641 +0000 +++ zfs-linux-2.3.9/config/lib-link.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # lib-link.m4 serial 28 dnl Copyright (C) 2001-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/lib-prefix.m4 zfs-linux-2.3.9/config/lib-prefix.m4 --- zfs-linux-2.3.2/config/lib-prefix.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/lib-prefix.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # lib-prefix.m4 serial 14 dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/libtool.m4 zfs-linux-2.3.9/config/libtool.m4 --- zfs-linux-2.3.2/config/libtool.m4 2025-05-01 18:45:01.714666267 +0000 +++ zfs-linux-2.3.9/config/libtool.m4 2026-08-21 21:15:31.716725542 +0000 @@ -1,7 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -32,7 +31,7 @@ # along with this program. If not, see . ]) -# serial 59 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -182,7 +181,6 @@ m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -221,8 +219,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -780,7 +778,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1044,8 +1042,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1069,12 +1067,17 @@ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1123,12 +1126,12 @@ output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1242,8 +1245,7 @@ # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([for sysroot]) +[AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1260,7 +1262,7 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1290,7 +1292,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1307,7 +1309,7 @@ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1319,7 +1321,7 @@ ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1341,7 +1343,7 @@ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1349,7 +1351,7 @@ emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1357,7 +1359,7 @@ emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1377,14 +1379,14 @@ # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1452,7 +1454,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1491,22 +1493,9 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) - -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because thats what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS -_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. -_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], - [Flags to create an archive]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1725,7 +1714,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1768,7 +1757,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -2218,35 +2207,26 @@ striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -z "$STRIP"; then - AC_MSG_RESULT([no]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) + else AC_MSG_RESULT([no]) - ;; - esac - fi + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2569,7 +2549,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; @@ -2579,14 +2559,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -2605,7 +2585,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2642,7 +2622,7 @@ ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2675,7 +2655,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3477,7 +3457,7 @@ bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3511,14 +3491,14 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3532,7 +3512,7 @@ ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3579,7 +3559,7 @@ newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3706,13 +3686,13 @@ mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -3738,7 +3718,7 @@ # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -3978,7 +3958,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -3996,20 +3976,20 @@ # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -4033,7 +4013,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ @@ -4051,9 +4031,9 @@ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else - lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -4340,7 +4320,7 @@ ;; esac ;; - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4423,7 +4403,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4759,7 +4739,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4942,7 +4922,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -4950,7 +4930,7 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl* | icl*) + cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -5007,15 +4987,15 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -5067,7 +5047,7 @@ _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -5179,7 +5159,6 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) @@ -5194,7 +5173,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5237,7 +5216,7 @@ _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes @@ -5249,7 +5228,7 @@ if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -5265,7 +5244,7 @@ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -5397,7 +5376,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5580,12 +5559,12 @@ cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl*) - # Native MSVC or ICC + cl*) + # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5626,7 +5605,7 @@ fi' ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. @@ -5674,7 +5653,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5885,7 +5864,6 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6656,8 +6634,8 @@ cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl* | ,icl* | no,icl*) - # Native MSVC or ICC + ,cl* | no,cl*) + # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6755,7 +6733,6 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) @@ -6786,7 +6763,7 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes @@ -6923,7 +6900,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -7063,13 +7040,13 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -8215,14 +8192,6 @@ AC_SUBST([DLLTOOL]) ]) -# _LT_DECL_FILECMD -# ---------------- -# Check for a file(cmd) program that can be used to detect file type and magic -m4_defun([_LT_DECL_FILECMD], -[AC_CHECK_TOOL([FILECMD], [file], [:]) -_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) -])# _LD_DECL_FILECMD - # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff -Nru zfs-linux-2.3.2/config/ltmain.sh zfs-linux-2.3.9/config/ltmain.sh --- zfs-linux-2.3.2/config/ltmain.sh 2025-05-01 18:45:01.633664700 +0000 +++ zfs-linux-2.3.9/config/ltmain.sh 2026-08-21 21:15:31.663726171 +0000 @@ -1,12 +1,12 @@ -#! /usr/bin/env sh +#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2019-02-19.15 +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.7 +# libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.7 -package_revision=2.4.7 +VERSION=2.4.6 +package_revision=2.4.6 ## ------ ## @@ -64,25 +64,34 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2019-02-19.15; # UTC +scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# This is free software. There is NO warranty; not even for -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Copyright (C) 2004-2019, 2021 Bootstrap Authors -# -# This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of -# these licenses when using or redistributing this software or any of -# the files within it. See the URLs above, or the file `LICENSE` -# included in the Bootstrap distribution for the full license texts. +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . -# Please report bugs or propose patches to: -# +# Please report bugs or propose patches to gary@gnu.org. ## ------ ## @@ -130,12 +139,9 @@ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -# These NLS vars are set unconditionally (bootstrap issue #24). Unset those -# in case the environment reset is needed later and the $save_* variant is not -# defined (see the code above). -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' @@ -153,26 +159,6 @@ fi -# func_unset VAR -# -------------- -# Portably unset VAR. -# In some shells, an 'unset VAR' statement leaves a non-zero return -# status if VAR is already unset, which might be problematic if the -# statement is used at the end of a function (thus poisoning its return -# value) or when 'set -e' is active (causing even a spurious abort of -# the script in this case). -func_unset () -{ - { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } -} - - -# Make sure CDPATH doesn't cause `cd` commands to output the target dir. -func_unset CDPATH - -# Make sure ${,E,F}GREP behave sanely. -func_unset GREP_OPTIONS - ## ------------------------- ## ## Locate command utilities. ## @@ -273,7 +259,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } @@ -309,7 +295,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } @@ -374,35 +360,6 @@ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" -# require_check_ifs_backslash -# --------------------------- -# Check if we can use backslash as IFS='\' separator, and set -# $check_ifs_backshlash_broken to ':' or 'false'. -require_check_ifs_backslash=func_require_check_ifs_backslash -func_require_check_ifs_backslash () -{ - _G_save_IFS=$IFS - IFS='\' - _G_check_ifs_backshlash='a\\b' - for _G_i in $_G_check_ifs_backshlash - do - case $_G_i in - a) - check_ifs_backshlash_broken=false - ;; - '') - break - ;; - *) - check_ifs_backshlash_broken=: - break - ;; - esac - done - IFS=$_G_save_IFS - require_check_ifs_backslash=: -} - ## ----------------- ## ## Global variables. ## @@ -623,16 +580,16 @@ { $debug_cmd - func_quote_arg pretty "$2" - eval "$1+=\\ \$func_quote_arg_result" + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd - func_quote_arg pretty "$2" - eval "$1=\$$1\\ \$func_quote_arg_result" + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi @@ -1134,203 +1091,85 @@ } -# func_quote_portable EVAL ARG -# ---------------------------- -# Internal function to portably implement func_quote_arg. Note that we still -# keep attention to performance here so we as much as possible try to avoid -# calling sed binary (so far O(N) complexity as long as func_append is O(1)). -func_quote_portable () +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () { $debug_cmd - $require_check_ifs_backslash - - func_quote_portable_result=$2 - - # one-time-loop (easy break) - while true - do - if $1; then - func_quote_portable_result=`$ECHO "$2" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` - break - fi - - # Quote for eval. - case $func_quote_portable_result in + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in *[\\\`\"\$]*) - # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string - # contains the shell wildcard characters. - case $check_ifs_backshlash_broken$func_quote_portable_result in - :*|*[\[\*\?]*) - func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ - | $SED "$sed_quote_subst"` - break - ;; - esac + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi - func_quote_portable_old_IFS=$IFS - for _G_char in '\' '`' '"' '$' - do - # STATE($1) PREV($2) SEPARATOR($3) - set start "" "" - func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy - IFS=$_G_char - for _G_part in $func_quote_portable_result - do - case $1 in - quote) - func_append func_quote_portable_result "$3$2" - set quote "$_G_part" "\\$_G_char" - ;; - start) - set first "" "" - func_quote_portable_result= - ;; - first) - set quote "$_G_part" "" - ;; - esac - done - done - IFS=$func_quote_portable_old_IFS + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" ;; - *) ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; esac - break - done - func_quote_portable_unquoted_result=$func_quote_portable_result - case $func_quote_portable_result in - # double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # many bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_portable_result=\"$func_quote_portable_result\" - ;; - esac + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done } -# func_quotefast_eval ARG -# ----------------------- -# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', -# but optimized for speed. Result is stored in $func_quotefast_eval. -if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then - printf -v _GL_test_printf_tilde %q '~' - if test '\~' = "$_GL_test_printf_tilde"; then - func_quotefast_eval () - { - printf -v func_quotefast_eval_result %q "$1" - } - else - # Broken older Bash implementations. Make those faster too if possible. - func_quotefast_eval () - { - case $1 in - '~'*) - func_quote_portable false "$1" - func_quotefast_eval_result=$func_quote_portable_result - ;; - *) - printf -v func_quotefast_eval_result %q "$1" - ;; - esac - } - fi -else - func_quotefast_eval () - { - func_quote_portable false "$1" - func_quotefast_eval_result=$func_quote_portable_result - } -fi - +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd -# func_quote_arg MODEs ARG -# ------------------------ -# Quote one ARG to be evaled later. MODEs argument may contain zero or more -# specifiers listed below separated by ',' character. This function returns two -# values: -# i) func_quote_arg_result -# double-quoted (when needed), suitable for a subsequent eval -# ii) func_quote_arg_unquoted_result -# has all characters that are still active within double -# quotes backslashified. Available only if 'unquoted' is specified. -# -# Available modes: -# ---------------- -# 'eval' (default) -# - escape shell special characters -# 'expand' -# - the same as 'eval'; but do not quote variable references -# 'pretty' -# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might -# be used later in func_quote to get output like: 'echo "a b"' instead -# of 'echo a\ b'. This is slower than default on some shells. -# 'unquoted' -# - produce also $func_quote_arg_unquoted_result which does not contain -# wrapping double-quotes. -# -# Examples for 'func_quote_arg pretty,unquoted string': -# -# string | *_result | *_unquoted_result -# ------------+-----------------------+------------------- -# " | \" | \" -# a b | "a b" | a b -# "a b" | "\"a b\"" | \"a b\" -# * | "*" | * -# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" -# -# Examples for 'func_quote_arg pretty,unquoted,expand string': -# -# string | *_result | *_unquoted_result -# --------------+---------------------+-------------------- -# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" -func_quote_arg () -{ - _G_quote_expand=false - case ,$1, in - *,expand,*) - _G_quote_expand=: - ;; + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; esac - case ,$1, in - *,pretty,*|*,expand,*|*,unquoted,*) - func_quote_portable $_G_quote_expand "$2" - func_quote_arg_result=$func_quote_portable_result - func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result - ;; - *) - # Faster quote-for-eval for some shells. - func_quotefast_eval "$2" - func_quote_arg_result=$func_quotefast_eval_result + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" ;; esac -} - -# func_quote MODEs ARGs... -# ------------------------ -# Quote all ARGs to be evaled later and join them into single command. See -# func_quote_arg's description for more info. -func_quote () -{ - $debug_cmd - _G_func_quote_mode=$1 ; shift - func_quote_result= - while test 0 -lt $#; do - func_quote_arg "$_G_func_quote_mode" "$1" - if test -n "$func_quote_result"; then - func_append func_quote_result " $func_quote_arg_result" - else - func_append func_quote_result "$func_quote_arg_result" - fi - shift - done + func_quote_for_expand_result=$_G_arg } @@ -1376,8 +1215,8 @@ _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_arg pretty,expand "$_G_cmd" - eval "func_notquiet $func_quote_arg_result" + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" @@ -1402,8 +1241,8 @@ _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_arg expand,pretty "$_G_cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { @@ -1530,26 +1369,30 @@ # End: #! /bin/sh +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# This is free software. There is NO warranty; not even for -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Copyright (C) 2010-2019, 2021 Bootstrap Authors -# -# This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of -# these licenses when using or redistributing this software or any of -# the files within it. See the URLs above, or the file `LICENSE` -# included in the Bootstrap distribution for the full license texts. +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# Please report bugs or propose patches to: -# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. -# Set a version string for this script. -scriptversion=2019-02-19.15; # UTC +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. ## ------ ## @@ -1572,7 +1415,7 @@ # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# Copyright'. +# starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1584,7 +1427,7 @@ # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug in processing for additional +# After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1633,8 +1476,8 @@ ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# in the main code. A hook is just a list of function names that can be -# run in order later on. +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1667,8 +1510,7 @@ # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of hook functions to be called by -# FUNC_NAME. +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1677,28 +1519,10 @@ } -# func_propagate_result FUNC_NAME_A FUNC_NAME_B -# --------------------------------------------- -# If the *_result variable of FUNC_NAME_A _is set_, assign its value to -# *_result variable of FUNC_NAME_B. -func_propagate_result () -{ - $debug_cmd - - func_propagate_result_result=: - if eval "test \"\${${1}_result+set}\" = set" - then - eval "${2}_result=\$${1}_result" - else - func_propagate_result_result=false - fi -} - - # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It's assumed that the list of hook functions contains nothing more +# It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1708,19 +1532,22 @@ case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook functions." ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - func_unset "${_G_hook}_result" - eval $_G_hook '${1+"$@"}' - func_propagate_result $_G_hook func_run_hooks - if $func_propagate_result_result; then - eval set dummy "$func_run_hooks_result"; shift - fi + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } @@ -1730,18 +1557,10 @@ ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list from your hook function. You may remove -# or edit any options that you action, and then pass back the remaining -# unprocessed options in '_result', escaped -# suitably for 'eval'. -# -# The '_result' variable is automatically unset -# before your hook gets called; for best performance, only set the -# *_result variable when necessary (i.e. don't call the 'func_quote' -# function unnecessarily because it can be an expensive operation on some -# machines). -# -# Like this: +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: # # my_options_prep () # { @@ -1751,8 +1570,9 @@ # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). Leave -# # my_options_prep_result variable intact. +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # @@ -1761,36 +1581,25 @@ # { # $debug_cmd # -# args_changed=false -# -# # Note that, for efficiency, we parse as many options as we can +# # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: -# args_changed=: -# ;; +# --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift -# args_changed=: # ;; -# *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@" in case we need it later, -# # if $args_changed was set to 'true'. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # -# # Only call 'func_quote' here if we processed at least one argument. -# if $args_changed; then -# func_quote eval ${1+"$@"} -# my_silent_option_result=$func_quote_result -# fi +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # @@ -1801,26 +1610,17 @@ # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll also need to manually amend $usage_message to reflect the extra +# You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. -# func_options_finish [ARG]... -# ---------------------------- -# Finishing the option parse loop (call 'func_options' hooks ATM). -func_options_finish () -{ - $debug_cmd - - func_run_hooks func_options ${1+"$@"} - func_propagate_result func_run_hooks func_options_finish -} - - # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1830,27 +1630,17 @@ { $debug_cmd - _G_options_quoted=false + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} - for my_func in options_prep parse_options validate_options options_finish - do - func_unset func_${my_func}_result - func_unset func_run_hooks_result - eval func_$my_func '${1+"$@"}' - func_propagate_result func_$my_func func_options - if $func_propagate_result_result; then - eval set dummy "$func_options_result"; shift - _G_options_quoted=: - fi - done + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} - $_G_options_quoted || { - # As we (func_options) are top-level options-parser function and - # nobody quoted "$@" for us yet, we need to do it explicitly for - # caller. - func_quote eval ${1+"$@"} - func_options_result=$func_quote_result - } + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } @@ -1859,8 +1649,9 @@ # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before returning. +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. func_hookable func_options_prep func_options_prep () { @@ -1871,7 +1662,9 @@ opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - func_propagate_result func_run_hooks func_options_prep + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } @@ -1883,32 +1676,25 @@ { $debug_cmd - _G_parse_options_requote=false + func_parse_options_result= + # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - func_propagate_result func_run_hooks func_parse_options - if $func_propagate_result_result; then - eval set dummy "$func_parse_options_result"; shift - # Even though we may have changed "$@", we passed the "$@" array - # down into the hook and it quoted it for us (because we are in - # this if-branch). No need to quote it again. - _G_parse_options_requote=false - fi + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break - # We expect that one of the options parsed in this function matches - # and thus we remove _G_opt from "$@" and need to re-quote. - _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" >&2 + func_echo "enabling shell trace mode" $debug_cmd ;; @@ -1918,10 +1704,7 @@ ;; --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_parse_options_requote=: - break - fi + test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1974,24 +1757,15 @@ shift ;; - --) _G_parse_options_requote=: ; break ;; + --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - - if $_G_match_parse_options; then - _G_parse_options_requote=: - fi done - if $_G_parse_options_requote; then - # save modified positional parameters for caller - func_quote eval ${1+"$@"} - func_parse_options_result=$func_quote_result - fi + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } @@ -2008,10 +1782,12 @@ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} - func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } @@ -2067,8 +1843,8 @@ # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables -# after splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -2083,9 +1859,8 @@ func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - if test "x$func_split_equals_lhs" = "x$1"; then - func_split_equals_rhs= - fi + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -2095,7 +1870,7 @@ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs=" = "x$1" \ + test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -2121,7 +1896,7 @@ { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -2163,44 +1938,31 @@ # func_version # ------------ # Echo version message to standard output and exit. -# The version message is extracted from the calling file's header -# comments, with leading '# ' stripped: -# 1. First display the progname and version -# 2. Followed by the header comment line matching /^# Written by / -# 3. Then a blank line followed by the first following line matching -# /^# Copyright / -# 4. Immediately followed by any lines between the previous matches, -# except lines preceding the intervening completely blank line. -# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /^# Written by /!b - s|^# ||; p; n - - :fwd2blnk - /./ { - n - b fwd2blnk + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more } - p; n - - :holdwrnt - s|^# || - s|^# *$|| - /^Copyright /!{ - /./H - n - b holdwrnt + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p } - - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - G - s|\(\n\)\n*|\1|g - p; q' < "$progpath" + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" exit $? } @@ -2210,12 +1972,12 @@ # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.7' +scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... @@ -2306,7 +2068,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.7 + version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2508,8 +2270,6 @@ nonopt= preserve_args= - _G_rc_lt_options_prep=: - # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2533,16 +2293,11 @@ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; - *) - _G_rc_lt_options_prep=false - ;; esac - if $_G_rc_lt_options_prep; then - # Pass back the list of options. - func_quote eval ${1+"$@"} - libtool_options_prep_result=$func_quote_result - fi + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep @@ -2554,12 +2309,9 @@ { $debug_cmd - _G_rc_lt_parse_options=false - # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do - _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2634,20 +2386,15 @@ func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - if $_G_rc_lt_parse_options; then - # save modified positional parameters for caller - func_quote eval ${1+"$@"} - libtool_parse_options_result=$func_quote_result - fi + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options @@ -2668,10 +2415,17 @@ # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - # Keeping compiler generated duplicates in $postdeps and $predeps is not - # harmful, and is necessary in a majority of systems that use it to satisfy - # symbol dependencies. - opt_duplicate_compiler_generated_deps=: + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac $opt_help || { # Sanity checks first: @@ -2697,8 +2451,8 @@ } # Pass back the unparsed argument list - func_quote eval ${1+"$@"} - libtool_validate_options_result=$func_quote_result + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options @@ -3664,8 +3418,8 @@ esac done - func_quote_arg pretty "$libobj" - test "X$libobj" != "X$func_quote_arg_result" \ + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3738,8 +3492,8 @@ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_arg pretty "$srcfile" - qsrcfile=$func_quote_arg_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3894,8 +3648,7 @@ -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG - -Xcompiler FLAG pass FLAG directly to the compiler + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -4001,8 +3754,6 @@ -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wa,FLAG - -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4345,8 +4096,8 @@ case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_arg pretty "$nonopt" - install_prog="$func_quote_arg_result " + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " arg=$1 shift else @@ -4356,8 +4107,8 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_arg pretty "$arg" - func_append install_prog "$func_quote_arg_result" + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4414,12 +4165,12 @@ esac # Aesthetically quote the argument. - func_quote_arg pretty "$arg" - func_append install_prog " $func_quote_arg_result" + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then - func_quote_arg pretty "$arg2" + func_quote_for_eval "$arg2" fi - func_append install_shared_prog " $func_quote_arg_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -4430,8 +4181,8 @@ if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_arg pretty "$install_override_mode" - func_append install_shared_prog " -m $func_quote_arg_result" + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -4727,8 +4478,8 @@ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_arg expand,pretty "$relink_command" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else @@ -5507,8 +5258,7 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - func_quote_arg pretty "$ECHO" - qECHO=$func_quote_arg_result + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5518,7 +5268,7 @@ \$1 _LTECHO_EOF' } - ECHO=$qECHO + ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to @@ -6861,9 +6611,9 @@ while test "$#" -gt 0; do arg=$1 shift - func_quote_arg pretty,unquoted "$arg" - qarg=$func_quote_arg_unquoted_result - func_append libtool_args " $func_quote_arg_result" + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -7099,13 +6849,6 @@ prev= continue ;; - xassembler) - func_append compiler_flags " -Xassembler $qarg" - prev= - func_append compile_command " -Xassembler $qarg" - func_append finalize_command " -Xassembler $qarg" - continue - ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7276,7 +7019,7 @@ # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7296,7 +7039,7 @@ esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7326,20 +7069,8 @@ prev=xcompiler continue ;; - # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. - -pthread) - case $host in - *solaris2*) ;; - *) - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - ;; - esac - continue - ;; - -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7480,9 +7211,9 @@ save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_arg pretty "$flag" - func_append arg " $func_quote_arg_result" - func_append compiler_flags " $func_quote_arg_result" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7496,21 +7227,16 @@ save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_arg pretty "$flag" - func_append arg " $wl$func_quote_arg_result" - func_append compiler_flags " $wl$func_quote_arg_result" - func_append linker_flags " $func_quote_arg_result" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; - -Xassembler) - prev=xassembler - continue - ;; - -Xcompiler) prev=xcompiler continue @@ -7528,8 +7254,8 @@ # -msg_* for osf cc -msg_*) - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -7548,15 +7274,12 @@ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - # -fuse-ld=* Linker select flags for GCC - # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + -specs=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7577,15 +7300,15 @@ continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result ;; *.$objext) @@ -7705,8 +7428,8 @@ *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result ;; esac # arg @@ -8911,7 +8634,7 @@ test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -9084,7 +8807,7 @@ # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -9175,7 +8898,7 @@ versuffix=.$current.$revision ;; - freebsd-elf | midnightbsd-elf) + freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9401,7 +9124,7 @@ *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -10212,8 +9935,8 @@ for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_arg expand,pretty "$cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10306,8 +10029,8 @@ eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_arg expand,pretty "$cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10781,13 +10504,12 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_arg pretty "$var_value" - relink_command="$var=$func_quote_arg_result; export $var; $relink_command" + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done - func_quote eval cd "`pwd`" - func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" - relink_command=$func_quote_arg_unquoted_result + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -11027,15 +10749,13 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_arg pretty,unquoted "$var_value" - relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. - func_quote eval cd "`pwd`" - relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - func_quote_arg pretty,unquoted "$relink_command" - relink_command=$func_quote_arg_unquoted_result + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi diff -Nru zfs-linux-2.3.2/config/ltoptions.m4 zfs-linux-2.3.9/config/ltoptions.m4 --- zfs-linux-2.3.2/config/ltoptions.m4 2025-05-01 18:45:02.077673286 +0000 +++ zfs-linux-2.3.9/config/ltoptions.m4 2026-08-21 21:15:31.988722315 +0000 @@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free -# Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives diff -Nru zfs-linux-2.3.2/config/ltsugar.m4 zfs-linux-2.3.9/config/ltsugar.m4 --- zfs-linux-2.3.2/config/ltsugar.m4 2025-05-01 18:45:02.505681562 +0000 +++ zfs-linux-2.3.9/config/ltsugar.m4 2026-08-21 21:15:32.283718816 +0000 @@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff -Nru zfs-linux-2.3.2/config/ltversion.m4 zfs-linux-2.3.9/config/ltversion.m4 --- zfs-linux-2.3.2/config/ltversion.m4 2025-05-01 18:45:02.877688756 +0000 +++ zfs-linux-2.3.9/config/ltversion.m4 2026-08-21 21:15:32.574715363 +0000 @@ -1,7 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, -# Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -10,15 +9,15 @@ # @configure_input@ -# serial 4245 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.7]) -m4_define([LT_PACKAGE_REVISION], [2.4.7]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.7' -macro_revision='2.4.7' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru zfs-linux-2.3.2/config/lt~obsolete.m4 zfs-linux-2.3.9/config/lt~obsolete.m4 --- zfs-linux-2.3.2/config/lt~obsolete.m4 2025-05-01 18:45:03.243695834 +0000 +++ zfs-linux-2.3.9/config/lt~obsolete.m4 2026-08-21 21:15:32.836712255 +0000 @@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free -# Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives diff -Nru zfs-linux-2.3.2/config/missing zfs-linux-2.3.9/config/missing --- zfs-linux-2.3.2/config/missing 2025-05-01 18:45:10.288832067 +0000 +++ zfs-linux-2.3.9/config/missing 2026-08-21 21:15:39.479633447 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru zfs-linux-2.3.2/config/mount-helper.m4 zfs-linux-2.3.9/config/mount-helper.m4 --- zfs-linux-2.3.2/config/mount-helper.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/mount-helper.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_MOUNT_HELPER], [ AC_ARG_WITH(mounthelperdir, AS_HELP_STRING([--with-mounthelperdir=DIR], diff -Nru zfs-linux-2.3.2/config/nls.m4 zfs-linux-2.3.9/config/nls.m4 --- zfs-linux-2.3.2/config/nls.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/nls.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019 Free Software dnl Foundation, Inc. diff -Nru zfs-linux-2.3.2/config/pkg.m4 zfs-linux-2.3.9/config/pkg.m4 --- zfs-linux-2.3.2/config/pkg.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/pkg.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later WITH Autoconf-exception-generic # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) diff -Nru zfs-linux-2.3.2/config/po.m4 zfs-linux-2.3.9/config/po.m4 --- zfs-linux-2.3.2/config/po.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/po.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # po.m4 serial 30 (gettext-0.20) dnl Copyright (C) 1995-2014, 2016, 2018-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/progtest.m4 zfs-linux-2.3.9/config/progtest.m4 --- zfs-linux-2.3.2/config/progtest.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/progtest.m4 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: FSFULLR # progtest.m4 serial 7 (gettext-0.18.2) dnl Copyright (C) 1996-2003, 2005, 2008-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation diff -Nru zfs-linux-2.3.2/config/rpm.am zfs-linux-2.3.9/config/rpm.am --- zfs-linux-2.3.2/config/rpm.am 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/rpm.am 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 ############################################################################### # Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC. # Copyright (C) 2007 The Regents of the University of California. diff -Nru zfs-linux-2.3.2/config/tgz.am zfs-linux-2.3.9/config/tgz.am --- zfs-linux-2.3.2/config/tgz.am 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/tgz.am 2026-08-21 20:57:12.295005937 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 PHONY += tgz tgz-kmod tgz-utils tgz-local tgz-local: diff -Nru zfs-linux-2.3.2/config/toolchain-cfi.m4 zfs-linux-2.3.9/config/toolchain-cfi.m4 --- zfs-linux-2.3.2/config/toolchain-cfi.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/toolchain-cfi.m4 2026-08-21 20:57:12.296005923 +0000 @@ -0,0 +1,33 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Check whether assembler supports .cfi_negate_ra_state on AArch64. +dnl # + +AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_CFI_PSEUDO_OP], [ + case "$host_cpu" in + aarch64*) + AC_CACHE_CHECK([whether assembler supports .cfi_negate_ra_state], + [zfs_cv_as_cfi_pseudo_op], [ + cat > conftest.S <<_ACEOF + .text +conftest: + .cfi_startproc + .cfi_negate_ra_state + ret + .cfi_endproc +_ACEOF + if AC_TRY_COMMAND([$CC -c $CFLAGS $CPPFLAGS conftest.S -o conftest.o]) >/dev/null 2>&1; then + zfs_cv_as_cfi_pseudo_op=yes + else + zfs_cv_as_cfi_pseudo_op=no + fi + rm -f conftest.S conftest.o + ]) + + AS_IF([test "x$zfs_cv_as_cfi_pseudo_op" = xyes], [ + AC_DEFINE([HAVE_AS_CFI_PSEUDO_OP], 1, + [Define if your assembler supports .cfi_negate_ra_state.]) + ]) + ;; + esac +]) diff -Nru zfs-linux-2.3.2/config/toolchain-simd.m4 zfs-linux-2.3.9/config/toolchain-simd.m4 --- zfs-linux-2.3.2/config/toolchain-simd.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/toolchain-simd.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Checks if host toolchain supports SIMD instructions dnl # @@ -38,9 +39,10 @@ AC_MSG_CHECKING([whether host toolchain supports SSE]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { __asm__ __volatile__("xorps %xmm0, %xmm1"); + return (0); } ]])], [ AC_DEFINE([HAVE_SSE], 1, [Define if host toolchain supports SSE]) @@ -57,9 +59,10 @@ AC_MSG_CHECKING([whether host toolchain supports SSE2]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { __asm__ __volatile__("pxor %xmm0, %xmm1"); + return (0); } ]])], [ AC_DEFINE([HAVE_SSE2], 1, [Define if host toolchain supports SSE2]) @@ -76,10 +79,11 @@ AC_MSG_CHECKING([whether host toolchain supports SSE3]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { char v[16]; __asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0])); + return (0); } ]])], [ AC_DEFINE([HAVE_SSE3], 1, [Define if host toolchain supports SSE3]) @@ -96,9 +100,10 @@ AC_MSG_CHECKING([whether host toolchain supports SSSE3]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { __asm__ __volatile__("pshufb %xmm0,%xmm1"); + return (0); } ]])], [ AC_DEFINE([HAVE_SSSE3], 1, [Define if host toolchain supports SSSE3]) @@ -115,9 +120,10 @@ AC_MSG_CHECKING([whether host toolchain supports SSE4.1]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { __asm__ __volatile__("pmaxsb %xmm0,%xmm1"); + return (0); } ]])], [ AC_DEFINE([HAVE_SSE4_1], 1, [Define if host toolchain supports SSE4.1]) @@ -134,9 +140,10 @@ AC_MSG_CHECKING([whether host toolchain supports SSE4.2]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { __asm__ __volatile__("pcmpgtq %xmm0, %xmm1"); + return (0); } ]])], [ AC_DEFINE([HAVE_SSE4_2], 1, [Define if host toolchain supports SSE4.2]) @@ -153,10 +160,11 @@ AC_MSG_CHECKING([whether host toolchain supports AVX]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ - void main() + int main() { char v[32]; __asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0])); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -174,9 +182,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -194,9 +203,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -214,9 +224,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vplzcntd %zmm0,%zmm1"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -234,9 +245,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -254,9 +266,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -274,9 +287,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -294,9 +308,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -314,9 +329,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -334,9 +350,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vexp2pd %zmm0,%zmm1"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -354,9 +371,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("vpabsq %zmm0,%zmm1"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -374,9 +392,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("aesenc %xmm0, %xmm1"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -394,9 +413,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0)); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -414,9 +434,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { __asm__ __volatile__("movbe 0(%eax), %eax"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -434,10 +455,11 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { char b[4096] __attribute__ ((aligned (64))); __asm__ __volatile__("xsave %[b]\n" : : [b] "m" (*b) : "memory"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -455,10 +477,11 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { char b[4096] __attribute__ ((aligned (64))); __asm__ __volatile__("xsaveopt %[b]\n" : : [b] "m" (*b) : "memory"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) @@ -476,10 +499,11 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ [ - void main() + int main() { char b[4096] __attribute__ ((aligned (64))); __asm__ __volatile__("xsaves %[b]\n" : : [b] "m" (*b) : "memory"); + return (0); } ]])], [ AC_MSG_RESULT([yes]) diff -Nru zfs-linux-2.3.2/config/user-aio.h.m4 zfs-linux-2.3.9/config/user-aio.h.m4 --- zfs-linux-2.3.2/config/user-aio.h.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-aio.h.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # POSIX specifies as part of realtime extensions, dnl # and is missing from at least uClibc – force fallbacks there diff -Nru zfs-linux-2.3.2/config/user-backtrace.m4 zfs-linux-2.3.9/config/user-backtrace.m4 --- zfs-linux-2.3.2/config/user-backtrace.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-backtrace.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl dnl backtrace(), for userspace assertions. glibc has this directly in libc. dnl FreeBSD and (sometimes) musl have it in a separate -lexecinfo. It's assumed diff -Nru zfs-linux-2.3.2/config/user-clock_gettime.m4 zfs-linux-2.3.9/config/user-clock_gettime.m4 --- zfs-linux-2.3.2/config/user-clock_gettime.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-clock_gettime.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check if librt is required for clock_gettime. dnl # clock_gettime is generally available in libc on modern systems. diff -Nru zfs-linux-2.3.2/config/user-dracut.m4 zfs-linux-2.3.9/config/user-dracut.m4 --- zfs-linux-2.3.2/config/user-dracut.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-dracut.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_DRACUT], [ AC_MSG_CHECKING(for dracut directory) AC_ARG_WITH([dracutdir], diff -Nru zfs-linux-2.3.2/config/user-gettext.m4 zfs-linux-2.3.9/config/user-gettext.m4 --- zfs-linux-2.3.2/config/user-gettext.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-gettext.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check if libintl and possibly libiconv are needed for gettext() functionality dnl # diff -Nru zfs-linux-2.3.2/config/user-libaio.m4 zfs-linux-2.3.9/config/user-libaio.m4 --- zfs-linux-2.3.2/config/user-libaio.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-libaio.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for libaio - only used for mmap_libaio test cases. dnl # diff -Nru zfs-linux-2.3.2/config/user-libatomic.m4 zfs-linux-2.3.9/config/user-libatomic.m4 --- zfs-linux-2.3.2/config/user-libatomic.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-libatomic.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # If -latomic exists and atomic.c doesn't link without it, dnl # it's needed for __atomic intrinsics. diff -Nru zfs-linux-2.3.2/config/user-libblkid.m4 zfs-linux-2.3.9/config/user-libblkid.m4 --- zfs-linux-2.3.2/config/user-libblkid.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-libblkid.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for libblkid. Basic support for detecting ZFS pools dnl # has existing in blkid since 2008. diff -Nru zfs-linux-2.3.2/config/user-libcrypto.m4 zfs-linux-2.3.9/config/user-libcrypto.m4 --- zfs-linux-2.3.2/config/user-libcrypto.m4 2025-05-01 18:23:23.727214655 +0000 +++ zfs-linux-2.3.9/config/user-libcrypto.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for libcrypto. Used for userspace password derivation via PBKDF2. dnl # diff -Nru zfs-linux-2.3.2/config/user-libexec.m4 zfs-linux-2.3.9/config/user-libexec.m4 --- zfs-linux-2.3.2/config/user-libexec.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-libexec.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_ZFSEXEC], [ AC_ARG_WITH(zfsexecdir, AS_HELP_STRING([--with-zfsexecdir=DIR], diff -Nru zfs-linux-2.3.2/config/user-libfetch.m4 zfs-linux-2.3.9/config/user-libfetch.m4 --- zfs-linux-2.3.2/config/user-libfetch.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-libfetch.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for a libfetch - either fetch(3) or libcurl. dnl # diff -Nru zfs-linux-2.3.2/config/user-libtirpc.m4 zfs-linux-2.3.9/config/user-libtirpc.m4 --- zfs-linux-2.3.2/config/user-libtirpc.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-libtirpc.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for libtirpc - may be needed for xdr functionality dnl # diff -Nru zfs-linux-2.3.2/config/user-libudev.m4 zfs-linux-2.3.9/config/user-libudev.m4 --- zfs-linux-2.3.2/config/user-libudev.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-libudev.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for libudev - needed for vdev auto-online and auto-replace dnl # diff -Nru zfs-linux-2.3.2/config/user-libunwind.m4 zfs-linux-2.3.9/config/user-libunwind.m4 --- zfs-linux-2.3.2/config/user-libunwind.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-libunwind.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl dnl Checks for libunwind, which usually does a better job than backtrace() when dnl resolving symbols in the stack backtrace. Newer versions have support for @@ -34,6 +35,22 @@ ], [ AC_MSG_RESULT([no]) ]) + dnl LLVM includes it's own libunwind library, which + dnl defines the highest numbered register in a different + dnl way, and has an incompatible unw_resname function. + AC_MSG_CHECKING([whether libunwind is llvm libunwind]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + #include + #if !defined(_LIBUNWIND_HIGHEST_DWARF_REGISTER) + #error "_LIBUNWIND_HIGHEST_DWARF_REGISTER is not defined" + #endif + ], [])], [ + AC_MSG_RESULT([yes]) + AC_DEFINE(IS_LIBUNWIND_LLVM, 1, [libunwind is llvm libunwind]) + ], [ + AC_MSG_RESULT([no]) + ]) AX_RESTORE_FLAGS ], [ AS_IF([test "x$with_libunwind" = "xyes"], [ diff -Nru zfs-linux-2.3.2/config/user-libuuid.m4 zfs-linux-2.3.9/config/user-libuuid.m4 --- zfs-linux-2.3.2/config/user-libuuid.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-libuuid.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for libuuid dnl # diff -Nru zfs-linux-2.3.2/config/user-makedev.m4 zfs-linux-2.3.9/config/user-makedev.m4 --- zfs-linux-2.3.2/config/user-makedev.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-makedev.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # glibc 2.25 dnl # diff -Nru zfs-linux-2.3.2/config/user-mount-setattr.m4 zfs-linux-2.3.9/config/user-mount-setattr.m4 --- zfs-linux-2.3.2/config/user-mount-setattr.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/user-mount-setattr.m4 2026-08-21 20:57:12.296005923 +0000 @@ -0,0 +1,27 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Check for mount_setattr() and struct mount_attr availability +dnl # +AC_DEFUN([ZFS_AC_CONFIG_USER_MOUNT_SETATTR], [ + AC_CHECK_FUNC([mount_setattr], [ + AC_MSG_CHECKING([for struct mount_attr]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + #include + ]], [[ + struct mount_attr attr = { + .attr_set = MOUNT_ATTR_RDONLY, + .attr_clr = MOUNT_ATTR_NOEXEC, + }; + (void) attr; + ]]) + ], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_MOUNT_SETATTR], [1], + [mount_setattr() and struct mount_attr + are available]) + ], [ + AC_MSG_RESULT([no]) + ]) + ]) +]) diff -Nru zfs-linux-2.3.2/config/user-pam.m4 zfs-linux-2.3.9/config/user-pam.m4 --- zfs-linux-2.3.2/config/user-pam.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-pam.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_PAM], [ AC_ARG_ENABLE([pam], AS_HELP_STRING([--enable-pam], diff -Nru zfs-linux-2.3.2/config/user-runstatedir.m4 zfs-linux-2.3.9/config/user-runstatedir.m4 --- zfs-linux-2.3.2/config/user-runstatedir.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-runstatedir.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl For backwards compatibility; runstatedir added in autoconf 2.70. AC_DEFUN([ZFS_AC_CONFIG_USER_RUNSTATEDIR], [ if test "x$runstatedir" = x; then diff -Nru zfs-linux-2.3.2/config/user-statx.m4 zfs-linux-2.3.9/config/user-statx.m4 --- zfs-linux-2.3.2/config/user-statx.m4 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/config/user-statx.m4 2026-08-21 20:57:12.296005923 +0000 @@ -0,0 +1,36 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 +dnl # +dnl # Check for statx() function and STATX_MNT_ID availability +dnl # +AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [ + AC_CHECK_HEADERS([sys/stat.h], + [have_stat_headers=yes], + [have_stat_headers=no]) + + AS_IF([test "x$have_stat_headers" = "xyes"], [ + AC_CHECK_FUNC([statx], [ + AC_DEFINE([HAVE_STATX], [1], [statx() is available]) + + dnl Check for STATX_MNT_ID availability + AC_MSG_CHECKING([for STATX_MNT_ID]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + #define _GNU_SOURCE + #include + ]], [[ + struct statx stx; + int mask = STATX_MNT_ID; + (void)mask; + (void)stx.stx_mnt_id; + ]]) + ], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_STATX_MNT_ID], [1], [STATX_MNT_ID is available]) + ], [ + AC_MSG_RESULT([no]) + ]) + ]) + ], [ + AC_MSG_WARN([sys/stat.h not found; skipping statx support]) + ]) +]) dnl end AC_DEFUN diff -Nru zfs-linux-2.3.2/config/user-systemd.m4 zfs-linux-2.3.9/config/user-systemd.m4 --- zfs-linux-2.3.2/config/user-systemd.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-systemd.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_SYSTEMD], [ AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd], diff -Nru zfs-linux-2.3.2/config/user-sysvinit.m4 zfs-linux-2.3.9/config/user-sysvinit.m4 --- zfs-linux-2.3.2/config/user-sysvinit.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-sysvinit.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_SYSVINIT], [ AC_ARG_ENABLE(sysvinit, AS_HELP_STRING([--enable-sysvinit], diff -Nru zfs-linux-2.3.2/config/user-udev.m4 zfs-linux-2.3.9/config/user-udev.m4 --- zfs-linux-2.3.2/config/user-udev.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-udev.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_CONFIG_USER_UDEV], [ AC_MSG_CHECKING(for udev directories) AC_ARG_WITH(udevdir, diff -Nru zfs-linux-2.3.2/config/user-zlib.m4 zfs-linux-2.3.9/config/user-zlib.m4 --- zfs-linux-2.3.2/config/user-zlib.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user-zlib.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Check for zlib dnl # diff -Nru zfs-linux-2.3.2/config/user.m4 zfs-linux-2.3.9/config/user.m4 --- zfs-linux-2.3.2/config/user.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/user.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # Default ZFS user configuration dnl # @@ -17,6 +18,8 @@ ZFS_AC_CONFIG_USER_LIBUDEV ZFS_AC_CONFIG_USER_LIBUUID ZFS_AC_CONFIG_USER_LIBBLKID + ZFS_AC_CONFIG_USER_STATX + ZFS_AC_CONFIG_USER_MOUNT_SETATTR ]) ZFS_AC_CONFIG_USER_LIBTIRPC ZFS_AC_CONFIG_USER_LIBCRYPTO diff -Nru zfs-linux-2.3.2/config/zfs-build.m4 zfs-linux-2.3.9/config/zfs-build.m4 --- zfs-linux-2.3.2/config/zfs-build.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/zfs-build.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 AC_DEFUN([ZFS_AC_LICENSE], [ AC_MSG_CHECKING([zfs author]) AC_MSG_RESULT([$ZFS_META_AUTHOR]) @@ -205,6 +206,46 @@ AC_MSG_RESULT([$enable_invariants]) ]) +dnl # Disabled by default. If enabled allows a configured "turn objtools +dnl # warnings into errors" (CONFIG_OBJTOOL_WERROR) behavior to take effect. +dnl # If disabled, objtool warnings are never turned into errors. It can't +dnl # be enabled if the kernel wasn't compiled with CONFIG_OBJTOOL_WERROR=y. +dnl # +AC_DEFUN([ZFS_AC_OBJTOOL_WERROR], [ + AC_MSG_CHECKING([whether objtool error on warning behavior is enabled]) + AC_ARG_ENABLE([objtool-werror], + [AS_HELP_STRING([--enable-objtool-werror], + [Enable objtool's error on warning behaviour if present @<:@default=no@:>@])], + [enable_objtool_werror=$enableval], + [enable_objtool_werror=no]) + AC_MSG_RESULT([$enable_objtool_werror]) + + AS_IF([test x$CONFIG_OBJTOOL_WERROR_DEFINED = xyes],[ + AS_IF([test x$enable_objtool_werror = xyes],[ + AC_MSG_NOTICE([enable-objtool-werror defined, keeping -Werror ]) + ],[ + AC_MSG_NOTICE([enable-objtool-werror undefined, disabling -Werror ]) + OBJTOOL_DISABLE_WERROR=y + abs_objtool_binary=$kernelbuild/tools/objtool/objtool + AS_IF([test -x $abs_objtool_binary],[],[ + AC_MSG_ERROR([*** objtool binary $abs_objtool_binary not found]) + ]) + dnl # The path to the wrapper is defined in modules/Makefile.in. + ]) + ],[ + dnl # We can't enable --Werror if it's not there. + AS_IF([test x$enable_objtool_werror = xyes],[ + AC_MSG_ERROR([ + *** Cannot enable objtool-werror, + *** a kernel built with CONFIG_OBJTOOL_WERROR=y is required. + ]) + ],[]) + ]) + + AC_SUBST(OBJTOOL_DISABLE_WERROR) + AC_SUBST(abs_objtool_binary) +]) + AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ AX_COUNT_CPUS([]) AC_SUBST(CPU_COUNT) @@ -223,6 +264,7 @@ ZFS_AC_CONFIG_ALWAYS_CC_ASAN ZFS_AC_CONFIG_ALWAYS_CC_UBSAN ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_SIMD + ZFS_AC_CONFIG_ALWAYS_TOOLCHAIN_CFI_PSEUDO_OP ZFS_AC_CONFIG_ALWAYS_SYSTEM ZFS_AC_CONFIG_ALWAYS_ARCH ZFS_AC_CONFIG_ALWAYS_PYTHON diff -Nru zfs-linux-2.3.2/config/zfs-meta.m4 zfs-linux-2.3.9/config/zfs-meta.m4 --- zfs-linux-2.3.2/config/zfs-meta.m4 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/config/zfs-meta.m4 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +dnl # SPDX-License-Identifier: CDDL-1.0 dnl # dnl # DESCRIPTION: dnl # Read meta data from the META file. When building from a git repository @@ -70,16 +71,16 @@ fi ZFS_META_RELEASE=_ZFS_AC_META_GETVAL([Release]); - if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then + if test ! -f "$srcdir/.nogitrelease" && git -C "$srcdir" rev-parse --git-dir > /dev/null 2>&1; then _match="${ZFS_META_NAME}-${ZFS_META_VERSION}" - _alias=$(git describe --match=${_match} 2>/dev/null) + _alias=$(git -C "$srcdir" describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|sed "s/${ZFS_META_NAME}//"|cut -f3- -d'-'|tr - _) if test -n "${_release}"; then ZFS_META_RELEASE=${_release} _zfs_ac_meta_type="git describe" else _match="${ZFS_META_NAME}-${ZFS_META_VERSION}-${ZFS_META_RELEASE}" - _alias=$(git describe --match=${_match} 2>/dev/null) + _alias=$(git -C "$srcdir" describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|sed 's/${ZFS_META_NAME}//'|cut -f3- -d'-'|tr - _) if test -n "${_release}"; then ZFS_META_RELEASE=${_release} diff -Nru zfs-linux-2.3.2/configure zfs-linux-2.3.9/configure --- zfs-linux-2.3.2/configure 2025-05-01 18:45:08.797803234 +0000 +++ zfs-linux-2.3.9/configure 2026-08-21 21:15:37.614655572 +0000 @@ -1,10 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for zfs 2.3.2. +# Generated by GNU Autoconf 2.69 for zfs 2.3.9. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -15,16 +14,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -34,46 +31,46 @@ fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -82,6 +79,13 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -90,12 +94,8 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -107,10 +107,30 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -132,22 +152,20 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -167,15 +185,12 @@ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO @@ -190,38 +205,30 @@ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -229,21 +236,14 @@ esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -261,19 +261,18 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -300,7 +299,6 @@ } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -318,14 +316,6 @@ as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -340,7 +330,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -349,7 +339,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -388,13 +378,12 @@ # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -406,27 +395,18 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -438,9 +418,9 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -467,7 +447,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -511,7 +491,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -525,10 +505,6 @@ exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -542,13 +518,6 @@ ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -678,48 +647,54 @@ # Identity of this package. PACKAGE_NAME='zfs' PACKAGE_TARNAME='zfs' -PACKAGE_VERSION='2.3.2' -PACKAGE_STRING='zfs 2.3.2' +PACKAGE_VERSION='2.3.9' +PACKAGE_STRING='zfs 2.3.9' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +abs_objtool_binary +OBJTOOL_DISABLE_WERROR WITH_INVARIANTS DEBUG_KMEM_TRACKING_ZFS DEBUG_KMEM_ZFS @@ -841,6 +816,7 @@ INTLLIBS LTLIBICONV LIBICONV +INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE @@ -896,9 +872,9 @@ pyexecdir pkgpythondir pythondir +PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX -PYTHON_PLATFORM PYTHON_VERSION PYTHON TARGET_CPU_ARM_FALSE @@ -962,6 +938,7 @@ PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG +CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -974,7 +951,6 @@ AR DLLTOOL OBJDUMP -FILECMD LN_S NM ac_ct_DUMPBIN @@ -1001,9 +977,6 @@ CFLAGS CC LIBTOOL -CSCOPE -ETAGS -CTAGS am__untar am__tar AMTAR @@ -1120,9 +1093,6 @@ enable_asan enable_ubsan with_python -with_python_sys_prefix -with_python_prefix -with_python_exec_prefix enable_pyzfs with_linux with_linux_obj @@ -1157,6 +1127,7 @@ enable_debug_kmem enable_debug_kmem_tracking enable_invariants +enable_objtool_werror ' ac_precious_vars='build_alias host_alias @@ -1167,6 +1138,7 @@ LIBS CPPFLAGS LT_SYS_LIBRARY_PATH +CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1266,6 +1238,8 @@ *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1306,9 +1280,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1332,9 +1306,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1545,9 +1519,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1561,9 +1535,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1607,9 +1581,9 @@ *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1625,7 +1599,7 @@ case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1689,7 +1663,7 @@ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1746,7 +1720,7 @@ # 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 2.3.2 to adapt to many kinds of systems. +\`configure' configures zfs 2.3.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1818,7 +1792,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of zfs 2.3.2:";; + short | recursive ) echo "Configuration of zfs 2.3.9:";; esac cat <<\_ACEOF @@ -1861,6 +1835,8 @@ Enable detailed kmem tracking [default=no] --enable-invariants Enable FreeBSD kernel INVARIANTS checks [[default: detect]] + --enable-objtool-werror Enable objtool's error on warning behaviour if + present [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1876,11 +1852,6 @@ --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). --with-config=CONFIG Config file 'kernel|user|all|srpm' --with-python=VERSION default system python version [default=check] - --with-python-sys-prefix - use Python's sys.prefix and sys.exec_prefix values - --with-python_prefix override the default PYTHON_PREFIX - --with-python_exec_prefix - override the default PYTHON_EXEC_PREFIX --with-linux=PATH Path to kernel source --with-linux-obj=PATH Path to kernel build objects --with-qat=PATH Path to qat source @@ -1929,6 +1900,7 @@ you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. + CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -2000,9 +1972,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -2030,8 +2002,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -2039,7 +2010,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -2048,10 +2019,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -zfs configure 2.3.2 -generated by GNU Autoconf 2.71 +zfs configure 2.3.9 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2068,14 +2039,14 @@ ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2083,15 +2054,14 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2107,14 +2077,14 @@ ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2122,18 +2092,17 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2155,44 +2124,120 @@ ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -2200,9 +2245,16 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2220,99 +2272,122 @@ #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac +} # ac_fn_c_check_header_mongrel 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 2.3.2, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by zfs $as_me 2.3.9, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2345,12 +2420,8 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2385,7 +2456,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2420,13 +2491,11 @@ # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2437,8 +2506,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2462,7 +2531,7 @@ ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2470,14 +2539,14 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2485,15 +2554,15 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2501,8 +2570,8 @@ echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2516,48 +2585,63 @@ # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2567,436 +2651,21 @@ # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" gt_needs="$gt_needs " gt_needs="$gt_needs " - -# Auxiliary files required by this configure script. -ac_aux_files="config.rpath compile ltmain.sh missing install-sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/config" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3007,12 +2676,12 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3021,24 +2690,24 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -3048,12 +2717,11 @@ fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3081,12 +2749,11 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -3094,15 +2761,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3113,19 +2776,19 @@ fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking metadata" >&5 -printf %s "checking metadata... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking metadata" >&5 +$as_echo_n "checking metadata... " >&6; } META="$srcdir/META" _zfs_ac_meta_type="none" @@ -3135,7 +2798,9 @@ ZFS_META_NAME=`$AWK -F ':[ \t]+' '$1 ~ /^ *(Name|Project|Package)$/ { print $2; exit }' $META`; if test -n "$ZFS_META_NAME"; then -printf "%s\n" "#define ZFS_META_NAME \"$ZFS_META_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_NAME "$ZFS_META_NAME" +_ACEOF fi @@ -3143,25 +2808,29 @@ ZFS_META_VERSION=`$AWK -F ':[ \t]+' '$1 ~ /^ *Version$/ { print $2; exit }' $META`; if test -n "$ZFS_META_VERSION"; then -printf "%s\n" "#define ZFS_META_VERSION \"$ZFS_META_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_VERSION "$ZFS_META_VERSION" +_ACEOF -printf "%s\n" "#define SPL_META_VERSION ZFS_META_VERSION" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SPL_META_VERSION ZFS_META_VERSION +_ACEOF fi ZFS_META_RELEASE=`$AWK -F ':[ \t]+' '$1 ~ /^ *Release$/ { print $2; exit }' $META`; - if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then + if test ! -f "$srcdir/.nogitrelease" && git -C "$srcdir" rev-parse --git-dir > /dev/null 2>&1; then _match="${ZFS_META_NAME}-${ZFS_META_VERSION}" - _alias=$(git describe --match=${_match} 2>/dev/null) + _alias=$(git -C "$srcdir" describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|sed "s/${ZFS_META_NAME}//"|cut -f3- -d'-'|tr - _) if test -n "${_release}"; then ZFS_META_RELEASE=${_release} _zfs_ac_meta_type="git describe" else _match="${ZFS_META_NAME}-${ZFS_META_VERSION}-${ZFS_META_RELEASE}" - _alias=$(git describe --match=${_match} 2>/dev/null) + _alias=$(git -C "$srcdir" describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|sed 's/${ZFS_META_NAME}//'|cut -f3- -d'-'|tr - _) if test -n "${_release}"; then ZFS_META_RELEASE=${_release} @@ -3172,10 +2841,14 @@ if test -n "$ZFS_META_RELEASE"; then -printf "%s\n" "#define ZFS_META_RELEASE \"$ZFS_META_RELEASE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_RELEASE "$ZFS_META_RELEASE" +_ACEOF -printf "%s\n" "#define SPL_META_RELEASE ZFS_META_RELEASE" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SPL_META_RELEASE ZFS_META_RELEASE +_ACEOF @@ -3186,7 +2859,9 @@ ZFS_META_LICENSE=`$AWK -F ':[ \t]+' '$1 ~ /^ *License$/ { print $2; exit }' $META`; if test -n "$ZFS_META_LICENSE"; then -printf "%s\n" "#define ZFS_META_LICENSE \"$ZFS_META_LICENSE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_LICENSE "$ZFS_META_LICENSE" +_ACEOF fi @@ -3196,10 +2871,14 @@ test -n "$ZFS_META_RELEASE" && ZFS_META_ALIAS="$ZFS_META_ALIAS-$ZFS_META_RELEASE" -printf "%s\n" "#define ZFS_META_ALIAS \"$ZFS_META_ALIAS\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_ALIAS "$ZFS_META_ALIAS" +_ACEOF -printf "%s\n" "#define SPL_META_ALIAS ZFS_META_ALIAS" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SPL_META_ALIAS ZFS_META_ALIAS +_ACEOF fi @@ -3207,7 +2886,9 @@ ZFS_META_DATA=`$AWK -F ':[ \t]+' '$1 ~ /^ *Date$/ { print $2; exit }' $META`; if test -n "$ZFS_META_DATA"; then -printf "%s\n" "#define ZFS_META_DATA \"$ZFS_META_DATA\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_DATA "$ZFS_META_DATA" +_ACEOF fi @@ -3215,7 +2896,9 @@ ZFS_META_AUTHOR=`$AWK -F ':[ \t]+' '$1 ~ /^ *Author$/ { print $2; exit }' $META`; if test -n "$ZFS_META_AUTHOR"; then -printf "%s\n" "#define ZFS_META_AUTHOR \"$ZFS_META_AUTHOR\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_AUTHOR "$ZFS_META_AUTHOR" +_ACEOF fi @@ -3223,7 +2906,9 @@ ZFS_META_KVER_MIN=`$AWK -F ':[ \t]+' '$1 ~ /^ *Linux-Minimum$/ { print $2; exit }' $META`; if test -n "$ZFS_META_KVER_MIN"; then -printf "%s\n" "#define ZFS_META_KVER_MIN \"$ZFS_META_KVER_MIN\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_KVER_MIN "$ZFS_META_KVER_MIN" +_ACEOF fi @@ -3231,7 +2916,9 @@ ZFS_META_KVER_MAX=`$AWK -F ':[ \t]+' '$1 ~ /^ *Linux-Maximum$/ { print $2; exit }' $META`; if test -n "$ZFS_META_KVER_MAX"; then -printf "%s\n" "#define ZFS_META_KVER_MAX \"$ZFS_META_KVER_MAX\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_KVER_MAX "$ZFS_META_KVER_MAX" +_ACEOF fi @@ -3247,13 +2934,19 @@ test -n "$ZFS_META_LT_REVISION" || ZFS_META_LT_REVISION="0" test -n "$ZFS_META_LT_AGE" || ZFS_META_LT_AGE="0" -printf "%s\n" "#define ZFS_META_LT_CURRENT \"$ZFS_META_LT_CURRENT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_LT_CURRENT "$ZFS_META_LT_CURRENT" +_ACEOF -printf "%s\n" "#define ZFS_META_LT_REVISION \"$ZFS_META_LT_REVISION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_LT_REVISION "$ZFS_META_LT_REVISION" +_ACEOF -printf "%s\n" "#define ZFS_META_LT_AGE \"$ZFS_META_LT_AGE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_META_LT_AGE "$ZFS_META_LT_AGE" +_ACEOF @@ -3261,36 +2954,60 @@ fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_zfs_ac_meta_type" >&5 -printf "%s\n" "$_zfs_ac_meta_type" >&6; } - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_zfs_ac_meta_type" >&5 +$as_echo "$_zfs_ac_meta_type" >&6; } +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3309,22 +3026,21 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3343,22 +3059,21 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -printf %s "checking target system type... " >&6; } -if test ${ac_cv_target+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else - ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -printf "%s\n" "$ac_cv_target" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; @@ -3384,18 +3099,17 @@ NONENONEs,x,x, && program_prefix=${target_alias}- -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test ${enable_maintainer_mode+y} -then : +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else $as_nop +else USE_MAINTAINER_MODE=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -3408,8 +3122,7 @@ # Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi @@ -3419,13 +3132,12 @@ *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3437,8 +3149,8 @@ am_cv_make_support_nested_variables=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3450,8 +3162,7 @@ am__api_version='1.16' - - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -3465,25 +3176,20 @@ # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -3493,13 +3199,13 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -3507,12 +3213,12 @@ echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -3528,7 +3234,7 @@ rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -3538,8 +3244,8 @@ INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3549,8 +3255,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -printf %s "checking whether build environment is sane... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3604,8 +3310,8 @@ as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -3624,23 +3330,26 @@ # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` - +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` - - if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3660,12 +3369,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -3673,15 +3381,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3692,11 +3396,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3705,12 +3409,11 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -3718,15 +3421,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3737,11 +3436,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3749,8 +3448,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3762,31 +3461,25 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done @@ -3797,7 +3490,7 @@ fi test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then + if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -3807,17 +3500,16 @@ MKDIR_P="$ac_install_sh -d" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -3833,12 +3525,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3873,13 +3565,17 @@ # Define the identity of the package. PACKAGE='zfs' - VERSION='2.3.2' + VERSION='2.3.9' -printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF -printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF # Some tools Automake needs. @@ -3913,25 +3609,96 @@ # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' -am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 +$as_echo_n "checking how to create a pax tar archive... " >&6; } + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_pax-$_am_tools} + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x pax -w "$$tardir"' + am__tar_='pax -L -x pax -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H pax -L' + am__tar_='find "$tardir" -print | cpio -o -H pax -L' + am__untar='cpio -i -H pax -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_pax}" && break -if test -z "$ETAGS"; then - ETAGS=etags -fi + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir -if test -z "$CSCOPE"; then - CSCOPE=cscope + if ${am_cv_prog_tar_pax+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_pax=$_am_tool fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 +$as_echo "$am_cv_prog_tar_pax" >&6; } + + + + # POSIX will say in a future version that running "rm -f" with no argument @@ -3983,15 +3750,14 @@ case `pwd` in *\ * | *\ *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -macro_version='2.4.7' -macro_revision='2.4.7' - +macro_version='2.4.6' +macro_revision='2.4.6' @@ -4028,8 +3794,8 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -printf %s "checking how to print strings... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4055,12 +3821,12 @@ } case $ECHO in - printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -printf "%s\n" "printf" >&6; } ;; - print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -printf "%s\n" "print -r" >&6; } ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -printf "%s\n" "cat" >&6; } ;; + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; esac @@ -4076,21 +3842,12 @@ - - - - - - - - - DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -4126,12 +3883,11 @@ fi done rm -f confinc.* confmf.* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -printf "%s\n" "${_am_result}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test ${enable_dependency_tracking+y} -then : +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -4157,12 +3913,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4170,15 +3925,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4189,11 +3940,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4202,12 +3953,11 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4215,15 +3965,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4234,11 +3980,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4246,8 +3992,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4260,12 +4006,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4273,15 +4018,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4292,11 +4033,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4305,12 +4046,11 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4319,19 +4059,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4347,18 +4083,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4369,12 +4105,11 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4382,15 +4117,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4401,11 +4132,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4418,12 +4149,11 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4431,15 +4161,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4450,11 +4176,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4466,138 +4192,34 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4607,7 +4229,7 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4615,7 +4237,7 @@ /* end confdefs.h. */ int -main (void) +main () { ; @@ -4627,9 +4249,9 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4650,12 +4272,11 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4672,7 +4293,7 @@ # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4688,46 +4309,44 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4741,15 +4360,15 @@ * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4758,7 +4377,7 @@ /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4770,8 +4389,8 @@ ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4779,10 +4398,10 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4790,40 +4409,39 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4837,12 +4455,11 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4851,32 +4468,31 @@ break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4886,33 +4502,29 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4921,60 +4533,57 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4989,144 +4598,94 @@ CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -5135,23 +4694,21 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -5179,8 +4736,8 @@ rm -f core conftest* unset am_i fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -5198,12 +4755,11 @@ depcc="$CC" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -5310,8 +4866,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -5325,12 +4881,11 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5344,15 +4899,10 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5361,13 +4911,13 @@ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5395,8 +4945,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5413,12 +4963,11 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5426,15 +4975,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -5443,13 +4987,13 @@ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5477,17 +5021,16 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -5498,15 +5041,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -5515,13 +5053,13 @@ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5550,17 +5088,16 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -printf %s "checking for fgrep... " >&6; } -if test ${ac_cv_path_FGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -5571,15 +5108,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in fgrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -5588,13 +5120,13 @@ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'FGREP' >> "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5623,8 +5155,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -printf "%s\n" "$ac_cv_path_FGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5649,18 +5181,17 @@ # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -5689,16 +5220,15 @@ ;; esac elif test yes = "$with_gnu_ld"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test ${lt_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -5727,19 +5257,18 @@ LD=$lt_cv_path_LD if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${lt_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5762,12 +5291,11 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test ${lt_cv_path_NM+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -5792,13 +5320,13 @@ mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -5817,8 +5345,8 @@ : ${lt_cv_path_NM=no} fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -printf "%s\n" "$lt_cv_path_NM" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -5831,12 +5359,11 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -5844,15 +5371,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5863,11 +5386,11 @@ fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -printf "%s\n" "$DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5880,12 +5403,11 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DUMPBIN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -5893,15 +5415,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5912,11 +5430,11 @@ fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -printf "%s\n" "$ac_ct_DUMPBIN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5928,15 +5446,15 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -5957,12 +5475,11 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -printf %s "checking the name lister ($NM) interface... " >&6; } -if test ${lt_cv_nm_interface+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -5978,27 +5495,26 @@ fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -printf "%s\n" "$lt_cv_nm_interface" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -printf %s "checking the maximum length of command line arguments... " >&6; } -if test ${lt_cv_sys_max_cmd_len+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else i=0 teststring=ABCD @@ -6040,7 +5556,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -6083,7 +5599,7 @@ sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -6125,11 +5641,11 @@ fi if test -n "$lt_cv_sys_max_cmd_len"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6173,12 +5689,11 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -printf %s "checking how to convert $build file names to $host format... " >&6; } -if test ${lt_cv_to_host_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else case $host in *-*-mingw* ) case $build in @@ -6214,19 +5729,18 @@ fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -printf %s "checking how to convert $build file names to toolchain format... " >&6; } -if test ${lt_cv_to_tool_file_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -6242,23 +5756,22 @@ fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -printf %s "checking for $LD option to reload object files... " >&6; } -if test ${lt_cv_ld_reload_flag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_reload_flag='-r' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6289,122 +5802,13 @@ if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. -set dummy ${ac_tool_prefix}file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FILECMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$FILECMD"; then - ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_FILECMD="${ac_tool_prefix}file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FILECMD=$ac_cv_prog_FILECMD -if test -n "$FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 -printf "%s\n" "$FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_FILECMD"; then - ac_ct_FILECMD=$FILECMD - # Extract the first word of "file", so it can be a program name with args. -set dummy file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FILECMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_FILECMD"; then - ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FILECMD="file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD -if test -n "$ac_ct_FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 -printf "%s\n" "$ac_ct_FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_FILECMD" = x; then - FILECMD=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FILECMD=$ac_ct_FILECMD - fi -else - FILECMD="$ac_cv_prog_FILECMD" -fi - - - - - - - -if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -6412,15 +5816,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6431,11 +5831,11 @@ fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -printf "%s\n" "$OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6444,12 +5844,11 @@ ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OBJDUMP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6457,15 +5856,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6476,11 +5871,11 @@ fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -printf "%s\n" "$ac_ct_OBJDUMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6488,8 +5883,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6508,12 +5903,11 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -printf %s "checking how to recognize dependent libraries... " >&6; } -if test ${lt_cv_deplibs_check_method+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -6539,7 +5933,7 @@ bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -6573,14 +5967,14 @@ lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -6594,7 +5988,7 @@ ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -6641,7 +6035,7 @@ newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -6709,8 +6103,8 @@ esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -6754,12 +6148,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -6767,15 +6160,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6786,11 +6175,11 @@ fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -printf "%s\n" "$DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6799,12 +6188,11 @@ ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DLLTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -6812,15 +6200,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6831,11 +6215,11 @@ fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -printf "%s\n" "$ac_ct_DLLTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6843,8 +6227,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -6864,12 +6248,11 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -printf %s "checking how to associate runtime and link libraries... " >&6; } -if test ${lt_cv_sharedlib_from_linklib_cmd+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -6892,8 +6275,8 @@ esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6909,12 +6292,11 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6922,15 +6304,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6941,11 +6319,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6958,12 +6336,11 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6971,15 +6348,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6990,11 +6363,11 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7006,8 +6379,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -7015,60 +6388,42 @@ fi : ${AR=ar} +: ${AR_FLAGS=cru} -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because thats what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS - - - - - - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -printf %s "checking for archiver @FILE support... " >&6; } -if test ${lt_cv_ar_at_file+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -7076,7 +6431,7 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -7085,11 +6440,11 @@ rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -printf "%s\n" "$lt_cv_ar_at_file" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -7106,12 +6461,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -7119,15 +6473,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7138,11 +6488,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7151,12 +6501,11 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -7164,15 +6513,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7183,11 +6528,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -7195,8 +6540,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -7215,12 +6560,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -7228,15 +6572,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7247,11 +6587,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7260,12 +6600,11 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -7273,15 +6612,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7292,11 +6627,11 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -7304,8 +6639,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -7394,12 +6729,11 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -printf %s "checking command to parse $NM output from $compiler object... " >&6; } -if test ${lt_cv_sys_global_symbol_pipe+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7454,7 +6788,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -7472,20 +6806,20 @@ # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -7509,7 +6843,7 @@ if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -7527,9 +6861,9 @@ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7551,14 +6885,14 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -7627,7 +6961,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7662,11 +6996,11 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -printf "%s\n" "ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi # Response file support. @@ -7712,14 +7046,13 @@ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -printf %s "checking for sysroot... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test ${with_sysroot+y} -then : +if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; -else $as_nop +else with_sysroot=no fi @@ -7732,30 +7065,29 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -printf "%s\n" "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -printf "%s\n" "${lt_sysroot:-no}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -printf %s "checking for a working dd... " >&6; } -if test ${ac_cv_path_lt_DD+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7766,15 +7098,10 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in dd - do + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7794,16 +7121,15 @@ rm -f conftest.i conftest2.i conftest.out fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -printf "%s\n" "$ac_cv_path_lt_DD" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -printf %s "checking how to truncate binary pipes... " >&6; } -if test ${lt_cv_truncate_bin+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7814,8 +7140,8 @@ rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -printf "%s\n" "$lt_cv_truncate_bin" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } @@ -7838,8 +7164,7 @@ } # Check whether --enable-libtool-lock was given. -if test ${enable_libtool_lock+y} -then : +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7855,9 +7180,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -7875,10 +7200,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -7890,7 +7215,7 @@ ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -7913,10 +7238,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -7924,7 +7249,7 @@ emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -7932,7 +7257,7 @@ emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -7954,16 +7279,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -8017,12 +7342,11 @@ # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -printf %s "checking whether the C compiler needs -belf... " >&6; } -if test ${lt_cv_cc_needs_belf+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8033,20 +7357,19 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes -else $as_nop +else lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8055,8 +7378,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -8069,9 +7392,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -8106,12 +7429,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -8119,15 +7441,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8138,11 +7456,11 @@ fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -printf "%s\n" "$MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8151,12 +7469,11 @@ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -8164,15 +7481,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8183,11 +7496,11 @@ fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -8195,8 +7508,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -8206,12 +7519,11 @@ fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test ${lt_cv_path_mainfest_tool+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -8221,8 +7533,8 @@ fi rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8237,12 +7549,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -8250,15 +7561,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8269,11 +7576,11 @@ fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -printf "%s\n" "$DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8282,12 +7589,11 @@ ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -8295,15 +7601,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8314,11 +7616,11 @@ fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8326,8 +7628,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8339,12 +7641,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -8352,15 +7653,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8371,11 +7668,11 @@ fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -printf "%s\n" "$NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8384,12 +7681,11 @@ ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_NMEDIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -8397,15 +7693,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8416,11 +7708,11 @@ fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -printf "%s\n" "$ac_ct_NMEDIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8428,8 +7720,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8441,12 +7733,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -8454,15 +7745,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8473,11 +7760,11 @@ fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -printf "%s\n" "$LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8486,12 +7773,11 @@ ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_LIPO+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -8499,15 +7785,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8518,11 +7800,11 @@ fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -printf "%s\n" "$ac_ct_LIPO" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8530,8 +7812,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8543,12 +7825,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8556,15 +7837,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8575,11 +7852,11 @@ fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -printf "%s\n" "$OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8588,12 +7865,11 @@ ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8601,15 +7877,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8620,11 +7892,11 @@ fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -printf "%s\n" "$ac_ct_OTOOL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8632,8 +7904,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8645,12 +7917,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8658,15 +7929,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8677,11 +7944,11 @@ fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -printf "%s\n" "$OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8690,12 +7957,11 @@ ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_OTOOL64+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8703,15 +7969,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8722,11 +7984,11 @@ fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -printf "%s\n" "$ac_ct_OTOOL64" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8734,8 +7996,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8770,12 +8032,11 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -printf %s "checking for -single_module linker flag... " >&6; } -if test ${lt_cv_apple_cc_single_mod+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8804,15 +8065,14 @@ rm -f conftest.* fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -printf %s "checking for -exported_symbols_list linker flag... " >&6; } -if test ${lt_cv_ld_exported_symbols_list+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8821,41 +8081,39 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes -else $as_nop +else lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -printf %s "checking for -force_load linker flag... " >&6; } -if test ${lt_cv_ld_force_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 - $AR $AR_FLAGS libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8875,19 +8133,24 @@ rm -rf conftest.dSYM fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -printf "%s\n" "$lt_cv_ld_force_load" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[012],*|,*powerpc*-darwin[5-8]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -8942,43 +8205,286 @@ esac } -ac_header= ac_cache= -for ac_item in $ac_header_c_list +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +fi -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF fi +done + @@ -8994,8 +8500,7 @@ # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -9013,7 +8518,7 @@ IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_shared=yes fi @@ -9026,8 +8531,7 @@ # Check whether --enable-static was given. -if test ${enable_static+y} -then : +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -9045,7 +8549,7 @@ IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_static=yes fi @@ -9059,8 +8563,7 @@ # Check whether --with-pic was given. -if test ${with_pic+y} -then : +if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -9077,7 +8580,7 @@ IFS=$lt_save_ifs ;; esac -else $as_nop +else pic_mode=default fi @@ -9089,8 +8592,7 @@ # Check whether --enable-fast-install was given. -if test ${enable_fast_install+y} -then : +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -9108,7 +8610,7 @@ IFS=$lt_save_ifs ;; esac -else $as_nop +else enable_fast_install=yes fi @@ -9122,12 +8624,11 @@ shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -printf %s "checking which variant of shared library versioning to provide... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test ${with_aix_soname+y} -then : +if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -9136,19 +8637,18 @@ ;; esac lt_cv_with_aix_soname=$with_aix_soname -else $as_nop - if test ${lt_cv_with_aix_soname+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -printf "%s\n" "$with_aix_soname" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -9230,12 +8730,11 @@ setopt NO_GLOB_SUBST fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -printf %s "checking for objdir... " >&6; } -if test ${lt_cv_objdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -9246,15 +8745,17 @@ fi rmdir .libs 2>/dev/null fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -printf "%s\n" "$lt_cv_objdir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF @@ -9275,8 +8776,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9300,12 +8801,11 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -printf %s "checking for ${ac_tool_prefix}file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9354,11 +8854,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9367,12 +8867,11 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -printf %s "checking for file... " >&6; } -if test ${lt_cv_path_MAGIC_CMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9421,11 +8920,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -printf "%s\n" "$MAGIC_CMD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9510,12 +9009,11 @@ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test ${lt_cv_prog_compiler_rtti_exceptions+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9546,8 +9044,8 @@ $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9788,7 +9286,7 @@ lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -9904,28 +9402,26 @@ ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -printf %s "checking for $compiler option to produce PIC... " >&6; } -if test ${lt_cv_prog_compiler_pic+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test ${lt_cv_prog_compiler_pic_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9956,8 +9452,8 @@ $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -9985,12 +9481,11 @@ # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test ${lt_cv_prog_compiler_static_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -10014,8 +9509,8 @@ LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -10029,12 +9524,11 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10077,20 +9571,19 @@ $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test ${lt_cv_prog_compiler_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10133,8 +9626,8 @@ $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -10142,19 +9635,19 @@ hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -printf %s "checking if we can lock with hard links... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -printf "%s\n" "$hard_links" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test no = "$hard_links"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -10166,8 +9659,8 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10211,15 +9704,15 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -10271,7 +9764,7 @@ whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10383,7 +9876,6 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes - file_list_spec='@' ;; interix[3-9]*) @@ -10398,7 +9890,7 @@ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -10441,7 +9933,7 @@ compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -10453,7 +9945,7 @@ if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -10469,7 +9961,7 @@ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -10601,7 +10093,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -10723,23 +10215,21 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10754,7 +10244,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10778,23 +10268,21 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if test ${lt_cv_aix_libpath_+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10809,7 +10297,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10872,12 +10360,12 @@ cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl*) - # Native MSVC or ICC + cl*) + # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -10918,7 +10406,7 @@ fi' ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -10959,8 +10447,8 @@ output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -10994,7 +10482,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -11060,12 +10548,11 @@ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -printf %s "checking if $CC understands -b... " >&6; } -if test ${lt_cv_prog_compiler__b+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -11089,8 +10576,8 @@ LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -11130,30 +10617,28 @@ # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test ${lt_cv_irix_exported_symbol+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes -else $as_nop +else lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -11245,7 +10730,6 @@ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes - file_list_spec='@' ;; osf3*) @@ -11434,8 +10918,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -printf "%s\n" "$ld_shlibs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11471,19 +10955,18 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -printf %s "checking whether -lc should be explicitly linked in... " >&6; } -if test ${lt_cv_archive_cmds_need_lc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11501,7 +10984,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11515,8 +10998,8 @@ $RM conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11675,8 +11158,8 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -printf %s "checking dynamic linker characteristics... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -11938,7 +11421,7 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -11948,14 +11431,14 @@ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -11974,7 +11457,7 @@ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -12011,7 +11494,7 @@ ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -12044,7 +11527,7 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -12237,10 +11720,9 @@ shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test ${lt_cv_shlibpath_overrides_runpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -12250,21 +11732,19 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null -then : +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12499,8 +11979,8 @@ dynamic_linker=no ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -printf "%s\n" "$dynamic_linker" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12621,8 +12101,8 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -printf %s "checking how to hardcode library paths into programs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12646,8 +12126,8 @@ # directories. hardcode_action=unsupported fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -printf "%s\n" "$hardcode_action" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12691,12 +12171,11 @@ darwin*) # if libdl is installed we need to link against it - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12705,31 +12184,32 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop +else lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12749,16 +12229,14 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes -then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12767,42 +12245,41 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load (); int -main (void) +main () { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes -else $as_nop +else ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else $as_nop +else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12811,37 +12288,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -printf %s "checking for dlopen in -lsvld... " >&6; } -if test ${ac_cv_lib_svld_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12850,37 +12327,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes -else $as_nop +else ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -printf %s "checking for dld_link in -ldld... " >&6; } -if test ${ac_cv_lib_dld_dld_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12889,29 +12366,30 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dld_link (); int -main (void) +main () { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes -else $as_nop +else ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12950,12 +12428,11 @@ save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -printf %s "checking whether a program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -13034,7 +12511,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13052,17 +12529,16 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -printf "%s\n" "$lt_cv_dlopen_self" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -printf %s "checking whether a statically linked program can dlopen itself... " >&6; } -if test ${lt_cv_dlopen_self_static+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -13141,7 +12617,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13159,8 +12635,8 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -13198,43 +12674,32 @@ striplib= old_striplib= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -printf %s "checking whether stripping libraries is possible... " >&6; } -if test -z "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - ;; - *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; - esac - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac fi @@ -13249,13 +12714,13 @@ # Report what library types will actually be built - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -printf %s "checking if libtool supports shared libraries... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -printf "%s\n" "$can_build_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -printf %s "checking whether to build shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -13279,15 +12744,15 @@ fi ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -printf %s "checking whether to build static libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -printf "%s\n" "$enable_static" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } @@ -13332,12 +12797,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -13345,15 +12809,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13364,11 +12824,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13377,12 +12837,11 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -13390,15 +12849,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13409,11 +12864,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -13421,8 +12876,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -13435,12 +12890,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -13448,15 +12902,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13467,11 +12917,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13480,12 +12930,11 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -13494,19 +12943,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13522,18 +12967,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13544,12 +12989,11 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -13557,15 +13001,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13576,11 +13016,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13593,12 +13033,11 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -13606,15 +13045,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13625,11 +13060,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -13641,138 +13076,34 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -13782,21 +13113,20 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -13806,33 +13136,29 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -13841,60 +13167,57 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -13909,144 +13232,94 @@ CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -14055,23 +13328,21 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -14099,8 +13370,8 @@ rm -f core conftest* unset am_i fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -14118,12 +13389,11 @@ depcc="$CC" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -14230,8 +13500,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -14245,15 +13515,15 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -printf %s "checking whether ln -s works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -printf "%s\n" "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi @@ -14267,12 +13537,11 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -14282,15 +13551,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14302,11 +13567,11 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14315,12 +13580,11 @@ ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -14330,15 +13594,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14350,11 +13610,11 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -14362,8 +13622,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -14375,14 +13635,14 @@ fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } PKG_CONFIG="" fi fi @@ -14395,12 +13655,11 @@ depcc="$CCAS" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CCAS_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -14505,8 +13764,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if @@ -14527,21 +13786,19 @@ # allow to override gcov location # Check whether --with-gcov was given. -if test ${with_gcov+y} -then : +if test "${with_gcov+set}" = set; then : withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov -else $as_nop +else _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 -printf %s "checking whether to build with code coverage support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 +$as_echo_n "checking whether to build with code coverage support... " >&6; } # Check whether --enable-code-coverage was given. -if test ${enable_code_coverage+y} -then : +if test "${enable_code_coverage+set}" = set; then : enableval=$enable_code_coverage; -else $as_nop +else enable_code_coverage=no fi @@ -14556,22 +13813,20 @@ CODE_COVERAGE_ENABLED=$enable_code_coverage - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 -printf "%s\n" "$enable_code_coverage" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 +$as_echo "$enable_code_coverage" >&6; } - if test "$enable_code_coverage" = "yes" -then : + if test "$enable_code_coverage" = "yes" ; then : # check for gcov if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GCOV+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GCOV"; then ac_cv_prog_GCOV="$GCOV" # Let the user override the test. else @@ -14579,15 +13834,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14598,11 +13849,11 @@ fi GCOV=$ac_cv_prog_GCOV if test -n "$GCOV"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 -printf "%s\n" "$GCOV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14611,12 +13862,11 @@ ac_ct_GCOV=$GCOV # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_GCOV+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_GCOV"; then ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. else @@ -14624,15 +13874,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14643,11 +13889,11 @@ fi ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV if test -n "$ac_ct_GCOV"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 -printf "%s\n" "$ac_ct_GCOV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_GCOV" = x; then @@ -14655,8 +13901,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GCOV=$ac_ct_GCOV @@ -14665,14 +13911,12 @@ GCOV="$ac_cv_prog_GCOV" fi - if test "X$GCOV" = "X:" -then : + if test "X$GCOV" = "X:"; then : as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 fi - if test "$GCC" = "no" -then : + if test "$GCC" = "no" ; then : as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 @@ -14680,12 +13924,11 @@ # Extract the first word of "lcov", so it can be a program name with args. set dummy lcov; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_LCOV+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$LCOV"; then ac_cv_prog_LCOV="$LCOV" # Let the user override the test. else @@ -14693,15 +13936,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LCOV="lcov" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14712,22 +13951,21 @@ fi LCOV=$ac_cv_prog_LCOV if test -n "$LCOV"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 -printf "%s\n" "$LCOV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "genhtml", so it can be a program name with args. set dummy genhtml; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GENHTML+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GENHTML"; then ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. else @@ -14735,15 +13973,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GENHTML="genhtml" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14754,24 +13988,22 @@ fi GENHTML=$ac_cv_prog_GENHTML if test -n "$GENHTML"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 -printf "%s\n" "$GENHTML" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +$as_echo "$GENHTML" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test -z "$LCOV" -then : + if test -z "$LCOV" ; then : as_fn_error $? "To enable code coverage reporting you must have lcov installed" "$LINENO" 5 fi - if test -z "$GENHTML" -then : + if test -z "$GENHTML" ; then : as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 @@ -14809,7 +14041,7 @@ -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete ' -else $as_nop +else CODE_COVERAGE_RULES_CHECK=' @echo "Need to reconfigure with --enable-code-coverage" @@ -14933,8 +14165,8 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 -printf %s "checking how to create a pax tar archive... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 +$as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. @@ -15009,44 +14241,42 @@ done rm -rf conftest.dir - if test ${am_cv_prog_tar_pax+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${am_cv_prog_tar_pax+:} false; then : + $as_echo_n "(cached) " >&6 +else am_cv_prog_tar_pax=$_am_tool fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 -printf "%s\n" "$am_cv_prog_tar_pax" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 +$as_echo "$am_cv_prog_tar_pax" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking zfs author" >&5 -printf %s "checking zfs author... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZFS_META_AUTHOR" >&5 -printf "%s\n" "$ZFS_META_AUTHOR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking zfs author" >&5 +$as_echo_n "checking zfs author... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZFS_META_AUTHOR" >&5 +$as_echo "$ZFS_META_AUTHOR" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking zfs license" >&5 -printf %s "checking zfs license... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZFS_META_LICENSE" >&5 -printf "%s\n" "$ZFS_META_LICENSE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking zfs license" >&5 +$as_echo_n "checking zfs license... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZFS_META_LICENSE" >&5 +$as_echo "$ZFS_META_LICENSE" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 -printf %s "checking whether NLS is requested... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. -if test ${enable_nls+y} -then : +if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval -else $as_nop +else USE_NLS=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -printf "%s\n" "$USE_NLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } @@ -15085,12 +14315,11 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_MSGFMT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. @@ -15118,21 +14347,20 @@ fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -printf "%s\n" "$MSGFMT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_GMSGFMT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. @@ -15142,15 +14370,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -15163,11 +14387,11 @@ fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 -printf "%s\n" "$GMSGFMT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -15208,12 +14432,11 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_XGETTEXT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. @@ -15241,11 +14464,11 @@ fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 -printf "%s\n" "$XGETTEXT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi rm -f messages.po @@ -15286,12 +14509,11 @@ # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_MSGMERGE+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. @@ -15318,11 +14540,11 @@ fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 -printf "%s\n" "$MSGMERGE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -15362,10 +14584,9 @@ # Check whether --with-gnu-ld was given. -if test ${with_gnu_ld+y} -then : +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else $as_nop +else with_gnu_ld=no fi @@ -15383,26 +14604,25 @@ fi if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 -printf %s "checking for ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +$as_echo_n "checking for ld... " >&6; } elif test "$GCC" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -printf %s "checking for ld used by $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -printf %s "checking for non-GNU ld... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi if test -n "$LD"; then # Let the user override the test with a path. : else - if test ${acl_cv_path_LD+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH @@ -15471,8 +14691,7 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in @@ -15481,7 +14700,7 @@ esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15493,10 +14712,9 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in @@ -15505,7 +14723,7 @@ esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac @@ -15514,19 +14732,18 @@ LD="$acl_cv_path_LD" fi if test -n "$LD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -printf "%s\n" "$LD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -printf %s "checking if the linker ($LD) is GNU ld... " >&6; } -if test ${acl_cv_prog_gnu_ld+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${acl_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -printf %s "checking for shared library run path origin... " >&6; } -if test ${acl_cv_rpath+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 +else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh @@ -15559,8 +14774,8 @@ acl_cv_rpath=done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -printf "%s\n" "$acl_cv_rpath" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" @@ -15571,22 +14786,20 @@ acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. -if test ${enable_rpath+y} -then : +if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : -else $as_nop +else enable_rpath=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 -printf %s "checking 32-bit host C ABI... " >&6; } -if test ${gl_cv_host_cpu_c_abi_32bit+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +$as_echo_n "checking 32-bit host C ABI... " >&6; } +if ${gl_cv_host_cpu_c_abi_32bit+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) @@ -15620,13 +14833,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; arm* | aarch64 ) @@ -15645,13 +14857,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) @@ -15666,13 +14877,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; ia64* ) @@ -15687,13 +14897,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=yes -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; mips* ) @@ -15708,13 +14917,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; powerpc* ) @@ -15733,13 +14941,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; rs6000 ) @@ -15758,13 +14965,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; s390* ) @@ -15779,13 +14985,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; sparc | sparc64 ) @@ -15800,13 +15005,12 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_host_cpu_c_abi_32bit=no -else $as_nop +else gl_cv_host_cpu_c_abi_32bit=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; *) @@ -15816,8 +15020,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 -printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" @@ -15827,12 +15031,11 @@ case "$host_os" in solaris*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -printf %s "checking for 64-bit host... " >&6; } -if test ${gl_cv_solaris_64bit+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 @@ -15842,25 +15045,23 @@ #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : gl_cv_solaris_64bit=yes -else $as_nop +else gl_cv_solaris_64bit=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -printf "%s\n" "$gl_cv_solaris_64bit" >&6; };; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +$as_echo "$gl_cv_solaris_64bit" >&6; };; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 -printf %s "checking for the common suffixes of directories in the library search path... " >&6; } -if test ${acl_cv_libdirstems+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } +if ${acl_cv_libdirstems+:} false; then : + $as_echo_n "(cached) " >&6 +else acl_libdirstem=lib acl_libdirstem2= case "$host_os" in @@ -15907,8 +15108,8 @@ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 -printf "%s\n" "$acl_cv_libdirstems" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +$as_echo "$acl_cv_libdirstems" >&6; } # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` @@ -15938,8 +15139,7 @@ # Check whether --with-libiconv-prefix was given. -if test ${with_libiconv_prefix+y} -then : +if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -16385,29 +15585,27 @@ ZFS_CONFIG=all # Check whether --with-config was given. -if test ${with_config+y} -then : +if test "${with_config+set}" = set; then : withval=$with_config; ZFS_CONFIG="$withval" fi # Check whether --enable-linux-builtin was given. -if test ${enable_linux_builtin+y} -then : +if test "${enable_linux_builtin+set}" = set; then : enableval=$enable_linux_builtin; -else $as_nop +else enable_linux_builtin=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking zfs config" >&5 -printf %s "checking zfs config... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZFS_CONFIG" >&5 -printf "%s\n" "$ZFS_CONFIG" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking zfs config" >&5 +$as_echo_n "checking zfs config... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZFS_CONFIG" >&5 +$as_echo "$ZFS_CONFIG" >&6; }; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 -printf %s "checking the number of available CPUs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 +$as_echo_n "checking the number of available CPUs... " >&6; } CPU_COUNT="0" # Try generic methods @@ -16416,18 +15614,16 @@ # 'NPROCESSORS_ONLN' are platform-specific command -v getconf >/dev/null 2>&1 && \ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0" - if test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1 -then : + if test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1; then : : # empty -else $as_nop +else # 'nproc' is part of GNU Coreutils and is widely available CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0" fi - if test "$CPU_COUNT" -gt "0" 2>/dev/null -then : + if test "$CPU_COUNT" -gt "0" 2>/dev/null; then : : # empty -else $as_nop +else # Try platform-specific preferred methods case $host_os in #( *linux*) : @@ -16450,19 +15646,17 @@ ;; esac fi - if test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1 -then : + if test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1; then : : # empty -else $as_nop +else # Try less preferred generic method # 'hw.ncpu' exist on many platforms, but not on GNU/Linux CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0" fi - if test "$CPU_COUNT" -gt "0" 2>/dev/null -then : + if test "$CPU_COUNT" -gt "0" 2>/dev/null; then : : # empty -else $as_nop +else # Try platform-specific fallback methods # They can be less accurate and slower then preferred methods case $host_os in #( @@ -16479,10 +15673,9 @@ command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0" ;; #( mingw*) : - if CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\[0-9]+$' -c` -then : + if CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\[0-9]+$' -c`; then : : # empty -else $as_nop +else test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS" fi ;; #( msys*) : @@ -16493,22 +15686,21 @@ ;; esac fi - if test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT" >&5 -printf "%s\n" "$CPU_COUNT" >&6; } + if test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT" >&5 +$as_echo "$CPU_COUNT" >&6; } -else $as_nop +else CPU_COUNT="1" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1)" >&5 -printf "%s\n" "unable to detect (assuming 1)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1)" >&5 +$as_echo "unable to detect (assuming 1)" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-clobbered" >&5 -printf %s "checking whether $CC supports -Wno-clobbered... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-clobbered" >&5 +$as_echo_n "checking whether $CC supports -Wno-clobbered... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wclobbered" @@ -16517,35 +15709,34 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : NO_CLOBBERED=-Wno-clobbered - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else NO_CLOBBERED= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Winfinite-recursion" >&5 -printf %s "checking whether $CC supports -Winfinite-recursion... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Winfinite-recursion" >&5 +$as_echo_n "checking whether $CC supports -Winfinite-recursion... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Winfinite-recursion" @@ -16554,52 +15745,49 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : INFINITE_RECURSION=-Winfinite-recursion -printf "%s\n" "#define HAVE_INFINITE_RECURSION 1" >>confdefs.h +$as_echo "#define HAVE_INFINITE_RECURSION 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else INFINITE_RECURSION= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $KERNEL_CC supports -Winfinite-recursion" >&5 -printf %s "checking whether $KERNEL_CC supports -Winfinite-recursion... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $KERNEL_CC supports -Winfinite-recursion" >&5 +$as_echo_n "checking whether $KERNEL_CC supports -Winfinite-recursion... " >&6; } saved_cc="$CC" saved_flags="$CFLAGS" CC="gcc" CFLAGS="$CFLAGS -Werror -Winfinite-recursion" - if test -n "$KERNEL_CC" -then : + if test -n "$KERNEL_CC" ; then : CC="$KERNEL_CC" fi - if test -n "$KERNEL_LLVM" -then : + if test -n "$KERNEL_LLVM" ; then : CC="clang" @@ -16609,39 +15797,38 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : KERNEL_INFINITE_RECURSION=-Winfinite-recursion -printf "%s\n" "#define HAVE_KERNEL_INFINITE_RECURSION 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_INFINITE_RECURSION 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else KERNEL_INFINITE_RECURSION= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CC="$saved_cc" CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wimplicit-fallthrough" >&5 -printf %s "checking whether $CC supports -Wimplicit-fallthrough... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wimplicit-fallthrough" >&5 +$as_echo_n "checking whether $CC supports -Wimplicit-fallthrough... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wimplicit-fallthrough" @@ -16650,38 +15837,37 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : IMPLICIT_FALLTHROUGH=-Wimplicit-fallthrough -printf "%s\n" "#define HAVE_IMPLICIT_FALLTHROUGH 1" >>confdefs.h +$as_echo "#define HAVE_IMPLICIT_FALLTHROUGH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else IMPLICIT_FALLTHROUGH= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wframe-larger-than=" >&5 -printf %s "checking whether $CC supports -Wframe-larger-than=... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wframe-larger-than=" >&5 +$as_echo_n "checking whether $CC supports -Wframe-larger-than=... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wframe-larger-than=4096" @@ -16690,35 +15876,34 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : FRAME_LARGER_THAN="-Wframe-larger-than=4096" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else FRAME_LARGER_THAN="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-truncation" >&5 -printf %s "checking whether $CC supports -Wno-format-truncation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-truncation" >&5 +$as_echo_n "checking whether $CC supports -Wno-format-truncation... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wno-format-truncation" @@ -16727,35 +15912,34 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : NO_FORMAT_TRUNCATION=-Wno-format-truncation - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else NO_FORMAT_TRUNCATION= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-zero-length" >&5 -printf %s "checking whether $CC supports -Wno-format-zero-length... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-zero-length" >&5 +$as_echo_n "checking whether $CC supports -Wno-format-zero-length... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wno-format-zero-length" @@ -16764,35 +15948,34 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : NO_FORMAT_ZERO_LENGTH=-Wno-format-zero-length - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else NO_FORMAT_ZERO_LENGTH= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-overflow" >&5 -printf %s "checking whether $CC supports -Wformat-overflow... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-overflow" >&5 +$as_echo_n "checking whether $CC supports -Wformat-overflow... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -Wformat-overflow" @@ -16801,38 +15984,37 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : FORMAT_OVERFLOW=-Wformat-overflow -printf "%s\n" "#define HAVE_FORMAT_OVERFLOW 1" >>confdefs.h +$as_echo "#define HAVE_FORMAT_OVERFLOW 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else FORMAT_OVERFLOW= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-omit-frame-pointer" >&5 -printf %s "checking whether $CC supports -fno-omit-frame-pointer... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-omit-frame-pointer" >&5 +$as_echo_n "checking whether $CC supports -fno-omit-frame-pointer... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -fno-omit-frame-pointer" @@ -16841,35 +16023,34 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : NO_OMIT_FRAME_POINTER=-fno-omit-frame-pointer - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else NO_OMIT_FRAME_POINTER= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-ipa-sra" >&5 -printf %s "checking whether $CC supports -fno-ipa-sra... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-ipa-sra" >&5 +$as_echo_n "checking whether $CC supports -fno-ipa-sra... " >&6; } saved_flags="$CFLAGS" CFLAGS="$CFLAGS -Werror -fno-ipa-sra" @@ -16878,49 +16059,46 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : NO_IPA_SRA=-fno-ipa-sra - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else NO_IPA_SRA= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $KERNEL_CC supports -fno-ipa-sra" >&5 -printf %s "checking whether $KERNEL_CC supports -fno-ipa-sra... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $KERNEL_CC supports -fno-ipa-sra" >&5 +$as_echo_n "checking whether $KERNEL_CC supports -fno-ipa-sra... " >&6; } saved_cc="$CC" saved_flags="$CFLAGS" CC="gcc" CFLAGS="$CFLAGS -Werror -fno-ipa-sra" - if test -n "$KERNEL_CC" -then : + if test -n "$KERNEL_CC" ; then : CC="$KERNEL_CC" fi - if test -n "$KERNEL_LLVM" -then : + if test -n "$KERNEL_LLVM" ; then : CC="clang" @@ -16930,41 +16108,39 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : KERNEL_NO_IPA_SRA=-fno-ipa-sra - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else KERNEL_NO_IPA_SRA= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CC="$saved_cc" CFLAGS="$saved_flags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with -fsanitize=address support" >&5 -printf %s "checking whether to build with -fsanitize=address support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with -fsanitize=address support" >&5 +$as_echo_n "checking whether to build with -fsanitize=address support... " >&6; } # Check whether --enable-asan was given. -if test ${enable_asan+y} -then : +if test "${enable_asan+set}" = set; then : enableval=$enable_asan; -else $as_nop +else enable_asan=no fi @@ -16979,14 +16155,13 @@ ASAN_ENABLED=$enable_asan - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_asan" >&5 -printf "%s\n" "$enable_asan" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_asan" >&5 +$as_echo "$enable_asan" >&6; } - if test "$enable_asan" = "yes" -then : + if test "$enable_asan" = "yes" ; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=address" >&5 -printf %s "checking whether $CC supports -fsanitize=address... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=address" >&5 +$as_echo_n "checking whether $CC supports -fsanitize=address... " >&6; } saved_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror -fsanitize=address" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16995,25 +16170,24 @@ int main() { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ASAN_CFLAGS="-fsanitize=address" ASAN_LDFLAGS="-fsanitize=address" ASAN_ZFS="_with_asan" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? "$CC does not support -fsanitize=address" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$saved_cflags" -else $as_nop +else ASAN_CFLAGS="" ASAN_LDFLAGS="" @@ -17026,13 +16200,12 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with -fsanitize=undefined support" >&5 -printf %s "checking whether to build with -fsanitize=undefined support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with -fsanitize=undefined support" >&5 +$as_echo_n "checking whether to build with -fsanitize=undefined support... " >&6; } # Check whether --enable-ubsan was given. -if test ${enable_ubsan+y} -then : +if test "${enable_ubsan+set}" = set; then : enableval=$enable_ubsan; -else $as_nop +else enable_ubsan=no fi @@ -17047,14 +16220,13 @@ UBSAN_ENABLED=$enable_ubsan - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 -printf "%s\n" "$enable_ubsan" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 +$as_echo "$enable_ubsan" >&6; } - if test "$enable_ubsan" = "yes" -then : + if test "$enable_ubsan" = "yes" ; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=undefined" >&5 -printf %s "checking whether $CC supports -fsanitize=undefined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=undefined" >&5 +$as_echo_n "checking whether $CC supports -fsanitize=undefined... " >&6; } saved_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror -fsanitize=undefined" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17063,25 +16235,24 @@ int main() { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : UBSAN_CFLAGS="-fsanitize=undefined" UBSAN_LDFLAGS="-fsanitize=undefined" UBSAN_ZFS="_with_ubsan" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? "$CC does not support -fsanitize=undefined" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$saved_cflags" -else $as_nop +else UBSAN_CFLAGS="" UBSAN_LDFLAGS="" @@ -17097,756 +16268,799 @@ case "$host_cpu" in amd64 | x86_64 | x86 | i686) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE" >&5 -printf %s "checking whether host toolchain supports SSE... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE" >&5 +$as_echo_n "checking whether host toolchain supports SSE... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("xorps %xmm0, %xmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_SSE 1" >>confdefs.h +$as_echo "#define HAVE_SSE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE2" >&5 -printf %s "checking whether host toolchain supports SSE2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE2" >&5 +$as_echo_n "checking whether host toolchain supports SSE2... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("pxor %xmm0, %xmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_SSE2 1" >>confdefs.h +$as_echo "#define HAVE_SSE2 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE3" >&5 -printf %s "checking whether host toolchain supports SSE3... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE3" >&5 +$as_echo_n "checking whether host toolchain supports SSE3... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { char v[16]; __asm__ __volatile__("lddqu %0,%%xmm0" :: "m"(v[0])); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_SSE3 1" >>confdefs.h +$as_echo "#define HAVE_SSE3 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSSE3" >&5 -printf %s "checking whether host toolchain supports SSSE3... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSSE3" >&5 +$as_echo_n "checking whether host toolchain supports SSSE3... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("pshufb %xmm0,%xmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_SSSE3 1" >>confdefs.h +$as_echo "#define HAVE_SSSE3 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE4.1" >&5 -printf %s "checking whether host toolchain supports SSE4.1... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE4.1" >&5 +$as_echo_n "checking whether host toolchain supports SSE4.1... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("pmaxsb %xmm0,%xmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_SSE4_1 1" >>confdefs.h +$as_echo "#define HAVE_SSE4_1 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE4.2" >&5 -printf %s "checking whether host toolchain supports SSE4.2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports SSE4.2" >&5 +$as_echo_n "checking whether host toolchain supports SSE4.2... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("pcmpgtq %xmm0, %xmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_SSE4_2 1" >>confdefs.h +$as_echo "#define HAVE_SSE4_2 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX" >&5 -printf %s "checking whether host toolchain supports AVX... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX" >&5 +$as_echo_n "checking whether host toolchain supports AVX... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { char v[32]; __asm__ __volatile__("vmovdqa %0,%%ymm0" :: "m"(v[0])); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX 1" >>confdefs.h +$as_echo "#define HAVE_AVX 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX2" >&5 -printf %s "checking whether host toolchain supports AVX2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX2" >&5 +$as_echo_n "checking whether host toolchain supports AVX2... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vpshufb %ymm0,%ymm1,%ymm2"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX2 1" >>confdefs.h +$as_echo "#define HAVE_AVX2 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512F" >&5 -printf %s "checking whether host toolchain supports AVX512F... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512F" >&5 +$as_echo_n "checking whether host toolchain supports AVX512F... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vpandd %zmm0,%zmm1,%zmm2"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512F 1" >>confdefs.h +$as_echo "#define HAVE_AVX512F 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512CD" >&5 -printf %s "checking whether host toolchain supports AVX512CD... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512CD" >&5 +$as_echo_n "checking whether host toolchain supports AVX512CD... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vplzcntd %zmm0,%zmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512CD 1" >>confdefs.h +$as_echo "#define HAVE_AVX512CD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512DQ" >&5 -printf %s "checking whether host toolchain supports AVX512DQ... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512DQ" >&5 +$as_echo_n "checking whether host toolchain supports AVX512DQ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vandpd %zmm0,%zmm1,%zmm2"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512DQ 1" >>confdefs.h +$as_echo "#define HAVE_AVX512DQ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512BW" >&5 -printf %s "checking whether host toolchain supports AVX512BW... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512BW" >&5 +$as_echo_n "checking whether host toolchain supports AVX512BW... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vpshufb %zmm0,%zmm1,%zmm2"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512BW 1" >>confdefs.h +$as_echo "#define HAVE_AVX512BW 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512IFMA" >&5 -printf %s "checking whether host toolchain supports AVX512IFMA... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512IFMA" >&5 +$as_echo_n "checking whether host toolchain supports AVX512IFMA... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vpmadd52luq %zmm0,%zmm1,%zmm2"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512IFMA 1" >>confdefs.h +$as_echo "#define HAVE_AVX512IFMA 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512VBMI" >&5 -printf %s "checking whether host toolchain supports AVX512VBMI... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512VBMI" >&5 +$as_echo_n "checking whether host toolchain supports AVX512VBMI... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vpermb %zmm0,%zmm1,%zmm2"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512VBMI 1" >>confdefs.h +$as_echo "#define HAVE_AVX512VBMI 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512PF" >&5 -printf %s "checking whether host toolchain supports AVX512PF... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512PF" >&5 +$as_echo_n "checking whether host toolchain supports AVX512PF... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vgatherpf0dps (%rsi,%zmm0,4){%k1}"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512PF 1" >>confdefs.h +$as_echo "#define HAVE_AVX512PF 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512ER" >&5 -printf %s "checking whether host toolchain supports AVX512ER... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512ER" >&5 +$as_echo_n "checking whether host toolchain supports AVX512ER... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vexp2pd %zmm0,%zmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512ER 1" >>confdefs.h +$as_echo "#define HAVE_AVX512ER 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512VL" >&5 -printf %s "checking whether host toolchain supports AVX512VL... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AVX512VL" >&5 +$as_echo_n "checking whether host toolchain supports AVX512VL... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("vpabsq %zmm0,%zmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AVX512VL 1" >>confdefs.h +$as_echo "#define HAVE_AVX512VL 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AES" >&5 -printf %s "checking whether host toolchain supports AES... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports AES" >&5 +$as_echo_n "checking whether host toolchain supports AES... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("aesenc %xmm0, %xmm1"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_AES 1" >>confdefs.h +$as_echo "#define HAVE_AES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports PCLMULQDQ" >&5 -printf %s "checking whether host toolchain supports PCLMULQDQ... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports PCLMULQDQ" >&5 +$as_echo_n "checking whether host toolchain supports PCLMULQDQ... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("pclmulqdq %0, %%xmm0, %%xmm1" :: "i"(0)); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PCLMULQDQ 1" >>confdefs.h +$as_echo "#define HAVE_PCLMULQDQ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports MOVBE" >&5 -printf %s "checking whether host toolchain supports MOVBE... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports MOVBE" >&5 +$as_echo_n "checking whether host toolchain supports MOVBE... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { __asm__ __volatile__("movbe 0(%eax), %eax"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MOVBE 1" >>confdefs.h +$as_echo "#define HAVE_MOVBE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports XSAVE" >&5 -printf %s "checking whether host toolchain supports XSAVE... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports XSAVE" >&5 +$as_echo_n "checking whether host toolchain supports XSAVE... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { char b[4096] __attribute__ ((aligned (64))); __asm__ __volatile__("xsave %[b]\n" : : [b] "m" (*b) : "memory"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XSAVE 1" >>confdefs.h +$as_echo "#define HAVE_XSAVE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports XSAVEOPT" >&5 -printf %s "checking whether host toolchain supports XSAVEOPT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports XSAVEOPT" >&5 +$as_echo_n "checking whether host toolchain supports XSAVEOPT... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { char b[4096] __attribute__ ((aligned (64))); __asm__ __volatile__("xsaveopt %[b]\n" : : [b] "m" (*b) : "memory"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XSAVEOPT 1" >>confdefs.h +$as_echo "#define HAVE_XSAVEOPT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports XSAVES" >&5 -printf %s "checking whether host toolchain supports XSAVES... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host toolchain supports XSAVES" >&5 +$as_echo_n "checking whether host toolchain supports XSAVES... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - void main() + int main() { char b[4096] __attribute__ ((aligned (64))); __asm__ __volatile__("xsaves %[b]\n" : : [b] "m" (*b) : "memory"); + return (0); } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XSAVES 1" >>confdefs.h +$as_echo "#define HAVE_XSAVES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for system type ($host_os)" >&5 -printf %s "checking for system type ($host_os)... " >&6; } + case "$host_cpu" in + aarch64*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports .cfi_negate_ra_state" >&5 +$as_echo_n "checking whether assembler supports .cfi_negate_ra_state... " >&6; } +if ${zfs_cv_as_cfi_pseudo_op+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat > conftest.S <<_ACEOF + .text +conftest: + .cfi_startproc + .cfi_negate_ra_state + ret + .cfi_endproc +_ACEOF + if { ac_try='$CC -c $CFLAGS $CPPFLAGS conftest.S -o 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; }; } >/dev/null 2>&1; then + zfs_cv_as_cfi_pseudo_op=yes + else + zfs_cv_as_cfi_pseudo_op=no + fi + rm -f conftest.S conftest.o + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $zfs_cv_as_cfi_pseudo_op" >&5 +$as_echo "$zfs_cv_as_cfi_pseudo_op" >&6; } + + if test "x$zfs_cv_as_cfi_pseudo_op" = xyes; then : + + +$as_echo "#define HAVE_AS_CFI_PSEUDO_OP 1" >>confdefs.h + + +fi + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system type ($host_os)" >&5 +$as_echo_n "checking for system type ($host_os)... " >&6; } case $host_os in *linux*) -printf "%s\n" "#define SYSTEM_LINUX 1" >>confdefs.h +$as_echo "#define SYSTEM_LINUX 1" >>confdefs.h ac_system="Linux" ac_system_l="linux" ;; *freebsd*) -printf "%s\n" "#define SYSTEM_FREEBSD 1" >>confdefs.h +$as_echo "#define SYSTEM_FREEBSD 1" >>confdefs.h ac_system="FreeBSD" ac_system_l="freebsd" @@ -17856,8 +17070,8 @@ ac_system_l="unknown" ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_system" >&5 -printf "%s\n" "$ac_system" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_system" >&5 +$as_echo "$ac_system" >&6; } @@ -17947,10 +17161,9 @@ # Check whether --with-python was given. -if test ${with_python+y} -then : +if test "${with_python+set}" = set; then : withval=$with_python; with_python=$withval -else $as_nop +else with_python=check fi @@ -17961,12 +17174,11 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. else @@ -17974,15 +17186,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -17993,11 +17201,11 @@ fi PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -18024,16 +17232,15 @@ # Find any Python interpreter. if test -z "$PYTHON"; then - for ac_prog in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 + for ac_prog in python python2 python3 python3.15 python3.14 python3.13 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. @@ -18043,15 +17250,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18063,11 +17266,11 @@ fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -18080,172 +17283,42 @@ if test "$PYTHON" = :; then - : + : else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 -printf %s "checking for $am_display_PYTHON version... " >&6; } -if test ${am_cv_python_version+y} -then : - printf %s "(cached) " >&6 -else $as_nop - am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[:2])"` -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 -printf "%s\n" "$am_cv_python_version" >&6; } - PYTHON_VERSION=$am_cv_python_version - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 -printf %s "checking for $am_display_PYTHON platform... " >&6; } -if test ${am_cv_python_platform+y} -then : - printf %s "(cached) " >&6 -else $as_nop - am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; print('%u.%u' % sys.version_info[:2])"` fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 -printf "%s\n" "$am_cv_python_platform" >&6; } - PYTHON_PLATFORM=$am_cv_python_platform - - - if test "x$prefix" = xNONE; then - am__usable_prefix=$ac_default_prefix - else - am__usable_prefix=$prefix - fi - - # Allow user to request using sys.* values from Python, - # instead of the GNU $prefix values. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version -# Check whether --with-python-sys-prefix was given. -if test ${with_python_sys_prefix+y} -then : - withval=$with_python_sys_prefix; am_use_python_sys=: -else $as_nop - am_use_python_sys=false -fi - # Allow user to override whatever the default Python prefix is. - -# Check whether --with-python_prefix was given. -if test ${with_python_prefix+y} -then : - withval=$with_python_prefix; am_python_prefix_subst=$withval - am_cv_python_prefix=$withval - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON prefix" >&5 -printf %s "checking for explicit $am_display_PYTHON prefix... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5 -printf "%s\n" "$am_cv_python_prefix" >&6; } -else $as_nop - - if $am_use_python_sys; then - # using python sys.prefix value, not GNU - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON prefix" >&5 -printf %s "checking for python default $am_display_PYTHON prefix... " >&6; } -if test ${am_cv_python_prefix+y} -then : - printf %s "(cached) " >&6 -else $as_nop - am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5 -printf "%s\n" "$am_cv_python_prefix" >&6; } - - case $am_cv_python_prefix in - $am__usable_prefix*) - am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` - am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` - ;; - *) - am_python_prefix_subst=$am_cv_python_prefix - ;; - esac - else # using GNU prefix value, not python sys.prefix - am_python_prefix_subst='${prefix}' - am_python_prefix=$am_python_prefix_subst - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON prefix" >&5 -printf %s "checking for GNU default $am_display_PYTHON prefix... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_python_prefix" >&5 -printf "%s\n" "$am_python_prefix" >&6; } - fi -fi + PYTHON_PREFIX='${prefix}' - # Substituting python_prefix_subst value. - PYTHON_PREFIX=$am_python_prefix_subst + PYTHON_EXEC_PREFIX='${exec_prefix}' - # emacs-page Now do it all over again for Python exec_prefix, but with yet - # another conditional: fall back to regular prefix if that was specified. -# Check whether --with-python_exec_prefix was given. -if test ${with_python_exec_prefix+y} -then : - withval=$with_python_exec_prefix; am_python_exec_prefix_subst=$withval - am_cv_python_exec_prefix=$withval - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON exec_prefix" >&5 -printf %s "checking for explicit $am_display_PYTHON exec_prefix... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5 -printf "%s\n" "$am_cv_python_exec_prefix" >&6; } -else $as_nop - - # no explicit --with-python_exec_prefix, but if - # --with-python_prefix was given, use its value for python_exec_prefix too. - if test -n "$with_python_prefix" -then : - am_python_exec_prefix_subst=$with_python_prefix - am_cv_python_exec_prefix=$with_python_prefix - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python_prefix-given $am_display_PYTHON exec_prefix" >&5 -printf %s "checking for python_prefix-given $am_display_PYTHON exec_prefix... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5 -printf "%s\n" "$am_cv_python_exec_prefix" >&6; } -else $as_nop - - # Set am__usable_exec_prefix whether using GNU or Python values, - # since we use that variable for pyexecdir. - if test "x$exec_prefix" = xNONE; then - am__usable_exec_prefix=$am__usable_prefix - else - am__usable_exec_prefix=$exec_prefix - fi - # - if $am_use_python_sys; then # using python sys.exec_prefix, not GNU - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON exec_prefix" >&5 -printf %s "checking for python default $am_display_PYTHON exec_prefix... " >&6; } -if test ${am_cv_python_exec_prefix+y} -then : - printf %s "(cached) " >&6 -else $as_nop - am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"` -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5 -printf "%s\n" "$am_cv_python_exec_prefix" >&6; } - case $am_cv_python_exec_prefix in - $am__usable_exec_prefix*) - am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` - am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` - ;; - *) - am_python_exec_prefix_subst=$am_cv_python_exec_prefix - ;; - esac - else # using GNU $exec_prefix, not python sys.exec_prefix - am_python_exec_prefix_subst='${exec_prefix}' - am_python_exec_prefix=$am_python_exec_prefix_subst - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON exec_prefix" >&5 -printf %s "checking for GNU default $am_display_PYTHON exec_prefix... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_python_exec_prefix" >&5 -printf "%s\n" "$am_python_exec_prefix" >&6; } - fi -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi - - # Substituting python_exec_prefix_subst. - PYTHON_EXEC_PREFIX=$am_python_exec_prefix_subst +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform - # Factor out some code duplication into this shell variable. + # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility @@ -18266,97 +17339,99 @@ pass" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory (pythondir)" >&5 -printf %s "checking for $am_display_PYTHON script directory (pythondir)... " >&6; } -if test ${am_cv_python_pythondir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$am_cv_python_prefix" = x; then - am_py_prefix=$am__usable_prefix - else - am_py_prefix=$am_cv_python_prefix - fi - am_cv_python_pythondir=`$PYTHON -c " + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` - # - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` - ;; - *) - case $am_py_prefix in - /usr|/System*) ;; - *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" - ;; + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac - ;; - esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 -printf "%s\n" "$am_cv_python_pythondir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir - pkgpythondir=\${pythondir}/$PACKAGE + pkgpythondir=\${pythondir}/$PACKAGE - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory (pyexecdir)" >&5 -printf %s "checking for $am_display_PYTHON extension module directory (pyexecdir)... " >&6; } -if test ${am_cv_python_pyexecdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$am_cv_python_exec_prefix" = x; then - am_py_exec_prefix=$am__usable_exec_prefix - else - am_py_exec_prefix=$am_cv_python_exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c " + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` - # - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` - ;; - *) - case $am_py_exec_prefix in - /usr|/System*) ;; - *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" - ;; + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; esac - ;; - esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 -printf "%s\n" "$am_cv_python_pyexecdir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir - pkgpyexecdir=\${pyexecdir}/$PACKAGE + + pkgpyexecdir=\${pyexecdir}/$PACKAGE fi - if test -z "$PYTHON_VERSION" -then : + + if test -z "$PYTHON_VERSION"; then : PYTHON_VERSION=$(echo ${PYTHON##*/} | tr -cd 0-9.) @@ -18366,8 +17441,7 @@ case $PYTHON_VERSION in #( 3.*) : - if test $PYTHON_MINOR -lt 6 -then : + if test $PYTHON_MINOR -lt 6; then : as_fn_error $? "\"Python >= 3.6 is required\"" "$LINENO" 5 fi ;; #( @@ -18389,14 +17463,13 @@ PYTHON_SHEBANG=python3 - if test "x$with_python" != xcheck -then : + if test "x$with_python" != xcheck; then : PYTHON_PKG_VERSION=$(echo $PYTHON_VERSION | tr -d .) DEFINE_PYTHON_PKG_VERSION='--define "__use_python_pkg_version '${PYTHON_PKG_VERSION}'"' DEFINE_PYTHON_VERSION='--define "__use_python '${PYTHON}'"' -else $as_nop +else DEFINE_PYTHON_VERSION='' DEFINE_PYTHON_PKG_VERSION='' @@ -18408,36 +17481,32 @@ # Check whether --enable-pyzfs was given. -if test ${enable_pyzfs+y} -then : +if test "${enable_pyzfs+set}" = set; then : enableval=$enable_pyzfs; enable_pyzfs=$enableval -else $as_nop +else enable_pyzfs=check fi - if test "x$enable_pyzfs" != xcheck -then : + if test "x$enable_pyzfs" != xcheck; then : - if test "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xyes; then : DEFINE_PYZFS='--with pyzfs' -else $as_nop +else DEFINE_PYZFS='--without pyzfs' fi -else $as_nop +else - if test "$PYTHON" != : -then : + if test "$PYTHON" != :; then : DEFINE_PYZFS='' -else $as_nop +else enable_pyzfs=no DEFINE_PYZFS='--without pyzfs' @@ -18447,62 +17516,55 @@ fi - if test "x$enable_pyzfs" = xcheck -then : + if test "x$enable_pyzfs" = xcheck; then : - if test "x$ZFS_CONFIG" = xkernel -o "x$ZFS_CONFIG" = xsrpm -then : + if test "x$ZFS_CONFIG" = xkernel -o "x$ZFS_CONFIG" = xsrpm ; then : enable_pyzfs=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling pyzfs for kernel/srpm config" >&5 -printf "%s\n" "$as_me: Disabling pyzfs for kernel/srpm config" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling pyzfs for kernel/srpm config" >&5 +$as_echo "$as_me: Disabling pyzfs for kernel/srpm config" >&6;} fi fi - if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes; then : PYTHON_NAME=${PYTHON##*/} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: packaging" >&5 -printf %s "checking for $PYTHON_NAME module: packaging... " >&6; } - if $PYTHON -c "import packaging" 2>/dev/null -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: packaging" >&5 +$as_echo_n "checking for $PYTHON_NAME module: packaging... " >&6; } + if $PYTHON -c "import packaging" 2>/dev/null; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } PYTHON_NAME=${PYTHON##*/} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: distlib" >&5 -printf %s "checking for $PYTHON_NAME module: distlib... " >&6; } - if $PYTHON -c "import distlib" 2>/dev/null -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: distlib" >&5 +$as_echo_n "checking for $PYTHON_NAME module: distlib... " >&6; } + if $PYTHON -c "import distlib" 2>/dev/null; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - if test "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xyes; then : as_fn_error $? "\"Python $PYTHON_VERSION packaging and distlib modules are not installed\"" "$LINENO" 5 -elif test "x$enable_pyzfs" != xno -then : +elif test "x$enable_pyzfs" != xno; then : enable_pyzfs=no @@ -18520,8 +17582,7 @@ fi - if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes; then : case $PYTHON_VERSION in #( 3.*) : @@ -18531,8 +17592,7 @@ ;; esac - if test "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xyes; then : # Get whether it's optional @@ -18550,12 +17610,11 @@ # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. set dummy python$PYTHON_VERSION; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. @@ -18565,15 +17624,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -18585,17 +17640,17 @@ fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test -z "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&5 -printf "%s\n" "$as_me: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&5 +$as_echo "$as_me: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&2;} if ! $ax_python_devel_optional; then as_fn_error $? "Giving up, python development not available" "$LINENO" 5 fi @@ -18607,16 +17662,16 @@ # # Check for a version of Python >= 2.1.0 # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 -printf %s "checking for a version of Python >= '2.1.0'... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } ac_supports_python_ver=`$PYTHON -c "import sys; \ ver = sys.version.split ()[0]; \ print (ver >= '2.1.0')"` if test "$ac_supports_python_ver" != "True"; then if test -z "$PYTHON_NOVERSIONCHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This version of the AC_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the @@ -18625,7 +17680,7 @@ Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: This version of the AC_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the @@ -18635,20 +17690,20 @@ to something else than an empty string. " >&2;} if ! $ax_python_devel_optional; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Giving up See \`config.log' for more details" "$LINENO" 5; } fi ax_python_devel_found=no PYTHON_VERSION="" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 -printf "%s\n" "skip at user request" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi fi @@ -18660,8 +17715,8 @@ # Python 2.7.10 (the ".1" being evaluated as less than ".3"). # if test -n "$PYTHON_REQUIRED_VERSION"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a version of Python $PYTHON_REQUIRED_VERSION" >&5 -printf %s "checking for a version of Python $PYTHON_REQUIRED_VERSION... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python $PYTHON_REQUIRED_VERSION" >&5 +$as_echo_n "checking for a version of Python $PYTHON_REQUIRED_VERSION... " >&6; } cat << EOF > ax_python_devel_vpy.py class VPy: def vtup(self, s): @@ -18687,17 +17742,17 @@ print (ver $PYTHON_REQUIRED_VERSION)"` rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py* if test "$ac_supports_python_ver" = "True"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See \`\`configure --help'' for reference. " >&5 -printf "%s\n" "$as_me: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. +$as_echo "$as_me: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See \`\`configure --help'' for reference. @@ -18715,29 +17770,29 @@ # # Check if you have distutils, else fail # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python package" >&5 -printf %s "checking for the sysconfig Python package... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python package" >&5 +$as_echo_n "checking for the sysconfig Python package... " >&6; } ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1` if test $? -eq 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } IMPORT_SYSCONFIG="import sysconfig" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 -printf %s "checking for the distutils Python package... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1` if test $? -eq 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } IMPORT_SYSCONFIG="from distutils import sysconfig" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot import Python module \"distutils\". + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot import Python module \"distutils\". Please check your Python installation. The error was: $ac_sysconfig_result" >&5 -printf "%s\n" "$as_me: WARNING: cannot import Python module \"distutils\". +$as_echo "$as_me: WARNING: cannot import Python module \"distutils\". Please check your Python installation. The error was: $ac_sysconfig_result" >&2;} if ! $ax_python_devel_optional; then @@ -18753,8 +17808,8 @@ # # Check for Python include path # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 -printf %s "checking for Python include path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } if test -z "$PYTHON_CPPFLAGS"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then # sysconfig module has different functions @@ -18778,15 +17833,15 @@ fi PYTHON_CPPFLAGS=$python_path fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 -printf "%s\n" "$PYTHON_CPPFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } # # Check for Python library path # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 -printf %s "checking for Python library path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } if test -z "$PYTHON_LIBS"; then # (makes two attempts to ensure we've got a version number # from the interpreter) @@ -18811,7 +17866,9 @@ # Make the versioning information available to the compiler -printf "%s\n" "#define HAVE_PYTHON \"$ac_python_version\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF # First, the library directory: @@ -18853,12 +17910,12 @@ PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version" fi - if test -z "PYTHON_LIBS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + if test -z "$PYTHON_LIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot determine location of your Python DSO. Please check it was installed with dynamic libraries enabled, or try setting PYTHON_LIBS by hand. " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: Cannot determine location of your Python DSO. Please check it was installed with dynamic libraries enabled, or try setting PYTHON_LIBS by hand. " >&2;} @@ -18872,15 +17929,15 @@ fi if test $ax_python_devel_found = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5 -printf "%s\n" "$PYTHON_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5 +$as_echo "$PYTHON_LIBS" >&6; } # # Check for site packages # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 -printf %s "checking for Python site-packages path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } if test -z "$PYTHON_SITE_PKG"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then PYTHON_SITE_PKG=`$PYTHON -c " @@ -18903,15 +17960,15 @@ print (sysconfig.get_python_lib(0,0));"` fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 -printf "%s\n" "$PYTHON_SITE_PKG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } # # Check for platform-specific site packages # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python platform specific site-packages path" >&5 -printf %s "checking for Python platform specific site-packages path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python platform specific site-packages path" >&5 +$as_echo_n "checking for Python platform specific site-packages path... " >&6; } if test -z "$PYTHON_PLATFORM_SITE_PKG"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c " @@ -18934,29 +17991,29 @@ print (sysconfig.get_python_lib(1,0));"` fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PLATFORM_SITE_PKG" >&5 -printf "%s\n" "$PYTHON_PLATFORM_SITE_PKG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PLATFORM_SITE_PKG" >&5 +$as_echo "$PYTHON_PLATFORM_SITE_PKG" >&6; } # # libraries which must be linked in when embedding # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 -printf %s "checking python extra libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } if test -z "$PYTHON_EXTRA_LIBS"; then PYTHON_EXTRA_LIBS=`$PYTHON -c "$IMPORT_SYSCONFIG; \ conf = sysconfig.get_config_var; \ print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 -printf "%s\n" "$PYTHON_EXTRA_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } # # linking flags needed when embedding # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 -printf %s "checking python extra linking flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } if test -z "$PYTHON_EXTRA_LDFLAGS"; then PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "$IMPORT_SYSCONFIG; \ conf = sysconfig.get_config_var; \ @@ -18964,15 +18021,15 @@ # Hack for macos, it sticks this in here. PYTHON_EXTRA_LDFLAGS=`echo $PYTHON_EXTRA_LDFLAGS | sed 's/CoreFoundation.*$/CoreFoundation/'` fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 -printf "%s\n" "$PYTHON_EXTRA_LDFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } # # final check to see if everything compiles alright # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 -printf %s "checking consistency of all components of python development environment... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } # save current global flags ac_save_LIBS="$LIBS" ac_save_LDFLAGS="$LDFLAGS" @@ -18991,7 +18048,7 @@ #include int -main (void) +main () { Py_Initialize(); ; @@ -18999,13 +18056,12 @@ } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : pythonexists=yes -else $as_nop +else pythonexists=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -19018,11 +18074,11 @@ LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 -printf "%s\n" "$pythonexists" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } if test ! "x$pythonexists" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable. @@ -19033,7 +18089,7 @@ for your distribution. The exact name of this package varies among them. ============================================================================ " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable. @@ -19057,7 +18113,7 @@ # -else $as_nop +else # Get whether it's optional @@ -19075,12 +18131,11 @@ # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. set dummy python$PYTHON_VERSION; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PYTHON+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. @@ -19090,15 +18145,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19110,17 +18161,17 @@ fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -printf "%s\n" "$PYTHON" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test -z "$PYTHON"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&5 -printf "%s\n" "$as_me: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&5 +$as_echo "$as_me: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&2;} if ! $ax_python_devel_optional; then as_fn_error $? "Giving up, python development not available" "$LINENO" 5 fi @@ -19132,16 +18183,16 @@ # # Check for a version of Python >= 2.1.0 # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 -printf %s "checking for a version of Python >= '2.1.0'... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5 +$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; } ac_supports_python_ver=`$PYTHON -c "import sys; \ ver = sys.version.split ()[0]; \ print (ver >= '2.1.0')"` if test "$ac_supports_python_ver" != "True"; then if test -z "$PYTHON_NOVERSIONCHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This version of the AC_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the @@ -19150,7 +18201,7 @@ Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: This version of the AC_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the @@ -19160,20 +18211,20 @@ to something else than an empty string. " >&2;} if ! $ax_python_devel_optional; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Giving up See \`config.log' for more details" "$LINENO" 5; } fi ax_python_devel_found=no PYTHON_VERSION="" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 -printf "%s\n" "skip at user request" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5 +$as_echo "skip at user request" >&6; } fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi fi @@ -19185,8 +18236,8 @@ # Python 2.7.10 (the ".1" being evaluated as less than ".3"). # if test -n "$PYTHON_REQUIRED_VERSION"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a version of Python $PYTHON_REQUIRED_VERSION" >&5 -printf %s "checking for a version of Python $PYTHON_REQUIRED_VERSION... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python $PYTHON_REQUIRED_VERSION" >&5 +$as_echo_n "checking for a version of Python $PYTHON_REQUIRED_VERSION... " >&6; } cat << EOF > ax_python_devel_vpy.py class VPy: def vtup(self, s): @@ -19212,17 +18263,17 @@ print (ver $PYTHON_REQUIRED_VERSION)"` rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py* if test "$ac_supports_python_ver" = "True"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See \`\`configure --help'' for reference. " >&5 -printf "%s\n" "$as_me: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. +$as_echo "$as_me: WARNING: this package requires Python $PYTHON_REQUIRED_VERSION. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See \`\`configure --help'' for reference. @@ -19240,29 +18291,29 @@ # # Check if you have distutils, else fail # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python package" >&5 -printf %s "checking for the sysconfig Python package... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the sysconfig Python package" >&5 +$as_echo_n "checking for the sysconfig Python package... " >&6; } ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1` if test $? -eq 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } IMPORT_SYSCONFIG="import sysconfig" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 -printf %s "checking for the distutils Python package... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5 +$as_echo_n "checking for the distutils Python package... " >&6; } ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1` if test $? -eq 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } IMPORT_SYSCONFIG="from distutils import sysconfig" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot import Python module \"distutils\". + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot import Python module \"distutils\". Please check your Python installation. The error was: $ac_sysconfig_result" >&5 -printf "%s\n" "$as_me: WARNING: cannot import Python module \"distutils\". +$as_echo "$as_me: WARNING: cannot import Python module \"distutils\". Please check your Python installation. The error was: $ac_sysconfig_result" >&2;} if ! $ax_python_devel_optional; then @@ -19278,8 +18329,8 @@ # # Check for Python include path # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 -printf %s "checking for Python include path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 +$as_echo_n "checking for Python include path... " >&6; } if test -z "$PYTHON_CPPFLAGS"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then # sysconfig module has different functions @@ -19303,15 +18354,15 @@ fi PYTHON_CPPFLAGS=$python_path fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 -printf "%s\n" "$PYTHON_CPPFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 +$as_echo "$PYTHON_CPPFLAGS" >&6; } # # Check for Python library path # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 -printf %s "checking for Python library path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 +$as_echo_n "checking for Python library path... " >&6; } if test -z "$PYTHON_LIBS"; then # (makes two attempts to ensure we've got a version number # from the interpreter) @@ -19336,7 +18387,9 @@ # Make the versioning information available to the compiler -printf "%s\n" "#define HAVE_PYTHON \"$ac_python_version\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_PYTHON "$ac_python_version" +_ACEOF # First, the library directory: @@ -19378,12 +18431,12 @@ PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version" fi - if test -z "PYTHON_LIBS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + if test -z "$PYTHON_LIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot determine location of your Python DSO. Please check it was installed with dynamic libraries enabled, or try setting PYTHON_LIBS by hand. " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: Cannot determine location of your Python DSO. Please check it was installed with dynamic libraries enabled, or try setting PYTHON_LIBS by hand. " >&2;} @@ -19397,15 +18450,15 @@ fi if test $ax_python_devel_found = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5 -printf "%s\n" "$PYTHON_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LIBS" >&5 +$as_echo "$PYTHON_LIBS" >&6; } # # Check for site packages # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 -printf %s "checking for Python site-packages path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5 +$as_echo_n "checking for Python site-packages path... " >&6; } if test -z "$PYTHON_SITE_PKG"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then PYTHON_SITE_PKG=`$PYTHON -c " @@ -19428,15 +18481,15 @@ print (sysconfig.get_python_lib(0,0));"` fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 -printf "%s\n" "$PYTHON_SITE_PKG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 +$as_echo "$PYTHON_SITE_PKG" >&6; } # # Check for platform-specific site packages # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Python platform specific site-packages path" >&5 -printf %s "checking for Python platform specific site-packages path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python platform specific site-packages path" >&5 +$as_echo_n "checking for Python platform specific site-packages path... " >&6; } if test -z "$PYTHON_PLATFORM_SITE_PKG"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c " @@ -19459,29 +18512,29 @@ print (sysconfig.get_python_lib(1,0));"` fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PLATFORM_SITE_PKG" >&5 -printf "%s\n" "$PYTHON_PLATFORM_SITE_PKG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PLATFORM_SITE_PKG" >&5 +$as_echo "$PYTHON_PLATFORM_SITE_PKG" >&6; } # # libraries which must be linked in when embedding # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 -printf %s "checking python extra libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 +$as_echo_n "checking python extra libraries... " >&6; } if test -z "$PYTHON_EXTRA_LIBS"; then PYTHON_EXTRA_LIBS=`$PYTHON -c "$IMPORT_SYSCONFIG; \ conf = sysconfig.get_config_var; \ print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 -printf "%s\n" "$PYTHON_EXTRA_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 +$as_echo "$PYTHON_EXTRA_LIBS" >&6; } # # linking flags needed when embedding # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 -printf %s "checking python extra linking flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 +$as_echo_n "checking python extra linking flags... " >&6; } if test -z "$PYTHON_EXTRA_LDFLAGS"; then PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "$IMPORT_SYSCONFIG; \ conf = sysconfig.get_config_var; \ @@ -19489,15 +18542,15 @@ # Hack for macos, it sticks this in here. PYTHON_EXTRA_LDFLAGS=`echo $PYTHON_EXTRA_LDFLAGS | sed 's/CoreFoundation.*$/CoreFoundation/'` fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 -printf "%s\n" "$PYTHON_EXTRA_LDFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 +$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } # # final check to see if everything compiles alright # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 -printf %s "checking consistency of all components of python development environment... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 +$as_echo_n "checking consistency of all components of python development environment... " >&6; } # save current global flags ac_save_LIBS="$LIBS" ac_save_LDFLAGS="$LDFLAGS" @@ -19516,7 +18569,7 @@ #include int -main (void) +main () { Py_Initialize(); ; @@ -19524,13 +18577,12 @@ } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : pythonexists=yes -else $as_nop +else pythonexists=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -19543,11 +18595,11 @@ LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 -printf "%s\n" "$pythonexists" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 +$as_echo "$pythonexists" >&6; } if test ! "x$pythonexists" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable. @@ -19558,7 +18610,7 @@ for your distribution. The exact name of this package varies among them. ============================================================================ " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LIBS environment variable. @@ -19581,8 +18633,7 @@ # all done! # - if test "x$ax_python_devel_found" = xno -then : + if test "x$ax_python_devel_found" = xno; then : enable_pyzfs=no @@ -19592,32 +18643,28 @@ fi - if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes; then : PYTHON_NAME=${PYTHON##*/} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: setuptools" >&5 -printf %s "checking for $PYTHON_NAME module: setuptools... " >&6; } - if $PYTHON -c "import setuptools" 2>/dev/null -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: setuptools" >&5 +$as_echo_n "checking for $PYTHON_NAME module: setuptools... " >&6; } + if $PYTHON -c "import setuptools" 2>/dev/null; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - if test "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xyes; then : as_fn_error $? "\"Python $PYTHON_VERSION setuptools is not installed\"" "$LINENO" 5 -elif test "x$enable_pyzfs" != xno -then : +elif test "x$enable_pyzfs" != xno; then : enable_pyzfs=no @@ -19630,32 +18677,28 @@ fi - if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes; then : PYTHON_NAME=${PYTHON##*/} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: cffi" >&5 -printf %s "checking for $PYTHON_NAME module: cffi... " >&6; } - if $PYTHON -c "import cffi" 2>/dev/null -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: cffi" >&5 +$as_echo_n "checking for $PYTHON_NAME module: cffi... " >&6; } + if $PYTHON -c "import cffi" 2>/dev/null; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - if test "x$enable_pyzfs" = xyes -then : + if test "x$enable_pyzfs" = xyes; then : as_fn_error $? "\"Python $PYTHON_VERSION cffi is not installed\"" "$LINENO" 5 -elif test "x$enable_pyzfs" != xno -then : +elif test "x$enable_pyzfs" != xno; then : enable_pyzfs=no @@ -19668,8 +18711,7 @@ fi - if test "x$enable_pyzfs" = xcheck -then : + if test "x$enable_pyzfs" = xcheck; then : enable_pyzfs=yes fi @@ -19686,46 +18728,42 @@ pythonsitedir=$PYTHON_SITE_PKG - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable pyzfs: " >&5 -printf %s "checking whether to enable pyzfs: ... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pyzfs" >&5 -printf "%s\n" "$enable_pyzfs" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable pyzfs: " >&5 +$as_echo_n "checking whether to enable pyzfs: ... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pyzfs" >&5 +$as_echo "$enable_pyzfs" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sed --in-place" >&5 -printf %s "checking for sed --in-place... " >&6; } -if test ${ac_cv_inplace+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sed --in-place" >&5 +$as_echo_n "checking for sed --in-place... " >&6; } +if ${ac_cv_inplace+:} false; then : + $as_echo_n "(cached) " >&6 +else tmpfile=$(mktemp conftest.XXXXXX) echo foo >$tmpfile - if $SED --in-place 's#foo#bar#' $tmpfile 2>/dev/null -then : + if $SED --in-place 's#foo#bar#' $tmpfile 2>/dev/null; then : ac_cv_inplace="--in-place" -elif $SED -i '' 's#foo#bar#' $tmpfile 2>/dev/null -then : +elif $SED -i '' 's#foo#bar#' $tmpfile 2>/dev/null; then : ac_cv_inplace="-i ''" -else $as_nop +else as_fn_error $? "$SED does not support in-place" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_inplace" >&5 -printf "%s\n" "$ac_cv_inplace" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_inplace" >&5 +$as_echo "$ac_cv_inplace" >&6; } ac_inplace=$ac_cv_inplace # Extract the first word of "cppcheck", so it can be a program name with args. set dummy cppcheck; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CPPCHECK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CPPCHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CPPCHECK"; then ac_cv_prog_CPPCHECK="$CPPCHECK" # Let the user override the test. else @@ -19733,15 +18771,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CPPCHECK="cppcheck" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19752,11 +18786,11 @@ fi CPPCHECK=$ac_cv_prog_CPPCHECK if test -n "$CPPCHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPPCHECK" >&5 -printf "%s\n" "$CPPCHECK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPCHECK" >&5 +$as_echo "$CPPCHECK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19767,12 +18801,11 @@ # Extract the first word of "shellcheck", so it can be a program name with args. set dummy shellcheck; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_SHELLCHECK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_SHELLCHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$SHELLCHECK"; then ac_cv_prog_SHELLCHECK="$SHELLCHECK" # Let the user override the test. else @@ -19780,15 +18813,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_SHELLCHECK="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19799,22 +18828,21 @@ fi SHELLCHECK=$ac_cv_prog_SHELLCHECK if test -n "$SHELLCHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHELLCHECK" >&5 -printf "%s\n" "$SHELLCHECK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHELLCHECK" >&5 +$as_echo "$SHELLCHECK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "checkbashisms", so it can be a program name with args. set dummy checkbashisms; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CHECKBASHISMS+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CHECKBASHISMS+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CHECKBASHISMS"; then ac_cv_prog_CHECKBASHISMS="$CHECKBASHISMS" # Let the user override the test. else @@ -19822,15 +18850,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CHECKBASHISMS="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19841,11 +18865,11 @@ fi CHECKBASHISMS=$ac_cv_prog_CHECKBASHISMS if test -n "$CHECKBASHISMS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CHECKBASHISMS" >&5 -printf "%s\n" "$CHECKBASHISMS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECKBASHISMS" >&5 +$as_echo "$CHECKBASHISMS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19870,12 +18894,11 @@ # Extract the first word of "parallel", so it can be a program name with args. set dummy parallel; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PARALLEL+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PARALLEL+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$PARALLEL"; then ac_cv_prog_PARALLEL="$PARALLEL" # Let the user override the test. else @@ -19883,15 +18906,11 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PARALLEL="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19902,11 +18921,11 @@ fi PARALLEL=$ac_cv_prog_PARALLEL if test -n "$PARALLEL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PARALLEL" >&5 -printf "%s\n" "$PARALLEL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PARALLEL" >&5 +$as_echo "$PARALLEL" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19943,44 +18962,38 @@ # Check whether --with-linux was given. -if test ${with_linux+y} -then : +if test "${with_linux+set}" = set; then : withval=$with_linux; kernelsrc="$withval" fi # Check whether --with-linux-obj was given. -if test ${with_linux_obj+y} -then : +if test "${with_linux_obj+set}" = set; then : withval=$with_linux_obj; kernelbuild="$withval" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel source and build directories" >&5 -printf %s "checking kernel source and build directories... " >&6; } - if test -n "$kernelsrc" && test -z "$kernelbuild" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source and build directories" >&5 +$as_echo_n "checking kernel source and build directories... " >&6; } + if test -n "$kernelsrc" && test -z "$kernelbuild"; then : kernelbuild="$kernelsrc" -elif test -z "$kernelsrc" -then : +elif test -z "$kernelsrc"; then : if test -e "/lib/modules/$(uname -r)/source" && \ - test -e "/lib/modules/$(uname -r)/build" -then : + test -e "/lib/modules/$(uname -r)/build"; then : src="/lib/modules/$(uname -r)/source" build="/lib/modules/$(uname -r)/build" -elif test -e "/lib/modules/$(uname -r)/build" -then : +elif test -e "/lib/modules/$(uname -r)/build"; then : build="/lib/modules/$(uname -r)/build" src="$build" -else $as_nop +else src= @@ -20007,31 +19020,28 @@ fi - if test -n "$src" && test -e "$src" -then : + if test -n "$src" && test -e "$src"; then : kernelsrc=$(readlink -e "$src") -else $as_nop +else kernelsrc="Not found" fi - if test -n "$build" && test -e "$build" -then : + if test -n "$build" && test -e "$build"; then : kernelbuild=$(readlink -e "$build") -else $as_nop +else kernelbuild="Not found" fi -else $as_nop +else - if test "$kernelsrc" = "NONE" -then : + if test "$kernelsrc" = "NONE"; then : kernsrcver=NONE @@ -20040,18 +19050,17 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel source directory" >&5 -printf %s "checking kernel source directory... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kernelsrc" >&5 -printf "%s\n" "$kernelsrc" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel build directory" >&5 -printf %s "checking kernel build directory... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kernelbuild" >&5 -printf "%s\n" "$kernelbuild" >&6; } - if test ! -d "$kernelsrc" || test ! -d "$kernelbuild" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source directory" >&5 +$as_echo_n "checking kernel source directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelsrc" >&5 +$as_echo "$kernelsrc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel build directory" >&5 +$as_echo_n "checking kernel build directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelbuild" >&5 +$as_echo "$kernelbuild" >&6; } + if test ! -d "$kernelsrc" || test ! -d "$kernelbuild"; then : as_fn_error $? " *** Please make sure the kernel devel package for your distribution @@ -20061,47 +19070,42 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel source version" >&5 -printf %s "checking kernel source version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source version" >&5 +$as_echo_n "checking kernel source version... " >&6; } utsrelease1=$kernelbuild/include/linux/version.h utsrelease2=$kernelbuild/include/linux/utsrelease.h utsrelease3=$kernelbuild/include/generated/utsrelease.h - if test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1 -then : + if test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1; then : utsrelease=$utsrelease1 -elif test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2 -then : +elif test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2; then : utsrelease=$utsrelease2 -elif test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3 -then : +elif test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3; then : utsrelease=$utsrelease3 fi - if test -n "$utsrelease" -then : + if test -n "$utsrelease"; then : kernsrcver=$($AWK '/UTS_RELEASE/ { gsub(/"/, "", $3); print $3 }' $utsrelease) - if test -z "$kernsrcver" -then : + if test -z "$kernsrcver"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 -printf "%s\n" "Not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 +$as_echo "Not found" >&6; } as_fn_error $? " *** Cannot determine kernel version. " "$LINENO" 5 fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 -printf "%s\n" "Not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 +$as_echo "Not found" >&6; } if test "x$enable_linux_builtin" != xyes; then as_fn_error $? " *** Cannot find UTS_RELEASE definition. @@ -20114,54 +19118,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kernsrcver" >&5 -printf "%s\n" "$kernsrcver" >&6; } - - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "$kernsrcver" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "$ZFS_META_KVER_MIN" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - : - else - as_fn_error $? " - *** Cannot build against kernel version $kernsrcver. - *** The minimum supported kernel version is $ZFS_META_KVER_MIN. - " "$LINENO" 5 - - fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernsrcver" >&5 +$as_echo "$kernsrcver" >&6; } # Check whether --enable-linux-experimental was given. -if test ${enable_linux_experimental+y} -then : +if test "${enable_linux_experimental+set}" = set; then : enableval=$enable_linux_experimental; fi @@ -20259,17 +19220,15 @@ fi - if test "x$kern_max_version_ok" != "xyes" -then : + if test "x$kern_max_version_ok" != "xyes"; then : - if test "x$enable_linux_experimental" == "xyes" -then : + if test "x$enable_linux_experimental" == "xyes"; then : -printf "%s\n" "#define HAVE_LINUX_EXPERIMENTAL 1" >>confdefs.h +$as_echo "#define HAVE_LINUX_EXPERIMENTAL 1" >>confdefs.h -else $as_nop +else as_fn_error $? " *** Cannot build against kernel version $kernsrcver. @@ -20293,12 +19252,10 @@ # Check whether --with-qat was given. -if test ${with_qat+y} -then : - withval=$with_qat; if test "$withval" = "yes" -then : +if test "${with_qat+set}" = set; then : + withval=$with_qat; if test "$withval" = "yes"; then : as_fn_error $? "--with-qat=PATH requires a PATH" "$LINENO" 5 -else $as_nop +else qatsrc="$withval" fi fi @@ -20306,22 +19263,19 @@ # Check whether --with-qat-obj was given. -if test ${with_qat_obj+y} -then : +if test "${with_qat_obj+set}" = set; then : withval=$with_qat_obj; qatbuild="$withval" fi - if test ! -z "${qatsrc}" -then : + if test ! -z "${qatsrc}"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking qat source directory" >&5 -printf %s "checking qat source directory... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qatsrc" >&5 -printf "%s\n" "$qatsrc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking qat source directory" >&5 +$as_echo_n "checking qat source directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qatsrc" >&5 +$as_echo "$qatsrc" >&6; } QAT_SRC="${qatsrc}/quickassist" - if test ! -e "$QAT_SRC/include/cpa.h" -then : + if test ! -e "$QAT_SRC/include/cpa.h"; then : as_fn_error $? " *** Please make sure the qat driver package is installed @@ -20334,23 +19288,20 @@ fi - if test ! -z "${qatsrc}" -then : + if test ! -z "${qatsrc}"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking qat build directory" >&5 -printf %s "checking qat build directory... " >&6; } - if test -z "$qatbuild" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking qat build directory" >&5 +$as_echo_n "checking qat build directory... " >&6; } + if test -z "$qatbuild"; then : qatbuild="${qatsrc}/build" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qatbuild" >&5 -printf "%s\n" "$qatbuild" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qatbuild" >&5 +$as_echo "$qatbuild" >&6; } QAT_OBJ=${qatbuild} - if ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko" -then : + if ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko"; then : as_fn_error $? " *** Please make sure the qat driver is installed then try again. @@ -20363,26 +19314,24 @@ -printf "%s\n" "#define HAVE_QAT 1" >>confdefs.h +$as_echo "#define HAVE_QAT 1" >>confdefs.h fi - if test ! -z "${qatsrc}" -then : + if test ! -z "${qatsrc}"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking qat file for module symbols" >&5 -printf %s "checking qat file for module symbols... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking qat file for module symbols" >&5 +$as_echo_n "checking qat file for module symbols... " >&6; } QAT_SYMBOLS=$QAT_SRC/lookaside/access_layer/src/Module.symvers - if test -r $QAT_SYMBOLS -then : + if test -r $QAT_SYMBOLS; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QAT_SYMBOLS" >&5 -printf "%s\n" "$QAT_SYMBOLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QAT_SYMBOLS" >&5 +$as_echo "$QAT_SYMBOLS" >&6; } -else $as_nop +else as_fn_error $? " *** Please make sure the qat driver is installed then try again. @@ -20400,8 +19349,7 @@ cachevar="zfs_cv_kernel_config_modules_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_modules || mkdir -p build/config_modules @@ -20446,14 +19394,12 @@ echo "obj-m := config_modules.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_modules/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_modules_license || mkdir -p build/config_modules_license @@ -20498,8 +19444,7 @@ echo "obj-m := config_modules_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_modules_license/" >>build/Makefile fi @@ -20513,8 +19458,7 @@ cachevar="zfs_cv_kernel_config_block_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_block || mkdir -p build/config_block @@ -20559,14 +19503,12 @@ echo "obj-m := config_block.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_block/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_block_license || mkdir -p build/config_block_license @@ -20611,8 +19553,7 @@ echo "obj-m := config_block_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_block_license/" >>build/Makefile fi @@ -20626,8 +19567,7 @@ cachevar="zfs_cv_kernel_config_debug_lock_alloc_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_debug_lock_alloc || mkdir -p build/config_debug_lock_alloc @@ -20676,14 +19616,12 @@ echo "obj-m := config_debug_lock_alloc.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_debug_lock_alloc/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/config_debug_lock_alloc_license || mkdir -p build/config_debug_lock_alloc_license @@ -20732,8 +19670,7 @@ echo "obj-m := config_debug_lock_alloc_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_debug_lock_alloc_license/" >>build/Makefile fi @@ -20747,8 +19684,7 @@ cachevar="zfs_cv_kernel_config_trim_unusued_ksyms_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_trim_unusued_ksyms || mkdir -p build/config_trim_unusued_ksyms @@ -20793,14 +19729,12 @@ echo "obj-m := config_trim_unusued_ksyms.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_trim_unusued_ksyms/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_trim_unusued_ksyms_license || mkdir -p build/config_trim_unusued_ksyms_license @@ -20845,8 +19779,7 @@ echo "obj-m := config_trim_unusued_ksyms_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_trim_unusued_ksyms_license/" >>build/Makefile fi @@ -20860,8 +19793,7 @@ cachevar="zfs_cv_kernel_config_zlib_deflate_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_zlib_deflate || mkdir -p build/config_zlib_deflate @@ -20907,14 +19839,12 @@ echo "obj-m := config_zlib_deflate.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_deflate/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_zlib_deflate_license || mkdir -p build/config_zlib_deflate_license @@ -20960,8 +19890,7 @@ echo "obj-m := config_zlib_deflate_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_deflate_license/" >>build/Makefile fi @@ -20975,8 +19904,7 @@ cachevar="zfs_cv_kernel_config_zlib_inflate_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_zlib_inflate || mkdir -p build/config_zlib_inflate @@ -21022,14 +19950,12 @@ echo "obj-m := config_zlib_inflate.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_inflate/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_zlib_inflate_license || mkdir -p build/config_zlib_inflate_license @@ -21075,8 +20001,7 @@ echo "obj-m := config_zlib_inflate_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_inflate_license/" >>build/Makefile fi @@ -21087,8 +20012,48 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kernel config option compatibility" >&5 -printf %s "checking for kernel config option compatibility... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel config option compatibility" >&5 +$as_echo_n "checking for kernel config option compatibility... " >&6; } + + if test "x" != "x"; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking " >&5 +$as_echo_n "checking ... " >&6; } + + if test "x$silent" != "xyes" -a -t 6; then : + + _zfs_linux_test_progress_text="" + + ( + total=$(wc -l < build/Makefile) + count=0 + + while kill -0 $$ 2>/dev/null ; do + + if test "$count" -lt "$total" ; then + if ! test -f build/build.log ; then + count=$total + else + count_n=$(awk '/CC/ && /\/[^\.]+\.o$/ { c++ } END { print c }' build/build.log 2>/dev/null) + if test "x$count_n" != "x" ; then + count=$count_n + fi + fi + + printf '\rchecking %s... %d/%d' "" "$count" "$total" >&6 + fi + + sleep 0.5 + done + ) & + + _zfs_linux_test_progress_pid=$! + +fi + + +fi @@ -21108,20 +20073,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/Makefile build/Makefile.compile.config mv build/build.log build/build.log.config -else $as_nop +else as_fn_error $? " *** Unable to compile test source to determine kernel interfaces." "$LINENO" 5 @@ -21130,17 +20094,14 @@ - if test "x$enable_linux_builtin" = "xno" -then : + if test "x$enable_linux_builtin" = "xno"; then : for dir in $(awk '/^obj-m/ { print $3 }' \ build/Makefile.compile.config); do name=${dir%/} - if test -f build/$name/$name.o -then : + if test -f build/$name/$name.o; then : - if test "${name##*_}" = "license" -then : + if test "${name##*_}" = "license"; then : @@ -21160,20 +20121,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/$name/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/$name/Makefile build/$name/Makefile.modpost.config cat build/$name/build.log >>build/build.log.config -else $as_nop +else as_fn_error $? " *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 @@ -21183,13 +20143,13 @@ echo "obj-n += $dir" >>build/Makefile -else $as_nop +else echo "obj-m += $dir" >>build/Makefile fi -else $as_nop +else echo "obj-n += $dir" >>build/Makefile @@ -21214,20 +20174,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/Makefile build/Makefile.modpost.config cat build/build.log >>build/build.log.config -else $as_nop +else as_fn_error $? " *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 @@ -21236,13 +20195,12 @@ -else $as_nop +else for dir in $(awk '/^obj-m/ { print $3 }' \ build/Makefile.compile.config); do name=${dir%/} - if test -f build/$name/$name.o -then : + if test -f build/$name/$name.o; then : touch build/$name/$name.ko @@ -21251,37 +20209,52 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + if test "x" != "x"; then : + + + if test "x$_zfs_linux_test_progress_pid" != "x"; then : + + kill $_zfs_linux_test_progress_pid 2>/dev/null + wait $_zfs_linux_test_progress_pid 2>/dev/null + printf '\r\033\1332Kchecking %s... ' "$_zfs_linux_test_progress_text" >&6 + _zfs_linux_test_progress_pid= + _zfs_linux_test_progress_text= + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_MODULES is defined" >&5 -printf %s "checking whether CONFIG_MODULES is defined... " >&6; } - if test "x$enable_linux_builtin" != xyes -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_MODULES is defined" >&5 +$as_echo_n "checking whether CONFIG_MODULES is defined... " >&6; } + if test "x$enable_linux_builtin" != xyes; then : cachevar="zfs_cv_kernel_config_modules_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_modules -then : + if test -d build/config_modules; then : - if test -f build/config_modules/config_modules.ko -then : + if test -f build/config_modules/config_modules.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_modules\" test, check that @@ -21293,16 +20266,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required loadable module *** support! @@ -21326,11 +20298,10 @@ fi -else $as_nop +else - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -21386,8 +20357,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -21408,23 +20378,22 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 -printf "%s\n" "not needed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 +$as_echo "not needed" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: error" >&5 -printf "%s\n" "error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } as_fn_error $? " *** This kernel is unable to compile object files. *** @@ -21436,7 +20405,7 @@ -else $as_nop +else @@ -21492,8 +20461,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -21514,23 +20482,22 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 -printf "%s\n" "not needed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 +$as_echo "not needed" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: error" >&5 -printf "%s\n" "error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } as_fn_error $? " *** This kernel is unable to compile object files. *** @@ -21548,30 +20515,27 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_BLOCK is defined" >&5 -printf %s "checking whether CONFIG_BLOCK is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_BLOCK is defined" >&5 +$as_echo_n "checking whether CONFIG_BLOCK is defined... " >&6; } cachevar="zfs_cv_kernel_config_block_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_block -then : + if test -d build/config_block; then : - if test -f build/config_block/config_block.ko -then : + if test -f build/config_block/config_block.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_block\" test, check that @@ -21583,16 +20547,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required block device support. *** Rebuild the kernel with CONFIG_BLOCK=y set." "$LINENO" 5 @@ -21601,30 +20564,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mutex_lock() is GPL-only" >&5 -printf %s "checking whether mutex_lock() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mutex_lock() is GPL-only" >&5 +$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_config_debug_lock_alloc_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_debug_lock_alloc_license -then : + if test -d build/config_debug_lock_alloc_license; then : - if test -f build/config_debug_lock_alloc_license/config_debug_lock_alloc_license.ko -then : + if test -f build/config_debug_lock_alloc_license/config_debug_lock_alloc_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_debug_lock_alloc_license\" test, check that @@ -21636,16 +20596,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } as_fn_error $? " *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible *** with the CDDL license and will prevent the module linking stage @@ -21656,30 +20615,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5 -printf %s "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5 +$as_echo_n "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; } cachevar="zfs_cv_kernel_config_trim_unusued_ksyms_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_trim_unusued_ksyms -then : + if test -d build/config_trim_unusued_ksyms; then : - if test -f build/config_trim_unusued_ksyms/config_trim_unusued_ksyms.ko -then : + if test -f build/config_trim_unusued_ksyms/config_trim_unusued_ksyms.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_trim_unusued_ksyms\" test, check that @@ -21691,18 +20647,16 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "x$enable_linux_builtin" != xyes -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "x$enable_linux_builtin" != xyes; then : as_fn_error $? " *** This kernel has unused symbols trimming enabled, please disable. @@ -21714,30 +20668,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5 -printf %s "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; } cachevar="zfs_cv_kernel_config_zlib_deflate_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_zlib_deflate -then : + if test -d build/config_zlib_deflate; then : - if test -f build/config_zlib_deflate/config_zlib_deflate.ko -then : + if test -f build/config_zlib_deflate/config_zlib_deflate.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_zlib_deflate\" test, check that @@ -21749,16 +20700,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required zlib deflate support. *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." "$LINENO" 5 @@ -21767,30 +20717,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_INFLATE is defined" >&5 -printf %s "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_INFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; } cachevar="zfs_cv_kernel_config_zlib_inflate_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_zlib_inflate -then : + if test -d build/config_zlib_inflate; then : - if test -f build/config_zlib_inflate/config_zlib_inflate.ko -then : + if test -f build/config_zlib_inflate/config_zlib_inflate.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_zlib_inflate\" test, check that @@ -21802,16 +20749,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required zlib inflate support. *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." "$LINENO" 5 @@ -21822,24 +20768,21 @@ modpost=$LINUX/scripts/Makefile.modpost - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel file name for module symbols" >&5 -printf %s "checking kernel file name for module symbols... " >&6; } - if test "x$enable_linux_builtin" != xyes -a -f "$modpost" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel file name for module symbols" >&5 +$as_echo_n "checking kernel file name for module symbols... " >&6; } + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then : - if grep -q Modules.symvers $modpost -then : + if grep -q Modules.symvers $modpost; then : LINUX_SYMBOLS=Modules.symvers -else $as_nop +else LINUX_SYMBOLS=Module.symvers fi - if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS" -then : + if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then : as_fn_error $? " *** Please make sure the kernel devel package for your distribution @@ -21850,22 +20793,21 @@ fi -else $as_nop +else LINUX_SYMBOLS=NONE fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINUX_SYMBOLS" >&5 -printf "%s\n" "$LINUX_SYMBOLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_SYMBOLS" >&5 +$as_echo "$LINUX_SYMBOLS" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpu headers are available" >&5 -printf %s "checking whether fpu headers are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpu headers are available" >&5 +$as_echo_n "checking whether fpu headers are available... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -21925,8 +20867,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -21947,23 +20888,21 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -22023,8 +20962,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22045,32 +20983,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi -else $as_nop +else @@ -22130,8 +21067,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22152,26 +21088,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi @@ -22180,16 +21115,16 @@ fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 -printf "%s\n" "i387.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 +$as_echo "i387.h" >&6; } fi -else $as_nop +else @@ -22249,8 +21184,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22271,23 +21205,21 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -22347,8 +21279,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22369,32 +21300,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi -else $as_nop +else @@ -22454,8 +21384,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22476,26 +21405,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi @@ -22504,10 +21432,10 @@ fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 -printf "%s\n" "i387.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 +$as_echo "i387.h" >&6; } fi @@ -22518,11 +21446,10 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether objtool header is available" >&5 -printf %s "checking whether objtool header is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether objtool header is available" >&5 +$as_echo_n "checking whether objtool header is available... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -22581,8 +21508,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22603,32 +21529,33 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + objtool_header=$LINUX/include/linux/objtool.h -printf "%s\n" "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 -printf "%s\n" "linux/objtool.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 +$as_echo "linux/objtool.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 -printf "%s\n" "linux/frame.h" >&6; } + objtool_header=$LINUX/include/linux/frame.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 +$as_echo "linux/frame.h" >&6; } fi -else $as_nop +else @@ -22687,8 +21614,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22709,26 +21635,27 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + objtool_header=$LINUX/include/linux/objtool.h -printf "%s\n" "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 -printf "%s\n" "linux/objtool.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 +$as_echo "linux/objtool.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 -printf "%s\n" "linux/frame.h" >&6; } + objtool_header=$LINUX/include/linux/frame.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 +$as_echo "linux/frame.h" >&6; } fi @@ -22738,24 +21665,25 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/zfs minor is available" >&5 -printf %s "checking whether /dev/zfs minor is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zfs minor is available" >&5 +$as_echo_n "checking whether /dev/zfs minor is available... " >&6; } for i in $(seq 249 -1 200); do if ! grep -q "^#define\s\+.*_MINOR\s\+.*$i" \ ${LINUX}/include/linux/miscdevice.h; then ZFS_DEVICE_MINOR="$i" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZFS_DEVICE_MINOR" >&5 -printf "%s\n" "$ZFS_DEVICE_MINOR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZFS_DEVICE_MINOR" >&5 +$as_echo "$ZFS_DEVICE_MINOR" >&6; } -printf "%s\n" "#define ZFS_DEVICE_MINOR $ZFS_DEVICE_MINOR" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_DEVICE_MINOR $ZFS_DEVICE_MINOR +_ACEOF break fi done - if test -z "$ZFS_DEVICE_MINOR" -then : + if test -z "$ZFS_DEVICE_MINOR"; then : as_fn_error $? " *** No available misc minor numbers available for use." "$LINENO" 5 @@ -22763,11 +21691,10 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DECLARE_EVENT_CLASS() is available" >&5 -printf %s "checking whether DECLARE_EVENT_CLASS() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DECLARE_EVENT_CLASS() is available" >&5 +$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -22866,8 +21793,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -22888,32 +21814,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h +$as_echo "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else @@ -23012,8 +21937,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -23034,26 +21958,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h +$as_echo "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -23070,8 +21993,7 @@ cachevar="zfs_cv_kernel_type_intptr_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/type_intptr_t || mkdir -p build/type_intptr_t @@ -23116,14 +22038,12 @@ echo "obj-m := type_intptr_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_intptr_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/type_intptr_t_license || mkdir -p build/type_intptr_t_license @@ -23168,8 +22088,7 @@ echo "obj-m := type_intptr_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_intptr_t_license/" >>build/Makefile fi @@ -23186,8 +22105,7 @@ cachevar="zfs_cv_kernel_objtool_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/objtool || mkdir -p build/objtool @@ -23236,14 +22154,12 @@ echo "obj-m := objtool.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += objtool/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/objtool_license || mkdir -p build/objtool_license @@ -23292,8 +22208,7 @@ echo "obj-m := objtool_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += objtool_license/" >>build/Makefile fi @@ -23306,8 +22221,7 @@ cachevar="zfs_cv_kernel_stack_frame_non_standard_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/stack_frame_non_standard || mkdir -p build/stack_frame_non_standard @@ -23358,14 +22272,12 @@ echo "obj-m := stack_frame_non_standard.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += stack_frame_non_standard/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/stack_frame_non_standard_license || mkdir -p build/stack_frame_non_standard_license @@ -23416,8 +22328,7 @@ echo "obj-m := stack_frame_non_standard_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += stack_frame_non_standard_license/" >>build/Makefile fi @@ -23428,11 +22339,119 @@ + cachevar="zfs_cv_kernel_config_objtool_werror_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/config_objtool_werror || mkdir -p build/config_objtool_werror +cat confdefs.h - <<_ACEOF >build/config_objtool_werror/config_objtool_werror.c + +#include + + #if !defined(CONFIG_OBJTOOL_WERROR) + #error "CONFIG_OBJTOOL_WERROR is not defined." + #endif + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/config_objtool_werror || mkdir -p build/config_objtool_werror + + file=build/config_objtool_werror/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/config_objtool_werror + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := config_objtool_werror.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += config_objtool_werror/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/config_objtool_werror_license || mkdir -p build/config_objtool_werror_license +cat confdefs.h - <<_ACEOF >build/config_objtool_werror_license/config_objtool_werror_license.c + +#include + + #if !defined(CONFIG_OBJTOOL_WERROR) + #error "CONFIG_OBJTOOL_WERROR is not defined." + #endif + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/config_objtool_werror_license || mkdir -p build/config_objtool_werror_license + + file=build/config_objtool_werror_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/config_objtool_werror_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := config_objtool_werror_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += config_objtool_werror_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_access_ok_type_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/access_ok_type || mkdir -p build/access_ok_type @@ -23480,14 +22499,12 @@ echo "obj-m := access_ok_type.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += access_ok_type/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/access_ok_type_license || mkdir -p build/access_ok_type_license @@ -23535,8 +22552,7 @@ echo "obj-m := access_ok_type_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += access_ok_type_license/" >>build/Makefile fi @@ -23550,8 +22566,7 @@ cachevar="zfs_cv_kernel_pde_data_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/pde_data || mkdir -p build/pde_data @@ -23596,14 +22611,12 @@ echo "obj-m := pde_data.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pde_data/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/pde_data_license || mkdir -p build/pde_data_license @@ -23648,8 +22661,7 @@ echo "obj-m := pde_data_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pde_data_license/" >>build/Makefile fi @@ -23663,8 +22675,7 @@ cachevar="zfs_cv_kernel_generic_fadvise_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fadvise || mkdir -p build/generic_fadvise @@ -23713,14 +22724,12 @@ echo "obj-m := generic_fadvise.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fadvise/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fadvise_license || mkdir -p build/generic_fadvise_license @@ -23769,8 +22778,7 @@ echo "obj-m := generic_fadvise_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fadvise_license/" >>build/Makefile fi @@ -23785,8 +22793,7 @@ cachevar="zfs_cv_kernel_sched_rt_header_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/sched_rt_header || mkdir -p build/sched_rt_header @@ -23832,14 +22839,12 @@ echo "obj-m := sched_rt_header.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sched_rt_header/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/sched_rt_header_license || mkdir -p build/sched_rt_header_license @@ -23885,8 +22890,7 @@ echo "obj-m := sched_rt_header_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sched_rt_header_license/" >>build/Makefile fi @@ -23901,8 +22905,7 @@ cachevar="zfs_cv_kernel_usleep_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/usleep_range || mkdir -p build/usleep_range @@ -23947,14 +22950,12 @@ echo "obj-m := usleep_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += usleep_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/usleep_range_license || mkdir -p build/usleep_range_license @@ -23999,8 +23000,7 @@ echo "obj-m := usleep_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += usleep_range_license/" >>build/Makefile fi @@ -24014,8 +23014,7 @@ cachevar="zfs_cv_kernel___vmalloc_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/__vmalloc || mkdir -p build/__vmalloc @@ -24063,14 +23062,12 @@ echo "obj-m := __vmalloc.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __vmalloc/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/__vmalloc_license || mkdir -p build/__vmalloc_license @@ -24118,8 +23115,7 @@ echo "obj-m := __vmalloc_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __vmalloc_license/" >>build/Makefile fi @@ -24134,8 +23130,7 @@ cachevar="zfs_cv_kernel_timestamp_truncate_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/timestamp_truncate || mkdir -p build/timestamp_truncate @@ -24184,14 +23179,12 @@ echo "obj-m := timestamp_truncate.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += timestamp_truncate/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/timestamp_truncate_license || mkdir -p build/timestamp_truncate_license @@ -24240,8 +23233,7 @@ echo "obj-m := timestamp_truncate_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += timestamp_truncate_license/" >>build/Makefile fi @@ -24254,8 +23246,7 @@ cachevar="zfs_cv_kernel_inode_get_ctime_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_get_ctime || mkdir -p build/inode_get_ctime @@ -24303,14 +23294,12 @@ echo "obj-m := inode_get_ctime.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_ctime/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_get_ctime_license || mkdir -p build/inode_get_ctime_license @@ -24358,8 +23347,7 @@ echo "obj-m := inode_get_ctime_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_ctime_license/" >>build/Makefile fi @@ -24372,8 +23360,7 @@ cachevar="zfs_cv_kernel_inode_set_ctime_to_ts_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_set_ctime_to_ts || mkdir -p build/inode_set_ctime_to_ts @@ -24422,14 +23409,12 @@ echo "obj-m := inode_set_ctime_to_ts.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_ctime_to_ts/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_set_ctime_to_ts_license || mkdir -p build/inode_set_ctime_to_ts_license @@ -24478,8 +23463,7 @@ echo "obj-m := inode_set_ctime_to_ts_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_ctime_to_ts_license/" >>build/Makefile fi @@ -24492,8 +23476,7 @@ cachevar="zfs_cv_kernel_inode_get_atime_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_get_atime || mkdir -p build/inode_get_atime @@ -24541,14 +23524,12 @@ echo "obj-m := inode_get_atime.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_atime/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_get_atime_license || mkdir -p build/inode_get_atime_license @@ -24596,8 +23577,7 @@ echo "obj-m := inode_get_atime_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_atime_license/" >>build/Makefile fi @@ -24609,8 +23589,7 @@ cachevar="zfs_cv_kernel_inode_get_mtime_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_get_mtime || mkdir -p build/inode_get_mtime @@ -24658,14 +23637,12 @@ echo "obj-m := inode_get_mtime.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_mtime/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_get_mtime_license || mkdir -p build/inode_get_mtime_license @@ -24713,8 +23690,7 @@ echo "obj-m := inode_get_mtime_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_mtime_license/" >>build/Makefile fi @@ -24727,8 +23703,7 @@ cachevar="zfs_cv_kernel_inode_set_atime_to_ts_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_set_atime_to_ts || mkdir -p build/inode_set_atime_to_ts @@ -24777,14 +23752,12 @@ echo "obj-m := inode_set_atime_to_ts.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_atime_to_ts/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_set_atime_to_ts_license || mkdir -p build/inode_set_atime_to_ts_license @@ -24833,8 +23806,7 @@ echo "obj-m := inode_set_atime_to_ts_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_atime_to_ts_license/" >>build/Makefile fi @@ -24846,8 +23818,7 @@ cachevar="zfs_cv_kernel_inode_set_mtime_to_ts_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_set_mtime_to_ts || mkdir -p build/inode_set_mtime_to_ts @@ -24896,14 +23867,12 @@ echo "obj-m := inode_set_mtime_to_ts.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_mtime_to_ts/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_set_mtime_to_ts_license || mkdir -p build/inode_set_mtime_to_ts_license @@ -24952,8 +23921,7 @@ echo "obj-m := inode_set_mtime_to_ts_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_mtime_to_ts_license/" >>build/Makefile fi @@ -24967,8 +23935,7 @@ cachevar="zfs_cv_kernel_proc_ops_struct_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/proc_ops_struct || mkdir -p build/proc_ops_struct @@ -25032,14 +23999,12 @@ echo "obj-m := proc_ops_struct.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += proc_ops_struct/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/proc_ops_struct_license || mkdir -p build/proc_ops_struct_license @@ -25103,8 +24068,7 @@ echo "obj-m := proc_ops_struct_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += proc_ops_struct_license/" >>build/Makefile fi @@ -25119,8 +24083,7 @@ cachevar="zfs_cv_kernel_block_device_operations_check_events_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_check_events || mkdir -p build/block_device_operations_check_events @@ -25174,14 +24137,12 @@ echo "obj-m := block_device_operations_check_events.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_check_events/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_check_events_license || mkdir -p build/block_device_operations_check_events_license @@ -25235,8 +24196,7 @@ echo "obj-m := block_device_operations_check_events_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_check_events_license/" >>build/Makefile fi @@ -25250,8 +24210,7 @@ cachevar="zfs_cv_kernel_block_device_operations_release_void_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_release_void || mkdir -p build/block_device_operations_release_void @@ -25307,14 +24266,12 @@ echo "obj-m := block_device_operations_release_void.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_release_void_license || mkdir -p build/block_device_operations_release_void_license @@ -25370,8 +24327,7 @@ echo "obj-m := block_device_operations_release_void_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void_license/" >>build/Makefile fi @@ -25385,8 +24341,7 @@ cachevar="zfs_cv_kernel_block_device_operations_release_void_1arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_release_void_1arg || mkdir -p build/block_device_operations_release_void_1arg @@ -25442,14 +24397,12 @@ echo "obj-m := block_device_operations_release_void_1arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void_1arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_release_void_1arg_license || mkdir -p build/block_device_operations_release_void_1arg_license @@ -25505,8 +24458,7 @@ echo "obj-m := block_device_operations_release_void_1arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void_1arg_license/" >>build/Makefile fi @@ -25520,8 +24472,7 @@ cachevar="zfs_cv_kernel_block_device_operations_revalidate_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_revalidate_disk || mkdir -p build/block_device_operations_revalidate_disk @@ -25574,14 +24525,12 @@ echo "obj-m := block_device_operations_revalidate_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_revalidate_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_revalidate_disk_license || mkdir -p build/block_device_operations_revalidate_disk_license @@ -25634,8 +24583,7 @@ echo "obj-m := block_device_operations_revalidate_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_revalidate_disk_license/" >>build/Makefile fi @@ -25647,12 +24595,138 @@ + cachevar="zfs_cv_kernel_block_device_operations_getgeo_gendisk_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/block_device_operations_getgeo_gendisk || mkdir -p build/block_device_operations_getgeo_gendisk +cat confdefs.h - <<_ACEOF >build/block_device_operations_getgeo_gendisk/block_device_operations_getgeo_gendisk.c + +#include + + #include + + static int blk_getgeo(struct gendisk *disk, struct hd_geometry *geo) + { + (void) disk, (void) geo; + return (0); + } + + static const struct block_device_operations + bops __attribute__ ((unused)) = { + .getgeo = blk_getgeo, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/block_device_operations_getgeo_gendisk || mkdir -p build/block_device_operations_getgeo_gendisk + + file=build/block_device_operations_getgeo_gendisk/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/block_device_operations_getgeo_gendisk + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := block_device_operations_getgeo_gendisk.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += block_device_operations_getgeo_gendisk/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/block_device_operations_getgeo_gendisk_license || mkdir -p build/block_device_operations_getgeo_gendisk_license +cat confdefs.h - <<_ACEOF >build/block_device_operations_getgeo_gendisk_license/block_device_operations_getgeo_gendisk_license.c + +#include + + #include + + static int blk_getgeo(struct gendisk *disk, struct hd_geometry *geo) + { + (void) disk, (void) geo; + return (0); + } + + static const struct block_device_operations + bops __attribute__ ((unused)) = { + .getgeo = blk_getgeo, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/block_device_operations_getgeo_gendisk_license || mkdir -p build/block_device_operations_getgeo_gendisk_license + + file=build/block_device_operations_getgeo_gendisk_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/block_device_operations_getgeo_gendisk_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := block_device_operations_getgeo_gendisk_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += block_device_operations_getgeo_gendisk_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_bio_set_op_attrs_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_set_op_attrs || mkdir -p build/bio_set_op_attrs @@ -25698,14 +24772,12 @@ echo "obj-m := bio_set_op_attrs.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_op_attrs/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_set_op_attrs_license || mkdir -p build/bio_set_op_attrs_license @@ -25751,8 +24823,7 @@ echo "obj-m := bio_set_op_attrs_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_op_attrs_license/" >>build/Makefile fi @@ -25766,8 +24837,7 @@ cachevar="zfs_cv_kernel_bio_set_dev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_set_dev || mkdir -p build/bio_set_dev @@ -25815,14 +24885,12 @@ echo "obj-m := bio_set_dev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/bio_set_dev_license || mkdir -p build/bio_set_dev_license @@ -25870,8 +24938,7 @@ echo "obj-m := bio_set_dev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev_license/" >>build/Makefile fi @@ -25885,8 +24952,7 @@ cachevar="zfs_cv_kernel_current_bio_list_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/current_bio_list || mkdir -p build/current_bio_list @@ -25931,14 +24997,12 @@ echo "obj-m := current_bio_list.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += current_bio_list/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/current_bio_list_license || mkdir -p build/current_bio_list_license @@ -25983,8 +25047,7 @@ echo "obj-m := current_bio_list_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += current_bio_list_license/" >>build/Makefile fi @@ -25998,8 +25061,7 @@ cachevar="zfs_cv_kernel_blkg_tryget_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkg_tryget || mkdir -p build/blkg_tryget @@ -26048,14 +25110,12 @@ echo "obj-m := blkg_tryget.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkg_tryget/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/blkg_tryget_license || mkdir -p build/blkg_tryget_license @@ -26104,8 +25164,7 @@ echo "obj-m := blkg_tryget_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkg_tryget_license/" >>build/Makefile fi @@ -26119,8 +25178,7 @@ cachevar="zfs_cv_kernel_bio_bdev_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_bdev_disk || mkdir -p build/bio_bdev_disk @@ -26168,14 +25226,12 @@ echo "obj-m := bio_bdev_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_bdev_disk_license || mkdir -p build/bio_bdev_disk_license @@ -26223,8 +25279,7 @@ echo "obj-m := bio_bdev_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_disk_license/" >>build/Makefile fi @@ -26238,8 +25293,7 @@ cachevar="zfs_cv_kernel_bio_bdev_submit_bio_void_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_bdev_submit_bio_void || mkdir -p build/bio_bdev_submit_bio_void @@ -26285,14 +25339,12 @@ echo "obj-m := bio_bdev_submit_bio_void.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_submit_bio_void/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_bdev_submit_bio_void_license || mkdir -p build/bio_bdev_submit_bio_void_license @@ -26338,8 +25390,7 @@ echo "obj-m := bio_bdev_submit_bio_void_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_submit_bio_void_license/" >>build/Makefile fi @@ -26353,8 +25404,7 @@ cachevar="zfs_cv_kernel_bio_set_dev_macro_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_set_dev_macro || mkdir -p build/bio_set_dev_macro @@ -26402,14 +25452,12 @@ echo "obj-m := bio_set_dev_macro.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev_macro/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/bio_set_dev_macro_license || mkdir -p build/bio_set_dev_macro_license @@ -26457,8 +25505,7 @@ echo "obj-m := bio_set_dev_macro_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev_macro_license/" >>build/Makefile fi @@ -26472,8 +25519,7 @@ cachevar="zfs_cv_kernel_bio_alloc_4arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_alloc_4arg || mkdir -p build/bio_alloc_4arg @@ -26523,14 +25569,12 @@ echo "obj-m := bio_alloc_4arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_alloc_4arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_alloc_4arg_license || mkdir -p build/bio_alloc_4arg_license @@ -26580,8 +25624,7 @@ echo "obj-m := bio_alloc_4arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_alloc_4arg_license/" >>build/Makefile fi @@ -26597,8 +25640,7 @@ cachevar="zfs_cv_kernel_blkdev_get_by_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_get_by_path || mkdir -p build/blkdev_get_by_path @@ -26649,14 +25691,12 @@ echo "obj-m := blkdev_get_by_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_get_by_path_license || mkdir -p build/blkdev_get_by_path_license @@ -26707,8 +25747,7 @@ echo "obj-m := blkdev_get_by_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path_license/" >>build/Makefile fi @@ -26722,8 +25761,7 @@ cachevar="zfs_cv_kernel_blkdev_get_by_path_4arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_get_by_path_4arg || mkdir -p build/blkdev_get_by_path_4arg @@ -26743,9 +25781,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdev = blkdev_get_by_path(path, mode, holder, &h); + bdev = blkdev_get_by_path(path, mode, holder, NULL); ; return 0; @@ -26775,14 +25812,12 @@ echo "obj-m := blkdev_get_by_path_4arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path_4arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_get_by_path_4arg_license || mkdir -p build/blkdev_get_by_path_4arg_license @@ -26802,9 +25837,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdev = blkdev_get_by_path(path, mode, holder, &h); + bdev = blkdev_get_by_path(path, mode, holder, NULL); ; return 0; @@ -26834,8 +25868,7 @@ echo "obj-m := blkdev_get_by_path_4arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path_4arg_license/" >>build/Makefile fi @@ -26849,8 +25882,7 @@ cachevar="zfs_cv_kernel_bdev_open_by_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_open_by_path || mkdir -p build/bdev_open_by_path @@ -26870,9 +25902,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdh = bdev_open_by_path(path, mode, holder, &h); + bdh = bdev_open_by_path(path, mode, holder, NULL); ; return 0; @@ -26902,14 +25933,12 @@ echo "obj-m := bdev_open_by_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_open_by_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_open_by_path_license || mkdir -p build/bdev_open_by_path_license @@ -26929,9 +25958,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdh = bdev_open_by_path(path, mode, holder, &h); + bdh = bdev_open_by_path(path, mode, holder, NULL); ; return 0; @@ -26961,8 +25989,7 @@ echo "obj-m := bdev_open_by_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_open_by_path_license/" >>build/Makefile fi @@ -26976,8 +26003,7 @@ cachevar="zfs_cv_kernel_bdev_file_open_by_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_file_open_by_path || mkdir -p build/bdev_file_open_by_path @@ -26997,9 +26023,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - file = bdev_file_open_by_path(path, mode, holder, &h); + file = bdev_file_open_by_path(path, mode, holder, NULL); ; return 0; @@ -27029,14 +26054,12 @@ echo "obj-m := bdev_file_open_by_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_file_open_by_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_file_open_by_path_license || mkdir -p build/bdev_file_open_by_path_license @@ -27056,9 +26079,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - file = bdev_file_open_by_path(path, mode, holder, &h); + file = bdev_file_open_by_path(path, mode, holder, NULL); ; return 0; @@ -27088,8 +26110,7 @@ echo "obj-m := bdev_file_open_by_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_file_open_by_path_license/" >>build/Makefile fi @@ -27103,8 +26124,7 @@ cachevar="zfs_cv_kernel_blkdev_put_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_put || mkdir -p build/blkdev_put @@ -27153,14 +26173,12 @@ echo "obj-m := blkdev_put.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_put_license || mkdir -p build/blkdev_put_license @@ -27209,8 +26227,7 @@ echo "obj-m := blkdev_put_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put_license/" >>build/Makefile fi @@ -27224,8 +26241,7 @@ cachevar="zfs_cv_kernel_blkdev_put_holder_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_put_holder || mkdir -p build/blkdev_put_holder @@ -27274,14 +26290,12 @@ echo "obj-m := blkdev_put_holder.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put_holder/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_put_holder_license || mkdir -p build/blkdev_put_holder_license @@ -27330,8 +26344,7 @@ echo "obj-m := blkdev_put_holder_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put_holder_license/" >>build/Makefile fi @@ -27345,8 +26358,7 @@ cachevar="zfs_cv_kernel_bdev_release_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_release || mkdir -p build/bdev_release @@ -27393,14 +26405,12 @@ echo "obj-m := bdev_release.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_release/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_release_license || mkdir -p build/bdev_release_license @@ -27447,8 +26457,7 @@ echo "obj-m := bdev_release_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_release_license/" >>build/Makefile fi @@ -27462,8 +26471,7 @@ cachevar="zfs_cv_kernel_blkdev_reread_part_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_reread_part || mkdir -p build/blkdev_reread_part @@ -27512,14 +26520,12 @@ echo "obj-m := blkdev_reread_part.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_reread_part/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_reread_part_license || mkdir -p build/blkdev_reread_part_license @@ -27568,8 +26574,7 @@ echo "obj-m := blkdev_reread_part_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_reread_part_license/" >>build/Makefile fi @@ -27583,8 +26588,7 @@ cachevar="zfs_cv_kernel_invalidate_bdev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/invalidate_bdev || mkdir -p build/invalidate_bdev @@ -27631,14 +26635,12 @@ echo "obj-m := invalidate_bdev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += invalidate_bdev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/invalidate_bdev_license || mkdir -p build/invalidate_bdev_license @@ -27685,8 +26687,7 @@ echo "obj-m := invalidate_bdev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += invalidate_bdev_license/" >>build/Makefile fi @@ -27700,8 +26701,7 @@ cachevar="zfs_cv_kernel_lookup_bdev_devt_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/lookup_bdev_devt || mkdir -p build/lookup_bdev_devt @@ -27750,14 +26750,12 @@ echo "obj-m := lookup_bdev_devt.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_devt/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/lookup_bdev_devt_license || mkdir -p build/lookup_bdev_devt_license @@ -27806,8 +26804,7 @@ echo "obj-m := lookup_bdev_devt_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_devt_license/" >>build/Makefile fi @@ -27820,8 +26817,7 @@ cachevar="zfs_cv_kernel_lookup_bdev_1arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/lookup_bdev_1arg || mkdir -p build/lookup_bdev_1arg @@ -27870,14 +26866,12 @@ echo "obj-m := lookup_bdev_1arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_1arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/lookup_bdev_1arg_license || mkdir -p build/lookup_bdev_1arg_license @@ -27926,8 +26920,7 @@ echo "obj-m := lookup_bdev_1arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_1arg_license/" >>build/Makefile fi @@ -27941,8 +26934,7 @@ cachevar="zfs_cv_kernel_bdev_logical_block_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_logical_block_size || mkdir -p build/bdev_logical_block_size @@ -27988,14 +26980,12 @@ echo "obj-m := bdev_logical_block_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_logical_block_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_logical_block_size_license || mkdir -p build/bdev_logical_block_size_license @@ -28041,8 +27031,7 @@ echo "obj-m := bdev_logical_block_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_logical_block_size_license/" >>build/Makefile fi @@ -28056,8 +27045,7 @@ cachevar="zfs_cv_kernel_bdev_physical_block_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_physical_block_size || mkdir -p build/bdev_physical_block_size @@ -28103,14 +27091,12 @@ echo "obj-m := bdev_physical_block_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_physical_block_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_physical_block_size_license || mkdir -p build/bdev_physical_block_size_license @@ -28156,8 +27142,7 @@ echo "obj-m := bdev_physical_block_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_physical_block_size_license/" >>build/Makefile fi @@ -28171,8 +27156,7 @@ cachevar="zfs_cv_kernel_check_disk_change_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/check_disk_change || mkdir -p build/check_disk_change @@ -28221,14 +27205,12 @@ echo "obj-m := check_disk_change.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += check_disk_change/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/check_disk_change_license || mkdir -p build/check_disk_change_license @@ -28277,8 +27259,7 @@ echo "obj-m := check_disk_change_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += check_disk_change_license/" >>build/Makefile fi @@ -28292,8 +27273,7 @@ cachevar="zfs_cv_kernel_bdev_check_media_change_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_check_media_change || mkdir -p build/bdev_check_media_change @@ -28342,14 +27322,12 @@ echo "obj-m := bdev_check_media_change.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_check_media_change/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_check_media_change_license || mkdir -p build/bdev_check_media_change_license @@ -28398,8 +27376,7 @@ echo "obj-m := bdev_check_media_change_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_check_media_change_license/" >>build/Makefile fi @@ -28413,8 +27390,7 @@ cachevar="zfs_cv_kernel_bdev_whole_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_whole || mkdir -p build/bdev_whole @@ -28460,14 +27436,12 @@ echo "obj-m := bdev_whole.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_whole/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_whole_license || mkdir -p build/bdev_whole_license @@ -28513,8 +27487,7 @@ echo "obj-m := bdev_whole_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_whole_license/" >>build/Makefile fi @@ -28528,8 +27501,7 @@ cachevar="zfs_cv_kernel_bdev_nr_bytes_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_nr_bytes || mkdir -p build/bdev_nr_bytes @@ -28576,14 +27548,12 @@ echo "obj-m := bdev_nr_bytes.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_nr_bytes/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_nr_bytes_license || mkdir -p build/bdev_nr_bytes_license @@ -28630,8 +27600,7 @@ echo "obj-m := bdev_nr_bytes_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_nr_bytes_license/" >>build/Makefile fi @@ -28645,8 +27614,7 @@ cachevar="zfs_cv_kernel_bdevname_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdevname || mkdir -p build/bdevname @@ -28695,14 +27663,12 @@ echo "obj-m := bdevname.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdevname/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdevname_license || mkdir -p build/bdevname_license @@ -28751,8 +27717,7 @@ echo "obj-m := bdevname_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdevname_license/" >>build/Makefile fi @@ -28766,8 +27731,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_noflags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_noflags || mkdir -p build/blkdev_issue_discard_noflags @@ -28818,14 +27782,12 @@ echo "obj-m := blkdev_issue_discard_noflags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_noflags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_noflags_license || mkdir -p build/blkdev_issue_discard_noflags_license @@ -28876,8 +27838,7 @@ echo "obj-m := blkdev_issue_discard_noflags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_noflags_license/" >>build/Makefile fi @@ -28889,8 +27850,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_flags || mkdir -p build/blkdev_issue_discard_flags @@ -28942,14 +27902,12 @@ echo "obj-m := blkdev_issue_discard_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_flags_license || mkdir -p build/blkdev_issue_discard_flags_license @@ -29001,8 +27959,7 @@ echo "obj-m := blkdev_issue_discard_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_flags_license/" >>build/Makefile fi @@ -29014,8 +27971,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_async_noflags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_async_noflags || mkdir -p build/blkdev_issue_discard_async_noflags @@ -29067,14 +28023,12 @@ echo "obj-m := blkdev_issue_discard_async_noflags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_noflags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_async_noflags_license || mkdir -p build/blkdev_issue_discard_async_noflags_license @@ -29126,8 +28080,7 @@ echo "obj-m := blkdev_issue_discard_async_noflags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_noflags_license/" >>build/Makefile fi @@ -29139,8 +28092,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_async_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_async_flags || mkdir -p build/blkdev_issue_discard_async_flags @@ -29193,14 +28145,12 @@ echo "obj-m := blkdev_issue_discard_async_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_async_flags_license || mkdir -p build/blkdev_issue_discard_async_flags_license @@ -29253,8 +28203,7 @@ echo "obj-m := blkdev_issue_discard_async_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_flags_license/" >>build/Makefile fi @@ -29266,8 +28215,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_secure_erase_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_secure_erase || mkdir -p build/blkdev_issue_secure_erase @@ -29318,14 +28266,12 @@ echo "obj-m := blkdev_issue_secure_erase.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_secure_erase/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_secure_erase_license || mkdir -p build/blkdev_issue_secure_erase_license @@ -29376,8 +28322,7 @@ echo "obj-m := blkdev_issue_secure_erase_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_secure_erase_license/" >>build/Makefile fi @@ -29391,8 +28336,7 @@ cachevar="zfs_cv_kernel_bdev_kobj_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_kobj || mkdir -p build/bdev_kobj @@ -29441,14 +28385,12 @@ echo "obj-m := bdev_kobj.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_kobj/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_kobj_license || mkdir -p build/bdev_kobj_license @@ -29497,8 +28439,7 @@ echo "obj-m := bdev_kobj_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_kobj_license/" >>build/Makefile fi @@ -29512,8 +28453,7 @@ cachevar="zfs_cv_kernel_part_to_dev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/part_to_dev || mkdir -p build/part_to_dev @@ -29561,14 +28501,12 @@ echo "obj-m := part_to_dev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += part_to_dev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/part_to_dev_license || mkdir -p build/part_to_dev_license @@ -29616,8 +28554,7 @@ echo "obj-m := part_to_dev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += part_to_dev_license/" >>build/Makefile fi @@ -29631,8 +28568,7 @@ cachevar="zfs_cv_kernel_disk_check_media_change_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/disk_check_media_change || mkdir -p build/disk_check_media_change @@ -29681,14 +28617,12 @@ echo "obj-m := disk_check_media_change.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_check_media_change/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/disk_check_media_change_license || mkdir -p build/disk_check_media_change_license @@ -29737,8 +28671,7 @@ echo "obj-m := disk_check_media_change_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_check_media_change_license/" >>build/Makefile fi @@ -29752,8 +28685,7 @@ cachevar="zfs_cv_kernel_blk_sts_resv_conflict_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_sts_resv_conflict || mkdir -p build/blk_sts_resv_conflict @@ -29798,14 +28730,12 @@ echo "obj-m := blk_sts_resv_conflict.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_sts_resv_conflict/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_sts_resv_conflict_license || mkdir -p build/blk_sts_resv_conflict_license @@ -29850,8 +28780,7 @@ echo "obj-m := blk_sts_resv_conflict_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_sts_resv_conflict_license/" >>build/Makefile fi @@ -29865,8 +28794,7 @@ cachevar="zfs_cv_kernel_blk_mode_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_mode_t || mkdir -p build/blk_mode_t @@ -29912,14 +28840,12 @@ echo "obj-m := blk_mode_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mode_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_mode_t_license || mkdir -p build/blk_mode_t_license @@ -29965,8 +28891,7 @@ echo "obj-m := blk_mode_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mode_t_license/" >>build/Makefile fi @@ -29982,8 +28907,7 @@ cachevar="zfs_cv_kernel_blk_plug_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_plug || mkdir -p build/blk_plug @@ -30031,14 +28955,12 @@ echo "obj-m := blk_plug.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_plug/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_plug_license || mkdir -p build/blk_plug_license @@ -30086,8 +29008,7 @@ echo "obj-m := blk_plug_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_plug_license/" >>build/Makefile fi @@ -30101,8 +29022,7 @@ cachevar="zfs_cv_kernel_blk_queue_bdi_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_bdi || mkdir -p build/blk_queue_bdi @@ -30149,14 +29069,12 @@ echo "obj-m := blk_queue_bdi.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_bdi/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_bdi_license || mkdir -p build/blk_queue_bdi_license @@ -30203,8 +29121,7 @@ echo "obj-m := blk_queue_bdi_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_bdi_license/" >>build/Makefile fi @@ -30218,8 +29135,7 @@ cachevar="zfs_cv_kernel_blk_queue_disk_bdi_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_disk_bdi || mkdir -p build/blk_queue_disk_bdi @@ -30269,14 +29185,12 @@ echo "obj-m := blk_queue_disk_bdi.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_disk_bdi/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_disk_bdi_license || mkdir -p build/blk_queue_disk_bdi_license @@ -30326,8 +29240,7 @@ echo "obj-m := blk_queue_disk_bdi_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_disk_bdi_license/" >>build/Makefile fi @@ -30341,8 +29254,7 @@ cachevar="zfs_cv_kernel_blk_queue_update_readahead_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_update_readahead || mkdir -p build/blk_queue_update_readahead @@ -30388,14 +29300,12 @@ echo "obj-m := blk_queue_update_readahead.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_update_readahead/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_update_readahead_license || mkdir -p build/blk_queue_update_readahead_license @@ -30441,8 +29351,7 @@ echo "obj-m := blk_queue_update_readahead_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_update_readahead_license/" >>build/Makefile fi @@ -30455,8 +29364,7 @@ cachevar="zfs_cv_kernel_disk_update_readahead_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/disk_update_readahead || mkdir -p build/disk_update_readahead @@ -30502,14 +29410,12 @@ echo "obj-m := disk_update_readahead.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_update_readahead/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/disk_update_readahead_license || mkdir -p build/disk_update_readahead_license @@ -30555,8 +29461,7 @@ echo "obj-m := disk_update_readahead_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_update_readahead_license/" >>build/Makefile fi @@ -30570,8 +29475,7 @@ cachevar="zfs_cv_kernel_bdev_max_discard_sectors_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_max_discard_sectors || mkdir -p build/bdev_max_discard_sectors @@ -30619,14 +29523,12 @@ echo "obj-m := bdev_max_discard_sectors.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_discard_sectors/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_max_discard_sectors_license || mkdir -p build/bdev_max_discard_sectors_license @@ -30674,8 +29576,7 @@ echo "obj-m := bdev_max_discard_sectors_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_discard_sectors_license/" >>build/Makefile fi @@ -30688,8 +29589,7 @@ cachevar="zfs_cv_kernel_blk_queue_discard_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_discard || mkdir -p build/blk_queue_discard @@ -30738,14 +29638,12 @@ echo "obj-m := blk_queue_discard.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_discard/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_discard_license || mkdir -p build/blk_queue_discard_license @@ -30794,8 +29692,7 @@ echo "obj-m := blk_queue_discard_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_discard_license/" >>build/Makefile fi @@ -30809,8 +29706,7 @@ cachevar="zfs_cv_kernel_bdev_max_secure_erase_sectors_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_max_secure_erase_sectors || mkdir -p build/bdev_max_secure_erase_sectors @@ -30858,14 +29754,12 @@ echo "obj-m := bdev_max_secure_erase_sectors.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_secure_erase_sectors/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_max_secure_erase_sectors_license || mkdir -p build/bdev_max_secure_erase_sectors_license @@ -30913,8 +29807,7 @@ echo "obj-m := bdev_max_secure_erase_sectors_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_secure_erase_sectors_license/" >>build/Makefile fi @@ -30927,8 +29820,7 @@ cachevar="zfs_cv_kernel_blk_queue_secure_erase_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_secure_erase || mkdir -p build/blk_queue_secure_erase @@ -30977,14 +29869,12 @@ echo "obj-m := blk_queue_secure_erase.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_secure_erase/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_secure_erase_license || mkdir -p build/blk_queue_secure_erase_license @@ -31033,8 +29923,7 @@ echo "obj-m := blk_queue_secure_erase_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_secure_erase_license/" >>build/Makefile fi @@ -31048,8 +29937,7 @@ cachevar="zfs_cv_kernel_blk_queue_max_hw_sectors_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_max_hw_sectors || mkdir -p build/blk_queue_max_hw_sectors @@ -31095,14 +29983,12 @@ echo "obj-m := blk_queue_max_hw_sectors.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_hw_sectors/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_max_hw_sectors_license || mkdir -p build/blk_queue_max_hw_sectors_license @@ -31148,8 +30034,7 @@ echo "obj-m := blk_queue_max_hw_sectors_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_hw_sectors_license/" >>build/Makefile fi @@ -31163,8 +30048,7 @@ cachevar="zfs_cv_kernel_blk_queue_max_segments_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_max_segments || mkdir -p build/blk_queue_max_segments @@ -31210,14 +30094,12 @@ echo "obj-m := blk_queue_max_segments.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_segments/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_max_segments_license || mkdir -p build/blk_queue_max_segments_license @@ -31263,8 +30145,7 @@ echo "obj-m := blk_queue_max_segments_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_segments_license/" >>build/Makefile fi @@ -31276,10 +30157,120 @@ + cachevar="zfs_cv_kernel_blk_queue_rot_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/blk_queue_rot || mkdir -p build/blk_queue_rot +cat confdefs.h - <<_ACEOF >build/blk_queue_rot/blk_queue_rot.c + +#include + + #include + + +int +main (void) +{ + + struct request_queue *q __attribute__ ((unused)) = NULL; + (void) blk_queue_rot(q); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/blk_queue_rot || mkdir -p build/blk_queue_rot + + file=build/blk_queue_rot/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/blk_queue_rot + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := blk_queue_rot.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += blk_queue_rot/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/blk_queue_rot_license || mkdir -p build/blk_queue_rot_license +cat confdefs.h - <<_ACEOF >build/blk_queue_rot_license/blk_queue_rot_license.c + +#include + + #include + + +int +main (void) +{ + + struct request_queue *q __attribute__ ((unused)) = NULL; + (void) blk_queue_rot(q); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/blk_queue_rot_license || mkdir -p build/blk_queue_rot_license + + file=build/blk_queue_rot_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/blk_queue_rot_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := blk_queue_rot_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += blk_queue_rot_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_blk_mq_rq_hctx_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_mq_rq_hctx || mkdir -p build/blk_mq_rq_hctx @@ -31327,14 +30318,12 @@ echo "obj-m := blk_mq_rq_hctx.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mq_rq_hctx/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_mq_rq_hctx_license || mkdir -p build/blk_mq_rq_hctx_license @@ -31382,8 +30371,7 @@ echo "obj-m := blk_mq_rq_hctx_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mq_rq_hctx_license/" >>build/Makefile fi @@ -31399,8 +30387,7 @@ cachevar="zfs_cv_kernel_genhd_fl_ext_devt_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/genhd_fl_ext_devt || mkdir -p build/genhd_fl_ext_devt @@ -31445,14 +30432,12 @@ echo "obj-m := genhd_fl_ext_devt.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_ext_devt/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/genhd_fl_ext_devt_license || mkdir -p build/genhd_fl_ext_devt_license @@ -31497,8 +30482,7 @@ echo "obj-m := genhd_fl_ext_devt_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_ext_devt_license/" >>build/Makefile fi @@ -31511,8 +30495,7 @@ cachevar="zfs_cv_kernel_genhd_fl_no_part_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/genhd_fl_no_part || mkdir -p build/genhd_fl_no_part @@ -31557,14 +30540,12 @@ echo "obj-m := genhd_fl_no_part.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_no_part/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/genhd_fl_no_part_license || mkdir -p build/genhd_fl_no_part_license @@ -31609,8 +30590,7 @@ echo "obj-m := genhd_fl_no_part_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_no_part_license/" >>build/Makefile fi @@ -31625,8 +30605,7 @@ cachevar="zfs_cv_kernel_revalidate_disk_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/revalidate_disk_size || mkdir -p build/revalidate_disk_size @@ -31672,14 +30651,12 @@ echo "obj-m := revalidate_disk_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/revalidate_disk_size_license || mkdir -p build/revalidate_disk_size_license @@ -31725,8 +30702,7 @@ echo "obj-m := revalidate_disk_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk_size_license/" >>build/Makefile fi @@ -31739,8 +30715,7 @@ cachevar="zfs_cv_kernel_revalidate_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/revalidate_disk || mkdir -p build/revalidate_disk @@ -31786,14 +30761,12 @@ echo "obj-m := revalidate_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/revalidate_disk_license || mkdir -p build/revalidate_disk_license @@ -31839,8 +30812,7 @@ echo "obj-m := revalidate_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk_license/" >>build/Makefile fi @@ -31854,8 +30826,7 @@ cachevar="zfs_cv_kernel_get_disk_ro_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/get_disk_ro || mkdir -p build/get_disk_ro @@ -31901,14 +30872,12 @@ echo "obj-m := get_disk_ro.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += get_disk_ro/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/get_disk_ro_license || mkdir -p build/get_disk_ro_license @@ -31954,8 +30923,7 @@ echo "obj-m := get_disk_ro_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += get_disk_ro_license/" >>build/Makefile fi @@ -31969,8 +30937,7 @@ cachevar="zfs_cv_kernel_discard_granularity_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/discard_granularity || mkdir -p build/discard_granularity @@ -32016,14 +30983,12 @@ echo "obj-m := discard_granularity.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += discard_granularity/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/discard_granularity_license || mkdir -p build/discard_granularity_license @@ -32069,8 +31034,7 @@ echo "obj-m := discard_granularity_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += discard_granularity_license/" >>build/Makefile fi @@ -32084,8 +31048,7 @@ cachevar="zfs_cv_kernel_inode_owner_or_capable_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_owner_or_capable || mkdir -p build/inode_owner_or_capable @@ -32131,14 +31094,12 @@ echo "obj-m := inode_owner_or_capable.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_owner_or_capable_license || mkdir -p build/inode_owner_or_capable_license @@ -32184,8 +31145,7 @@ echo "obj-m := inode_owner_or_capable_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_license/" >>build/Makefile fi @@ -32198,8 +31158,7 @@ cachevar="zfs_cv_kernel_inode_owner_or_capable_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_owner_or_capable_userns || mkdir -p build/inode_owner_or_capable_userns @@ -32245,14 +31204,12 @@ echo "obj-m := inode_owner_or_capable_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_owner_or_capable_userns_license || mkdir -p build/inode_owner_or_capable_userns_license @@ -32298,8 +31255,7 @@ echo "obj-m := inode_owner_or_capable_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_userns_license/" >>build/Makefile fi @@ -32312,8 +31268,7 @@ cachevar="zfs_cv_kernel_inode_owner_or_capable_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_owner_or_capable_mnt_idmap || mkdir -p build/inode_owner_or_capable_mnt_idmap @@ -32360,14 +31315,12 @@ echo "obj-m := inode_owner_or_capable_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_owner_or_capable_mnt_idmap_license || mkdir -p build/inode_owner_or_capable_mnt_idmap_license @@ -32414,8 +31367,7 @@ echo "obj-m := inode_owner_or_capable_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_mnt_idmap_license/" >>build/Makefile fi @@ -32430,8 +31382,7 @@ cachevar="zfs_cv_kernel_const_xattr_handler_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/const_xattr_handler || mkdir -p build/const_xattr_handler @@ -32489,14 +31440,12 @@ echo "obj-m := const_xattr_handler.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += const_xattr_handler/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/const_xattr_handler_license || mkdir -p build/const_xattr_handler_license @@ -32554,8 +31503,7 @@ echo "obj-m := const_xattr_handler_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += const_xattr_handler_license/" >>build/Makefile fi @@ -32569,8 +31517,7 @@ cachevar="zfs_cv_kernel_xattr_handler_get_dentry_inode_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_get_dentry_inode_flags || mkdir -p build/xattr_handler_get_dentry_inode_flags @@ -32622,14 +31569,12 @@ echo "obj-m := xattr_handler_get_dentry_inode_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_get_dentry_inode_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_get_dentry_inode_flags_license || mkdir -p build/xattr_handler_get_dentry_inode_flags_license @@ -32681,8 +31626,7 @@ echo "obj-m := xattr_handler_get_dentry_inode_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_get_dentry_inode_flags_license/" >>build/Makefile fi @@ -32696,8 +31640,7 @@ cachevar="zfs_cv_kernel_xattr_handler_set_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_set_mnt_idmap || mkdir -p build/xattr_handler_set_mnt_idmap @@ -32751,14 +31694,12 @@ echo "obj-m := xattr_handler_set_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_set_mnt_idmap_license || mkdir -p build/xattr_handler_set_mnt_idmap_license @@ -32812,8 +31753,7 @@ echo "obj-m := xattr_handler_set_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_mnt_idmap_license/" >>build/Makefile fi @@ -32826,8 +31766,7 @@ cachevar="zfs_cv_kernel_xattr_handler_set_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_set_userns || mkdir -p build/xattr_handler_set_userns @@ -32881,14 +31820,12 @@ echo "obj-m := xattr_handler_set_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_set_userns_license || mkdir -p build/xattr_handler_set_userns_license @@ -32942,8 +31879,7 @@ echo "obj-m := xattr_handler_set_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_userns_license/" >>build/Makefile fi @@ -32956,8 +31892,7 @@ cachevar="zfs_cv_kernel_xattr_handler_set_dentry_inode_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_set_dentry_inode || mkdir -p build/xattr_handler_set_dentry_inode @@ -33010,14 +31945,12 @@ echo "obj-m := xattr_handler_set_dentry_inode.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_dentry_inode/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_set_dentry_inode_license || mkdir -p build/xattr_handler_set_dentry_inode_license @@ -33070,8 +32003,7 @@ echo "obj-m := xattr_handler_set_dentry_inode_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_dentry_inode_license/" >>build/Makefile fi @@ -33087,8 +32019,7 @@ cachevar="zfs_cv_kernel_posix_acl_equiv_mode_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/posix_acl_equiv_mode || mkdir -p build/posix_acl_equiv_mode @@ -33135,14 +32066,12 @@ echo "obj-m := posix_acl_equiv_mode.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += posix_acl_equiv_mode/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/posix_acl_equiv_mode_license || mkdir -p build/posix_acl_equiv_mode_license @@ -33189,8 +32118,7 @@ echo "obj-m := posix_acl_equiv_mode_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += posix_acl_equiv_mode_license/" >>build/Makefile fi @@ -33202,10 +32130,130 @@ + cachevar="zfs_cv_kernel_posix_acl_to_xattr_alloc_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/posix_acl_to_xattr_alloc || mkdir -p build/posix_acl_to_xattr_alloc +cat confdefs.h - <<_ACEOF >build/posix_acl_to_xattr_alloc/posix_acl_to_xattr_alloc.c + +#include + + #include + #include + + +int +main (void) +{ + + struct user_namespace *ns = NULL; + struct posix_acl *acl = NULL; + size_t size = 0; + gfp_t gfp = 0; + void *xattr = NULL; + xattr = posix_acl_to_xattr(ns, acl, &size, gfp); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/posix_acl_to_xattr_alloc || mkdir -p build/posix_acl_to_xattr_alloc + + file=build/posix_acl_to_xattr_alloc/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/posix_acl_to_xattr_alloc + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := posix_acl_to_xattr_alloc.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += posix_acl_to_xattr_alloc/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/posix_acl_to_xattr_alloc_license || mkdir -p build/posix_acl_to_xattr_alloc_license +cat confdefs.h - <<_ACEOF >build/posix_acl_to_xattr_alloc_license/posix_acl_to_xattr_alloc_license.c + +#include + + #include + #include + + +int +main (void) +{ + + struct user_namespace *ns = NULL; + struct posix_acl *acl = NULL; + size_t size = 0; + gfp_t gfp = 0; + void *xattr = NULL; + xattr = posix_acl_to_xattr(ns, acl, &size, gfp); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/posix_acl_to_xattr_alloc_license || mkdir -p build/posix_acl_to_xattr_alloc_license + + file=build/posix_acl_to_xattr_alloc_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/posix_acl_to_xattr_alloc_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := posix_acl_to_xattr_alloc_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += posix_acl_to_xattr_alloc_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_inode_operations_get_acl_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_get_acl || mkdir -p build/inode_operations_get_acl @@ -33256,14 +32304,12 @@ echo "obj-m := inode_operations_get_acl.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_get_acl_license || mkdir -p build/inode_operations_get_acl_license @@ -33314,8 +32360,7 @@ echo "obj-m := inode_operations_get_acl_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl_license/" >>build/Makefile fi @@ -33328,8 +32373,7 @@ cachevar="zfs_cv_kernel_inode_operations_get_acl_rcu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_get_acl_rcu || mkdir -p build/inode_operations_get_acl_rcu @@ -33380,14 +32424,12 @@ echo "obj-m := inode_operations_get_acl_rcu.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl_rcu/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_get_acl_rcu_license || mkdir -p build/inode_operations_get_acl_rcu_license @@ -33438,8 +32480,7 @@ echo "obj-m := inode_operations_get_acl_rcu_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl_rcu_license/" >>build/Makefile fi @@ -33452,8 +32493,7 @@ cachevar="zfs_cv_kernel_inode_operations_get_inode_acl_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_get_inode_acl || mkdir -p build/inode_operations_get_inode_acl @@ -33504,14 +32544,12 @@ echo "obj-m := inode_operations_get_inode_acl.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_inode_acl/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_get_inode_acl_license || mkdir -p build/inode_operations_get_inode_acl_license @@ -33562,8 +32600,7 @@ echo "obj-m := inode_operations_get_inode_acl_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_inode_acl_license/" >>build/Makefile fi @@ -33577,8 +32614,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_mnt_idmap_dentry_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl_mnt_idmap_dentry || mkdir -p build/inode_operations_set_acl_mnt_idmap_dentry @@ -33630,14 +32666,12 @@ echo "obj-m := inode_operations_set_acl_mnt_idmap_dentry.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_mnt_idmap_dentry/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_mnt_idmap_dentry_license || mkdir -p build/inode_operations_set_acl_mnt_idmap_dentry_license @@ -33689,8 +32723,7 @@ echo "obj-m := inode_operations_set_acl_mnt_idmap_dentry_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_mnt_idmap_dentry_license/" >>build/Makefile fi @@ -33702,8 +32735,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_dentry_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl_userns_dentry || mkdir -p build/inode_operations_set_acl_userns_dentry @@ -33755,14 +32787,12 @@ echo "obj-m := inode_operations_set_acl_userns_dentry.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns_dentry/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_userns_dentry_license || mkdir -p build/inode_operations_set_acl_userns_dentry_license @@ -33814,8 +32844,7 @@ echo "obj-m := inode_operations_set_acl_userns_dentry_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns_dentry_license/" >>build/Makefile fi @@ -33827,8 +32856,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl_userns || mkdir -p build/inode_operations_set_acl_userns @@ -33880,14 +32908,12 @@ echo "obj-m := inode_operations_set_acl_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_userns_license || mkdir -p build/inode_operations_set_acl_userns_license @@ -33939,8 +32965,7 @@ echo "obj-m := inode_operations_set_acl_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns_license/" >>build/Makefile fi @@ -33952,8 +32977,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl || mkdir -p build/inode_operations_set_acl @@ -34004,14 +33028,12 @@ echo "obj-m := inode_operations_set_acl.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_license || mkdir -p build/inode_operations_set_acl_license @@ -34062,8 +33084,7 @@ echo "obj-m := inode_operations_set_acl_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_license/" >>build/Makefile fi @@ -34078,8 +33099,7 @@ cachevar="zfs_cv_kernel_inode_operations_setattr_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_setattr_mnt_idmap || mkdir -p build/inode_operations_setattr_mnt_idmap @@ -34132,14 +33152,12 @@ echo "obj-m := inode_operations_setattr_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_setattr_mnt_idmap_license || mkdir -p build/inode_operations_setattr_mnt_idmap_license @@ -34192,8 +33210,7 @@ echo "obj-m := inode_operations_setattr_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_mnt_idmap_license/" >>build/Makefile fi @@ -34206,8 +33223,7 @@ cachevar="zfs_cv_kernel_inode_operations_setattr_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_setattr_userns || mkdir -p build/inode_operations_setattr_userns @@ -34260,14 +33276,12 @@ echo "obj-m := inode_operations_setattr_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_setattr_userns_license || mkdir -p build/inode_operations_setattr_userns_license @@ -34320,8 +33334,7 @@ echo "obj-m := inode_operations_setattr_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_userns_license/" >>build/Makefile fi @@ -34335,8 +33348,7 @@ cachevar="zfs_cv_kernel_inode_operations_getattr_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_getattr_mnt_idmap || mkdir -p build/inode_operations_getattr_mnt_idmap @@ -34390,14 +33402,12 @@ echo "obj-m := inode_operations_getattr_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_getattr_mnt_idmap_license || mkdir -p build/inode_operations_getattr_mnt_idmap_license @@ -34451,8 +33461,7 @@ echo "obj-m := inode_operations_getattr_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_mnt_idmap_license/" >>build/Makefile fi @@ -34465,8 +33474,7 @@ cachevar="zfs_cv_kernel_inode_operations_getattr_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_getattr_userns || mkdir -p build/inode_operations_getattr_userns @@ -34520,14 +33528,12 @@ echo "obj-m := inode_operations_getattr_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_getattr_userns_license || mkdir -p build/inode_operations_getattr_userns_license @@ -34581,8 +33587,7 @@ echo "obj-m := inode_operations_getattr_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_userns_license/" >>build/Makefile fi @@ -34595,8 +33600,7 @@ cachevar="zfs_cv_kernel_inode_operations_getattr_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_getattr_path || mkdir -p build/inode_operations_getattr_path @@ -34649,14 +33653,12 @@ echo "obj-m := inode_operations_getattr_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_getattr_path_license || mkdir -p build/inode_operations_getattr_path_license @@ -34709,8 +33711,7 @@ echo "obj-m := inode_operations_getattr_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_path_license/" >>build/Makefile fi @@ -34722,10 +33723,120 @@ + cachevar="zfs_cv_kernel_inode_state_read_once_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/inode_state_read_once || mkdir -p build/inode_state_read_once +cat confdefs.h - <<_ACEOF >build/inode_state_read_once/inode_state_read_once.c + +#include + + #include + + +int +main (void) +{ + + struct inode i = {}; + inode_state_read_once(&i); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/inode_state_read_once || mkdir -p build/inode_state_read_once + + file=build/inode_state_read_once/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_state_read_once + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := inode_state_read_once.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += inode_state_read_once/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/inode_state_read_once_license || mkdir -p build/inode_state_read_once_license +cat confdefs.h - <<_ACEOF >build/inode_state_read_once_license/inode_state_read_once_license.c + +#include + + #include + + +int +main (void) +{ + + struct inode i = {}; + inode_state_read_once(&i); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/inode_state_read_once_license || mkdir -p build/inode_state_read_once_license + + file=build/inode_state_read_once_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_state_read_once_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := inode_state_read_once_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += inode_state_read_once_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_super_operations_show_options_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/super_operations_show_options || mkdir -p build/super_operations_show_options @@ -34776,14 +33887,12 @@ echo "obj-m := super_operations_show_options.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_operations_show_options/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/super_operations_show_options_license || mkdir -p build/super_operations_show_options_license @@ -34834,8 +33943,7 @@ echo "obj-m := super_operations_show_options_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_operations_show_options_license/" >>build/Makefile fi @@ -34850,8 +33958,7 @@ cachevar="zfs_cv_kernel_super_block_s_shrink_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/super_block_s_shrink || mkdir -p build/super_block_s_shrink @@ -34900,14 +34007,12 @@ echo "obj-m := super_block_s_shrink.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/super_block_s_shrink_license || mkdir -p build/super_block_s_shrink_license @@ -34956,8 +34061,7 @@ echo "obj-m := super_block_s_shrink_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink_license/" >>build/Makefile fi @@ -34971,8 +34075,7 @@ cachevar="zfs_cv_kernel_super_block_s_shrink_ptr_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/super_block_s_shrink_ptr || mkdir -p build/super_block_s_shrink_ptr @@ -35026,14 +34129,12 @@ echo "obj-m := super_block_s_shrink_ptr.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink_ptr/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/super_block_s_shrink_ptr_license || mkdir -p build/super_block_s_shrink_ptr_license @@ -35087,8 +34188,7 @@ echo "obj-m := super_block_s_shrink_ptr_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink_ptr_license/" >>build/Makefile fi @@ -35102,8 +34202,7 @@ cachevar="zfs_cv_kernel_register_shrinker_vararg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/register_shrinker_vararg || mkdir -p build/register_shrinker_vararg @@ -35155,14 +34254,12 @@ echo "obj-m := register_shrinker_vararg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += register_shrinker_vararg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/register_shrinker_vararg_license || mkdir -p build/register_shrinker_vararg_license @@ -35214,8 +34311,7 @@ echo "obj-m := register_shrinker_vararg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += register_shrinker_vararg_license/" >>build/Makefile fi @@ -35229,8 +34325,7 @@ cachevar="zfs_cv_kernel_shrinker_register_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/shrinker_register || mkdir -p build/shrinker_register @@ -35282,14 +34377,12 @@ echo "obj-m := shrinker_register.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += shrinker_register/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/shrinker_register_license || mkdir -p build/shrinker_register_license @@ -35341,8 +34434,7 @@ echo "obj-m := shrinker_register_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += shrinker_register_license/" >>build/Makefile fi @@ -35355,10 +34447,129 @@ + cachevar="zfs_cv_kernel_mkdir_return_dentry_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/mkdir_return_dentry || mkdir -p build/mkdir_return_dentry +cat confdefs.h - <<_ACEOF >build/mkdir_return_dentry/mkdir_return_dentry.c + +#include + + #include + + static struct dentry *mkdir(struct mnt_idmap *idmap, + struct inode *inode, struct dentry *dentry, + umode_t umode) { return dentry; } + static const struct inode_operations + iops __attribute__ ((unused)) = { + .mkdir = mkdir, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mkdir_return_dentry || mkdir -p build/mkdir_return_dentry + + file=build/mkdir_return_dentry/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mkdir_return_dentry + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mkdir_return_dentry.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mkdir_return_dentry/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/mkdir_return_dentry_license || mkdir -p build/mkdir_return_dentry_license +cat confdefs.h - <<_ACEOF >build/mkdir_return_dentry_license/mkdir_return_dentry_license.c + +#include + + #include + + static struct dentry *mkdir(struct mnt_idmap *idmap, + struct inode *inode, struct dentry *dentry, + umode_t umode) { return dentry; } + static const struct inode_operations + iops __attribute__ ((unused)) = { + .mkdir = mkdir, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mkdir_return_dentry_license || mkdir -p build/mkdir_return_dentry_license + + file=build/mkdir_return_dentry_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mkdir_return_dentry_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mkdir_return_dentry_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mkdir_return_dentry_license/" >>build/Makefile +fi + + +fi + +fi + + + cachevar="zfs_cv_kernel_mkdir_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mkdir_mnt_idmap || mkdir -p build/mkdir_mnt_idmap @@ -35409,14 +34620,12 @@ echo "obj-m := mkdir_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mkdir_mnt_idmap_license || mkdir -p build/mkdir_mnt_idmap_license @@ -35467,8 +34676,7 @@ echo "obj-m := mkdir_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_mnt_idmap_license/" >>build/Makefile fi @@ -35481,8 +34689,7 @@ cachevar="zfs_cv_kernel_mkdir_user_namespace_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mkdir_user_namespace || mkdir -p build/mkdir_user_namespace @@ -35534,14 +34741,12 @@ echo "obj-m := mkdir_user_namespace.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_user_namespace/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mkdir_user_namespace_license || mkdir -p build/mkdir_user_namespace_license @@ -35593,8 +34798,7 @@ echo "obj-m := mkdir_user_namespace_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_user_namespace_license/" >>build/Makefile fi @@ -35607,8 +34811,7 @@ cachevar="zfs_cv_kernel_inode_operations_mkdir_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_mkdir || mkdir -p build/inode_operations_mkdir @@ -35659,14 +34862,12 @@ echo "obj-m := inode_operations_mkdir.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_mkdir/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_mkdir_license || mkdir -p build/inode_operations_mkdir_license @@ -35717,8 +34918,7 @@ echo "obj-m := inode_operations_mkdir_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_mkdir_license/" >>build/Makefile fi @@ -35732,8 +34932,7 @@ cachevar="zfs_cv_kernel_lookup_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/lookup_flags || mkdir -p build/lookup_flags @@ -35785,14 +34984,12 @@ echo "obj-m := lookup_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/lookup_flags_license || mkdir -p build/lookup_flags_license @@ -35844,8 +35041,7 @@ echo "obj-m := lookup_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_flags_license/" >>build/Makefile fi @@ -35857,10 +35053,356 @@ + cachevar="zfs_cv_kernel_generic_permission_idmap_mntidmap_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/generic_permission_idmap_mntidmap || mkdir -p build/generic_permission_idmap_mntidmap +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_mntidmap/generic_permission_idmap_mntidmap.c + +#include + + #include + + +int +main (void) +{ + + struct mnt_idmap *idmap = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(idmap, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_mntidmap || mkdir -p build/generic_permission_idmap_mntidmap + + file=build/generic_permission_idmap_mntidmap/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_mntidmap + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_mntidmap.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_mntidmap/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/generic_permission_idmap_mntidmap_license || mkdir -p build/generic_permission_idmap_mntidmap_license +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_mntidmap_license/generic_permission_idmap_mntidmap_license.c + +#include + + #include + + +int +main (void) +{ + + struct mnt_idmap *idmap = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(idmap, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_mntidmap_license || mkdir -p build/generic_permission_idmap_mntidmap_license + + file=build/generic_permission_idmap_mntidmap_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_mntidmap_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_mntidmap_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_mntidmap_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_generic_permission_idmap_userns_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/generic_permission_idmap_userns || mkdir -p build/generic_permission_idmap_userns +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_userns/generic_permission_idmap_userns.c + +#include + + #include + + +int +main (void) +{ + + struct user_namespace *userns = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(userns, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_userns || mkdir -p build/generic_permission_idmap_userns + + file=build/generic_permission_idmap_userns/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_userns + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_userns.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_userns/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/generic_permission_idmap_userns_license || mkdir -p build/generic_permission_idmap_userns_license +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_userns_license/generic_permission_idmap_userns_license.c + +#include + + #include + + +int +main (void) +{ + + struct user_namespace *userns = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(userns, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_userns_license || mkdir -p build/generic_permission_idmap_userns_license + + file=build/generic_permission_idmap_userns_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_userns_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_userns_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_userns_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_generic_permission_idmap_none_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/generic_permission_idmap_none || mkdir -p build/generic_permission_idmap_none +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_none/generic_permission_idmap_none.c + +#include + + #include + + +int +main (void) +{ + + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_none || mkdir -p build/generic_permission_idmap_none + + file=build/generic_permission_idmap_none/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_none + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_none.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_none/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/generic_permission_idmap_none_license || mkdir -p build/generic_permission_idmap_none_license +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_none_license/generic_permission_idmap_none_license.c + +#include + + #include + + +int +main (void) +{ + + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_none_license || mkdir -p build/generic_permission_idmap_none_license + + file=build/generic_permission_idmap_none_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_none_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_none_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_none_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_create_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/create_mnt_idmap || mkdir -p build/create_mnt_idmap @@ -35913,14 +35455,12 @@ echo "obj-m := create_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/create_mnt_idmap_license || mkdir -p build/create_mnt_idmap_license @@ -35973,8 +35513,7 @@ echo "obj-m := create_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_mnt_idmap_license/" >>build/Makefile fi @@ -35987,8 +35526,7 @@ cachevar="zfs_cv_kernel_create_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/create_userns || mkdir -p build/create_userns @@ -36041,14 +35579,12 @@ echo "obj-m := create_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/create_userns_license || mkdir -p build/create_userns_license @@ -36101,8 +35637,7 @@ echo "obj-m := create_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_userns_license/" >>build/Makefile fi @@ -36115,8 +35650,7 @@ cachevar="zfs_cv_kernel_create_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/create_flags || mkdir -p build/create_flags @@ -36168,14 +35702,12 @@ echo "obj-m := create_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/create_flags_license || mkdir -p build/create_flags_license @@ -36227,8 +35759,7 @@ echo "obj-m := create_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_flags_license/" >>build/Makefile fi @@ -36242,8 +35773,7 @@ cachevar="zfs_cv_kernel_permission_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/permission_mnt_idmap || mkdir -p build/permission_mnt_idmap @@ -36295,14 +35825,12 @@ echo "obj-m := permission_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/permission_mnt_idmap_license || mkdir -p build/permission_mnt_idmap_license @@ -36354,8 +35882,7 @@ echo "obj-m := permission_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_mnt_idmap_license/" >>build/Makefile fi @@ -36368,8 +35895,7 @@ cachevar="zfs_cv_kernel_permission_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/permission_userns || mkdir -p build/permission_userns @@ -36421,14 +35947,12 @@ echo "obj-m := permission_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/permission_userns_license || mkdir -p build/permission_userns_license @@ -36480,8 +36004,7 @@ echo "obj-m := permission_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_userns_license/" >>build/Makefile fi @@ -36495,8 +36018,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile_mnt_idmap || mkdir -p build/inode_operations_tmpfile_mnt_idmap @@ -36546,14 +36068,12 @@ echo "obj-m := inode_operations_tmpfile_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_mnt_idmap_license || mkdir -p build/inode_operations_tmpfile_mnt_idmap_license @@ -36603,8 +36123,7 @@ echo "obj-m := inode_operations_tmpfile_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_mnt_idmap_license/" >>build/Makefile fi @@ -36616,8 +36135,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile || mkdir -p build/inode_operations_tmpfile @@ -36667,14 +36185,12 @@ echo "obj-m := inode_operations_tmpfile.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_license || mkdir -p build/inode_operations_tmpfile_license @@ -36724,8 +36240,7 @@ echo "obj-m := inode_operations_tmpfile_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_license/" >>build/Makefile fi @@ -36737,8 +36252,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile_dentry_userns || mkdir -p build/inode_operations_tmpfile_dentry_userns @@ -36788,14 +36302,12 @@ echo "obj-m := inode_operations_tmpfile_dentry_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_dentry_userns_license || mkdir -p build/inode_operations_tmpfile_dentry_userns_license @@ -36845,8 +36357,7 @@ echo "obj-m := inode_operations_tmpfile_dentry_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry_userns_license/" >>build/Makefile fi @@ -36858,8 +36369,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile_dentry || mkdir -p build/inode_operations_tmpfile_dentry @@ -36908,14 +36418,12 @@ echo "obj-m := inode_operations_tmpfile_dentry.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_dentry_license || mkdir -p build/inode_operations_tmpfile_dentry_license @@ -36964,8 +36472,7 @@ echo "obj-m := inode_operations_tmpfile_dentry_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry_license/" >>build/Makefile fi @@ -36980,8 +36487,7 @@ cachevar="zfs_cv_kernel_dentry_operations_d_automount_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/dentry_operations_d_automount || mkdir -p build/dentry_operations_d_automount @@ -37028,14 +36534,12 @@ echo "obj-m := dentry_operations_d_automount.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_automount/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/dentry_operations_d_automount_license || mkdir -p build/dentry_operations_d_automount_license @@ -37082,8 +36586,7 @@ echo "obj-m := dentry_operations_d_automount_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_automount_license/" >>build/Makefile fi @@ -37097,8 +36600,7 @@ cachevar="zfs_cv_kernel_dentry_operations_d_revalidate_4args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/dentry_operations_d_revalidate_4args || mkdir -p build/dentry_operations_d_revalidate_4args @@ -37147,14 +36649,12 @@ echo "obj-m := dentry_operations_d_revalidate_4args.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_revalidate_4args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/dentry_operations_d_revalidate_4args_license || mkdir -p build/dentry_operations_d_revalidate_4args_license @@ -37203,8 +36703,7 @@ echo "obj-m := dentry_operations_d_revalidate_4args_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_revalidate_4args_license/" >>build/Makefile fi @@ -37219,8 +36718,7 @@ cachevar="zfs_cv_kernel_export_operations_commit_metadata_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/export_operations_commit_metadata || mkdir -p build/export_operations_commit_metadata @@ -37267,14 +36765,12 @@ echo "obj-m := export_operations_commit_metadata.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += export_operations_commit_metadata/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/export_operations_commit_metadata_license || mkdir -p build/export_operations_commit_metadata_license @@ -37321,8 +36817,7 @@ echo "obj-m := export_operations_commit_metadata_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += export_operations_commit_metadata_license/" >>build/Makefile fi @@ -37336,8 +36831,7 @@ cachevar="zfs_cv_kernel_setattr_prepare_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/setattr_prepare || mkdir -p build/setattr_prepare @@ -37385,14 +36879,12 @@ echo "obj-m := setattr_prepare.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/setattr_prepare_license || mkdir -p build/setattr_prepare_license @@ -37440,8 +36932,7 @@ echo "obj-m := setattr_prepare_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_license/" >>build/Makefile fi @@ -37454,8 +36945,7 @@ cachevar="zfs_cv_kernel_setattr_prepare_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/setattr_prepare_userns || mkdir -p build/setattr_prepare_userns @@ -37504,14 +36994,12 @@ echo "obj-m := setattr_prepare_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/setattr_prepare_userns_license || mkdir -p build/setattr_prepare_userns_license @@ -37560,8 +37048,7 @@ echo "obj-m := setattr_prepare_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_userns_license/" >>build/Makefile fi @@ -37574,8 +37061,7 @@ cachevar="zfs_cv_kernel_setattr_prepare_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/setattr_prepare_mnt_idmap || mkdir -p build/setattr_prepare_mnt_idmap @@ -37624,14 +37110,12 @@ echo "obj-m := setattr_prepare_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/setattr_prepare_mnt_idmap_license || mkdir -p build/setattr_prepare_mnt_idmap_license @@ -37680,8 +37164,7 @@ echo "obj-m := setattr_prepare_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_mnt_idmap_license/" >>build/Makefile fi @@ -37695,8 +37178,7 @@ cachevar="zfs_cv_kernel_insert_inode_locked_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/insert_inode_locked || mkdir -p build/insert_inode_locked @@ -37741,14 +37223,12 @@ echo "obj-m := insert_inode_locked.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += insert_inode_locked/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/insert_inode_locked_license || mkdir -p build/insert_inode_locked_license @@ -37793,8 +37273,7 @@ echo "obj-m := insert_inode_locked_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += insert_inode_locked_license/" >>build/Makefile fi @@ -37806,10 +37285,461 @@ + + cachevar="zfs_cv_kernel_d_obtain_alias_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/d_obtain_alias || mkdir -p build/d_obtain_alias +cat confdefs.h - <<_ACEOF >build/d_obtain_alias/d_obtain_alias.c + +#include + + #include + + +int +main (void) +{ + + d_obtain_alias(NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_obtain_alias || mkdir -p build/d_obtain_alias + + file=build/d_obtain_alias/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_obtain_alias + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_obtain_alias.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_obtain_alias/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/d_obtain_alias_license || mkdir -p build/d_obtain_alias_license +cat confdefs.h - <<_ACEOF >build/d_obtain_alias_license/d_obtain_alias_license.c + +#include + + #include + + +int +main (void) +{ + + d_obtain_alias(NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_obtain_alias_license || mkdir -p build/d_obtain_alias_license + + file=build/d_obtain_alias_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_obtain_alias_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_obtain_alias_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_obtain_alias_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_d_set_d_op_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/d_set_d_op || mkdir -p build/d_set_d_op +cat confdefs.h - <<_ACEOF >build/d_set_d_op/d_set_d_op.c + +#include + + #include + + +int +main (void) +{ + + d_set_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_set_d_op || mkdir -p build/d_set_d_op + + file=build/d_set_d_op/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_set_d_op + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_set_d_op.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_set_d_op/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/d_set_d_op_license || mkdir -p build/d_set_d_op_license +cat confdefs.h - <<_ACEOF >build/d_set_d_op_license/d_set_d_op_license.c + +#include + + #include + + +int +main (void) +{ + + d_set_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_set_d_op_license || mkdir -p build/d_set_d_op_license + + file=build/d_set_d_op_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_set_d_op_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_set_d_op_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_set_d_op_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_set_default_d_op_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/set_default_d_op || mkdir -p build/set_default_d_op +cat confdefs.h - <<_ACEOF >build/set_default_d_op/set_default_d_op.c + +#include + + #include + + +int +main (void) +{ + + set_default_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/set_default_d_op || mkdir -p build/set_default_d_op + + file=build/set_default_d_op/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_default_d_op + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := set_default_d_op.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += set_default_d_op/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/set_default_d_op_license || mkdir -p build/set_default_d_op_license +cat confdefs.h - <<_ACEOF >build/set_default_d_op_license/set_default_d_op_license.c + +#include + + #include + + +int +main (void) +{ + + set_default_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/set_default_d_op_license || mkdir -p build/set_default_d_op_license + + file=build/set_default_d_op_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_default_d_op_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := set_default_d_op_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += set_default_d_op_license/" >>build/Makefile +fi + + +fi + +fi + + + + + + cachevar="zfs_cv_kernel_dentry_alias_d_u_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/dentry_alias_d_u || mkdir -p build/dentry_alias_d_u +cat confdefs.h - <<_ACEOF >build/dentry_alias_d_u/dentry_alias_d_u.c + +#include + + #include + #include + #include + + +int +main (void) +{ + + struct inode *inode __attribute__ ((unused)) = NULL; + struct dentry *dentry __attribute__ ((unused)) = NULL; + hlist_for_each_entry(dentry, &inode->i_dentry, + d_u.d_alias) { + d_drop(dentry); + } + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/dentry_alias_d_u || mkdir -p build/dentry_alias_d_u + + file=build/dentry_alias_d_u/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/dentry_alias_d_u + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := dentry_alias_d_u.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += dentry_alias_d_u/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/dentry_alias_d_u_license || mkdir -p build/dentry_alias_d_u_license +cat confdefs.h - <<_ACEOF >build/dentry_alias_d_u_license/dentry_alias_d_u_license.c + +#include + + #include + #include + #include + + +int +main (void) +{ + + struct inode *inode __attribute__ ((unused)) = NULL; + struct dentry *dentry __attribute__ ((unused)) = NULL; + hlist_for_each_entry(dentry, &inode->i_dentry, + d_u.d_alias) { + d_drop(dentry); + } + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/dentry_alias_d_u_license || mkdir -p build/dentry_alias_d_u_license + + file=build/dentry_alias_d_u_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/dentry_alias_d_u_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := dentry_alias_d_u_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += dentry_alias_d_u_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_truncate_setsize_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/truncate_setsize || mkdir -p build/truncate_setsize @@ -37854,14 +37784,12 @@ echo "obj-m := truncate_setsize.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += truncate_setsize/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/truncate_setsize_license || mkdir -p build/truncate_setsize_license @@ -37906,8 +37834,7 @@ echo "obj-m := truncate_setsize_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += truncate_setsize_license/" >>build/Makefile fi @@ -37922,8 +37849,7 @@ cachevar="zfs_cv_kernel_security_inode_init_security_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/security_inode_init_security || mkdir -p build/security_inode_init_security @@ -37973,14 +37899,12 @@ echo "obj-m := security_inode_init_security.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += security_inode_init_security/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/security_inode_init_security_license || mkdir -p build/security_inode_init_security_license @@ -38030,8 +37954,7 @@ echo "obj-m := security_inode_init_security_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += security_inode_init_security_license/" >>build/Makefile fi @@ -38044,35 +37967,81 @@ - cachevar="zfs_cv_kernel_file_system_type_mount_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_fs_context_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/file_system_type_mount || mkdir -p build/file_system_type_mount -cat confdefs.h - <<_ACEOF >build/file_system_type_mount/file_system_type_mount.c +test -d build/fs_context || mkdir -p build/fs_context +cat confdefs.h - <<_ACEOF >build/fs_context/fs_context.c #include - #include + #include + #include + + +int +main (void) +{ + + static struct fs_context fs __attribute__ ((unused)) = { 0 }; + static struct fs_context *fsp __attribute__ ((unused)); + fsp = vfs_dup_fs_context(&fs); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/fs_context || mkdir -p build/fs_context + + file=build/fs_context/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_context + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := fs_context.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += fs_context/" >>build/Makefile +fi + + + if test -n "" ; then : + - static struct dentry * - mount(struct file_system_type *fs_type, int flags, - const char *osname, void *data) { - struct dentry *d = NULL; - return (d); - } +test -d build/fs_context_license || mkdir -p build/fs_context_license +cat confdefs.h - <<_ACEOF >build/fs_context_license/fs_context_license.c - static struct file_system_type fst __attribute__ ((unused)) = { - .mount = mount, - }; +#include + + #include + #include int main (void) { + static struct fs_context fs __attribute__ ((unused)) = { 0 }; + static struct fs_context *fsp __attribute__ ((unused)); + fsp = vfs_dup_fs_context(&fs); + ; return 0; } @@ -38080,60 +38049,124 @@ MODULE_DESCRIPTION("conftest"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE("Dual BSD/GPL"); +MODULE_LICENSE(); _ACEOF test -d build || mkdir -p build - test -d build/file_system_type_mount || mkdir -p build/file_system_type_mount + test -d build/fs_context_license || mkdir -p build/fs_context_license - file=build/file_system_type_mount/Makefile + file=build/fs_context_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/file_system_type_mount +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_context_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := file_system_type_mount.o" >>$file + echo "obj-m := fs_context_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += fs_context_license/" >>build/Makefile +fi + + +fi - if test "xyes" = "xyes" -then : - echo "obj-m += file_system_type_mount/" >>build/Makefile fi - if test -n "" -then : -test -d build/file_system_type_mount_license || mkdir -p build/file_system_type_mount_license -cat confdefs.h - <<_ACEOF >build/file_system_type_mount_license/file_system_type_mount_license.c + cachevar="zfs_cv_kernel_fs_parse_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/fs_parse || mkdir -p build/fs_parse +cat confdefs.h - <<_ACEOF >build/fs_parse/fs_parse.c #include - #include + #include + #include + + +int +main (void) +{ + + static const struct fs_parameter_spec specs[] = { + {} + }; + int test __attribute__ ((unused)); + struct fs_context *fc __attribute__ ((unused)) = NULL; + struct fs_parameter param __attribute__ ((unused)); + struct fs_parse_result result __attribute__ ((unused)); + test = fs_parse(fc, specs, ¶m, &result); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/fs_parse || mkdir -p build/fs_parse + + file=build/fs_parse/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_parse + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF - static struct dentry * - mount(struct file_system_type *fs_type, int flags, - const char *osname, void *data) { - struct dentry *d = NULL; - return (d); - } - static struct file_system_type fst __attribute__ ((unused)) = { - .mount = mount, - }; + + echo "obj-m := fs_parse.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += fs_parse/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/fs_parse_license || mkdir -p build/fs_parse_license +cat confdefs.h - <<_ACEOF >build/fs_parse_license/fs_parse_license.c + +#include + + #include + #include int main (void) { + static const struct fs_parameter_spec specs[] = { + {} + }; + int test __attribute__ ((unused)); + struct fs_context *fc __attribute__ ((unused)) = NULL; + struct fs_parameter param __attribute__ ((unused)); + struct fs_parse_result result __attribute__ ((unused)); + test = fs_parse(fc, specs, ¶m, &result); + ; return 0; } @@ -38147,24 +38180,23 @@ test -d build || mkdir -p build - test -d build/file_system_type_mount_license || mkdir -p build/file_system_type_mount_license + test -d build/fs_parse_license || mkdir -p build/fs_parse_license - file=build/file_system_type_mount_license/Makefile + file=build/fs_parse_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/file_system_type_mount_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_parse_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := file_system_type_mount_license.o" >>$file + echo "obj-m := fs_parse_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += file_system_type_mount_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += fs_parse_license/" >>build/Makefile fi @@ -38175,25 +38207,25 @@ - cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_vfs_parse_fs_string_3args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/sb_dying || mkdir -p build/sb_dying -cat confdefs.h - <<_ACEOF >build/sb_dying/sb_dying.c +test -d build/vfs_parse_fs_string_3args || mkdir -p build/vfs_parse_fs_string_3args +cat confdefs.h - <<_ACEOF >build/vfs_parse_fs_string_3args/vfs_parse_fs_string_3args.c #include #include + #include int main (void) { - (void) SB_DYING; + vfs_parse_fs_string(NULL, NULL, NULL); ; return 0; @@ -38208,44 +38240,43 @@ test -d build || mkdir -p build - test -d build/sb_dying || mkdir -p build/sb_dying + test -d build/vfs_parse_fs_string_3args || mkdir -p build/vfs_parse_fs_string_3args - file=build/sb_dying/Makefile + file=build/vfs_parse_fs_string_3args/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_parse_fs_string_3args ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sb_dying.o" >>$file + echo "obj-m := vfs_parse_fs_string_3args.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sb_dying/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_parse_fs_string_3args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : -test -d build/sb_dying_license || mkdir -p build/sb_dying_license -cat confdefs.h - <<_ACEOF >build/sb_dying_license/sb_dying_license.c +test -d build/vfs_parse_fs_string_3args_license || mkdir -p build/vfs_parse_fs_string_3args_license +cat confdefs.h - <<_ACEOF >build/vfs_parse_fs_string_3args_license/vfs_parse_fs_string_3args_license.c #include #include + #include int main (void) { - (void) SB_DYING; + vfs_parse_fs_string(NULL, NULL, NULL); ; return 0; @@ -38260,24 +38291,23 @@ test -d build || mkdir -p build - test -d build/sb_dying_license || mkdir -p build/sb_dying_license + test -d build/vfs_parse_fs_string_3args_license || mkdir -p build/vfs_parse_fs_string_3args_license - file=build/sb_dying_license/Makefile + file=build/vfs_parse_fs_string_3args_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_parse_fs_string_3args_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sb_dying_license.o" >>$file + echo "obj-m := vfs_parse_fs_string_3args_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sb_dying_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_parse_fs_string_3args_license/" >>build/Makefile fi @@ -38288,14 +38318,13 @@ - cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/set_nlink || mkdir -p build/set_nlink -cat confdefs.h - <<_ACEOF >build/set_nlink/set_nlink.c +test -d build/sb_dying || mkdir -p build/sb_dying +cat confdefs.h - <<_ACEOF >build/sb_dying/sb_dying.c #include @@ -38306,9 +38335,7 @@ main (void) { - struct inode node; - unsigned int link = 0; - (void) set_nlink(&node, link); + (void) SB_DYING; ; return 0; @@ -38323,33 +38350,31 @@ test -d build || mkdir -p build - test -d build/set_nlink || mkdir -p build/set_nlink + test -d build/sb_dying || mkdir -p build/sb_dying - file=build/set_nlink/Makefile + file=build/sb_dying/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := set_nlink.o" >>$file + echo "obj-m := sb_dying.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += set_nlink/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += sb_dying/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : -test -d build/set_nlink_license || mkdir -p build/set_nlink_license -cat confdefs.h - <<_ACEOF >build/set_nlink_license/set_nlink_license.c +test -d build/sb_dying_license || mkdir -p build/sb_dying_license +cat confdefs.h - <<_ACEOF >build/sb_dying_license/sb_dying_license.c #include @@ -38360,9 +38385,7 @@ main (void) { - struct inode node; - unsigned int link = 0; - (void) set_nlink(&node, link); + (void) SB_DYING; ; return 0; @@ -38377,24 +38400,23 @@ test -d build || mkdir -p build - test -d build/set_nlink_license || mkdir -p build/set_nlink_license + test -d build/sb_dying_license || mkdir -p build/sb_dying_license - file=build/set_nlink_license/Makefile + file=build/sb_dying_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := set_nlink_license.o" >>$file + echo "obj-m := sb_dying_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += set_nlink_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += sb_dying_license/" >>build/Makefile fi @@ -38405,14 +38427,13 @@ - cachevar="zfs_cv_kernel_sget_5args_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/sget_5args || mkdir -p build/sget_5args -cat confdefs.h - <<_ACEOF >build/sget_5args/sget_5args.c +test -d build/set_nlink || mkdir -p build/set_nlink +cat confdefs.h - <<_ACEOF >build/set_nlink/set_nlink.c #include @@ -38423,12 +38444,9 @@ main (void) { - struct file_system_type *type = NULL; - int (*test)(struct super_block *,void *) = NULL; - int (*set)(struct super_block *,void *) = NULL; - int flags = 0; - void *data = NULL; - (void) sget(type, test, set, flags, data); + struct inode node; + unsigned int link = 0; + (void) set_nlink(&node, link); ; return 0; @@ -38443,33 +38461,31 @@ test -d build || mkdir -p build - test -d build/sget_5args || mkdir -p build/sget_5args + test -d build/set_nlink || mkdir -p build/set_nlink - file=build/sget_5args/Makefile + file=build/set_nlink/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sget_5args +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sget_5args.o" >>$file + echo "obj-m := set_nlink.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sget_5args/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += set_nlink/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : -test -d build/sget_5args_license || mkdir -p build/sget_5args_license -cat confdefs.h - <<_ACEOF >build/sget_5args_license/sget_5args_license.c +test -d build/set_nlink_license || mkdir -p build/set_nlink_license +cat confdefs.h - <<_ACEOF >build/set_nlink_license/set_nlink_license.c #include @@ -38480,12 +38496,9 @@ main (void) { - struct file_system_type *type = NULL; - int (*test)(struct super_block *,void *) = NULL; - int (*set)(struct super_block *,void *) = NULL; - int flags = 0; - void *data = NULL; - (void) sget(type, test, set, flags, data); + struct inode node; + unsigned int link = 0; + (void) set_nlink(&node, link); ; return 0; @@ -38500,24 +38513,23 @@ test -d build || mkdir -p build - test -d build/sget_5args_license || mkdir -p build/sget_5args_license + test -d build/set_nlink_license || mkdir -p build/set_nlink_license - file=build/sget_5args_license/Makefile + file=build/set_nlink_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sget_5args_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sget_5args_license.o" >>$file + echo "obj-m := set_nlink_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sget_5args_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += set_nlink_license/" >>build/Makefile fi @@ -38530,8 +38542,7 @@ cachevar="zfs_cv_kernel_vfs_has_filemap_dirty_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_filemap_dirty_folio || mkdir -p build/vfs_has_filemap_dirty_folio @@ -38580,14 +38591,12 @@ echo "obj-m := vfs_has_filemap_dirty_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_filemap_dirty_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_filemap_dirty_folio_license || mkdir -p build/vfs_has_filemap_dirty_folio_license @@ -38636,8 +38645,7 @@ echo "obj-m := vfs_has_filemap_dirty_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_filemap_dirty_folio_license/" >>build/Makefile fi @@ -38651,8 +38659,7 @@ cachevar="zfs_cv_kernel_vfs_has_read_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_read_folio || mkdir -p build/vfs_has_read_folio @@ -38706,14 +38713,12 @@ echo "obj-m := vfs_has_read_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_read_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_read_folio_license || mkdir -p build/vfs_has_read_folio_license @@ -38767,8 +38772,7 @@ echo "obj-m := vfs_has_read_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_read_folio_license/" >>build/Makefile fi @@ -38782,8 +38786,7 @@ cachevar="zfs_cv_kernel_vfs_has_migrate_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_migrate_folio || mkdir -p build/vfs_has_migrate_folio @@ -38832,14 +38835,12 @@ echo "obj-m := vfs_has_migrate_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migrate_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_migrate_folio_license || mkdir -p build/vfs_has_migrate_folio_license @@ -38888,8 +38889,7 @@ echo "obj-m := vfs_has_migrate_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migrate_folio_license/" >>build/Makefile fi @@ -38903,8 +38903,7 @@ cachevar="zfs_cv_kernel_vfs_has_migratepage_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_migratepage || mkdir -p build/vfs_has_migratepage @@ -38953,14 +38952,12 @@ echo "obj-m := vfs_has_migratepage.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migratepage/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_migratepage_license || mkdir -p build/vfs_has_migratepage_license @@ -39009,8 +39006,7 @@ echo "obj-m := vfs_has_migratepage_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migratepage_license/" >>build/Makefile fi @@ -39024,8 +39020,7 @@ cachevar="zfs_cv_kernel_vfs_fsync_2args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_fsync_2args || mkdir -p build/vfs_fsync_2args @@ -39070,14 +39065,12 @@ echo "obj-m := vfs_fsync_2args.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_fsync_2args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_fsync_2args_license || mkdir -p build/vfs_fsync_2args_license @@ -39122,8 +39115,7 @@ echo "obj-m := vfs_fsync_2args_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_fsync_2args_license/" >>build/Makefile fi @@ -39137,8 +39129,7 @@ cachevar="zfs_cv_kernel_vfs_has_readpages_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_readpages || mkdir -p build/vfs_has_readpages @@ -39186,14 +39177,12 @@ echo "obj-m := vfs_has_readpages.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_readpages/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_readpages_license || mkdir -p build/vfs_has_readpages_license @@ -39241,8 +39230,7 @@ echo "obj-m := vfs_has_readpages_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_readpages_license/" >>build/Makefile fi @@ -39254,10 +39242,124 @@ + cachevar="zfs_cv_kernel_vfs_has_writepage_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/vfs_has_writepage || mkdir -p build/vfs_has_writepage +cat confdefs.h - <<_ACEOF >build/vfs_has_writepage/vfs_has_writepage.c + +#include + + #include + + static const struct address_space_operations + aops __attribute__ ((unused)) = { + .writepage = NULL, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/vfs_has_writepage || mkdir -p build/vfs_has_writepage + + file=build/vfs_has_writepage/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_has_writepage + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := vfs_has_writepage.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_has_writepage/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/vfs_has_writepage_license || mkdir -p build/vfs_has_writepage_license +cat confdefs.h - <<_ACEOF >build/vfs_has_writepage_license/vfs_has_writepage_license.c + +#include + + #include + + static const struct address_space_operations + aops __attribute__ ((unused)) = { + .writepage = NULL, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/vfs_has_writepage_license || mkdir -p build/vfs_has_writepage_license + + file=build/vfs_has_writepage_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_has_writepage_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := vfs_has_writepage_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_has_writepage_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_vfs_has_set_page_dirty_nobuffers_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_set_page_dirty_nobuffers || mkdir -p build/vfs_has_set_page_dirty_nobuffers @@ -39306,14 +39408,12 @@ echo "obj-m := vfs_has_set_page_dirty_nobuffers.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_set_page_dirty_nobuffers/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_set_page_dirty_nobuffers_license || mkdir -p build/vfs_has_set_page_dirty_nobuffers_license @@ -39362,8 +39462,7 @@ echo "obj-m := vfs_has_set_page_dirty_nobuffers_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_set_page_dirty_nobuffers_license/" >>build/Makefile fi @@ -39377,8 +39476,7 @@ cachevar="zfs_cv_kernel_fault_in_iov_iter_readable_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/fault_in_iov_iter_readable || mkdir -p build/fault_in_iov_iter_readable @@ -39428,14 +39526,12 @@ echo "obj-m := fault_in_iov_iter_readable.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fault_in_iov_iter_readable/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/fault_in_iov_iter_readable_license || mkdir -p build/fault_in_iov_iter_readable_license @@ -39485,8 +39581,7 @@ echo "obj-m := fault_in_iov_iter_readable_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fault_in_iov_iter_readable_license/" >>build/Makefile fi @@ -39499,8 +39594,7 @@ cachevar="zfs_cv_kernel_iov_iter_type_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iov_iter_type || mkdir -p build/iov_iter_type @@ -39547,14 +39641,12 @@ echo "obj-m := iov_iter_type.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_type/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iov_iter_type_license || mkdir -p build/iov_iter_type_license @@ -39601,8 +39693,7 @@ echo "obj-m := iov_iter_type_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_type_license/" >>build/Makefile fi @@ -39615,8 +39706,7 @@ cachevar="zfs_cv_kernel_iov_iter_get_pages2_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iov_iter_get_pages2 || mkdir -p build/iov_iter_get_pages2 @@ -39669,14 +39759,12 @@ echo "obj-m := iov_iter_get_pages2.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_get_pages2/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iov_iter_get_pages2_license || mkdir -p build/iov_iter_get_pages2_license @@ -39729,8 +39817,7 @@ echo "obj-m := iov_iter_get_pages2_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_get_pages2_license/" >>build/Makefile fi @@ -39743,8 +39830,7 @@ cachevar="zfs_cv_kernel_iter_is_ubuf_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iter_is_ubuf || mkdir -p build/iter_is_ubuf @@ -39792,14 +39878,12 @@ echo "obj-m := iter_is_ubuf.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_is_ubuf/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iter_is_ubuf_license || mkdir -p build/iter_is_ubuf_license @@ -39847,8 +39931,7 @@ echo "obj-m := iter_is_ubuf_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_is_ubuf_license/" >>build/Makefile fi @@ -39861,8 +39944,7 @@ cachevar="zfs_cv_kernel_iter_iov_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iter_iov || mkdir -p build/iter_iov @@ -39909,14 +39991,12 @@ echo "obj-m := iter_iov.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_iov/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iter_iov_license || mkdir -p build/iter_iov_license @@ -39963,8 +40043,7 @@ echo "obj-m := iter_iov_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_iov_license/" >>build/Makefile fi @@ -39978,8 +40057,7 @@ cachevar="zfs_cv_kernel_generic_copy_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_copy_file_range || mkdir -p build/generic_copy_file_range @@ -40031,14 +40109,12 @@ echo "obj-m := generic_copy_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_copy_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_copy_file_range_license || mkdir -p build/generic_copy_file_range_license @@ -40090,8 +40166,7 @@ echo "obj-m := generic_copy_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_copy_file_range_license/" >>build/Makefile fi @@ -40105,8 +40180,7 @@ cachevar="zfs_cv_kernel_splice_copy_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/splice_copy_file_range || mkdir -p build/splice_copy_file_range @@ -40157,14 +40231,12 @@ echo "obj-m := splice_copy_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += splice_copy_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/splice_copy_file_range_license || mkdir -p build/splice_copy_file_range_license @@ -40215,8 +40287,7 @@ echo "obj-m := splice_copy_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += splice_copy_file_range_license/" >>build/Makefile fi @@ -40230,8 +40301,7 @@ cachevar="zfs_cv_kernel_vfs_remap_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_remap_file_range || mkdir -p build/vfs_remap_file_range @@ -40288,14 +40358,12 @@ echo "obj-m := vfs_remap_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_remap_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_remap_file_range_license || mkdir -p build/vfs_remap_file_range_license @@ -40352,8 +40420,7 @@ echo "obj-m := vfs_remap_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_remap_file_range_license/" >>build/Makefile fi @@ -40367,8 +40434,7 @@ cachevar="zfs_cv_kernel_vfs_clone_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_clone_file_range || mkdir -p build/vfs_clone_file_range @@ -40425,14 +40491,12 @@ echo "obj-m := vfs_clone_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_clone_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_clone_file_range_license || mkdir -p build/vfs_clone_file_range_license @@ -40489,8 +40553,7 @@ echo "obj-m := vfs_clone_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_clone_file_range_license/" >>build/Makefile fi @@ -40504,8 +40567,7 @@ cachevar="zfs_cv_kernel_vfs_dedupe_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_dedupe_file_range || mkdir -p build/vfs_dedupe_file_range @@ -40562,14 +40624,12 @@ echo "obj-m := vfs_dedupe_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_dedupe_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_dedupe_file_range_license || mkdir -p build/vfs_dedupe_file_range_license @@ -40626,8 +40686,7 @@ echo "obj-m := vfs_dedupe_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_dedupe_file_range_license/" >>build/Makefile fi @@ -40641,8 +40700,7 @@ cachevar="zfs_cv_kernel_kmap_atomic_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kmap_atomic || mkdir -p build/kmap_atomic @@ -40657,7 +40715,7 @@ main (void) { - struct page page; + struct page page = {}; kmap_atomic(&page); ; @@ -40688,14 +40746,12 @@ echo "obj-m := kmap_atomic.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_atomic/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kmap_atomic_license || mkdir -p build/kmap_atomic_license @@ -40710,7 +40766,7 @@ main (void) { - struct page page; + struct page page = {}; kmap_atomic(&page); ; @@ -40741,8 +40797,7 @@ echo "obj-m := kmap_atomic_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_atomic_license/" >>build/Makefile fi @@ -40756,8 +40811,7 @@ cachevar="zfs_cv_kernel_kmap_local_page_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kmap_local_page || mkdir -p build/kmap_local_page @@ -40803,14 +40857,12 @@ echo "obj-m := kmap_local_page.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_local_page/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kmap_local_page_license || mkdir -p build/kmap_local_page_license @@ -40856,8 +40908,7 @@ echo "obj-m := kmap_local_page_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_local_page_license/" >>build/Makefile fi @@ -40869,10 +40920,10 @@ + cachevar="zfs_cv_kernel_follow_down_one_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/follow_down_one || mkdir -p build/follow_down_one @@ -40918,14 +40969,12 @@ echo "obj-m := follow_down_one.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += follow_down_one/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/follow_down_one_license || mkdir -p build/follow_down_one_license @@ -40971,8 +41020,7 @@ echo "obj-m := follow_down_one_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += follow_down_one_license/" >>build/Makefile fi @@ -40984,10 +41032,121 @@ + cachevar="zfs_cv_kernel_follow_down_flags_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/follow_down_flags || mkdir -p build/follow_down_flags +cat confdefs.h - <<_ACEOF >build/follow_down_flags/follow_down_flags.c + +#include + + #include + + +int +main (void) +{ + + struct path *p = NULL; + follow_down(p, 0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/follow_down_flags || mkdir -p build/follow_down_flags + + file=build/follow_down_flags/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/follow_down_flags + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := follow_down_flags.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += follow_down_flags/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/follow_down_flags_license || mkdir -p build/follow_down_flags_license +cat confdefs.h - <<_ACEOF >build/follow_down_flags_license/follow_down_flags_license.c + +#include + + #include + + +int +main (void) +{ + + struct path *p = NULL; + follow_down(p, 0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/follow_down_flags_license || mkdir -p build/follow_down_flags_license + + file=build/follow_down_flags_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/follow_down_flags_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := follow_down_flags_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += follow_down_flags_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_make_request_fn_blk_qc_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/make_request_fn_blk_qc_t || mkdir -p build/make_request_fn_blk_qc_t @@ -41034,14 +41193,12 @@ echo "obj-m := make_request_fn_blk_qc_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += make_request_fn_blk_qc_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/make_request_fn_blk_qc_t_license || mkdir -p build/make_request_fn_blk_qc_t_license @@ -41088,8 +41245,7 @@ echo "obj-m := make_request_fn_blk_qc_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += make_request_fn_blk_qc_t_license/" >>build/Makefile fi @@ -41102,8 +41258,7 @@ cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_queue_request_fn || mkdir -p build/blk_alloc_queue_request_fn @@ -41151,14 +41306,12 @@ echo "obj-m := blk_alloc_queue_request_fn.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_queue_request_fn_license || mkdir -p build/blk_alloc_queue_request_fn_license @@ -41206,8 +41359,7 @@ echo "obj-m := blk_alloc_queue_request_fn_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn_license/" >>build/Makefile fi @@ -41220,8 +41372,7 @@ cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_rh_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_queue_request_fn_rh || mkdir -p build/blk_alloc_queue_request_fn_rh @@ -41269,14 +41420,12 @@ echo "obj-m := blk_alloc_queue_request_fn_rh.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn_rh/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_queue_request_fn_rh_license || mkdir -p build/blk_alloc_queue_request_fn_rh_license @@ -41324,8 +41473,7 @@ echo "obj-m := blk_alloc_queue_request_fn_rh_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn_rh_license/" >>build/Makefile fi @@ -41338,8 +41486,7 @@ cachevar="zfs_cv_kernel_block_device_operations_submit_bio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_submit_bio || mkdir -p build/block_device_operations_submit_bio @@ -41385,14 +41532,12 @@ echo "obj-m := block_device_operations_submit_bio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_submit_bio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_submit_bio_license || mkdir -p build/block_device_operations_submit_bio_license @@ -41438,8 +41583,7 @@ echo "obj-m := block_device_operations_submit_bio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_submit_bio_license/" >>build/Makefile fi @@ -41452,8 +41596,7 @@ cachevar="zfs_cv_kernel_blk_alloc_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_disk || mkdir -p build/blk_alloc_disk @@ -41499,14 +41642,12 @@ echo "obj-m := blk_alloc_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_disk_license || mkdir -p build/blk_alloc_disk_license @@ -41552,8 +41693,7 @@ echo "obj-m := blk_alloc_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk_license/" >>build/Makefile fi @@ -41566,8 +41706,7 @@ cachevar="zfs_cv_kernel_blk_alloc_disk_2arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_disk_2arg || mkdir -p build/blk_alloc_disk_2arg @@ -41614,14 +41753,12 @@ echo "obj-m := blk_alloc_disk_2arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk_2arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_disk_2arg_license || mkdir -p build/blk_alloc_disk_2arg_license @@ -41668,8 +41805,7 @@ echo "obj-m := blk_alloc_disk_2arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk_2arg_license/" >>build/Makefile fi @@ -41682,8 +41818,7 @@ cachevar="zfs_cv_kernel_blkdev_queue_limits_features_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_queue_limits_features || mkdir -p build/blkdev_queue_limits_features @@ -41729,14 +41864,12 @@ echo "obj-m := blkdev_queue_limits_features.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_queue_limits_features/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_queue_limits_features_license || mkdir -p build/blkdev_queue_limits_features_license @@ -41782,8 +41915,7 @@ echo "obj-m := blkdev_queue_limits_features_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_queue_limits_features_license/" >>build/Makefile fi @@ -41796,8 +41928,7 @@ cachevar="zfs_cv_kernel_blk_cleanup_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_cleanup_disk || mkdir -p build/blk_cleanup_disk @@ -41843,14 +41974,12 @@ echo "obj-m := blk_cleanup_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_cleanup_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_cleanup_disk_license || mkdir -p build/blk_cleanup_disk_license @@ -41896,8 +42025,7 @@ echo "obj-m := blk_cleanup_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_cleanup_disk_license/" >>build/Makefile fi @@ -41911,8 +42039,7 @@ cachevar="zfs_cv_kernel_bdev_io_acct_63_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_io_acct_63 || mkdir -p build/bdev_io_acct_63 @@ -41964,14 +42091,12 @@ echo "obj-m := bdev_io_acct_63.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_63/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_io_acct_63_license || mkdir -p build/bdev_io_acct_63_license @@ -42023,8 +42148,7 @@ echo "obj-m := bdev_io_acct_63_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_63_license/" >>build/Makefile fi @@ -42037,8 +42161,7 @@ cachevar="zfs_cv_kernel_bdev_io_acct_old_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_io_acct_old || mkdir -p build/bdev_io_acct_old @@ -42090,14 +42213,12 @@ echo "obj-m := bdev_io_acct_old.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_old/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_io_acct_old_license || mkdir -p build/bdev_io_acct_old_license @@ -42149,8 +42270,7 @@ echo "obj-m := bdev_io_acct_old_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_old_license/" >>build/Makefile fi @@ -42163,8 +42283,7 @@ cachevar="zfs_cv_kernel_disk_io_acct_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/disk_io_acct || mkdir -p build/disk_io_acct @@ -42214,14 +42333,12 @@ echo "obj-m := disk_io_acct.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_io_acct/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/disk_io_acct_license || mkdir -p build/disk_io_acct_license @@ -42271,8 +42388,7 @@ echo "obj-m := disk_io_acct_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_io_acct_license/" >>build/Makefile fi @@ -42285,8 +42401,7 @@ cachevar="zfs_cv_kernel_bio_io_acct_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_io_acct || mkdir -p build/bio_io_acct @@ -42335,14 +42450,12 @@ echo "obj-m := bio_io_acct.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_io_acct/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_io_acct_license || mkdir -p build/bio_io_acct_license @@ -42391,8 +42504,7 @@ echo "obj-m := bio_io_acct_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_io_acct_license/" >>build/Makefile fi @@ -42405,8 +42517,7 @@ cachevar="zfs_cv_kernel_generic_acct_4args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_acct_4args || mkdir -p build/generic_acct_4args @@ -42457,14 +42568,12 @@ echo "obj-m := generic_acct_4args.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_acct_4args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_acct_4args_license || mkdir -p build/generic_acct_4args_license @@ -42515,8 +42624,7 @@ echo "obj-m := generic_acct_4args_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_acct_4args_license/" >>build/Makefile fi @@ -42530,8 +42638,7 @@ cachevar="zfs_cv_kernel_kernel_fpu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kernel_fpu || mkdir -p build/kernel_fpu @@ -42585,14 +42692,12 @@ echo "obj-m := kernel_fpu.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_fpu/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/kernel_fpu_license || mkdir -p build/kernel_fpu_license @@ -42646,8 +42751,7 @@ echo "obj-m := kernel_fpu_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_fpu_license/" >>build/Makefile fi @@ -42660,8 +42764,7 @@ cachevar="zfs_cv_kernel___kernel_fpu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/__kernel_fpu || mkdir -p build/__kernel_fpu @@ -42715,14 +42818,12 @@ echo "obj-m := __kernel_fpu.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __kernel_fpu/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/__kernel_fpu_license || mkdir -p build/__kernel_fpu_license @@ -42776,8 +42877,7 @@ echo "obj-m := __kernel_fpu_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __kernel_fpu_license/" >>build/Makefile fi @@ -42790,8 +42890,7 @@ cachevar="zfs_cv_kernel_kernel_neon_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kernel_neon || mkdir -p build/kernel_neon @@ -42837,14 +42936,12 @@ echo "obj-m := kernel_neon.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_neon/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/kernel_neon_license || mkdir -p build/kernel_neon_license @@ -42890,8 +42987,7 @@ echo "obj-m := kernel_neon_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_neon_license/" >>build/Makefile fi @@ -42905,8 +43001,7 @@ cachevar="zfs_cv_kernel_type_fmode_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/type_fmode_t || mkdir -p build/type_fmode_t @@ -42951,14 +43046,12 @@ echo "obj-m := type_fmode_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_fmode_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/type_fmode_t_license || mkdir -p build/type_fmode_t_license @@ -43003,8 +43096,7 @@ echo "obj-m := type_fmode_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_fmode_t_license/" >>build/Makefile fi @@ -43018,8 +43110,7 @@ cachevar="zfs_cv_kernel_kuidgid_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kuidgid_t || mkdir -p build/kuidgid_t @@ -43065,14 +43156,12 @@ echo "obj-m := kuidgid_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kuidgid_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kuidgid_t_license || mkdir -p build/kuidgid_t_license @@ -43118,8 +43207,7 @@ echo "obj-m := kuidgid_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kuidgid_t_license/" >>build/Makefile fi @@ -43133,8 +43221,7 @@ cachevar="zfs_cv_kernel_i_uid_read_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/i_uid_read || mkdir -p build/i_uid_read @@ -43180,14 +43267,12 @@ echo "obj-m := i_uid_read.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += i_uid_read/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/i_uid_read_license || mkdir -p build/i_uid_read_license @@ -43233,8 +43318,7 @@ echo "obj-m := i_uid_read_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += i_uid_read_license/" >>build/Makefile fi @@ -43246,134 +43330,9 @@ - cachevar="zfs_cv_kernel_inode_operations_rename_flags_$_zfs_linux_cache_checksum" - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : - - -test -d build/inode_operations_rename_flags || mkdir -p build/inode_operations_rename_flags -cat confdefs.h - <<_ACEOF >build/inode_operations_rename_flags/inode_operations_rename_flags.c - -#include - - #include - static int rename_fn(struct inode *sip, struct dentry *sdp, - struct inode *tip, struct dentry *tdp, - unsigned int flags) { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .rename = rename_fn, - }; - - -int -main (void) -{ - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE("Dual BSD/GPL"); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/inode_operations_rename_flags || mkdir -p build/inode_operations_rename_flags - - file=build/inode_operations_rename_flags/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_operations_rename_flags - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := inode_operations_rename_flags.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += inode_operations_rename_flags/" >>build/Makefile -fi - - - if test -n "" -then : - - -test -d build/inode_operations_rename_flags_license || mkdir -p build/inode_operations_rename_flags_license -cat confdefs.h - <<_ACEOF >build/inode_operations_rename_flags_license/inode_operations_rename_flags_license.c - -#include - - #include - static int rename_fn(struct inode *sip, struct dentry *sdp, - struct inode *tip, struct dentry *tdp, - unsigned int flags) { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .rename = rename_fn, - }; - - -int -main (void) -{ - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/inode_operations_rename_flags_license || mkdir -p build/inode_operations_rename_flags_license - - file=build/inode_operations_rename_flags_license/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_operations_rename_flags_license - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := inode_operations_rename_flags_license.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += inode_operations_rename_flags_license/" >>build/Makefile -fi - - -fi - -fi - - - cachevar="zfs_cv_kernel_inode_operations_rename_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_rename_userns || mkdir -p build/inode_operations_rename_userns @@ -43424,14 +43383,12 @@ echo "obj-m := inode_operations_rename_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_rename_userns_license || mkdir -p build/inode_operations_rename_userns_license @@ -43482,8 +43439,7 @@ echo "obj-m := inode_operations_rename_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_userns_license/" >>build/Makefile fi @@ -43496,8 +43452,7 @@ cachevar="zfs_cv_kernel_inode_operations_rename_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_rename_mnt_idmap || mkdir -p build/inode_operations_rename_mnt_idmap @@ -43548,14 +43503,12 @@ echo "obj-m := inode_operations_rename_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_rename_mnt_idmap_license || mkdir -p build/inode_operations_rename_mnt_idmap_license @@ -43606,8 +43559,7 @@ echo "obj-m := inode_operations_rename_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_mnt_idmap_license/" >>build/Makefile fi @@ -43621,8 +43573,7 @@ cachevar="zfs_cv_kernel_totalram_pages_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/totalram_pages || mkdir -p build/totalram_pages @@ -43668,14 +43619,12 @@ echo "obj-m := totalram_pages.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalram_pages/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/totalram_pages_license || mkdir -p build/totalram_pages_license @@ -43721,8 +43670,7 @@ echo "obj-m := totalram_pages_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalram_pages_license/" >>build/Makefile fi @@ -43736,8 +43684,7 @@ cachevar="zfs_cv_kernel_totalhigh_pages_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/totalhigh_pages || mkdir -p build/totalhigh_pages @@ -43783,14 +43730,12 @@ echo "obj-m := totalhigh_pages.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalhigh_pages/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/totalhigh_pages_license || mkdir -p build/totalhigh_pages_license @@ -43836,8 +43781,7 @@ echo "obj-m := totalhigh_pages_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalhigh_pages_license/" >>build/Makefile fi @@ -43852,8 +43796,7 @@ cachevar="zfs_cv_kernel_percpu_ref_count_in_data_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/percpu_ref_count_in_data || mkdir -p build/percpu_ref_count_in_data @@ -43900,14 +43843,12 @@ echo "obj-m := percpu_ref_count_in_data.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += percpu_ref_count_in_data/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/percpu_ref_count_in_data_license || mkdir -p build/percpu_ref_count_in_data_license @@ -43954,8 +43895,7 @@ echo "obj-m := percpu_ref_count_in_data_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += percpu_ref_count_in_data_license/" >>build/Makefile fi @@ -43970,8 +43910,7 @@ cachevar="zfs_cv_kernel_generic_fillattr_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fillattr_userns || mkdir -p build/generic_fillattr_userns @@ -44019,14 +43958,12 @@ echo "obj-m := generic_fillattr_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fillattr_userns_license || mkdir -p build/generic_fillattr_userns_license @@ -44074,8 +44011,7 @@ echo "obj-m := generic_fillattr_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_userns_license/" >>build/Makefile fi @@ -44088,8 +44024,7 @@ cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fillattr_mnt_idmap || mkdir -p build/generic_fillattr_mnt_idmap @@ -44137,14 +44072,12 @@ echo "obj-m := generic_fillattr_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fillattr_mnt_idmap_license || mkdir -p build/generic_fillattr_mnt_idmap_license @@ -44192,8 +44125,7 @@ echo "obj-m := generic_fillattr_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap_license/" >>build/Makefile fi @@ -44206,8 +44138,7 @@ cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_reqmask_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fillattr_mnt_idmap_reqmask || mkdir -p build/generic_fillattr_mnt_idmap_reqmask @@ -44255,14 +44186,12 @@ echo "obj-m := generic_fillattr_mnt_idmap_reqmask.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap_reqmask/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fillattr_mnt_idmap_reqmask_license || mkdir -p build/generic_fillattr_mnt_idmap_reqmask_license @@ -44310,8 +44239,7 @@ echo "obj-m := generic_fillattr_mnt_idmap_reqmask_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap_reqmask_license/" >>build/Makefile fi @@ -44325,8 +44253,7 @@ cachevar="zfs_cv_kernel_mknod_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mknod_mnt_idmap || mkdir -p build/mknod_mnt_idmap @@ -44379,14 +44306,12 @@ echo "obj-m := mknod_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mknod_mnt_idmap_license || mkdir -p build/mknod_mnt_idmap_license @@ -44439,8 +44364,7 @@ echo "obj-m := mknod_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_mnt_idmap_license/" >>build/Makefile fi @@ -44453,8 +44377,7 @@ cachevar="zfs_cv_kernel_mknod_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mknod_userns || mkdir -p build/mknod_userns @@ -44507,14 +44430,12 @@ echo "obj-m := mknod_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mknod_userns_license || mkdir -p build/mknod_userns_license @@ -44567,8 +44488,7 @@ echo "obj-m := mknod_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_userns_license/" >>build/Makefile fi @@ -44582,8 +44502,7 @@ cachevar="zfs_cv_kernel_symlink_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/symlink_mnt_idmap || mkdir -p build/symlink_mnt_idmap @@ -44635,14 +44554,12 @@ echo "obj-m := symlink_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/symlink_mnt_idmap_license || mkdir -p build/symlink_mnt_idmap_license @@ -44694,8 +44611,7 @@ echo "obj-m := symlink_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_mnt_idmap_license/" >>build/Makefile fi @@ -44707,8 +44623,7 @@ cachevar="zfs_cv_kernel_symlink_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/symlink_userns || mkdir -p build/symlink_userns @@ -44761,14 +44676,12 @@ echo "obj-m := symlink_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/symlink_userns_license || mkdir -p build/symlink_userns_license @@ -44821,8 +44734,7 @@ echo "obj-m := symlink_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_userns_license/" >>build/Makefile fi @@ -44836,8 +44748,7 @@ cachevar="zfs_cv_kernel_bio_max_segs_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_max_segs || mkdir -p build/bio_max_segs @@ -44882,14 +44793,12 @@ echo "obj-m := bio_max_segs.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_max_segs/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_max_segs_license || mkdir -p build/bio_max_segs_license @@ -44934,8 +44843,7 @@ echo "obj-m := bio_max_segs_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_max_segs_license/" >>build/Makefile fi @@ -44949,8 +44857,7 @@ cachevar="zfs_cv_kernel_siginfo_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/siginfo || mkdir -p build/siginfo @@ -44995,14 +44902,12 @@ echo "obj-m := siginfo.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += siginfo/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/siginfo_license || mkdir -p build/siginfo_license @@ -45047,8 +44952,7 @@ echo "obj-m := siginfo_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += siginfo_license/" >>build/Makefile fi @@ -45063,8 +44967,7 @@ cachevar="zfs_cv_kernel_sysfs_default_groups_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/sysfs_default_groups || mkdir -p build/sysfs_default_groups @@ -45110,14 +45013,12 @@ echo "obj-m := sysfs_default_groups.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sysfs_default_groups/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/sysfs_default_groups_license || mkdir -p build/sysfs_default_groups_license @@ -45163,8 +45064,7 @@ echo "obj-m := sysfs_default_groups_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sysfs_default_groups_license/" >>build/Makefile fi @@ -45179,8 +45079,7 @@ cachevar="zfs_cv_kernel_has_standalone_linux_stdarg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_standalone_linux_stdarg || mkdir -p build/has_standalone_linux_stdarg @@ -45228,14 +45127,12 @@ echo "obj-m := has_standalone_linux_stdarg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_standalone_linux_stdarg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_standalone_linux_stdarg_license || mkdir -p build/has_standalone_linux_stdarg_license @@ -45283,8 +45180,7 @@ echo "obj-m := has_standalone_linux_stdarg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_standalone_linux_stdarg_license/" >>build/Makefile fi @@ -45298,8 +45194,7 @@ cachevar="zfs_cv_kernel_kernel_has_strlcpy_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kernel_has_strlcpy || mkdir -p build/kernel_has_strlcpy @@ -45347,14 +45242,12 @@ echo "obj-m := kernel_has_strlcpy.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_has_strlcpy/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kernel_has_strlcpy_license || mkdir -p build/kernel_has_strlcpy_license @@ -45402,8 +45295,7 @@ echo "obj-m := kernel_has_strlcpy_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_has_strlcpy_license/" >>build/Makefile fi @@ -45417,8 +45309,7 @@ cachevar="zfs_cv_kernel_pagemap_has_folio_wait_bit_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/pagemap_has_folio_wait_bit || mkdir -p build/pagemap_has_folio_wait_bit @@ -45465,14 +45356,12 @@ echo "obj-m := pagemap_has_folio_wait_bit.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pagemap_has_folio_wait_bit/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/pagemap_has_folio_wait_bit_license || mkdir -p build/pagemap_has_folio_wait_bit_license @@ -45519,8 +45408,7 @@ echo "obj-m := pagemap_has_folio_wait_bit_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pagemap_has_folio_wait_bit_license/" >>build/Makefile fi @@ -45532,10 +45420,122 @@ + cachevar="zfs_cv_kernel_pagemap_has_readahead_page_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/pagemap_has_readahead_page || mkdir -p build/pagemap_has_readahead_page +cat confdefs.h - <<_ACEOF >build/pagemap_has_readahead_page/pagemap_has_readahead_page.c + +#include + + #include + + +int +main (void) +{ + + struct page *p __attribute__ ((unused)) = NULL; + struct readahead_control *ractl __attribute__ ((unused)) = NULL; + p = readahead_page(ractl); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/pagemap_has_readahead_page || mkdir -p build/pagemap_has_readahead_page + + file=build/pagemap_has_readahead_page/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/pagemap_has_readahead_page + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := pagemap_has_readahead_page.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += pagemap_has_readahead_page/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/pagemap_has_readahead_page_license || mkdir -p build/pagemap_has_readahead_page_license +cat confdefs.h - <<_ACEOF >build/pagemap_has_readahead_page_license/pagemap_has_readahead_page_license.c + +#include + + #include + + +int +main (void) +{ + + struct page *p __attribute__ ((unused)) = NULL; + struct readahead_control *ractl __attribute__ ((unused)) = NULL; + p = readahead_page(ractl); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/pagemap_has_readahead_page_license || mkdir -p build/pagemap_has_readahead_page_license + + file=build/pagemap_has_readahead_page_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/pagemap_has_readahead_page_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := pagemap_has_readahead_page_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += pagemap_has_readahead_page_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_add_disk_ret_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/add_disk_ret || mkdir -p build/add_disk_ret @@ -45581,14 +45581,12 @@ echo "obj-m := add_disk_ret.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += add_disk_ret/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/add_disk_ret_license || mkdir -p build/add_disk_ret_license @@ -45634,8 +45632,7 @@ echo "obj-m := add_disk_ret_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += add_disk_ret_license/" >>build/Makefile fi @@ -45650,8 +45647,7 @@ cachevar="zfs_cv_kernel_kthread_complete_and_exit_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kthread_complete_and_exit || mkdir -p build/kthread_complete_and_exit @@ -45699,14 +45695,12 @@ echo "obj-m := kthread_complete_and_exit.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_complete_and_exit/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kthread_complete_and_exit_license || mkdir -p build/kthread_complete_and_exit_license @@ -45754,8 +45748,7 @@ echo "obj-m := kthread_complete_and_exit_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_complete_and_exit_license/" >>build/Makefile fi @@ -45769,8 +45762,7 @@ cachevar="zfs_cv_kernel_kthread_dequeue_signal_4arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kthread_dequeue_signal_4arg || mkdir -p build/kthread_dequeue_signal_4arg @@ -45821,14 +45813,12 @@ echo "obj-m := kthread_dequeue_signal_4arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_4arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kthread_dequeue_signal_4arg_license || mkdir -p build/kthread_dequeue_signal_4arg_license @@ -45879,8 +45869,7 @@ echo "obj-m := kthread_dequeue_signal_4arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_4arg_license/" >>build/Makefile fi @@ -45893,8 +45882,7 @@ cachevar="zfs_cv_kernel_kthread_dequeue_signal_3arg_type_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kthread_dequeue_signal_3arg_type || mkdir -p build/kthread_dequeue_signal_3arg_type @@ -45944,14 +45932,12 @@ echo "obj-m := kthread_dequeue_signal_3arg_type.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_3arg_type/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kthread_dequeue_signal_3arg_type_license || mkdir -p build/kthread_dequeue_signal_3arg_type_license @@ -46001,8 +45987,7 @@ echo "obj-m := kthread_dequeue_signal_3arg_type_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_3arg_type_license/" >>build/Makefile fi @@ -46017,8 +46002,7 @@ cachevar="zfs_cv_kernel_zero_page_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/zero_page || mkdir -p build/zero_page @@ -46064,14 +46048,12 @@ echo "obj-m := zero_page.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += zero_page/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/zero_page_license || mkdir -p build/zero_page_license @@ -46117,8 +46099,7 @@ echo "obj-m := zero_page_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += zero_page_license/" >>build/Makefile fi @@ -46130,123 +46111,9 @@ - cachevar="zfs_cv_kernel___copy_from_user_inatomic_$_zfs_linux_cache_checksum" - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : - - -test -d build/__copy_from_user_inatomic || mkdir -p build/__copy_from_user_inatomic -cat confdefs.h - <<_ACEOF >build/__copy_from_user_inatomic/__copy_from_user_inatomic.c - -#include - - #include - - -int -main (void) -{ - - int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0); - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE("Dual BSD/GPL"); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/__copy_from_user_inatomic || mkdir -p build/__copy_from_user_inatomic - - file=build/__copy_from_user_inatomic/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/__copy_from_user_inatomic - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := __copy_from_user_inatomic.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += __copy_from_user_inatomic/" >>build/Makefile -fi - - - if test -n "ZFS_META_LICENSE" -then : - - -test -d build/__copy_from_user_inatomic_license || mkdir -p build/__copy_from_user_inatomic_license -cat confdefs.h - <<_ACEOF >build/__copy_from_user_inatomic_license/__copy_from_user_inatomic_license.c - -#include - - #include - - -int -main (void) -{ - - int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0); - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(ZFS_META_LICENSE); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/__copy_from_user_inatomic_license || mkdir -p build/__copy_from_user_inatomic_license - - file=build/__copy_from_user_inatomic_license/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/__copy_from_user_inatomic_license - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := __copy_from_user_inatomic_license.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += __copy_from_user_inatomic_license/" >>build/Makefile -fi - - -fi - -fi - - - - cachevar="zfs_cv_kernel_idmap_mnt_api_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/idmap_mnt_api || mkdir -p build/idmap_mnt_api @@ -46292,14 +46159,12 @@ echo "obj-m := idmap_mnt_api.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_mnt_api/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/idmap_mnt_api_license || mkdir -p build/idmap_mnt_api_license @@ -46345,8 +46210,7 @@ echo "obj-m := idmap_mnt_api_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_mnt_api_license/" >>build/Makefile fi @@ -46360,8 +46224,7 @@ cachevar="zfs_cv_kernel_idmap_no_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/idmap_no_userns || mkdir -p build/idmap_no_userns @@ -46407,14 +46270,12 @@ echo "obj-m := idmap_no_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_no_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/idmap_no_userns_license || mkdir -p build/idmap_no_userns_license @@ -46460,8 +46321,7 @@ echo "obj-m := idmap_no_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_no_userns_license/" >>build/Makefile fi @@ -46475,8 +46335,7 @@ cachevar="zfs_cv_kernel_iattr_vfsid_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iattr_vfsid || mkdir -p build/iattr_vfsid @@ -46523,14 +46382,12 @@ echo "obj-m := iattr_vfsid.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iattr_vfsid/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iattr_vfsid_license || mkdir -p build/iattr_vfsid_license @@ -46577,8 +46434,7 @@ echo "obj-m := iattr_vfsid_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iattr_vfsid_license/" >>build/Makefile fi @@ -46590,10 +46446,10 @@ + cachevar="zfs_cv_kernel_writepage_t_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/writepage_t_folio || mkdir -p build/writepage_t_folio @@ -46640,14 +46496,12 @@ echo "obj-m := writepage_t_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += writepage_t_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/writepage_t_folio_license || mkdir -p build/writepage_t_folio_license @@ -46694,8 +46548,7 @@ echo "obj-m := writepage_t_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += writepage_t_folio_license/" >>build/Makefile fi @@ -46707,10 +46560,119 @@ + cachevar="zfs_cv_kernel_write_cache_pages_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/write_cache_pages || mkdir -p build/write_cache_pages +cat confdefs.h - <<_ACEOF >build/write_cache_pages/write_cache_pages.c + +#include + + #include + + +int +main (void) +{ + + (void) write_cache_pages(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/write_cache_pages || mkdir -p build/write_cache_pages + + file=build/write_cache_pages/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/write_cache_pages + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := write_cache_pages.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += write_cache_pages/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/write_cache_pages_license || mkdir -p build/write_cache_pages_license +cat confdefs.h - <<_ACEOF >build/write_cache_pages_license/write_cache_pages_license.c + +#include + + #include + + +int +main (void) +{ + + (void) write_cache_pages(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/write_cache_pages_license || mkdir -p build/write_cache_pages_license + + file=build/write_cache_pages_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/write_cache_pages_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := write_cache_pages_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += write_cache_pages_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_reclaim_state_reclaimed_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/reclaim_state_reclaimed || mkdir -p build/reclaim_state_reclaimed @@ -46757,14 +46719,12 @@ echo "obj-m := reclaim_state_reclaimed.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += reclaim_state_reclaimed/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/reclaim_state_reclaimed_license || mkdir -p build/reclaim_state_reclaimed_license @@ -46811,8 +46771,7 @@ echo "obj-m := reclaim_state_reclaimed_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += reclaim_state_reclaimed_license/" >>build/Makefile fi @@ -46826,8 +46785,7 @@ cachevar="zfs_cv_kernel_has_register_sysctl_table_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_register_sysctl_table || mkdir -p build/has_register_sysctl_table @@ -46878,14 +46836,12 @@ echo "obj-m := has_register_sysctl_table.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_table/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_register_sysctl_table_license || mkdir -p build/has_register_sysctl_table_license @@ -46936,8 +46892,7 @@ echo "obj-m := has_register_sysctl_table_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_table_license/" >>build/Makefile fi @@ -46951,8 +46906,7 @@ cachevar="zfs_cv_kernel_has_register_sysctl_sz_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_register_sysctl_sz || mkdir -p build/has_register_sysctl_sz @@ -46998,14 +46952,12 @@ echo "obj-m := has_register_sysctl_sz.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_sz/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_register_sysctl_sz_license || mkdir -p build/has_register_sysctl_sz_license @@ -47051,8 +47003,7 @@ echo "obj-m := has_register_sysctl_sz_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_sz_license/" >>build/Makefile fi @@ -47066,8 +47017,7 @@ cachevar="zfs_cv_kernel_has_proc_handler_ctl_table_const_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_proc_handler_ctl_table_const || mkdir -p build/has_proc_handler_ctl_table_const @@ -47123,14 +47073,12 @@ echo "obj-m := has_proc_handler_ctl_table_const.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_proc_handler_ctl_table_const/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_proc_handler_ctl_table_const_license || mkdir -p build/has_proc_handler_ctl_table_const_license @@ -47186,8 +47134,7 @@ echo "obj-m := has_proc_handler_ctl_table_const_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_proc_handler_ctl_table_const_license/" >>build/Makefile fi @@ -47201,8 +47148,7 @@ cachevar="zfs_cv_kernel_has_copy_splice_read_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_copy_splice_read || mkdir -p build/has_copy_splice_read @@ -47249,14 +47195,12 @@ echo "obj-m := has_copy_splice_read.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_copy_splice_read/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_copy_splice_read_license || mkdir -p build/has_copy_splice_read_license @@ -47303,8 +47247,7 @@ echo "obj-m := has_copy_splice_read_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_copy_splice_read_license/" >>build/Makefile fi @@ -47318,8 +47261,7 @@ cachevar="zfs_cv_kernel_fsync_bdev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/fsync_bdev || mkdir -p build/fsync_bdev @@ -47364,14 +47306,12 @@ echo "obj-m := fsync_bdev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fsync_bdev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/fsync_bdev_license || mkdir -p build/fsync_bdev_license @@ -47416,8 +47356,7 @@ echo "obj-m := fsync_bdev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fsync_bdev_license/" >>build/Makefile fi @@ -47430,8 +47369,7 @@ cachevar="zfs_cv_kernel_sync_blockdev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/sync_blockdev || mkdir -p build/sync_blockdev @@ -47476,14 +47414,12 @@ echo "obj-m := sync_blockdev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sync_blockdev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/sync_blockdev_license || mkdir -p build/sync_blockdev_license @@ -47528,8 +47464,7 @@ echo "obj-m := sync_blockdev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sync_blockdev_license/" >>build/Makefile fi @@ -47544,8 +47479,7 @@ cachevar="zfs_cv_kernel_mm_page_flag_error_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mm_page_flag_error || mkdir -p build/mm_page_flag_error @@ -47591,14 +47525,12 @@ echo "obj-m := mm_page_flag_error.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mm_page_flag_error/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mm_page_flag_error_license || mkdir -p build/mm_page_flag_error_license @@ -47644,8 +47576,7 @@ echo "obj-m := mm_page_flag_error_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mm_page_flag_error_license/" >>build/Makefile fi @@ -47657,11 +47588,123 @@ + cachevar="zfs_cv_kernel_mm_page_flags_struct_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/mm_page_flags_struct || mkdir -p build/mm_page_flags_struct +cat confdefs.h - <<_ACEOF >build/mm_page_flags_struct/mm_page_flags_struct.c + +#include + + #include + + static const struct page p __attribute__ ((unused)) = { + .flags = { .f = 0 } + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mm_page_flags_struct || mkdir -p build/mm_page_flags_struct + + file=build/mm_page_flags_struct/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mm_page_flags_struct + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mm_page_flags_struct.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mm_page_flags_struct/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/mm_page_flags_struct_license || mkdir -p build/mm_page_flags_struct_license +cat confdefs.h - <<_ACEOF >build/mm_page_flags_struct_license/mm_page_flags_struct_license.c + +#include + + #include + + static const struct page p __attribute__ ((unused)) = { + .flags = { .f = 0 } + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mm_page_flags_struct_license || mkdir -p build/mm_page_flags_struct_license + + file=build/mm_page_flags_struct_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mm_page_flags_struct_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mm_page_flags_struct_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mm_page_flags_struct_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_page_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/page_size || mkdir -p build/page_size @@ -47707,14 +47750,12 @@ echo "obj-m := page_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/page_size_license || mkdir -p build/page_size_license @@ -47760,8 +47801,7 @@ echo "obj-m := page_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_size_license/" >>build/Makefile fi @@ -47775,8 +47815,7 @@ cachevar="zfs_cv_kernel_page_mapping_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/page_mapping || mkdir -p build/page_mapping @@ -47822,14 +47861,12 @@ echo "obj-m := page_mapping.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_mapping/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/page_mapping_license || mkdir -p build/page_mapping_license @@ -47875,8 +47912,7 @@ echo "obj-m := page_mapping_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_mapping_license/" >>build/Makefile fi @@ -47891,8 +47927,7 @@ cachevar="zfs_cv_kernel_file_f_version_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/file_f_version || mkdir -p build/file_f_version @@ -47939,14 +47974,12 @@ echo "obj-m := file_f_version.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += file_f_version/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/file_f_version_license || mkdir -p build/file_f_version_license @@ -47993,8 +48026,7 @@ echo "obj-m := file_f_version_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += file_f_version_license/" >>build/Makefile fi @@ -48009,8 +48041,7 @@ cachevar="zfs_cv_kernel_pin_user_pages_unlocked_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/pin_user_pages_unlocked || mkdir -p build/pin_user_pages_unlocked @@ -48062,14 +48093,12 @@ echo "obj-m := pin_user_pages_unlocked.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pin_user_pages_unlocked/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/pin_user_pages_unlocked_license || mkdir -p build/pin_user_pages_unlocked_license @@ -48121,8 +48150,7 @@ echo "obj-m := pin_user_pages_unlocked_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pin_user_pages_unlocked_license/" >>build/Makefile fi @@ -48132,34 +48160,28 @@ fi - case "$host_cpu" in - powerpc*) - cachevar="zfs_cv_kernel_cpu_has_feature_$_zfs_linux_cache_checksum" + + cachevar="zfs_cv_kernel_timer_delete_sync_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/cpu_has_feature || mkdir -p build/cpu_has_feature -cat confdefs.h - <<_ACEOF >build/cpu_has_feature/cpu_has_feature.c +test -d build/timer_delete_sync || mkdir -p build/timer_delete_sync +cat confdefs.h - <<_ACEOF >build/timer_delete_sync/timer_delete_sync.c #include - #include - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) - #include - #else - #include - #endif + #include int main (void) { - return cpu_has_feature(CPU_FTR_ALTIVEC) ? 0 : 1; + struct timer_list *timer __attribute__((unused)) = NULL; + timer_delete_sync(timer); ; return 0; @@ -48174,49 +48196,43 @@ test -d build || mkdir -p build - test -d build/cpu_has_feature || mkdir -p build/cpu_has_feature + test -d build/timer_delete_sync || mkdir -p build/timer_delete_sync - file=build/cpu_has_feature/Makefile + file=build/timer_delete_sync/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/cpu_has_feature +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/timer_delete_sync ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := cpu_has_feature.o" >>$file + echo "obj-m := timer_delete_sync.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += cpu_has_feature/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += timer_delete_sync/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "" ; then : -test -d build/cpu_has_feature_license || mkdir -p build/cpu_has_feature_license -cat confdefs.h - <<_ACEOF >build/cpu_has_feature_license/cpu_has_feature_license.c +test -d build/timer_delete_sync_license || mkdir -p build/timer_delete_sync_license +cat confdefs.h - <<_ACEOF >build/timer_delete_sync_license/timer_delete_sync_license.c #include - #include - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) - #include - #else - #include - #endif + #include int main (void) { - return cpu_has_feature(CPU_FTR_ALTIVEC) ? 0 : 1; + struct timer_list *timer __attribute__((unused)) = NULL; + timer_delete_sync(timer); ; return 0; @@ -48225,30 +48241,29 @@ MODULE_DESCRIPTION("conftest"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_LICENSE(); _ACEOF test -d build || mkdir -p build - test -d build/cpu_has_feature_license || mkdir -p build/cpu_has_feature_license + test -d build/timer_delete_sync_license || mkdir -p build/timer_delete_sync_license - file=build/cpu_has_feature_license/Makefile + file=build/timer_delete_sync_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/cpu_has_feature_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/timer_delete_sync_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := cpu_has_feature_license.o" >>$file + echo "obj-m := timer_delete_sync_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += cpu_has_feature_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += timer_delete_sync_license/" >>build/Makefile fi @@ -48259,26 +48274,29 @@ - cachevar="zfs_cv_kernel_flush_dcache_page_$_zfs_linux_cache_checksum" + + cachevar="zfs_cv_kernel_super_block_s_wb_err_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page -cat confdefs.h - <<_ACEOF >build/flush_dcache_page/flush_dcache_page.c +test -d build/super_block_s_wb_err || mkdir -p build/super_block_s_wb_err +cat confdefs.h - <<_ACEOF >build/super_block_s_wb_err/super_block_s_wb_err.c #include - #include + #include + + static const struct super_block + sb __attribute__ ((unused)) = { + .s_wb_err = 0, + }; int main (void) { - flush_dcache_page(0); - ; return 0; } @@ -48292,45 +48310,46 @@ test -d build || mkdir -p build - test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page + test -d build/super_block_s_wb_err || mkdir -p build/super_block_s_wb_err - file=build/flush_dcache_page/Makefile + file=build/super_block_s_wb_err/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_block_s_wb_err ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := flush_dcache_page.o" >>$file + echo "obj-m := super_block_s_wb_err.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += flush_dcache_page/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += super_block_s_wb_err/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "" ; then : -test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license -cat confdefs.h - <<_ACEOF >build/flush_dcache_page_license/flush_dcache_page_license.c +test -d build/super_block_s_wb_err_license || mkdir -p build/super_block_s_wb_err_license +cat confdefs.h - <<_ACEOF >build/super_block_s_wb_err_license/super_block_s_wb_err_license.c #include - #include + #include + + static const struct super_block + sb __attribute__ ((unused)) = { + .s_wb_err = 0, + }; int main (void) { - flush_dcache_page(0); - ; return 0; } @@ -48338,30 +48357,29 @@ MODULE_DESCRIPTION("conftest"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_LICENSE(); _ACEOF test -d build || mkdir -p build - test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license + test -d build/super_block_s_wb_err_license || mkdir -p build/super_block_s_wb_err_license - file=build/flush_dcache_page_license/Makefile + file=build/super_block_s_wb_err_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_block_s_wb_err_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := flush_dcache_page_license.o" >>$file + echo "obj-m := super_block_s_wb_err_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += flush_dcache_page_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += super_block_s_wb_err_license/" >>build/Makefile fi @@ -48370,30 +48388,31 @@ fi - ;; - riscv*) - cachevar="zfs_cv_kernel_flush_dcache_page_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_super_operations_free_inode_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page -cat confdefs.h - <<_ACEOF >build/flush_dcache_page/flush_dcache_page.c +test -d build/super_operations_free_inode || mkdir -p build/super_operations_free_inode +cat confdefs.h - <<_ACEOF >build/super_operations_free_inode/super_operations_free_inode.c #include - #include + #include + + static void free_inode(struct inode *) { } + + static struct super_operations sops __attribute__ ((unused)) = { + .free_inode = free_inode, + }; int main (void) { - flush_dcache_page(0); - ; return 0; } @@ -48407,45 +48426,47 @@ test -d build || mkdir -p build - test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page + test -d build/super_operations_free_inode || mkdir -p build/super_operations_free_inode - file=build/flush_dcache_page/Makefile + file=build/super_operations_free_inode/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_operations_free_inode ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := flush_dcache_page.o" >>$file + echo "obj-m := super_operations_free_inode.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += flush_dcache_page/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += super_operations_free_inode/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "" ; then : -test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license -cat confdefs.h - <<_ACEOF >build/flush_dcache_page_license/flush_dcache_page_license.c +test -d build/super_operations_free_inode_license || mkdir -p build/super_operations_free_inode_license +cat confdefs.h - <<_ACEOF >build/super_operations_free_inode_license/super_operations_free_inode_license.c #include - #include + #include + + static void free_inode(struct inode *) { } + + static struct super_operations sops __attribute__ ((unused)) = { + .free_inode = free_inode, + }; int main (void) { - flush_dcache_page(0); - ; return 0; } @@ -48453,30 +48474,29 @@ MODULE_DESCRIPTION("conftest"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_LICENSE(); _ACEOF test -d build || mkdir -p build - test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license + test -d build/super_operations_free_inode_license || mkdir -p build/super_operations_free_inode_license - file=build/flush_dcache_page_license/Makefile + file=build/super_operations_free_inode_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_operations_free_inode_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := flush_dcache_page_license.o" >>$file + echo "obj-m := super_operations_free_inode_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += flush_dcache_page_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += super_operations_free_inode_license/" >>build/Makefile fi @@ -48485,777 +48505,2061 @@ fi - ;; - esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for available kernel interfaces" >&5 -printf %s "checking for available kernel interfaces... " >&6; } + cachevar="zfs_cv_kernel_ns_common_type_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : +test -d build/ns_common_type || mkdir -p build/ns_common_type +cat confdefs.h - <<_ACEOF >build/ns_common_type/ns_common_type.c +#include + #include - { ac_try=' - KBUILD_MODPOST_NOFINAL="yes" KBUILD_MODPOST_WARN="" - make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} - ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} - CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES - ${KERNEL_CROSS_COMPILE:+CROSS_COMPILE=$KERNEL_CROSS_COMPILE} - ${KERNEL_ARCH:+ARCH=$KERNEL_ARCH} - -C $LINUX_OBJ $ARCH_UM M=$PWD/build >build/build.log 2>&1' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - if { ac_try='test -f build/build.log' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : +int +main (void) +{ - mv build/Makefile build/Makefile.compile.kabi - mv build/build.log build/build.log.kabi + struct user_namespace ns; + ns.ns.ns_type = 0; -else $as_nop + ; + return 0; +} - as_fn_error $? " - *** Unable to compile test source to determine kernel interfaces." "$LINENO" 5 +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); -fi +_ACEOF + test -d build || mkdir -p build + test -d build/ns_common_type || mkdir -p build/ns_common_type - if test "x$enable_linux_builtin" = "xno" -then : + file=build/ns_common_type/Makefile - for dir in $(awk '/^obj-m/ { print $3 }' \ - build/Makefile.compile.kabi); do - name=${dir%/} - if test -f build/$name/$name.o -then : + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/ns_common_type - if test "${name##*_}" = "license" -then : +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + echo "obj-m := ns_common_type.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += ns_common_type/" >>build/Makefile +fi + if test -n "" ; then : - { ac_try=' - KBUILD_MODPOST_NOFINAL="" KBUILD_MODPOST_WARN="yes" - make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} - ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} - CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES - ${KERNEL_CROSS_COMPILE:+CROSS_COMPILE=$KERNEL_CROSS_COMPILE} - ${KERNEL_ARCH:+ARCH=$KERNEL_ARCH} - -C $LINUX_OBJ $ARCH_UM M=$PWD/build/$name >build/$name/build.log 2>&1' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - if { ac_try='test -f build/$name/build.log' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : +test -d build/ns_common_type_license || mkdir -p build/ns_common_type_license +cat confdefs.h - <<_ACEOF >build/ns_common_type_license/ns_common_type_license.c - mv build/$name/Makefile build/$name/Makefile.modpost.kabi - cat build/$name/build.log >>build/build.log.kabi +#include -else $as_nop + #include - as_fn_error $? " - *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 -fi +int +main (void) +{ + struct user_namespace ns; + ns.ns.ns_type = 0; - echo "obj-n += $dir" >>build/Makefile + ; + return 0; +} -else $as_nop +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); - echo "obj-m += $dir" >>build/Makefile +_ACEOF -fi -else $as_nop + test -d build || mkdir -p build + test -d build/ns_common_type_license || mkdir -p build/ns_common_type_license - echo "obj-n += $dir" >>build/Makefile + file=build/ns_common_type_license/Makefile -fi - done + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/ns_common_type_license +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + echo "obj-m := ns_common_type_license.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += ns_common_type_license/" >>build/Makefile +fi +fi - { ac_try=' - KBUILD_MODPOST_NOFINAL="" KBUILD_MODPOST_WARN="yes" - make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} - ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} - CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES - ${KERNEL_CROSS_COMPILE:+CROSS_COMPILE=$KERNEL_CROSS_COMPILE} - ${KERNEL_ARCH:+ARCH=$KERNEL_ARCH} - -C $LINUX_OBJ $ARCH_UM M=$PWD/build >build/build.log 2>&1' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - if { ac_try='test -f build/build.log' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : +fi - mv build/Makefile build/Makefile.modpost.kabi - cat build/build.log >>build/build.log.kabi -else $as_nop - as_fn_error $? " - *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 -fi + cachevar="zfs_cv_kernel_inode_generic_drop_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : -else $as_nop +test -d build/inode_generic_drop || mkdir -p build/inode_generic_drop +cat confdefs.h - <<_ACEOF >build/inode_generic_drop/inode_generic_drop.c - for dir in $(awk '/^obj-m/ { print $3 }' \ - build/Makefile.compile.kabi); do - name=${dir%/} - if test -f build/$name/$name.o -then : +#include - touch build/$name/$name.ko + #include -fi - done -fi +int +main (void) +{ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + struct inode *ip = NULL; + inode_generic_drop(ip); + ; + return 0; +} +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel defines intptr_t" >&5 -printf %s "checking whether kernel defines intptr_t... " >&6; } + test -d build || mkdir -p build + test -d build/inode_generic_drop || mkdir -p build/inode_generic_drop - cachevar="zfs_cv_kernel_type_intptr_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + file=build/inode_generic_drop/Makefile - if test -d build/type_intptr_t -then : + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_generic_drop - if test -f build/type_intptr_t/type_intptr_t.ko -then : +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF - eval "$cachevar=yes" -else $as_nop - eval "$cachevar=no" + echo "obj-m := inode_generic_drop.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += inode_generic_drop/" >>build/Makefile fi -else $as_nop - - as_fn_error $? " - *** No matching source for the \"type_intptr_t\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 - -fi -fi + if test -n "" ; then : - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +test -d build/inode_generic_drop_license || mkdir -p build/inode_generic_drop_license +cat confdefs.h - <<_ACEOF >build/inode_generic_drop_license/inode_generic_drop_license.c -printf "%s\n" "#define HAVE_KERNEL_INTPTR_T 1" >>confdefs.h +#include + #include -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +int +main (void) +{ -fi + struct inode *ip = NULL; + inode_generic_drop(ip); + ; + return 0; +} +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether access_ok() has 'type' parameter" >&5 -printf %s "checking whether access_ok() has 'type' parameter... " >&6; } + test -d build || mkdir -p build + test -d build/inode_generic_drop_license || mkdir -p build/inode_generic_drop_license - cachevar="zfs_cv_kernel_access_ok_type_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + file=build/inode_generic_drop_license/Makefile - if test -d build/access_ok_type -then : + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_generic_drop_license - if test -f build/access_ok_type/access_ok_type.ko -then : +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF - eval "$cachevar=yes" -else $as_nop - eval "$cachevar=no" + echo "obj-m := inode_generic_drop_license.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += inode_generic_drop_license/" >>build/Makefile fi -else $as_nop - - as_fn_error $? " - *** No matching source for the \"access_ok_type\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 fi fi - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_ACCESS_OK_TYPE 1" >>confdefs.h + cachevar="zfs_cv_kernel_kasan_enabled_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +test -d build/kasan_enabled || mkdir -p build/kasan_enabled +cat confdefs.h - <<_ACEOF >build/kasan_enabled/kasan_enabled.c -fi +#include + #include - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compile-time stack validation (objtool) is available" >&5 -printf %s "checking whether compile-time stack validation (objtool) is available... " >&6; } +int +main (void) +{ - cachevar="zfs_cv_kernel_objtool_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + kasan_enabled(); - if test -d build/objtool -then : + ; + return 0; +} - if test -f build/objtool/objtool.ko -then : +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); - eval "$cachevar=yes" +_ACEOF -else $as_nop - eval "$cachevar=no" + test -d build || mkdir -p build + test -d build/kasan_enabled || mkdir -p build/kasan_enabled -fi + file=build/kasan_enabled/Makefile -else $as_nop + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/kasan_enabled - as_fn_error $? " - *** No matching source for the \"objtool\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -fi -fi - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + echo "obj-m := kasan_enabled.o" >>$file - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test "xyes" = "xyes"; then : + echo "obj-m += kasan_enabled/" >>build/Makefile +fi -printf "%s\n" "#define HAVE_KERNEL_OBJTOOL 1" >>confdefs.h + if test -n "ZFS_META_LICENSE" ; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether STACK_FRAME_NON_STANDARD is defined" >&5 -printf %s "checking whether STACK_FRAME_NON_STANDARD is defined... " >&6; } - cachevar="zfs_cv_kernel_stack_frame_non_standard_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop +test -d build/kasan_enabled_license || mkdir -p build/kasan_enabled_license +cat confdefs.h - <<_ACEOF >build/kasan_enabled_license/kasan_enabled_license.c - if test -d build/stack_frame_non_standard -then : +#include - if test -f build/stack_frame_non_standard/stack_frame_non_standard.ko -then : + #include - eval "$cachevar=yes" -else $as_nop +int +main (void) +{ - eval "$cachevar=no" + kasan_enabled(); -fi + ; + return 0; +} -else $as_nop +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(ZFS_META_LICENSE); - as_fn_error $? " - *** No matching source for the \"stack_frame_non_standard\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 +_ACEOF -fi -fi + test -d build || mkdir -p build + test -d build/kasan_enabled_license || mkdir -p build/kasan_enabled_license - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + file=build/kasan_enabled_license/Makefile - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/kasan_enabled_license -printf "%s\n" "#define HAVE_STACK_FRAME_NON_STANDARD 1" >>confdefs.h +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + echo "obj-m := kasan_enabled_license.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += kasan_enabled_license/" >>build/Makefile fi -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pde_data() is lowercase" >&5 -printf %s "checking whether pde_data() is lowercase... " >&6; } - cachevar="zfs_cv_kernel_pde_data_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -d build/pde_data -then : + cachevar="zfs_cv_kernel_filelock_header_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : - if test -f build/pde_data/pde_data.ko -then : - eval "$cachevar=yes" +test -d build/filelock_header || mkdir -p build/filelock_header +cat confdefs.h - <<_ACEOF >build/filelock_header/filelock_header.c -else $as_nop +#include - eval "$cachevar=no" + #include + #include -fi -else $as_nop +int +main (void) +{ - as_fn_error $? " - *** No matching source for the \"pde_data\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 + ; + return 0; +} -fi +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); -fi +_ACEOF - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + test -d build || mkdir -p build + test -d build/filelock_header || mkdir -p build/filelock_header -printf "%s\n" "#define SPL_PDE_DATA pde_data" >>confdefs.h + file=build/filelock_header/Makefile + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/filelock_header -else $as_nop +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "#define SPL_PDE_DATA PDE_DATA" >>confdefs.h + echo "obj-m := filelock_header.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += filelock_header/" >>build/Makefile fi + if test -n "" ; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fadvise() is available" >&5 -printf %s "checking whether generic_fadvise() is available... " >&6; } - cachevar="zfs_cv_kernel_generic_fadvise_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop +test -d build/filelock_header_license || mkdir -p build/filelock_header_license +cat confdefs.h - <<_ACEOF >build/filelock_header_license/filelock_header_license.c - if ! test -f build/generic_fadvise/generic_fadvise.ko -then : +#include - eval "$cachevar=no" + #include + #include -else $as_nop - if test "x$enable_linux_builtin" != "xyes" -then : +int +main (void) +{ + ; + return 0; +} - grep -q -E '[[:space:]]generic_fadvise[[:space:]]' \ - $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null - rc=$? - if test $rc -ne 0; then - export=0 - for file in mm/fadvise.c; do - grep -q -E "EXPORT_SYMBOL.*(generic_fadvise)" \ - "$LINUX/$file" 2>/dev/null - rc=$? - if test $rc -eq 0; then - export=1 - break; - fi - done - if test $export -eq 0; then : +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); - eval "$cachevar=no" +_ACEOF - else : - eval "$cachevar=yes" + test -d build || mkdir -p build + test -d build/filelock_header_license || mkdir -p build/filelock_header_license - fi - else : + file=build/filelock_header_license/Makefile - eval "$cachevar=yes" + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/filelock_header_license - fi +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -else $as_nop - eval "$cachevar=yes" + echo "obj-m := filelock_header_license.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += filelock_header_license/" >>build/Makefile fi + fi fi - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FADVISE 1" >>confdefs.h -else $as_nop + cachevar="zfs_cv_kernel_flush_workqueue_system_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +test -d build/flush_workqueue_system || mkdir -p build/flush_workqueue_system +cat confdefs.h - <<_ACEOF >build/flush_workqueue_system/flush_workqueue_system.c +#include + + #include +int +main (void) +{ + + flush_workqueue(system_wq); - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether header linux/sched/rt.h exists" >&5 -printf %s "checking whether header linux/sched/rt.h exists... " >&6; } + ; + return 0; +} - cachevar="zfs_cv_kernel_sched_rt_header_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); - if test -d build/sched_rt_header -then : +_ACEOF - if test -f build/sched_rt_header/sched_rt_header.ko -then : - eval "$cachevar=yes" + test -d build || mkdir -p build + test -d build/flush_workqueue_system || mkdir -p build/flush_workqueue_system -else $as_nop + file=build/flush_workqueue_system/Makefile - eval "$cachevar=no" + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_system -fi +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -else $as_nop - as_fn_error $? " - *** No matching source for the \"sched_rt_header\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 -fi + echo "obj-m := flush_workqueue_system.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_system/" >>build/Makefile fi - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test -n "" ; then : -else $as_nop +test -d build/flush_workqueue_system_license || mkdir -p build/flush_workqueue_system_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_system_license/flush_workqueue_system_license.c - as_fn_error $? " - *** None of the expected \"sched_rt_header\" interfaces were detected. - *** This may be because your kernel version is newer than what is - *** supported, or you are using a patched custom kernel with - *** incompatible modifications. - *** - *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX - " "$LINENO" 5 +#include + #include -fi +int +main (void) +{ + + flush_workqueue(system_wq); + + ; + return 0; +} +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether usleep_range() is available" >&5 -printf %s "checking whether usleep_range() is available... " >&6; } - cachevar="zfs_cv_kernel_usleep_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + test -d build || mkdir -p build + test -d build/flush_workqueue_system_license || mkdir -p build/flush_workqueue_system_license - if test -d build/usleep_range -then : + file=build/flush_workqueue_system_license/Makefile - if test -f build/usleep_range/usleep_range.ko -then : + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_system_license - eval "$cachevar=yes" +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -else $as_nop - eval "$cachevar=no" -fi + echo "obj-m := flush_workqueue_system_license.o" >>$file -else $as_nop + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_system_license/" >>build/Makefile +fi - as_fn_error $? " - *** No matching source for the \"usleep_range\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 fi fi + + cachevar="zfs_cv_kernel_flush_workqueue_percpu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "x"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop +test -d build/flush_workqueue_percpu || mkdir -p build/flush_workqueue_percpu +cat confdefs.h - <<_ACEOF >build/flush_workqueue_percpu/flush_workqueue_percpu.c +#include - as_fn_error $? " - *** None of the expected \"usleep_range()\" interfaces were detected. - *** This may be because your kernel version is newer than what is - *** supported, or you are using a patched custom kernel with - *** incompatible modifications. - *** - *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX - " "$LINENO" 5 + #include -fi +int +main (void) +{ + flush_workqueue(system_percpu_wq); + ; + return 0; +} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __vmalloc(ptr, flags, pageflags) is available" >&5 -printf %s "checking whether __vmalloc(ptr, flags, pageflags) is available... " >&6; } +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); - cachevar="zfs_cv_kernel___vmalloc_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop +_ACEOF - if test -d build/__vmalloc -then : - if test -f build/__vmalloc/__vmalloc.ko -then : + test -d build || mkdir -p build + test -d build/flush_workqueue_percpu || mkdir -p build/flush_workqueue_percpu - eval "$cachevar=yes" + file=build/flush_workqueue_percpu/Makefile -else $as_nop + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_percpu - eval "$cachevar=no" +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -fi -else $as_nop - as_fn_error $? " - *** No matching source for the \"__vmalloc\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 + echo "obj-m := flush_workqueue_percpu.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_percpu/" >>build/Makefile fi -fi - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test -n "" ; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_VMALLOC_PAGE_KERNEL 1" >>confdefs.h +test -d build/flush_workqueue_percpu_license || mkdir -p build/flush_workqueue_percpu_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_percpu_license/flush_workqueue_percpu_license.c +#include -else $as_nop + #include - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +int +main (void) +{ + flush_workqueue(system_percpu_wq); + ; + return 0; +} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether timestamp_truncate() exists" >&5 -printf %s "checking whether timestamp_truncate() exists... " >&6; } +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); - cachevar="zfs_cv_kernel_timestamp_truncate_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop +_ACEOF - if test -d build/timestamp_truncate -then : - if test -f build/timestamp_truncate/timestamp_truncate.ko -then : + test -d build || mkdir -p build + test -d build/flush_workqueue_percpu_license || mkdir -p build/flush_workqueue_percpu_license - eval "$cachevar=yes" + file=build/flush_workqueue_percpu_license/Makefile -else $as_nop + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_percpu_license - eval "$cachevar=no" +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF -fi -else $as_nop - as_fn_error $? " - *** No matching source for the \"timestamp_truncate\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 + echo "obj-m := flush_workqueue_percpu_license.o" >>$file + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_percpu_license/" >>build/Makefile fi -fi - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi -printf "%s\n" "#define HAVE_INODE_TIMESTAMP_TRUNCATE 1" >>confdefs.h + cachevar="zfs_cv_kernel_flush_workqueue_internal_system_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +test -d build/flush_workqueue_internal_system || mkdir -p build/flush_workqueue_internal_system +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_system/flush_workqueue_internal_system.c -fi +#include + #include - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_get_ctime() exists" >&5 -printf %s "checking whether inode_get_ctime() exists... " >&6; } - cachevar="zfs_cv_kernel_inode_get_ctime_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop +int +main (void) +{ - if test -d build/inode_get_ctime -then : + __flush_workqueue(system_wq); - if test -f build/inode_get_ctime/inode_get_ctime.ko -then : + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_system || mkdir -p build/flush_workqueue_internal_system + + file=build/flush_workqueue_internal_system/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_system + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_system.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_system/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/flush_workqueue_internal_system_license || mkdir -p build/flush_workqueue_internal_system_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_system_license/flush_workqueue_internal_system_license.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_system_license || mkdir -p build/flush_workqueue_internal_system_license + + file=build/flush_workqueue_internal_system_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_system_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_system_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_system_license/" >>build/Makefile +fi + + +fi + +fi + + + cachevar="zfs_cv_kernel_flush_workqueue_internal_percpu_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_workqueue_internal_percpu || mkdir -p build/flush_workqueue_internal_percpu +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_percpu/flush_workqueue_internal_percpu.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_percpu_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_percpu || mkdir -p build/flush_workqueue_internal_percpu + + file=build/flush_workqueue_internal_percpu/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_percpu + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_percpu.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_percpu/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/flush_workqueue_internal_percpu_license || mkdir -p build/flush_workqueue_internal_percpu_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_percpu_license/flush_workqueue_internal_percpu_license.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_percpu_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_percpu_license || mkdir -p build/flush_workqueue_internal_percpu_license + + file=build/flush_workqueue_internal_percpu_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_percpu_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_percpu_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_percpu_license/" >>build/Makefile +fi + + +fi + +fi + + + + case "$host_cpu" in + powerpc*) + + + cachevar="zfs_cv_kernel_cpu_has_feature_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/cpu_has_feature || mkdir -p build/cpu_has_feature +cat confdefs.h - <<_ACEOF >build/cpu_has_feature/cpu_has_feature.c + +#include + + #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) + #include + #else + #include + #endif + + +int +main (void) +{ + + return cpu_has_feature(CPU_FTR_ALTIVEC) ? 0 : 1; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/cpu_has_feature || mkdir -p build/cpu_has_feature + + file=build/cpu_has_feature/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/cpu_has_feature + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := cpu_has_feature.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += cpu_has_feature/" >>build/Makefile +fi + + + if test -n "ZFS_META_LICENSE" ; then : + + +test -d build/cpu_has_feature_license || mkdir -p build/cpu_has_feature_license +cat confdefs.h - <<_ACEOF >build/cpu_has_feature_license/cpu_has_feature_license.c + +#include + + #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) + #include + #else + #include + #endif + + +int +main (void) +{ + + return cpu_has_feature(CPU_FTR_ALTIVEC) ? 0 : 1; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(ZFS_META_LICENSE); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/cpu_has_feature_license || mkdir -p build/cpu_has_feature_license + + file=build/cpu_has_feature_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/cpu_has_feature_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := cpu_has_feature_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += cpu_has_feature_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_flush_dcache_page_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page +cat confdefs.h - <<_ACEOF >build/flush_dcache_page/flush_dcache_page.c + +#include + + #include + + +int +main (void) +{ + + flush_dcache_page(0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page + + file=build/flush_dcache_page/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_dcache_page.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_dcache_page/" >>build/Makefile +fi + + + if test -n "ZFS_META_LICENSE" ; then : + + +test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license +cat confdefs.h - <<_ACEOF >build/flush_dcache_page_license/flush_dcache_page_license.c + +#include + + #include + + +int +main (void) +{ + + flush_dcache_page(0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(ZFS_META_LICENSE); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license + + file=build/flush_dcache_page_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_dcache_page_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_dcache_page_license/" >>build/Makefile +fi + + +fi + +fi + + + ;; + riscv*) + + + cachevar="zfs_cv_kernel_flush_dcache_page_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page +cat confdefs.h - <<_ACEOF >build/flush_dcache_page/flush_dcache_page.c + +#include + + #include + + +int +main (void) +{ + + flush_dcache_page(0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page + + file=build/flush_dcache_page/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_dcache_page.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_dcache_page/" >>build/Makefile +fi + + + if test -n "ZFS_META_LICENSE" ; then : + + +test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license +cat confdefs.h - <<_ACEOF >build/flush_dcache_page_license/flush_dcache_page_license.c + +#include + + #include + + +int +main (void) +{ + + flush_dcache_page(0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(ZFS_META_LICENSE); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license + + file=build/flush_dcache_page_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_dcache_page_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_dcache_page_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_dcache_page_license/" >>build/Makefile +fi + + +fi + +fi + + + ;; + esac + + + if test "xfor available kernel interfaces" != "x"; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for available kernel interfaces" >&5 +$as_echo_n "checking for available kernel interfaces... " >&6; } + + if test "x$silent" != "xyes" -a -t 6; then : + + _zfs_linux_test_progress_text="for available kernel interfaces" + + ( + total=$(wc -l < build/Makefile) + count=0 + + while kill -0 $$ 2>/dev/null ; do + + if test "$count" -lt "$total" ; then + if ! test -f build/build.log ; then + count=$total + else + count_n=$(awk '/CC/ && /\/[^\.]+\.o$/ { c++ } END { print c }' build/build.log 2>/dev/null) + if test "x$count_n" != "x" ; then + count=$count_n + fi + fi + + printf '\rchecking %s... %d/%d' "for available kernel interfaces" "$count" "$total" >&6 + fi + + sleep 0.5 + done + ) & + + _zfs_linux_test_progress_pid=$! + +fi + + +fi + + + + + + + + + { ac_try=' + KBUILD_MODPOST_NOFINAL="yes" KBUILD_MODPOST_WARN="" + make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} + ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} + CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES + ${KERNEL_CROSS_COMPILE:+CROSS_COMPILE=$KERNEL_CROSS_COMPILE} + ${KERNEL_ARCH:+ARCH=$KERNEL_ARCH} + -C $LINUX_OBJ $ARCH_UM M=$PWD/build >build/build.log 2>&1' + { { 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; }; } + if { ac_try='test -f build/build.log' + { { 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 : + + mv build/Makefile build/Makefile.compile.kabi + mv build/build.log build/build.log.kabi + +else + + as_fn_error $? " + *** Unable to compile test source to determine kernel interfaces." "$LINENO" 5 + +fi + + + + if test "x$enable_linux_builtin" = "xno"; then : + + for dir in $(awk '/^obj-m/ { print $3 }' \ + build/Makefile.compile.kabi); do + name=${dir%/} + if test -f build/$name/$name.o; then : + + if test "${name##*_}" = "license"; then : + + + + + + + + + { ac_try=' + KBUILD_MODPOST_NOFINAL="" KBUILD_MODPOST_WARN="yes" + make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} + ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} + CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES + ${KERNEL_CROSS_COMPILE:+CROSS_COMPILE=$KERNEL_CROSS_COMPILE} + ${KERNEL_ARCH:+ARCH=$KERNEL_ARCH} + -C $LINUX_OBJ $ARCH_UM M=$PWD/build/$name >build/$name/build.log 2>&1' + { { 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; }; } + if { ac_try='test -f build/$name/build.log' + { { 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 : + + mv build/$name/Makefile build/$name/Makefile.modpost.kabi + cat build/$name/build.log >>build/build.log.kabi + +else + + as_fn_error $? " + *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 + +fi + + + echo "obj-n += $dir" >>build/Makefile + +else + + echo "obj-m += $dir" >>build/Makefile + +fi + +else + + echo "obj-n += $dir" >>build/Makefile + +fi + done + + + + + + + + + { ac_try=' + KBUILD_MODPOST_NOFINAL="" KBUILD_MODPOST_WARN="yes" + make modules -k -j$TEST_JOBS ${KERNEL_CC:+CC=$KERNEL_CC} + ${KERNEL_LD:+LD=$KERNEL_LD} ${KERNEL_LLVM:+LLVM=$KERNEL_LLVM} + CONFIG_MODULES=y CFLAGS_MODULE=-DCONFIG_MODULES + ${KERNEL_CROSS_COMPILE:+CROSS_COMPILE=$KERNEL_CROSS_COMPILE} + ${KERNEL_ARCH:+ARCH=$KERNEL_ARCH} + -C $LINUX_OBJ $ARCH_UM M=$PWD/build >build/build.log 2>&1' + { { 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; }; } + if { ac_try='test -f build/build.log' + { { 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 : + + mv build/Makefile build/Makefile.modpost.kabi + cat build/build.log >>build/build.log.kabi + +else + + as_fn_error $? " + *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 + +fi + + + +else + + for dir in $(awk '/^obj-m/ { print $3 }' \ + build/Makefile.compile.kabi); do + name=${dir%/} + if test -f build/$name/$name.o; then : + + touch build/$name/$name.ko + +fi + done + +fi + + if test "xfor available kernel interfaces" != "x"; then : + + + if test "x$_zfs_linux_test_progress_pid" != "x"; then : + + kill $_zfs_linux_test_progress_pid 2>/dev/null + wait $_zfs_linux_test_progress_pid 2>/dev/null + printf '\r\033\1332Kchecking %s... ' "$_zfs_linux_test_progress_text" >&6 + _zfs_linux_test_progress_pid= + _zfs_linux_test_progress_text= + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + + +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines intptr_t" >&5 +$as_echo_n "checking whether kernel defines intptr_t... " >&6; } + + cachevar="zfs_cv_kernel_type_intptr_t_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/type_intptr_t; then : + + if test -f build/type_intptr_t/type_intptr_t.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"type_intptr_t\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_KERNEL_INTPTR_T 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether access_ok() has 'type' parameter" >&5 +$as_echo_n "checking whether access_ok() has 'type' parameter... " >&6; } + + cachevar="zfs_cv_kernel_access_ok_type_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/access_ok_type; then : + + if test -f build/access_ok_type/access_ok_type.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"access_ok_type\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_ACCESS_OK_TYPE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compile-time stack validation (objtool) is available" >&5 +$as_echo_n "checking whether compile-time stack validation (objtool) is available... " >&6; } + + cachevar="zfs_cv_kernel_objtool_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/objtool; then : + + if test -f build/objtool/objtool.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"objtool\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_KERNEL_OBJTOOL 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether STACK_FRAME_NON_STANDARD is defined" >&5 +$as_echo_n "checking whether STACK_FRAME_NON_STANDARD is defined... " >&6; } + + cachevar="zfs_cv_kernel_stack_frame_non_standard_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/stack_frame_non_standard; then : + + if test -f build/stack_frame_non_standard/stack_frame_non_standard.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"stack_frame_non_standard\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_STACK_FRAME_NON_STANDARD 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether STACK_FRAME_NON_STANDARD asm macro is defined" >&5 +$as_echo_n "checking whether STACK_FRAME_NON_STANDARD asm macro is defined... " >&6; } + sp='[[:space:]]' + dotmacro='[.]macro' + regexp="^$sp*$dotmacro$sp+STACK_FRAME_NON_STANDARD$sp" + if $EGREP -s -q "$regexp" $objtool_header; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_STACK_FRAME_NON_STANDARD_ASM 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_OBJTOOL_WERROR is defined" >&5 +$as_echo_n "checking whether CONFIG_OBJTOOL_WERROR is defined... " >&6; } + + cachevar="zfs_cv_kernel_config_objtool_werror_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/config_objtool_werror; then : + + if test -f build/config_objtool_werror/config_objtool_werror.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"config_objtool_werror\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CONFIG_OBJTOOL_WERROR_DEFINED=yes + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pde_data() is lowercase" >&5 +$as_echo_n "checking whether pde_data() is lowercase... " >&6; } + + cachevar="zfs_cv_kernel_pde_data_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/pde_data; then : + + if test -f build/pde_data/pde_data.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"pde_data\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define SPL_PDE_DATA pde_data" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define SPL_PDE_DATA PDE_DATA" >>confdefs.h + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fadvise() is available" >&5 +$as_echo_n "checking whether generic_fadvise() is available... " >&6; } + + cachevar="zfs_cv_kernel_generic_fadvise_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if ! test -f build/generic_fadvise/generic_fadvise.ko; then : + + eval "$cachevar=no" + +else + + if test "x$enable_linux_builtin" != "xyes"; then : + + + grep -q -E '[[:space:]]generic_fadvise[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in mm/fadvise.c; do + grep -q -E "EXPORT_SYMBOL.*(generic_fadvise)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + + eval "$cachevar=no" + + else : + + eval "$cachevar=yes" + + fi + else : + + eval "$cachevar=yes" + + fi + + +else + + eval "$cachevar=yes" + +fi + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_GENERIC_FADVISE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether header linux/sched/rt.h exists" >&5 +$as_echo_n "checking whether header linux/sched/rt.h exists... " >&6; } + + cachevar="zfs_cv_kernel_sched_rt_header_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/sched_rt_header; then : + + if test -f build/sched_rt_header/sched_rt_header.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"sched_rt_header\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + + as_fn_error $? " + *** None of the expected \"sched_rt_header\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usleep_range() is available" >&5 +$as_echo_n "checking whether usleep_range() is available... " >&6; } + + cachevar="zfs_cv_kernel_usleep_range_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/usleep_range; then : + + if test -f build/usleep_range/usleep_range.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"usleep_range\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + + as_fn_error $? " + *** None of the expected \"usleep_range()\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __vmalloc(ptr, flags, pageflags) is available" >&5 +$as_echo_n "checking whether __vmalloc(ptr, flags, pageflags) is available... " >&6; } + + cachevar="zfs_cv_kernel___vmalloc_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/__vmalloc; then : + + if test -f build/__vmalloc/__vmalloc.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"__vmalloc\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VMALLOC_PAGE_KERNEL 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether timestamp_truncate() exists" >&5 +$as_echo_n "checking whether timestamp_truncate() exists... " >&6; } + + cachevar="zfs_cv_kernel_timestamp_truncate_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/timestamp_truncate; then : + + if test -f build/timestamp_truncate/timestamp_truncate.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"timestamp_truncate\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_INODE_TIMESTAMP_TRUNCATE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_get_ctime() exists" >&5 +$as_echo_n "checking whether inode_get_ctime() exists... " >&6; } + + cachevar="zfs_cv_kernel_inode_get_ctime_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/inode_get_ctime; then : + + if test -f build/inode_get_ctime/inode_get_ctime.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_get_ctime\" test, check that @@ -49267,47 +50571,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_GET_CTIME 1" >>confdefs.h +$as_echo "#define HAVE_INODE_GET_CTIME 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_set_ctime_to_ts() exists" >&5 -printf %s "checking whether inode_set_ctime_to_ts() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_set_ctime_to_ts() exists" >&5 +$as_echo_n "checking whether inode_set_ctime_to_ts() exists... " >&6; } cachevar="zfs_cv_kernel_inode_set_ctime_to_ts_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_set_ctime_to_ts -then : + if test -d build/inode_set_ctime_to_ts; then : - if test -f build/inode_set_ctime_to_ts/inode_set_ctime_to_ts.ko -then : + if test -f build/inode_set_ctime_to_ts/inode_set_ctime_to_ts.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_set_ctime_to_ts\" test, check that @@ -49319,47 +50619,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_SET_CTIME_TO_TS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_SET_CTIME_TO_TS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_get_atime() exists" >&5 -printf %s "checking whether inode_get_atime() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_get_atime() exists" >&5 +$as_echo_n "checking whether inode_get_atime() exists... " >&6; } cachevar="zfs_cv_kernel_inode_get_atime_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_get_atime -then : + if test -d build/inode_get_atime; then : - if test -f build/inode_get_atime/inode_get_atime.ko -then : + if test -f build/inode_get_atime/inode_get_atime.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_get_atime\" test, check that @@ -49371,47 +50667,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_GET_ATIME 1" >>confdefs.h +$as_echo "#define HAVE_INODE_GET_ATIME 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_set_atime_to_ts() exists" >&5 -printf %s "checking whether inode_set_atime_to_ts() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_set_atime_to_ts() exists" >&5 +$as_echo_n "checking whether inode_set_atime_to_ts() exists... " >&6; } cachevar="zfs_cv_kernel_inode_set_atime_to_ts_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_set_atime_to_ts -then : + if test -d build/inode_set_atime_to_ts; then : - if test -f build/inode_set_atime_to_ts/inode_set_atime_to_ts.ko -then : + if test -f build/inode_set_atime_to_ts/inode_set_atime_to_ts.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_set_atime_to_ts\" test, check that @@ -49423,47 +50715,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_SET_ATIME_TO_TS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_SET_ATIME_TO_TS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_get_mtime() exists" >&5 -printf %s "checking whether inode_get_mtime() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_get_mtime() exists" >&5 +$as_echo_n "checking whether inode_get_mtime() exists... " >&6; } cachevar="zfs_cv_kernel_inode_get_mtime_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_get_mtime -then : + if test -d build/inode_get_mtime; then : - if test -f build/inode_get_mtime/inode_get_mtime.ko -then : + if test -f build/inode_get_mtime/inode_get_mtime.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_get_mtime\" test, check that @@ -49475,47 +50763,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_GET_MTIME 1" >>confdefs.h +$as_echo "#define HAVE_INODE_GET_MTIME 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_set_mtime_to_ts() exists" >&5 -printf %s "checking whether inode_set_mtime_to_ts() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_set_mtime_to_ts() exists" >&5 +$as_echo_n "checking whether inode_set_mtime_to_ts() exists... " >&6; } cachevar="zfs_cv_kernel_inode_set_mtime_to_ts_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_set_mtime_to_ts -then : + if test -d build/inode_set_mtime_to_ts; then : - if test -f build/inode_set_mtime_to_ts/inode_set_mtime_to_ts.ko -then : + if test -f build/inode_set_mtime_to_ts/inode_set_mtime_to_ts.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_set_mtime_to_ts\" test, check that @@ -49527,48 +50811,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_SET_MTIME_TO_TS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_SET_MTIME_TO_TS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether proc_ops structure exists" >&5 -printf %s "checking whether proc_ops structure exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether proc_ops structure exists" >&5 +$as_echo_n "checking whether proc_ops structure exists... " >&6; } cachevar="zfs_cv_kernel_proc_ops_struct_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/proc_ops_struct -then : + if test -d build/proc_ops_struct; then : - if test -f build/proc_ops_struct/proc_ops_struct.ko -then : + if test -f build/proc_ops_struct/proc_ops_struct.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"proc_ops_struct\" test, check that @@ -49580,49 +50860,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PROC_OPS_STRUCT 1" >>confdefs.h +$as_echo "#define HAVE_PROC_OPS_STRUCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->check_events() exists" >&5 -printf %s "checking whether bops->check_events() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->check_events() exists" >&5 +$as_echo_n "checking whether bops->check_events() exists... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_check_events_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_check_events -then : + if test -d build/block_device_operations_check_events; then : - if test -f build/block_device_operations_check_events/block_device_operations_check_events.ko -then : + if test -f build/block_device_operations_check_events/block_device_operations_check_events.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_check_events\" test, check that @@ -49634,13 +50910,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -49650,7 +50925,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -49658,30 +50933,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 2 args" >&5 -printf %s "checking whether bops->release() is void and takes 2 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 2 args" >&5 +$as_echo_n "checking whether bops->release() is void and takes 2 args... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_release_void_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_release_void -then : + if test -d build/block_device_operations_release_void; then : - if test -f build/block_device_operations_release_void/block_device_operations_release_void.ko -then : + if test -f build/block_device_operations_release_void/block_device_operations_release_void.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_release_void\" test, check that @@ -49693,40 +50965,36 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 1 arg" >&5 -printf %s "checking whether bops->release() is void and takes 1 arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 1 arg" >&5 +$as_echo_n "checking whether bops->release() is void and takes 1 arg... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_release_void_1arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_release_void_1arg -then : + if test -d build/block_device_operations_release_void_1arg; then : - if test -f build/block_device_operations_release_void_1arg/block_device_operations_release_void_1arg.ko -then : + if test -f build/block_device_operations_release_void_1arg/block_device_operations_release_void_1arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_release_void_1arg\" test, check that @@ -49738,16 +51006,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG 1" >>confdefs.h +$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -49757,7 +51024,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -49768,30 +51035,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->revalidate_disk() exists" >&5 -printf %s "checking whether bops->revalidate_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->revalidate_disk() exists" >&5 +$as_echo_n "checking whether bops->revalidate_disk() exists... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_revalidate_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_revalidate_disk -then : + if test -d build/block_device_operations_revalidate_disk; then : - if test -f build/block_device_operations_revalidate_disk/block_device_operations_revalidate_disk.ko -then : + if test -f build/block_device_operations_revalidate_disk/block_device_operations_revalidate_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_revalidate_disk\" test, check that @@ -49803,19 +51067,67 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + +$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->getgeo() takes gendisk as first arg" >&5 +$as_echo_n "checking whether bops->getgeo() takes gendisk as first arg... " >&6; } + + cachevar="zfs_cv_kernel_block_device_operations_getgeo_gendisk_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/block_device_operations_getgeo_gendisk; then : + + if test -f build/block_device_operations_getgeo_gendisk/block_device_operations_getgeo_gendisk.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"block_device_operations_getgeo_gendisk\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -49823,30 +51135,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_set_op_attrs is available" >&5 -printf %s "checking whether bio_set_op_attrs is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_op_attrs is available" >&5 +$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; } cachevar="zfs_cv_kernel_bio_set_op_attrs_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_set_op_attrs -then : + if test -d build/bio_set_op_attrs; then : - if test -f build/bio_set_op_attrs/bio_set_op_attrs.ko -then : + if test -f build/bio_set_op_attrs/bio_set_op_attrs.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_set_op_attrs\" test, check that @@ -49858,48 +51167,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_SET_OP_ATTRS 1" >>confdefs.h +$as_echo "#define HAVE_BIO_SET_OP_ATTRS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is GPL-only" >&5 -printf %s "checking whether bio_set_dev() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is GPL-only" >&5 +$as_echo_n "checking whether bio_set_dev() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_bio_set_dev_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_set_dev_license -then : + if test -d build/bio_set_dev_license; then : - if test -f build/bio_set_dev_license/bio_set_dev_license.ko -then : + if test -f build/bio_set_dev_license/bio_set_dev_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_set_dev_license\" test, check that @@ -49911,47 +51216,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_SET_DEV_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_BIO_SET_DEV_GPL_ONLY 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is a macro" >&5 -printf %s "checking whether bio_set_dev() is a macro... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is a macro" >&5 +$as_echo_n "checking whether bio_set_dev() is a macro... " >&6; } cachevar="zfs_cv_kernel_bio_set_dev_macro_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_set_dev_macro -then : + if test -d build/bio_set_dev_macro; then : - if test -f build/bio_set_dev_macro/bio_set_dev_macro.ko -then : + if test -f build/bio_set_dev_macro/bio_set_dev_macro.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_set_dev_macro\" test, check that @@ -49963,48 +51264,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_SET_DEV_MACRO 1" >>confdefs.h +$as_echo "#define HAVE_BIO_SET_DEV_MACRO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether current->bio_list exists" >&5 -printf %s "checking whether current->bio_list exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current->bio_list exists" >&5 +$as_echo_n "checking whether current->bio_list exists... " >&6; } cachevar="zfs_cv_kernel_current_bio_list_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/current_bio_list -then : + if test -d build/current_bio_list; then : - if test -f build/current_bio_list/current_bio_list.ko -then : + if test -f build/current_bio_list/current_bio_list.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"current_bio_list\" test, check that @@ -50016,13 +51313,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -50032,7 +51328,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -50040,30 +51336,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is available" >&5 -printf %s "checking whether blkg_tryget() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is available" >&5 +$as_echo_n "checking whether blkg_tryget() is available... " >&6; } cachevar="zfs_cv_kernel_blkg_tryget_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkg_tryget -then : + if test -d build/blkg_tryget; then : - if test -f build/blkg_tryget/blkg_tryget.ko -then : + if test -f build/blkg_tryget/blkg_tryget.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkg_tryget\" test, check that @@ -50075,39 +51368,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKG_TRYGET 1" >>confdefs.h +$as_echo "#define HAVE_BLKG_TRYGET 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is GPL-only" >&5 -printf %s "checking whether blkg_tryget() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is GPL-only" >&5 +$as_echo_n "checking whether blkg_tryget() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_blkg_tryget_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkg_tryget_license -then : + if test -d build/blkg_tryget_license; then : - if test -f build/blkg_tryget_license/blkg_tryget_license.ko -then : + if test -f build/blkg_tryget_license/blkg_tryget_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkg_tryget_license\" test, check that @@ -50119,56 +51408,52 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKG_TRYGET_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_BLKG_TRYGET_GPL_ONLY 1" >>confdefs.h fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio->bi_bdev->bd_disk exists" >&5 -printf %s "checking whether bio->bi_bdev->bd_disk exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio->bi_bdev->bd_disk exists" >&5 +$as_echo_n "checking whether bio->bi_bdev->bd_disk exists... " >&6; } cachevar="zfs_cv_kernel_bio_bdev_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_bdev_disk -then : + if test -d build/bio_bdev_disk; then : - if test -f build/bio_bdev_disk/bio_bdev_disk.ko -then : + if test -f build/bio_bdev_disk/bio_bdev_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_bdev_disk\" test, check that @@ -50180,48 +51465,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_BDEV_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BIO_BDEV_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether block_device_operations->submit_bio() returns void" >&5 -printf %s "checking whether block_device_operations->submit_bio() returns void... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether block_device_operations->submit_bio() returns void" >&5 +$as_echo_n "checking whether block_device_operations->submit_bio() returns void... " >&6; } cachevar="zfs_cv_kernel_bio_bdev_submit_bio_void_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_bdev_submit_bio_void -then : + if test -d build/bio_bdev_submit_bio_void; then : - if test -f build/bio_bdev_submit_bio_void/bio_bdev_submit_bio_void.ko -then : + if test -f build/bio_bdev_submit_bio_void/bio_bdev_submit_bio_void.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_bdev_submit_bio_void\" test, check that @@ -50233,48 +51514,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_alloc() wants 4 args" >&5 -printf %s "checking whether bio_alloc() wants 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_alloc() wants 4 args" >&5 +$as_echo_n "checking whether bio_alloc() wants 4 args... " >&6; } cachevar="zfs_cv_kernel_bio_alloc_4arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_alloc_4arg -then : + if test -d build/bio_alloc_4arg; then : - if test -f build/bio_alloc_4arg/bio_alloc_4arg.ko -then : + if test -f build/bio_alloc_4arg/bio_alloc_4arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_alloc_4arg\" test, check that @@ -50286,19 +51563,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_ALLOC_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_BIO_ALLOC_4ARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -50306,30 +51582,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 3 args" >&5 -printf %s "checking whether blkdev_get_by_path() exists and takes 3 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 3 args" >&5 +$as_echo_n "checking whether blkdev_get_by_path() exists and takes 3 args... " >&6; } cachevar="zfs_cv_kernel_blkdev_get_by_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_get_by_path -then : + if test -d build/blkdev_get_by_path; then : - if test -f build/blkdev_get_by_path/blkdev_get_by_path.ko -then : + if test -f build/blkdev_get_by_path/blkdev_get_by_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_get_by_path\" test, check that @@ -50341,40 +51614,36 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 4 args" >&5 -printf %s "checking whether blkdev_get_by_path() exists and takes 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 4 args" >&5 +$as_echo_n "checking whether blkdev_get_by_path() exists and takes 4 args... " >&6; } cachevar="zfs_cv_kernel_blkdev_get_by_path_4arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_get_by_path_4arg -then : + if test -d build/blkdev_get_by_path_4arg; then : - if test -f build/blkdev_get_by_path_4arg/blkdev_get_by_path_4arg.ko -then : + if test -f build/blkdev_get_by_path_4arg/blkdev_get_by_path_4arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_get_by_path_4arg\" test, check that @@ -50386,43 +51655,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BLKDEV_GET_BY_PATH_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_GET_BY_PATH_4ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_open_by_path() exists" >&5 -printf %s "checking whether bdev_open_by_path() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_open_by_path() exists" >&5 +$as_echo_n "checking whether bdev_open_by_path() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_open_by_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_open_by_path -then : + if test -d build/bdev_open_by_path; then : - if test -f build/bdev_open_by_path/bdev_open_by_path.ko -then : + if test -f build/bdev_open_by_path/bdev_open_by_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_open_by_path\" test, check that @@ -50434,43 +51699,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BDEV_OPEN_BY_PATH 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_OPEN_BY_PATH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_file_open_by_path() exists" >&5 -printf %s "checking whether bdev_file_open_by_path() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_file_open_by_path() exists" >&5 +$as_echo_n "checking whether bdev_file_open_by_path() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_file_open_by_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_file_open_by_path -then : + if test -d build/bdev_file_open_by_path; then : - if test -f build/bdev_file_open_by_path/bdev_file_open_by_path.ko -then : + if test -f build/bdev_file_open_by_path/bdev_file_open_by_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_file_open_by_path\" test, check that @@ -50482,19 +51743,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BDEV_FILE_OPEN_BY_PATH 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_FILE_OPEN_BY_PATH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** None of the expected \"blkdev_get_by_path()\" interfaces were detected. @@ -50503,7 +51763,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -50520,30 +51780,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() exists" >&5 -printf %s "checking whether blkdev_put() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() exists" >&5 +$as_echo_n "checking whether blkdev_put() exists... " >&6; } cachevar="zfs_cv_kernel_blkdev_put_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_put -then : + if test -d build/blkdev_put; then : - if test -f build/blkdev_put/blkdev_put.ko -then : + if test -f build/blkdev_put/blkdev_put.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_put\" test, check that @@ -50555,43 +51812,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_PUT 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_PUT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() accepts void* as arg 2" >&5 -printf %s "checking whether blkdev_put() accepts void* as arg 2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() accepts void* as arg 2" >&5 +$as_echo_n "checking whether blkdev_put() accepts void* as arg 2... " >&6; } cachevar="zfs_cv_kernel_blkdev_put_holder_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_put_holder -then : + if test -d build/blkdev_put_holder; then : - if test -f build/blkdev_put_holder/blkdev_put_holder.ko -then : + if test -f build/blkdev_put_holder/blkdev_put_holder.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_put_holder\" test, check that @@ -50603,43 +51856,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_PUT_HOLDER 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_PUT_HOLDER 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_release() exists" >&5 -printf %s "checking whether bdev_release() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_release() exists" >&5 +$as_echo_n "checking whether bdev_release() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_release_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_release -then : + if test -d build/bdev_release; then : - if test -f build/bdev_release/bdev_release.ko -then : + if test -f build/bdev_release/bdev_release.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_release\" test, check that @@ -50651,19 +51900,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_RELEASE 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_RELEASE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -50675,30 +51923,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_reread_part() exists" >&5 -printf %s "checking whether blkdev_reread_part() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_reread_part() exists" >&5 +$as_echo_n "checking whether blkdev_reread_part() exists... " >&6; } cachevar="zfs_cv_kernel_blkdev_reread_part_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_reread_part -then : + if test -d build/blkdev_reread_part; then : - if test -f build/blkdev_reread_part/blkdev_reread_part.ko -then : + if test -f build/blkdev_reread_part/blkdev_reread_part.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_reread_part\" test, check that @@ -50710,48 +51955,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_REREAD_PART 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_REREAD_PART 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether invalidate_bdev() exists" >&5 -printf %s "checking whether invalidate_bdev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether invalidate_bdev() exists" >&5 +$as_echo_n "checking whether invalidate_bdev() exists... " >&6; } cachevar="zfs_cv_kernel_invalidate_bdev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/invalidate_bdev -then : + if test -d build/invalidate_bdev; then : - if test -f build/invalidate_bdev/invalidate_bdev.ko -then : + if test -f build/invalidate_bdev/invalidate_bdev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"invalidate_bdev\" test, check that @@ -50763,13 +52004,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -50779,7 +52019,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -50787,24 +52027,21 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants dev_t arg" >&5 -printf %s "checking whether lookup_bdev() wants dev_t arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants dev_t arg" >&5 +$as_echo_n "checking whether lookup_bdev() wants dev_t arg... " >&6; } cachevar="zfs_cv_kernel_lookup_bdev_devt_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/lookup_bdev_devt/lookup_bdev_devt.ko -then : + if ! test -f build/lookup_bdev_devt/lookup_bdev_devt.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \ @@ -50837,7 +52074,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -50848,38 +52085,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DEVT_LOOKUP_BDEV 1" >>confdefs.h +$as_echo "#define HAVE_DEVT_LOOKUP_BDEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants 1 arg" >&5 -printf %s "checking whether lookup_bdev() wants 1 arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants 1 arg" >&5 +$as_echo_n "checking whether lookup_bdev() wants 1 arg... " >&6; } cachevar="zfs_cv_kernel_lookup_bdev_1arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/lookup_bdev_1arg/lookup_bdev_1arg.ko -then : + if ! test -f build/lookup_bdev_1arg/lookup_bdev_1arg.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \ @@ -50912,7 +52145,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -50923,16 +52156,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_1ARG_LOOKUP_BDEV 1" >>confdefs.h +$as_echo "#define HAVE_1ARG_LOOKUP_BDEV 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -50942,7 +52174,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -50953,30 +52185,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_logical_block_size() is available" >&5 -printf %s "checking whether bdev_logical_block_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_logical_block_size() is available" >&5 +$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_logical_block_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_logical_block_size -then : + if test -d build/bdev_logical_block_size; then : - if test -f build/bdev_logical_block_size/bdev_logical_block_size.ko -then : + if test -f build/bdev_logical_block_size/bdev_logical_block_size.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_logical_block_size\" test, check that @@ -50988,13 +52217,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -51004,7 +52232,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -51012,30 +52240,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_physical_block_size() is available" >&5 -printf %s "checking whether bdev_physical_block_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_physical_block_size() is available" >&5 +$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_physical_block_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_physical_block_size -then : + if test -d build/bdev_physical_block_size; then : - if test -f build/bdev_physical_block_size/bdev_physical_block_size.ko -then : + if test -f build/bdev_physical_block_size/bdev_physical_block_size.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_physical_block_size\" test, check that @@ -51047,13 +52272,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -51063,7 +52287,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -51071,30 +52295,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether check_disk_change() exists" >&5 -printf %s "checking whether check_disk_change() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether check_disk_change() exists" >&5 +$as_echo_n "checking whether check_disk_change() exists... " >&6; } cachevar="zfs_cv_kernel_check_disk_change_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/check_disk_change -then : + if test -d build/check_disk_change; then : - if test -f build/check_disk_change/check_disk_change.ko -then : + if test -f build/check_disk_change/check_disk_change.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"check_disk_change\" test, check that @@ -51106,48 +52327,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_CHECK_DISK_CHANGE 1" >>confdefs.h +$as_echo "#define HAVE_CHECK_DISK_CHANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_check_media_change() exists" >&5 -printf %s "checking whether bdev_check_media_change() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_check_media_change() exists" >&5 +$as_echo_n "checking whether bdev_check_media_change() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_check_media_change_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_check_media_change -then : + if test -d build/bdev_check_media_change; then : - if test -f build/bdev_check_media_change/bdev_check_media_change.ko -then : + if test -f build/bdev_check_media_change/bdev_check_media_change.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_check_media_change\" test, check that @@ -51159,48 +52376,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_CHECK_MEDIA_CHANGE 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_CHECK_MEDIA_CHANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_whole() is available" >&5 -printf %s "checking whether bdev_whole() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_whole() is available" >&5 +$as_echo_n "checking whether bdev_whole() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_whole_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_whole -then : + if test -d build/bdev_whole; then : - if test -f build/bdev_whole/bdev_whole.ko -then : + if test -f build/bdev_whole/bdev_whole.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_whole\" test, check that @@ -51212,48 +52425,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_WHOLE 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_WHOLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_nr_bytes() is available" >&5 -printf %s "checking whether bdev_nr_bytes() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_nr_bytes() is available" >&5 +$as_echo_n "checking whether bdev_nr_bytes() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_nr_bytes_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_nr_bytes -then : + if test -d build/bdev_nr_bytes; then : - if test -f build/bdev_nr_bytes/bdev_nr_bytes.ko -then : + if test -f build/bdev_nr_bytes/bdev_nr_bytes.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_nr_bytes\" test, check that @@ -51265,48 +52474,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_NR_BYTES 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_NR_BYTES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdevname() exists" >&5 -printf %s "checking whether bdevname() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdevname() exists" >&5 +$as_echo_n "checking whether bdevname() exists... " >&6; } cachevar="zfs_cv_kernel_bdevname_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdevname -then : + if test -d build/bdevname; then : - if test -f build/bdevname/bdevname.ko -then : + if test -f build/bdevname/bdevname.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdevname\" test, check that @@ -51318,77 +52523,73 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BDEVNAME 1" >>confdefs.h +$as_echo "#define HAVE_BDEVNAME 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() handles ERESTARTSYS" >&5 -printf %s "checking whether blkdev_get_by_path() handles ERESTARTSYS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() handles ERESTARTSYS" >&5 +$as_echo_n "checking whether blkdev_get_by_path() handles ERESTARTSYS... " >&6; } as_arg_v1=$LINUX_VERSION as_arg_v2=5.13.0 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null case $? in #( 1) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_GET_ERESTARTSYS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_GET_ERESTARTSYS 1" >>confdefs.h ;; #( 0) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; #( 2) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; #( *) : ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard() is available" >&5 -printf %s "checking whether blkdev_issue_discard() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard() is available" >&5 +$as_echo_n "checking whether blkdev_issue_discard() is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_noflags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_noflags -then : + if test -d build/blkdev_issue_discard_noflags; then : - if test -f build/blkdev_issue_discard_noflags/blkdev_issue_discard_noflags.ko -then : + if test -f build/blkdev_issue_discard_noflags/blkdev_issue_discard_noflags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_noflags\" test, check that @@ -51400,46 +52601,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard(flags) is available" >&5 -printf %s "checking whether blkdev_issue_discard(flags) is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard(flags) is available" >&5 +$as_echo_n "checking whether blkdev_issue_discard(flags) is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_flags -then : + if test -d build/blkdev_issue_discard_flags; then : - if test -f build/blkdev_issue_discard_flags/blkdev_issue_discard_flags.ko -then : + if test -f build/blkdev_issue_discard_flags/blkdev_issue_discard_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_flags\" test, check that @@ -51451,46 +52648,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_FLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_FLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard() is available" >&5 -printf %s "checking whether __blkdev_issue_discard() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard() is available" >&5 +$as_echo_n "checking whether __blkdev_issue_discard() is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_async_noflags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_async_noflags -then : + if test -d build/blkdev_issue_discard_async_noflags; then : - if test -f build/blkdev_issue_discard_async_noflags/blkdev_issue_discard_async_noflags.ko -then : + if test -f build/blkdev_issue_discard_async_noflags/blkdev_issue_discard_async_noflags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_async_noflags\" test, check that @@ -51502,46 +52695,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard(flags) is available" >&5 -printf %s "checking whether __blkdev_issue_discard(flags) is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard(flags) is available" >&5 +$as_echo_n "checking whether __blkdev_issue_discard(flags) is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_async_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_async_flags -then : + if test -d build/blkdev_issue_discard_async_flags; then : - if test -f build/blkdev_issue_discard_async_flags/blkdev_issue_discard_async_flags.ko -then : + if test -f build/blkdev_issue_discard_async_flags/blkdev_issue_discard_async_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_async_flags\" test, check that @@ -51553,46 +52742,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_secure_erase() is available" >&5 -printf %s "checking whether blkdev_issue_secure_erase() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_secure_erase() is available" >&5 +$as_echo_n "checking whether blkdev_issue_secure_erase() is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_secure_erase_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_secure_erase -then : + if test -d build/blkdev_issue_secure_erase; then : - if test -f build/blkdev_issue_secure_erase/blkdev_issue_secure_erase.ko -then : + if test -f build/blkdev_issue_secure_erase/blkdev_issue_secure_erase.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_secure_erase\" test, check that @@ -51604,48 +52789,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_SECURE_ERASE 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_SECURE_ERASE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_kobj() exists" >&5 -printf %s "checking whether bdev_kobj() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_kobj() exists" >&5 +$as_echo_n "checking whether bdev_kobj() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_kobj_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_kobj -then : + if test -d build/bdev_kobj; then : - if test -f build/bdev_kobj/bdev_kobj.ko -then : + if test -f build/bdev_kobj/bdev_kobj.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_kobj\" test, check that @@ -51657,48 +52838,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_KOBJ 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_KOBJ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether part_to_dev() exists" >&5 -printf %s "checking whether part_to_dev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether part_to_dev() exists" >&5 +$as_echo_n "checking whether part_to_dev() exists... " >&6; } cachevar="zfs_cv_kernel_part_to_dev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/part_to_dev -then : + if test -d build/part_to_dev; then : - if test -f build/part_to_dev/part_to_dev.ko -then : + if test -f build/part_to_dev/part_to_dev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"part_to_dev\" test, check that @@ -51710,48 +52887,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PART_TO_DEV 1" >>confdefs.h +$as_echo "#define HAVE_PART_TO_DEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether disk_check_media_change() exists" >&5 -printf %s "checking whether disk_check_media_change() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether disk_check_media_change() exists" >&5 +$as_echo_n "checking whether disk_check_media_change() exists... " >&6; } cachevar="zfs_cv_kernel_disk_check_media_change_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/disk_check_media_change -then : + if test -d build/disk_check_media_change; then : - if test -f build/disk_check_media_change/disk_check_media_change.ko -then : + if test -f build/disk_check_media_change/disk_check_media_change.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"disk_check_media_change\" test, check that @@ -51763,48 +52936,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DISK_CHECK_MEDIA_CHANGE 1" >>confdefs.h +$as_echo "#define HAVE_DISK_CHECK_MEDIA_CHANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether BLK_STS_RESV_CONFLICT is defined" >&5 -printf %s "checking whether BLK_STS_RESV_CONFLICT is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BLK_STS_RESV_CONFLICT is defined" >&5 +$as_echo_n "checking whether BLK_STS_RESV_CONFLICT is defined... " >&6; } cachevar="zfs_cv_kernel_blk_sts_resv_conflict_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_sts_resv_conflict -then : + if test -d build/blk_sts_resv_conflict; then : - if test -f build/blk_sts_resv_conflict/blk_sts_resv_conflict.ko -then : + if test -f build/blk_sts_resv_conflict/blk_sts_resv_conflict.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_sts_resv_conflict\" test, check that @@ -51816,48 +52985,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BLK_STS_RESV_CONFLICT 1" >>confdefs.h +$as_echo "#define HAVE_BLK_STS_RESV_CONFLICT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_mode_t is defined" >&5 -printf %s "checking whether blk_mode_t is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_mode_t is defined" >&5 +$as_echo_n "checking whether blk_mode_t is defined... " >&6; } cachevar="zfs_cv_kernel_blk_mode_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_mode_t -then : + if test -d build/blk_mode_t; then : - if test -f build/blk_mode_t/blk_mode_t.ko -then : + if test -f build/blk_mode_t/blk_mode_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_mode_t\" test, check that @@ -51869,19 +53034,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_MODE_T 1" >>confdefs.h +$as_echo "#define HAVE_BLK_MODE_T 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -51889,30 +53053,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct blk_plug is available" >&5 -printf %s "checking whether struct blk_plug is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct blk_plug is available" >&5 +$as_echo_n "checking whether struct blk_plug is available... " >&6; } cachevar="zfs_cv_kernel_blk_plug_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_plug -then : + if test -d build/blk_plug; then : - if test -f build/blk_plug/blk_plug.ko -then : + if test -f build/blk_plug/blk_plug.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_plug\" test, check that @@ -51924,13 +53085,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -51940,7 +53100,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -51948,30 +53108,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue bdi is dynamic" >&5 -printf %s "checking whether blk_queue bdi is dynamic... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue bdi is dynamic" >&5 +$as_echo_n "checking whether blk_queue bdi is dynamic... " >&6; } cachevar="zfs_cv_kernel_blk_queue_bdi_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_bdi -then : + if test -d build/blk_queue_bdi; then : - if test -f build/blk_queue_bdi/blk_queue_bdi.ko -then : + if test -f build/blk_queue_bdi/blk_queue_bdi.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_bdi\" test, check that @@ -51983,48 +53140,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_BDI_DYNAMIC 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_BDI_DYNAMIC 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether backing_dev_info is available through queue gendisk" >&5 -printf %s "checking whether backing_dev_info is available through queue gendisk... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether backing_dev_info is available through queue gendisk" >&5 +$as_echo_n "checking whether backing_dev_info is available through queue gendisk... " >&6; } cachevar="zfs_cv_kernel_blk_queue_disk_bdi_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_disk_bdi -then : + if test -d build/blk_queue_disk_bdi; then : - if test -f build/blk_queue_disk_bdi/blk_queue_disk_bdi.ko -then : + if test -f build/blk_queue_disk_bdi/blk_queue_disk_bdi.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_disk_bdi\" test, check that @@ -52036,48 +53189,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_DISK_BDI 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_DISK_BDI 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_update_readahead() exists" >&5 -printf %s "checking whether blk_queue_update_readahead() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_update_readahead() exists" >&5 +$as_echo_n "checking whether blk_queue_update_readahead() exists... " >&6; } cachevar="zfs_cv_kernel_blk_queue_update_readahead_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_update_readahead -then : + if test -d build/blk_queue_update_readahead; then : - if test -f build/blk_queue_update_readahead/blk_queue_update_readahead.ko -then : + if test -f build/blk_queue_update_readahead/blk_queue_update_readahead.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_update_readahead\" test, check that @@ -52089,44 +53238,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_UPDATE_READAHEAD 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_UPDATE_READAHEAD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether disk_update_readahead() exists" >&5 -printf %s "checking whether disk_update_readahead() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether disk_update_readahead() exists" >&5 +$as_echo_n "checking whether disk_update_readahead() exists... " >&6; } cachevar="zfs_cv_kernel_disk_update_readahead_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/disk_update_readahead -then : + if test -d build/disk_update_readahead; then : - if test -f build/disk_update_readahead/disk_update_readahead.ko -then : + if test -f build/disk_update_readahead/disk_update_readahead.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"disk_update_readahead\" test, check that @@ -52138,19 +53283,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DISK_UPDATE_READAHEAD 1" >>confdefs.h +$as_echo "#define HAVE_DISK_UPDATE_READAHEAD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -52159,30 +53303,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_discard_sectors() is available" >&5 -printf %s "checking whether bdev_max_discard_sectors() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_discard_sectors() is available" >&5 +$as_echo_n "checking whether bdev_max_discard_sectors() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_max_discard_sectors_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_max_discard_sectors -then : + if test -d build/bdev_max_discard_sectors; then : - if test -f build/bdev_max_discard_sectors/bdev_max_discard_sectors.ko -then : + if test -f build/bdev_max_discard_sectors/bdev_max_discard_sectors.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_max_discard_sectors\" test, check that @@ -52194,44 +53335,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_MAX_DISCARD_SECTORS 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_MAX_DISCARD_SECTORS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_discard() is available" >&5 -printf %s "checking whether blk_queue_discard() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_discard() is available" >&5 +$as_echo_n "checking whether blk_queue_discard() is available... " >&6; } cachevar="zfs_cv_kernel_blk_queue_discard_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_discard -then : + if test -d build/blk_queue_discard; then : - if test -f build/blk_queue_discard/blk_queue_discard.ko -then : + if test -f build/blk_queue_discard/blk_queue_discard.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_discard\" test, check that @@ -52243,16 +53380,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_DISCARD 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_DISCARD 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -52262,7 +53398,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -52273,30 +53409,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_secure_erase_sectors() is available" >&5 -printf %s "checking whether bdev_max_secure_erase_sectors() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_secure_erase_sectors() is available" >&5 +$as_echo_n "checking whether bdev_max_secure_erase_sectors() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_max_secure_erase_sectors_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_max_secure_erase_sectors -then : + if test -d build/bdev_max_secure_erase_sectors; then : - if test -f build/bdev_max_secure_erase_sectors/bdev_max_secure_erase_sectors.ko -then : + if test -f build/bdev_max_secure_erase_sectors/bdev_max_secure_erase_sectors.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_max_secure_erase_sectors\" test, check that @@ -52308,44 +53441,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_MAX_SECURE_ERASE_SECTORS 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_MAX_SECURE_ERASE_SECTORS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_secure_erase() is available" >&5 -printf %s "checking whether blk_queue_secure_erase() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_secure_erase() is available" >&5 +$as_echo_n "checking whether blk_queue_secure_erase() is available... " >&6; } cachevar="zfs_cv_kernel_blk_queue_secure_erase_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_secure_erase -then : + if test -d build/blk_queue_secure_erase; then : - if test -f build/blk_queue_secure_erase/blk_queue_secure_erase.ko -then : + if test -f build/blk_queue_secure_erase/blk_queue_secure_erase.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_secure_erase\" test, check that @@ -52357,16 +53486,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_SECURE_ERASE 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_SECURE_ERASE 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -52376,7 +53504,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -52387,30 +53515,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_hw_sectors() is available" >&5 -printf %s "checking whether blk_queue_max_hw_sectors() is available... " >&6; } + { $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; } cachevar="zfs_cv_kernel_blk_queue_max_hw_sectors_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_max_hw_sectors -then : + if test -d build/blk_queue_max_hw_sectors; then : - if test -f build/blk_queue_max_hw_sectors/blk_queue_max_hw_sectors.ko -then : + if test -f build/blk_queue_max_hw_sectors/blk_queue_max_hw_sectors.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_max_hw_sectors\" test, check that @@ -52422,45 +53547,41 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_segments() is available" >&5 -printf %s "checking whether blk_queue_max_segments() is available... " >&6; } + { $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; } cachevar="zfs_cv_kernel_blk_queue_max_segments_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_max_segments -then : + if test -d build/blk_queue_max_segments; then : - if test -f build/blk_queue_max_segments/blk_queue_max_segments.ko -then : + if test -f build/blk_queue_max_segments/blk_queue_max_segments.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_max_segments\" test, check that @@ -52472,45 +53593,90 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_rot() is available" >&5 +$as_echo_n "checking whether blk_queue_rot() is available... " >&6; } + + cachevar="zfs_cv_kernel_blk_queue_rot_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/blk_queue_rot; then : + + if test -f build/blk_queue_rot/blk_queue_rot.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"blk_queue_rot\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +$as_echo "#define HAVE_BLK_QUEUE_ROT 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether block multiqueue hardware context is cached in struct request" >&5 -printf %s "checking whether block multiqueue hardware context is cached in struct request... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether block multiqueue hardware context is cached in struct request" >&5 +$as_echo_n "checking whether block multiqueue hardware context is cached in struct request... " >&6; } cachevar="zfs_cv_kernel_blk_mq_rq_hctx_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_mq_rq_hctx -then : + if test -d build/blk_mq_rq_hctx; then : - if test -f build/blk_mq_rq_hctx/blk_mq_rq_hctx.ko -then : + if test -f build/blk_mq_rq_hctx/blk_mq_rq_hctx.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_mq_rq_hctx\" test, check that @@ -52522,19 +53688,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_MQ_RQ_HCTX 1" >>confdefs.h +$as_echo "#define HAVE_BLK_MQ_RQ_HCTX 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -52542,30 +53707,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_EXT_DEVT flag is available" >&5 -printf %s "checking whether GENHD_FL_EXT_DEVT flag is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_EXT_DEVT flag is available" >&5 +$as_echo_n "checking whether GENHD_FL_EXT_DEVT flag is available... " >&6; } cachevar="zfs_cv_kernel_genhd_fl_ext_devt_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/genhd_fl_ext_devt -then : + if test -d build/genhd_fl_ext_devt; then : - if test -f build/genhd_fl_ext_devt/genhd_fl_ext_devt.ko -then : + if test -f build/genhd_fl_ext_devt/genhd_fl_ext_devt.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"genhd_fl_ext_devt\" test, check that @@ -52577,47 +53739,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENHD_FL_EXT_DEVT 1" >>confdefs.h +$as_echo "#define HAVE_GENHD_FL_EXT_DEVT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_NO_PART flag is available" >&5 -printf %s "checking whether GENHD_FL_NO_PART flag is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_NO_PART flag is available" >&5 +$as_echo_n "checking whether GENHD_FL_NO_PART flag is available... " >&6; } cachevar="zfs_cv_kernel_genhd_fl_no_part_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/genhd_fl_no_part -then : + if test -d build/genhd_fl_no_part; then : - if test -f build/genhd_fl_no_part/genhd_fl_no_part.ko -then : + if test -f build/genhd_fl_no_part/genhd_fl_no_part.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"genhd_fl_no_part\" test, check that @@ -52629,43 +53787,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENHD_FL_NO_PART 1" >>confdefs.h +$as_echo "#define HAVE_GENHD_FL_NO_PART 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk_size() is available" >&5 -printf %s "checking whether revalidate_disk_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk_size() is available" >&5 +$as_echo_n "checking whether revalidate_disk_size() is available... " >&6; } cachevar="zfs_cv_kernel_revalidate_disk_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/revalidate_disk_size/revalidate_disk_size.ko -then : + if ! test -f build/revalidate_disk_size/revalidate_disk_size.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]revalidate_disk_size[[:space:]]' \ @@ -52698,7 +53852,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -52709,38 +53863,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REVALIDATE_DISK_SIZE 1" >>confdefs.h +$as_echo "#define HAVE_REVALIDATE_DISK_SIZE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk() is available" >&5 -printf %s "checking whether revalidate_disk() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk() is available" >&5 +$as_echo_n "checking whether revalidate_disk() is available... " >&6; } cachevar="zfs_cv_kernel_revalidate_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/revalidate_disk/revalidate_disk.ko -then : + if ! test -f build/revalidate_disk/revalidate_disk.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]revalidate_disk[[:space:]]' \ @@ -52773,7 +53923,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -52784,19 +53934,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REVALIDATE_DISK 1" >>confdefs.h +$as_echo "#define HAVE_REVALIDATE_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -52805,30 +53954,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether get_disk_ro() is available" >&5 -printf %s "checking whether get_disk_ro() is available... " >&6; } + { $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; } cachevar="zfs_cv_kernel_get_disk_ro_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/get_disk_ro -then : + if test -d build/get_disk_ro; then : - if test -f build/get_disk_ro/get_disk_ro.ko -then : + if test -f build/get_disk_ro/get_disk_ro.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"get_disk_ro\" test, check that @@ -52840,13 +53986,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -52856,7 +54001,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -52864,30 +54009,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5 -printf %s "checking whether ql->discard_granularity is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5 +$as_echo_n "checking whether ql->discard_granularity is available... " >&6; } cachevar="zfs_cv_kernel_discard_granularity_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/discard_granularity -then : + if test -d build/discard_granularity; then : - if test -f build/discard_granularity/discard_granularity.ko -then : + if test -f build/discard_granularity/discard_granularity.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"discard_granularity\" test, check that @@ -52899,13 +54041,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -52915,7 +54056,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -52923,30 +54064,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() exists" >&5 -printf %s "checking whether inode_owner_or_capable() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() exists" >&5 +$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; } cachevar="zfs_cv_kernel_inode_owner_or_capable_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_owner_or_capable -then : + if test -d build/inode_owner_or_capable; then : - if test -f build/inode_owner_or_capable/inode_owner_or_capable.ko -then : + if test -f build/inode_owner_or_capable/inode_owner_or_capable.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_owner_or_capable\" test, check that @@ -52958,44 +54096,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_OWNER_OR_CAPABLE 1" >>confdefs.h +$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes user_ns" >&5 -printf %s "checking whether inode_owner_or_capable() takes user_ns... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes user_ns" >&5 +$as_echo_n "checking whether inode_owner_or_capable() takes user_ns... " >&6; } cachevar="zfs_cv_kernel_inode_owner_or_capable_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_owner_or_capable_userns -then : + if test -d build/inode_owner_or_capable_userns; then : - if test -f build/inode_owner_or_capable_userns/inode_owner_or_capable_userns.ko -then : + if test -f build/inode_owner_or_capable_userns/inode_owner_or_capable_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_owner_or_capable_userns\" test, check that @@ -53007,43 +54141,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_OWNER_OR_CAPABLE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes mnt_idmap" >&5 -printf %s "checking whether inode_owner_or_capable() takes mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes mnt_idmap" >&5 +$as_echo_n "checking whether inode_owner_or_capable() takes mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_inode_owner_or_capable_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_owner_or_capable_mnt_idmap -then : + if test -d build/inode_owner_or_capable_mnt_idmap; then : - if test -f build/inode_owner_or_capable_mnt_idmap/inode_owner_or_capable_mnt_idmap.ko -then : + if test -f build/inode_owner_or_capable_mnt_idmap/inode_owner_or_capable_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_owner_or_capable_mnt_idmap\" test, check that @@ -53055,16 +54185,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_OWNER_OR_CAPABLE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE_IDMAP 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -53074,7 +54203,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -53089,30 +54218,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_handler" >&5 -printf %s "checking whether super_block uses const struct xattr_handler... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_handler" >&5 +$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; } cachevar="zfs_cv_kernel_const_xattr_handler_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/const_xattr_handler -then : + if test -d build/const_xattr_handler; then : - if test -f build/const_xattr_handler/const_xattr_handler.ko -then : + if test -f build/const_xattr_handler/const_xattr_handler.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"const_xattr_handler\" test, check that @@ -53124,13 +54250,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -53140,7 +54265,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -53148,30 +54273,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry and inode and flags" >&5 -printf %s "checking whether xattr_handler->get() wants dentry and inode and flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry and inode and flags" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry and inode and flags... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_get_dentry_inode_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_get_dentry_inode_flags -then : + if test -d build/xattr_handler_get_dentry_inode_flags; then : - if test -f build/xattr_handler_get_dentry_inode_flags/xattr_handler_get_dentry_inode_flags.ko -then : + if test -f build/xattr_handler_get_dentry_inode_flags/xattr_handler_get_dentry_inode_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_get_dentry_inode_flags\" test, check that @@ -53183,48 +54305,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_GET_DENTRY_INODE_FLAGS 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_GET_DENTRY_INODE_FLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap" >&5 -printf %s "checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_set_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_set_mnt_idmap -then : + if test -d build/xattr_handler_set_mnt_idmap; then : - if test -f build/xattr_handler_set_mnt_idmap/xattr_handler_set_mnt_idmap.ko -then : + if test -f build/xattr_handler_set_mnt_idmap/xattr_handler_set_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_set_mnt_idmap\" test, check that @@ -53236,43 +54354,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_SET_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_SET_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry, inode, and user_namespace" >&5 -printf %s "checking whether xattr_handler->set() wants dentry, inode, and user_namespace... " >&6; } + { $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, inode, and user_namespace" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry, inode, and user_namespace... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_set_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_set_userns -then : + if test -d build/xattr_handler_set_userns; then : - if test -f build/xattr_handler_set_userns/xattr_handler_set_userns.ko -then : + if test -f build/xattr_handler_set_userns/xattr_handler_set_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_set_userns\" test, check that @@ -53284,43 +54398,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_SET_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_SET_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry and inode" >&5 -printf %s "checking whether xattr_handler->set() wants dentry and inode... " >&6; } + { $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 and inode" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry and inode... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_set_dentry_inode_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_set_dentry_inode -then : + if test -d build/xattr_handler_set_dentry_inode; then : - if test -f build/xattr_handler_set_dentry_inode/xattr_handler_set_dentry_inode.ko -then : + if test -f build/xattr_handler_set_dentry_inode/xattr_handler_set_dentry_inode.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_set_dentry_inode\" test, check that @@ -53332,16 +54442,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_SET_DENTRY_INODE 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_SET_DENTRY_INODE 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -53351,7 +54460,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -53367,30 +54476,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5 -printf %s "checking whether posix_acl_equiv_mode() wants umode_t... " >&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; } cachevar="zfs_cv_kernel_posix_acl_equiv_mode_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/posix_acl_equiv_mode -then : + if test -d build/posix_acl_equiv_mode; then : - if test -f build/posix_acl_equiv_mode/posix_acl_equiv_mode.ko -then : + if test -f build/posix_acl_equiv_mode/posix_acl_equiv_mode.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"posix_acl_equiv_mode\" test, check that @@ -53402,13 +54508,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -53418,7 +54523,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -53426,30 +54531,76 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->get_acl() exists" >&5 -printf %s "checking whether iops->get_acl() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_to_xattr() allocates its result" >&5 +$as_echo_n "checking whether posix_acl_to_xattr() allocates its result... " >&6; }; + + cachevar="zfs_cv_kernel_posix_acl_to_xattr_alloc_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/posix_acl_to_xattr_alloc; then : + + if test -f build/posix_acl_to_xattr_alloc/posix_acl_to_xattr_alloc.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"posix_acl_to_xattr_alloc\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_POSIX_ACL_TO_XATTR_ALLOC 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_acl() exists" >&5 +$as_echo_n "checking whether iops->get_acl() exists... " >&6; } cachevar="zfs_cv_kernel_inode_operations_get_acl_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_get_acl -then : + if test -d build/inode_operations_get_acl; then : - if test -f build/inode_operations_get_acl/inode_operations_get_acl.ko -then : + if test -f build/inode_operations_get_acl/inode_operations_get_acl.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_get_acl\" test, check that @@ -53461,39 +54612,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GET_ACL 1" >>confdefs.h +$as_echo "#define HAVE_GET_ACL 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_get_acl_rcu_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_get_acl_rcu -then : + if test -d build/inode_operations_get_acl_rcu; then : - if test -f build/inode_operations_get_acl_rcu/inode_operations_get_acl_rcu.ko -then : + if test -f build/inode_operations_get_acl_rcu/inode_operations_get_acl_rcu.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_get_acl_rcu\" test, check that @@ -53505,39 +54652,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GET_ACL_RCU 1" >>confdefs.h +$as_echo "#define HAVE_GET_ACL_RCU 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_get_inode_acl_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_get_inode_acl -then : + if test -d build/inode_operations_get_inode_acl; then : - if test -f build/inode_operations_get_inode_acl/inode_operations_get_inode_acl.ko -then : + if test -f build/inode_operations_get_inode_acl/inode_operations_get_inode_acl.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_get_inode_acl\" test, check that @@ -53549,16 +54692,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GET_INODE_ACL 1" >>confdefs.h +$as_echo "#define HAVE_GET_INODE_ACL 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -53568,7 +54710,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -53582,30 +54724,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->set_acl() with 4 args exists" >&5 -printf %s "checking whether iops->set_acl() with 4 args exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->set_acl() with 4 args exists" >&5 +$as_echo_n "checking whether iops->set_acl() with 4 args exists... " >&6; } cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_set_acl_userns -then : + if test -d build/inode_operations_set_acl_userns; then : - if test -f build/inode_operations_set_acl_userns/inode_operations_set_acl_userns.ko -then : + if test -f build/inode_operations_set_acl_userns/inode_operations_set_acl_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_set_acl_userns\" test, check that @@ -53617,39 +54756,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SET_ACL_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_SET_ACL_USERNS 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_set_acl_mnt_idmap_dentry_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_set_acl_mnt_idmap_dentry -then : + if test -d build/inode_operations_set_acl_mnt_idmap_dentry; then : - if test -f build/inode_operations_set_acl_mnt_idmap_dentry/inode_operations_set_acl_mnt_idmap_dentry.ko -then : + if test -f build/inode_operations_set_acl_mnt_idmap_dentry/inode_operations_set_acl_mnt_idmap_dentry.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_set_acl_mnt_idmap_dentry\" test, check that @@ -53661,39 +54796,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SET_ACL_IDMAP_DENTRY 1" >>confdefs.h +$as_echo "#define HAVE_SET_ACL_IDMAP_DENTRY 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_dentry_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_set_acl_userns_dentry -then : + if test -d build/inode_operations_set_acl_userns_dentry; then : - if test -f build/inode_operations_set_acl_userns_dentry/inode_operations_set_acl_userns_dentry.ko -then : + if test -f build/inode_operations_set_acl_userns_dentry/inode_operations_set_acl_userns_dentry.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_set_acl_userns_dentry\" test, check that @@ -53705,19 +54836,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SET_ACL_USERNS_DENTRY_ARG2 1" >>confdefs.h +$as_echo "#define HAVE_SET_ACL_USERNS_DENTRY_ARG2 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -53730,30 +54860,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes mnt_idmap" >&5 -printf %s "checking whether iops->setattr() takes mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes mnt_idmap" >&5 +$as_echo_n "checking whether iops->setattr() takes mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_inode_operations_setattr_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_setattr_mnt_idmap -then : + if test -d build/inode_operations_setattr_mnt_idmap; then : - if test -f build/inode_operations_setattr_mnt_idmap/inode_operations_setattr_mnt_idmap.ko -then : + if test -f build/inode_operations_setattr_mnt_idmap/inode_operations_setattr_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_setattr_mnt_idmap\" test, check that @@ -53765,43 +54892,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_IOPS_SETATTR 1" >>confdefs.h +$as_echo "#define HAVE_IDMAP_IOPS_SETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes user_namespace" >&5 -printf %s "checking whether iops->setattr() takes user_namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes user_namespace" >&5 +$as_echo_n "checking whether iops->setattr() takes user_namespace... " >&6; } cachevar="zfs_cv_kernel_inode_operations_setattr_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_setattr_userns -then : + if test -d build/inode_operations_setattr_userns; then : - if test -f build/inode_operations_setattr_userns/inode_operations_setattr_userns.ko -then : + if test -f build/inode_operations_setattr_userns/inode_operations_setattr_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_setattr_userns\" test, check that @@ -53813,19 +54936,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_USERNS_IOPS_SETATTR 1" >>confdefs.h +$as_echo "#define HAVE_USERNS_IOPS_SETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -53834,30 +54956,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes mnt_idmap" >&5 -printf %s "checking whether iops->getattr() takes mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes mnt_idmap" >&5 +$as_echo_n "checking whether iops->getattr() takes mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_inode_operations_getattr_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_getattr_mnt_idmap -then : + if test -d build/inode_operations_getattr_mnt_idmap; then : - if test -f build/inode_operations_getattr_mnt_idmap/inode_operations_getattr_mnt_idmap.ko -then : + if test -f build/inode_operations_getattr_mnt_idmap/inode_operations_getattr_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_getattr_mnt_idmap\" test, check that @@ -53869,43 +54988,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_IOPS_GETATTR 1" >>confdefs.h +$as_echo "#define HAVE_IDMAP_IOPS_GETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes user_namespace" >&5 -printf %s "checking whether iops->getattr() takes user_namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes user_namespace" >&5 +$as_echo_n "checking whether iops->getattr() takes user_namespace... " >&6; } cachevar="zfs_cv_kernel_inode_operations_getattr_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_getattr_userns -then : + if test -d build/inode_operations_getattr_userns; then : - if test -f build/inode_operations_getattr_userns/inode_operations_getattr_userns.ko -then : + if test -f build/inode_operations_getattr_userns/inode_operations_getattr_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_getattr_userns\" test, check that @@ -53917,44 +55032,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_USERNS_IOPS_GETATTR 1" >>confdefs.h +$as_echo "#define HAVE_USERNS_IOPS_GETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes a path" >&5 -printf %s "checking whether iops->getattr() takes a path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes a path" >&5 +$as_echo_n "checking whether iops->getattr() takes a path... " >&6; } cachevar="zfs_cv_kernel_inode_operations_getattr_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_getattr_path -then : + if test -d build/inode_operations_getattr_path; then : - if test -f build/inode_operations_getattr_path/inode_operations_getattr_path.ko -then : + if test -f build/inode_operations_getattr_path/inode_operations_getattr_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_getattr_path\" test, check that @@ -53966,54 +55077,99 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_PATH_IOPS_GETATTR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + +fi + - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_state_read_once() exists" >&5 +$as_echo_n "checking whether inode_state_read_once() exists... " >&6; } -printf "%s\n" "#define HAVE_PATH_IOPS_GETATTR 1" >>confdefs.h + cachevar="zfs_cv_kernel_inode_state_read_once_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/inode_state_read_once; then : + if test -f build/inode_state_read_once/inode_state_read_once.ko; then : + + eval "$cachevar=yes" -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + eval "$cachevar=no" fi +else + + as_fn_error $? " + *** No matching source for the \"inode_state_read_once\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi fi + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_INODE_STATE_READ_ONCE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sops->show_options() wants dentry" >&5 -printf %s "checking whether sops->show_options() wants dentry... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->show_options() wants dentry" >&5 +$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; } cachevar="zfs_cv_kernel_super_operations_show_options_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/super_operations_show_options -then : + if test -d build/super_operations_show_options; then : - if test -f build/super_operations_show_options/super_operations_show_options.ko -then : + if test -f build/super_operations_show_options/super_operations_show_options.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"super_operations_show_options\" test, check that @@ -54025,13 +55181,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -54041,7 +55196,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -54050,30 +55205,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5 -printf %s "checking whether super_block has s_shrink... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5 +$as_echo_n "checking whether super_block has s_shrink... " >&6; } cachevar="zfs_cv_kernel_super_block_s_shrink_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/super_block_s_shrink -then : + if test -d build/super_block_s_shrink; then : - if test -f build/super_block_s_shrink/super_block_s_shrink.ko -then : + if test -f build/super_block_s_shrink/super_block_s_shrink.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"super_block_s_shrink\" test, check that @@ -54085,43 +55237,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SUPER_BLOCK_S_SHRINK 1" >>confdefs.h +$as_echo "#define HAVE_SUPER_BLOCK_S_SHRINK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink pointer" >&5 -printf %s "checking whether super_block has s_shrink pointer... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink pointer" >&5 +$as_echo_n "checking whether super_block has s_shrink pointer... " >&6; } cachevar="zfs_cv_kernel_super_block_s_shrink_ptr_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/super_block_s_shrink_ptr -then : + if test -d build/super_block_s_shrink_ptr; then : - if test -f build/super_block_s_shrink_ptr/super_block_s_shrink_ptr.ko -then : + if test -f build/super_block_s_shrink_ptr/super_block_s_shrink_ptr.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"super_block_s_shrink_ptr\" test, check that @@ -54133,19 +55281,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SUPER_BLOCK_S_SHRINK_PTR 1" >>confdefs.h +$as_echo "#define HAVE_SUPER_BLOCK_S_SHRINK_PTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** None of the expected \"sb->s_shrink()\" interfaces were detected. @@ -54154,7 +55301,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -54165,30 +55312,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether new var-arg register_shrinker() exists" >&5 -printf %s "checking whether new var-arg register_shrinker() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether new var-arg register_shrinker() exists" >&5 +$as_echo_n "checking whether new var-arg register_shrinker() exists... " >&6; } cachevar="zfs_cv_kernel_register_shrinker_vararg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/register_shrinker_vararg -then : + if test -d build/register_shrinker_vararg; then : - if test -f build/register_shrinker_vararg/register_shrinker_vararg.ko -then : + if test -f build/register_shrinker_vararg/register_shrinker_vararg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"register_shrinker_vararg\" test, check that @@ -54200,48 +55344,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REGISTER_SHRINKER_VARARG 1" >>confdefs.h +$as_echo "#define HAVE_REGISTER_SHRINKER_VARARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether shrinker_register() exists" >&5 -printf %s "checking whether shrinker_register() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shrinker_register() exists" >&5 +$as_echo_n "checking whether shrinker_register() exists... " >&6; } cachevar="zfs_cv_kernel_shrinker_register_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/shrinker_register -then : + if test -d build/shrinker_register; then : - if test -f build/shrinker_register/shrinker_register.ko -then : + if test -f build/shrinker_register/shrinker_register.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"shrinker_register\" test, check that @@ -54253,49 +55393,87 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SHRINKER_REGISTER 1" >>confdefs.h + + +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -printf "%s\n" "#define HAVE_SHRINKER_REGISTER 1" >>confdefs.h +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() returns struct dentry*" >&5 +$as_echo_n "checking whether iops->mkdir() returns struct dentry*... " >&6; } + + cachevar="zfs_cv_kernel_mkdir_return_dentry_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/mkdir_return_dentry; then : + + if test -f build/mkdir_return_dentry/mkdir_return_dentry.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi +else -else $as_nop + as_fn_error $? " + *** No matching source for the \"mkdir_return_dentry\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +fi fi + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +$as_echo "#define HAVE_IOPS_MKDIR_DENTRY 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->mkdir() takes struct mnt_idmap*... " >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->mkdir() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_mkdir_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mkdir_mnt_idmap -then : + if test -d build/mkdir_mnt_idmap; then : - if test -f build/mkdir_mnt_idmap/mkdir_mnt_idmap.ko -then : + if test -f build/mkdir_mnt_idmap/mkdir_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mkdir_mnt_idmap\" test, check that @@ -54307,44 +55485,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKDIR_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_MKDIR_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct user_namespace*" >&5 -printf %s "checking whether iops->mkdir() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->mkdir() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_mkdir_user_namespace_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mkdir_user_namespace -then : + if test -d build/mkdir_user_namespace; then : - if test -f build/mkdir_user_namespace/mkdir_user_namespace.ko -then : + if test -f build/mkdir_user_namespace/mkdir_user_namespace.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mkdir_user_namespace\" test, check that @@ -54356,19 +55530,21 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +$as_echo "#define HAVE_IOPS_MKDIR_USERNS 1" >>confdefs.h -printf "%s\n" "#define HAVE_IOPS_MKDIR_USERNS 1" >>confdefs.h +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi @@ -54377,30 +55553,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->lookup() passes flags" >&5 -printf %s "checking whether iops->lookup() passes flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->lookup() passes flags" >&5 +$as_echo_n "checking whether iops->lookup() passes flags... " >&6; } cachevar="zfs_cv_kernel_lookup_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/lookup_flags -then : + if test -d build/lookup_flags; then : - if test -f build/lookup_flags/lookup_flags.ko -then : + if test -f build/lookup_flags/lookup_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"lookup_flags\" test, check that @@ -54412,13 +55585,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -54428,38 +55600,178 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for id mapping mechanism" >&5 +$as_echo_n "checking for id mapping mechanism... " >&6; } + + cachevar="zfs_cv_kernel_generic_permission_idmap_mntidmap_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/generic_permission_idmap_mntidmap; then : + + if test -f build/generic_permission_idmap_mntidmap/generic_permission_idmap_mntidmap.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"generic_permission_idmap_mntidmap\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: mnt_idmap" >&5 +$as_echo "mnt_idmap" >&6; } + +$as_echo "#define HAVE_IDMAP_MNTIDMAP 1" >>confdefs.h + + +else + + + cachevar="zfs_cv_kernel_generic_permission_idmap_userns_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/generic_permission_idmap_userns; then : + + if test -f build/generic_permission_idmap_userns/generic_permission_idmap_userns.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"generic_permission_idmap_userns\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: user_namespace" >&5 +$as_echo "user_namespace" >&6; } + +$as_echo "#define HAVE_IDMAP_USERNS 1" >>confdefs.h + + +else + + + cachevar="zfs_cv_kernel_generic_permission_idmap_none_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/generic_permission_idmap_none; then : + + if test -f build/generic_permission_idmap_none/generic_permission_idmap_none.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"generic_permission_idmap_none\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 +$as_echo "unknown" >&6; } + + as_fn_error $? " + *** None of the expected \"generic_permission\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 fi +fi + + +fi + + - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->create() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->create() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_create_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/create_mnt_idmap -then : + if test -d build/create_mnt_idmap; then : - if test -f build/create_mnt_idmap/create_mnt_idmap.ko -then : + if test -f build/create_mnt_idmap/create_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"create_mnt_idmap\" test, check that @@ -54471,44 +55783,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_CREATE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_CREATE_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct user_namespace*" >&5 -printf %s "checking whether iops->create() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->create() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_create_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/create_userns -then : + if test -d build/create_userns; then : - if test -f build/create_userns/create_userns.ko -then : + if test -f build/create_userns/create_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"create_userns\" test, check that @@ -54520,44 +55828,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_CREATE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_CREATE_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->create() passes flags" >&5 -printf %s "checking whether iops->create() passes flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() passes flags" >&5 +$as_echo_n "checking whether iops->create() passes flags... " >&6; } cachevar="zfs_cv_kernel_create_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/create_flags -then : + if test -d build/create_flags; then : - if test -f build/create_flags/create_flags.ko -then : + if test -f build/create_flags/create_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"create_flags\" test, check that @@ -54569,13 +55873,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -54585,7 +55888,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -54599,30 +55902,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->permission() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->permission() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_permission_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/permission_mnt_idmap -then : + if test -d build/permission_mnt_idmap; then : - if test -f build/permission_mnt_idmap/permission_mnt_idmap.ko -then : + if test -f build/permission_mnt_idmap/permission_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"permission_mnt_idmap\" test, check that @@ -54634,44 +55934,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_PERMISSION_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_PERMISSION_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct user_namespace*" >&5 -printf %s "checking whether iops->permission() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->permission() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_permission_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/permission_userns -then : + if test -d build/permission_userns; then : - if test -f build/permission_userns/permission_userns.ko -then : + if test -f build/permission_userns/permission_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"permission_userns\" test, check that @@ -54683,19 +55979,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_PERMISSION_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_PERMISSION_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -54704,30 +55999,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether i_op->tmpfile() exists" >&5 -printf %s "checking whether i_op->tmpfile() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether i_op->tmpfile() exists" >&5 +$as_echo_n "checking whether i_op->tmpfile() exists... " >&6; } cachevar="zfs_cv_kernel_inode_operations_tmpfile_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile_mnt_idmap -then : + if test -d build/inode_operations_tmpfile_mnt_idmap; then : - if test -f build/inode_operations_tmpfile_mnt_idmap/inode_operations_tmpfile_mnt_idmap.ko -then : + if test -f build/inode_operations_tmpfile_mnt_idmap/inode_operations_tmpfile_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile_mnt_idmap\" test, check that @@ -54739,39 +56031,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_IDMAP 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_tmpfile_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile -then : + if test -d build/inode_operations_tmpfile; then : - if test -f build/inode_operations_tmpfile/inode_operations_tmpfile.ko -then : + if test -f build/inode_operations_tmpfile/inode_operations_tmpfile.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile\" test, check that @@ -54783,39 +56071,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile_dentry_userns -then : + if test -d build/inode_operations_tmpfile_dentry_userns; then : - if test -f build/inode_operations_tmpfile_dentry_userns/inode_operations_tmpfile_dentry_userns.ko -then : + if test -f build/inode_operations_tmpfile_dentry_userns/inode_operations_tmpfile_dentry_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile_dentry_userns\" test, check that @@ -54827,42 +56111,38 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h -printf "%s\n" "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile_dentry -then : + if test -d build/inode_operations_tmpfile_dentry; then : - if test -f build/inode_operations_tmpfile_dentry/inode_operations_tmpfile_dentry.ko -then : + if test -f build/inode_operations_tmpfile_dentry/inode_operations_tmpfile_dentry.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile_dentry\" test, check that @@ -54874,16 +56154,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h -else $as_nop +else @@ -54902,7 +56181,7 @@ *** APIs. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 ;; #( 0) : @@ -54916,13 +56195,13 @@ *** APIs. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 ;; #( 2) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; #( *) : ;; @@ -54944,30 +56223,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5 -printf %s "checking whether dops->d_automount() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5 +$as_echo_n "checking whether dops->d_automount() exists... " >&6; } cachevar="zfs_cv_kernel_dentry_operations_d_automount_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/dentry_operations_d_automount -then : + if test -d build/dentry_operations_d_automount; then : - if test -f build/dentry_operations_d_automount/dentry_operations_d_automount.ko -then : + if test -f build/dentry_operations_d_automount/dentry_operations_d_automount.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"dentry_operations_d_automount\" test, check that @@ -54979,13 +56255,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -54995,7 +56270,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -55003,30 +56278,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes 4 args" >&5 -printf %s "checking whether dops->d_revalidate() takes 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes 4 args" >&5 +$as_echo_n "checking whether dops->d_revalidate() takes 4 args... " >&6; } cachevar="zfs_cv_kernel_dentry_operations_d_revalidate_4args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/dentry_operations_d_revalidate_4args -then : + if test -d build/dentry_operations_d_revalidate_4args; then : - if test -f build/dentry_operations_d_revalidate_4args/dentry_operations_d_revalidate_4args.ko -then : + if test -f build/dentry_operations_d_revalidate_4args/dentry_operations_d_revalidate_4args.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"dentry_operations_d_revalidate_4args\" test, check that @@ -55038,49 +56310,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_D_REVALIDATE_4ARGS 1" >>confdefs.h +$as_echo "#define HAVE_D_REVALIDATE_4ARGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5 -printf %s "checking whether eops->commit_metadata() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5 +$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; } cachevar="zfs_cv_kernel_export_operations_commit_metadata_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/export_operations_commit_metadata -then : + if test -d build/export_operations_commit_metadata; then : - if test -f build/export_operations_commit_metadata/export_operations_commit_metadata.ko -then : + if test -f build/export_operations_commit_metadata/export_operations_commit_metadata.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"export_operations_commit_metadata\" test, check that @@ -55092,13 +56360,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -55108,7 +56375,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -55116,24 +56383,21 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct mnt_idmap*" >&5 -printf %s "checking whether setattr_prepare() is available and accepts struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct mnt_idmap*" >&5 +$as_echo_n "checking whether setattr_prepare() is available and accepts struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_setattr_prepare_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/setattr_prepare_mnt_idmap/setattr_prepare_mnt_idmap.ko -then : + if ! test -f build/setattr_prepare_mnt_idmap/setattr_prepare_mnt_idmap.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \ @@ -55166,7 +56430,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -55177,38 +56441,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SETATTR_PREPARE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_SETATTR_PREPARE_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct user_namespace*" >&5 -printf %s "checking whether setattr_prepare() is available and accepts struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct user_namespace*" >&5 +$as_echo_n "checking whether setattr_prepare() is available and accepts struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_setattr_prepare_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/setattr_prepare_userns/setattr_prepare_userns.ko -then : + if ! test -f build/setattr_prepare_userns/setattr_prepare_userns.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \ @@ -55241,7 +56501,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -55252,38 +56512,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SETATTR_PREPARE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_SETATTR_PREPARE_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available, doesn't accept user_namespace" >&5 -printf %s "checking whether setattr_prepare() is available, doesn't accept user_namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available, doesn't accept user_namespace" >&5 +$as_echo_n "checking whether setattr_prepare() is available, doesn't accept user_namespace... " >&6; } cachevar="zfs_cv_kernel_setattr_prepare_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/setattr_prepare/setattr_prepare.ko -then : + if ! test -f build/setattr_prepare/setattr_prepare.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \ @@ -55316,7 +56572,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -55327,19 +56583,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SETATTR_PREPARE_NO_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_SETATTR_PREPARE_NO_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -55351,24 +56606,21 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5 -printf %s "checking whether insert_inode_locked() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5 +$as_echo_n "checking whether insert_inode_locked() is available... " >&6; } cachevar="zfs_cv_kernel_insert_inode_locked_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/insert_inode_locked/insert_inode_locked.ko -then : + if ! test -f build/insert_inode_locked/insert_inode_locked.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \ @@ -55401,7 +56653,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -55412,13 +56664,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -55428,7 +56679,89 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_obtain_alias() is available" >&5 +$as_echo_n "checking whether d_obtain_alias() is available... " >&6; } + + cachevar="zfs_cv_kernel_d_obtain_alias_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if ! test -f build/d_obtain_alias/d_obtain_alias.ko; then : + + eval "$cachevar=no" + +else + + if test "x$enable_linux_builtin" != "xyes"; then : + + + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + + eval "$cachevar=no" + + else : + + eval "$cachevar=yes" + + fi + else : + + eval "$cachevar=yes" + + fi + + +else + + eval "$cachevar=yes" + +fi + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + + as_fn_error $? " + *** None of the expected \"d_obtain_alias()\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -55436,24 +56769,169 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5 -printf %s "checking whether truncate_setsize() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_set_d_op() is available" >&5 +$as_echo_n "checking whether d_set_d_op() is available... " >&6; } + + cachevar="zfs_cv_kernel_d_set_d_op_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/d_set_d_op; then : + + if test -f build/d_set_d_op/d_set_d_op.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"d_set_d_op\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_default_d_op() is available" >&5 +$as_echo_n "checking whether set_default_d_op() is available... " >&6; } + + cachevar="zfs_cv_kernel_set_default_d_op_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/set_default_d_op; then : + + if test -f build/set_default_d_op/set_default_d_op.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"set_default_d_op\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SET_DEFAULT_D_OP 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dentry aliases are in d_u member" >&5 +$as_echo_n "checking whether dentry aliases are in d_u member... " >&6; } + + cachevar="zfs_cv_kernel_dentry_alias_d_u_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/dentry_alias_d_u; then : + + if test -f build/dentry_alias_d_u/dentry_alias_d_u.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"dentry_alias_d_u\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_DENTRY_D_U_ALIASES 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5 +$as_echo_n "checking whether truncate_setsize() is available... " >&6; } cachevar="zfs_cv_kernel_truncate_setsize_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/truncate_setsize/truncate_setsize.ko -then : + if ! test -f build/truncate_setsize/truncate_setsize.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ @@ -55486,7 +56964,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -55497,13 +56975,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -55513,7 +56990,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -55522,30 +56999,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5 -printf %s "checking whether security_inode_init_security wants callback... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5 +$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; } cachevar="zfs_cv_kernel_security_inode_init_security_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/security_inode_init_security -then : + if test -d build/security_inode_init_security; then : - if test -f build/security_inode_init_security/security_inode_init_security.ko -then : + if test -f build/security_inode_init_security/security_inode_init_security.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"security_inode_init_security\" test, check that @@ -55557,13 +57031,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -55573,7 +57046,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -55582,33 +57055,30 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fst->mount() exists" >&5 -printf %s "checking whether fst->mount() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fs_context exists" >&5 +$as_echo_n "checking whether fs_context exists... " >&6; } - cachevar="zfs_cv_kernel_file_system_type_mount_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_fs_context_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/file_system_type_mount -then : + if test -d build/fs_context; then : - if test -f build/file_system_type_mount/file_system_type_mount.ko -then : + if test -f build/fs_context/fs_context.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"file_system_type_mount\" test, check that + *** No matching source for the \"fs_context\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -55617,57 +57087,50 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_FS_CONTEXT 1" >>confdefs.h - as_fn_error $? " - *** None of the expected \"fst->mount()\" interfaces were detected. - *** This may be because your kernel version is newer than what is - *** supported, or you are using a patched custom kernel with - *** incompatible modifications. - *** - *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX - " "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? " + *** This kernel does not have \`struct fs_context\`. OpenZFS cannot be compiled. + " "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether SB_DYING is defined" >&5 -printf %s "checking whether SB_DYING is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fs_parse() takes fs_parameter_spec directly" >&5 +$as_echo_n "checking whether fs_parse() takes fs_parameter_spec directly... " >&6; } - cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_fs_parse_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sb_dying -then : + if test -d build/fs_parse; then : - if test -f build/sb_dying/sb_dying.ko -then : + if test -f build/fs_parse/fs_parse.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"sb_dying\" test, check that + *** No matching source for the \"fs_parse\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -55676,48 +57139,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_FS_PARSE_TAKES_SPEC 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5 -printf %s "checking whether set_nlink() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfs_parse_fs_string() takes 3 args" >&5 +$as_echo_n "checking whether vfs_parse_fs_string() takes 3 args... " >&6; } - cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_vfs_parse_fs_string_3args_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/set_nlink -then : + if test -d build/vfs_parse_fs_string_3args; then : - if test -f build/set_nlink/set_nlink.ko -then : + if test -f build/vfs_parse_fs_string_3args/vfs_parse_fs_string_3args.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"set_nlink\" test, check that + *** No matching source for the \"vfs_parse_fs_string_3args\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -55726,57 +57188,93 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_VFS_PARSE_FS_STRING_3ARGS 1" >>confdefs.h - as_fn_error $? " - *** None of the expected \"set_nlink()\" interfaces were detected. - *** This may be because your kernel version is newer than what is - *** supported, or you are using a patched custom kernel with - *** incompatible modifications. - *** - *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX - " "$LINENO" 5 +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SB_DYING is defined" >&5 +$as_echo_n "checking whether SB_DYING is defined... " >&6; } + + cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/sb_dying; then : + + if test -f build/sb_dying/sb_dying.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi +else + + as_fn_error $? " + *** No matching source for the \"sb_dying\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sget() wants 5 args" >&5 -printf %s "checking whether sget() wants 5 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5 +$as_echo_n "checking whether set_nlink() is available... " >&6; } - cachevar="zfs_cv_kernel_sget_5args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sget_5args -then : + if test -d build/set_nlink; then : - if test -f build/sget_5args/sget_5args.ko -then : + if test -f build/set_nlink/set_nlink.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"sget_5args\" test, check that + *** No matching source for the \"set_nlink\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -55785,23 +57283,22 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " - *** None of the expected \"sget()\" interfaces were detected. + *** None of the expected \"set_nlink()\" interfaces were detected. *** This may be because your kernel version is newer than what is *** supported, or you are using a patched custom kernel with *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -55809,30 +57306,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether filemap_dirty_folio exists" >&5 -printf %s "checking whether filemap_dirty_folio exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether filemap_dirty_folio exists" >&5 +$as_echo_n "checking whether filemap_dirty_folio exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_filemap_dirty_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_filemap_dirty_folio -then : + if test -d build/vfs_has_filemap_dirty_folio; then : - if test -f build/vfs_has_filemap_dirty_folio/vfs_has_filemap_dirty_folio.ko -then : + if test -f build/vfs_has_filemap_dirty_folio/vfs_has_filemap_dirty_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_filemap_dirty_folio\" test, check that @@ -55844,48 +57338,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_FILEMAP_DIRTY_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_VFS_FILEMAP_DIRTY_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether read_folio exists" >&5 -printf %s "checking whether read_folio exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read_folio exists" >&5 +$as_echo_n "checking whether read_folio exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_read_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_read_folio -then : + if test -d build/vfs_has_read_folio; then : - if test -f build/vfs_has_read_folio/vfs_has_read_folio.ko -then : + if test -f build/vfs_has_read_folio/vfs_has_read_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_read_folio\" test, check that @@ -55897,48 +57387,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_READ_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_VFS_READ_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether migrate_folio exists" >&5 -printf %s "checking whether migrate_folio exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether migrate_folio exists" >&5 +$as_echo_n "checking whether migrate_folio exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_migrate_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_migrate_folio -then : + if test -d build/vfs_has_migrate_folio; then : - if test -f build/vfs_has_migrate_folio/vfs_has_migrate_folio.ko -then : + if test -f build/vfs_has_migrate_folio/vfs_has_migrate_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_migrate_folio\" test, check that @@ -55950,48 +57436,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_MIGRATE_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_VFS_MIGRATE_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether migratepage exists" >&5 -printf %s "checking whether migratepage exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether migratepage exists" >&5 +$as_echo_n "checking whether migratepage exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_migratepage_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_migratepage -then : + if test -d build/vfs_has_migratepage; then : - if test -f build/vfs_has_migratepage/vfs_has_migratepage.ko -then : + if test -f build/vfs_has_migratepage/vfs_has_migratepage.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_migratepage\" test, check that @@ -56003,48 +57485,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_MIGRATEPAGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_MIGRATEPAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vfs_fsync() wants 2 args" >&5 -printf %s "checking whether vfs_fsync() wants 2 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfs_fsync() wants 2 args" >&5 +$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } cachevar="zfs_cv_kernel_vfs_fsync_2args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_fsync_2args -then : + if test -d build/vfs_fsync_2args; then : - if test -f build/vfs_fsync_2args/vfs_fsync_2args.ko -then : + if test -f build/vfs_fsync_2args/vfs_fsync_2args.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_fsync_2args\" test, check that @@ -56056,13 +57534,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -56072,7 +57549,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -56080,30 +57557,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether aops->readpages exists" >&5 -printf %s "checking whether aops->readpages exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether aops->readpages exists" >&5 +$as_echo_n "checking whether aops->readpages exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_readpages_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_readpages -then : + if test -d build/vfs_has_readpages; then : - if test -f build/vfs_has_readpages/vfs_has_readpages.ko -then : + if test -f build/vfs_has_readpages/vfs_has_readpages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_readpages\" test, check that @@ -56115,48 +57589,93 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VFS_READPAGES 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether aops->writepage exists" >&5 +$as_echo_n "checking whether aops->writepage exists... " >&6; } + + cachevar="zfs_cv_kernel_vfs_has_writepage_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/vfs_has_writepage; then : + + if test -f build/vfs_has_writepage/vfs_has_writepage.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"vfs_has_writepage\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_READPAGES 1" >>confdefs.h +$as_echo "#define HAVE_VFS_WRITEPAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __set_page_dirty_nobuffers exists" >&5 -printf %s "checking whether __set_page_dirty_nobuffers exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __set_page_dirty_nobuffers exists" >&5 +$as_echo_n "checking whether __set_page_dirty_nobuffers exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_set_page_dirty_nobuffers_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_set_page_dirty_nobuffers -then : + if test -d build/vfs_has_set_page_dirty_nobuffers; then : - if test -f build/vfs_has_set_page_dirty_nobuffers/vfs_has_set_page_dirty_nobuffers.ko -then : + if test -f build/vfs_has_set_page_dirty_nobuffers/vfs_has_set_page_dirty_nobuffers.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_set_page_dirty_nobuffers\" test, check that @@ -56168,49 +57687,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS 1" >>confdefs.h +$as_echo "#define HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fault_in_iov_iter_readable() is available" >&5 -printf %s "checking whether fault_in_iov_iter_readable() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fault_in_iov_iter_readable() is available" >&5 +$as_echo_n "checking whether fault_in_iov_iter_readable() is available... " >&6; } cachevar="zfs_cv_kernel_fault_in_iov_iter_readable_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/fault_in_iov_iter_readable -then : + if test -d build/fault_in_iov_iter_readable; then : - if test -f build/fault_in_iov_iter_readable/fault_in_iov_iter_readable.ko -then : + if test -f build/fault_in_iov_iter_readable/fault_in_iov_iter_readable.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"fault_in_iov_iter_readable\" test, check that @@ -56222,47 +57737,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FAULT_IN_IOV_ITER_READABLE 1" >>confdefs.h +$as_echo "#define HAVE_FAULT_IN_IOV_ITER_READABLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_type() is available" >&5 -printf %s "checking whether iov_iter_type() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_type() is available" >&5 +$as_echo_n "checking whether iov_iter_type() is available... " >&6; } cachevar="zfs_cv_kernel_iov_iter_type_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iov_iter_type -then : + if test -d build/iov_iter_type; then : - if test -f build/iov_iter_type/iov_iter_type.ko -then : + if test -f build/iov_iter_type/iov_iter_type.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iov_iter_type\" test, check that @@ -56274,48 +57785,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOV_ITER_TYPE 1" >>confdefs.h +$as_echo "#define HAVE_IOV_ITER_TYPE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_get_pages2() is available" >&5 -printf %s "checking whether iov_iter_get_pages2() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_get_pages2() is available" >&5 +$as_echo_n "checking whether iov_iter_get_pages2() is available... " >&6; } cachevar="zfs_cv_kernel_iov_iter_get_pages2_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iov_iter_get_pages2 -then : + if test -d build/iov_iter_get_pages2; then : - if test -f build/iov_iter_get_pages2/iov_iter_get_pages2.ko -then : + if test -f build/iov_iter_get_pages2/iov_iter_get_pages2.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iov_iter_get_pages2\" test, check that @@ -56327,47 +57834,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOV_ITER_GET_PAGES2 1" >>confdefs.h +$as_echo "#define HAVE_IOV_ITER_GET_PAGES2 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iter_is_ubuf() is available" >&5 -printf %s "checking whether iter_is_ubuf() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iter_is_ubuf() is available" >&5 +$as_echo_n "checking whether iter_is_ubuf() is available... " >&6; } cachevar="zfs_cv_kernel_iter_is_ubuf_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iter_is_ubuf -then : + if test -d build/iter_is_ubuf; then : - if test -f build/iter_is_ubuf/iter_is_ubuf.ko -then : + if test -f build/iter_is_ubuf/iter_is_ubuf.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iter_is_ubuf\" test, check that @@ -56379,47 +57882,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ITER_IS_UBUF 1" >>confdefs.h +$as_echo "#define HAVE_ITER_IS_UBUF 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iter_iov() is available" >&5 -printf %s "checking whether iter_iov() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iter_iov() is available" >&5 +$as_echo_n "checking whether iter_iov() is available... " >&6; } cachevar="zfs_cv_kernel_iter_iov_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iter_iov -then : + if test -d build/iter_iov; then : - if test -f build/iter_iov/iter_iov.ko -then : + if test -f build/iter_iov/iter_iov.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iter_iov\" test, check that @@ -56431,42 +57930,38 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ITER_IOV 1" >>confdefs.h +$as_echo "#define HAVE_ITER_IOV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_copy_file_range() is available" >&5 -printf %s "checking whether generic_copy_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_copy_file_range() is available" >&5 +$as_echo_n "checking whether generic_copy_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_generic_copy_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/generic_copy_file_range/generic_copy_file_range.ko -then : + if ! test -f build/generic_copy_file_range/generic_copy_file_range.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]generic_copy_file_range[[:space:]]' \ @@ -56499,7 +57994,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -56510,48 +58005,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_GENERIC_COPY_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_GENERIC_COPY_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether splice_copy_file_range() is available" >&5 -printf %s "checking whether splice_copy_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether splice_copy_file_range() is available" >&5 +$as_echo_n "checking whether splice_copy_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_splice_copy_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/splice_copy_file_range -then : + if test -d build/splice_copy_file_range; then : - if test -f build/splice_copy_file_range/splice_copy_file_range.ko -then : + if test -f build/splice_copy_file_range/splice_copy_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"splice_copy_file_range\" test, check that @@ -56563,48 +58054,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_SPLICE_COPY_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_SPLICE_COPY_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fops->remap_file_range() is available" >&5 -printf %s "checking whether fops->remap_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->remap_file_range() is available" >&5 +$as_echo_n "checking whether fops->remap_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_vfs_remap_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_remap_file_range -then : + if test -d build/vfs_remap_file_range; then : - if test -f build/vfs_remap_file_range/vfs_remap_file_range.ko -then : + if test -f build/vfs_remap_file_range/vfs_remap_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_remap_file_range\" test, check that @@ -56616,48 +58103,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_REMAP_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_REMAP_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fops->clone_file_range() is available" >&5 -printf %s "checking whether fops->clone_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->clone_file_range() is available" >&5 +$as_echo_n "checking whether fops->clone_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_vfs_clone_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_clone_file_range -then : + if test -d build/vfs_clone_file_range; then : - if test -f build/vfs_clone_file_range/vfs_clone_file_range.ko -then : + if test -f build/vfs_clone_file_range/vfs_clone_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_clone_file_range\" test, check that @@ -56669,48 +58152,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_CLONE_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_CLONE_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fops->dedupe_file_range() is available" >&5 -printf %s "checking whether fops->dedupe_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->dedupe_file_range() is available" >&5 +$as_echo_n "checking whether fops->dedupe_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_vfs_dedupe_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_dedupe_file_range -then : + if test -d build/vfs_dedupe_file_range; then : - if test -f build/vfs_dedupe_file_range/vfs_dedupe_file_range.ko -then : + if test -f build/vfs_dedupe_file_range/vfs_dedupe_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_dedupe_file_range\" test, check that @@ -56722,48 +58201,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_DEDUPE_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_DEDUPE_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kmap_atomic wants 1 args" >&5 -printf %s "checking whether kmap_atomic wants 1 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kmap_atomic wants 1 args" >&5 +$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; } cachevar="zfs_cv_kernel_kmap_atomic_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kmap_atomic -then : + if test -d build/kmap_atomic; then : - if test -f build/kmap_atomic/kmap_atomic.ko -then : + if test -f build/kmap_atomic/kmap_atomic.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kmap_atomic\" test, check that @@ -56775,13 +58250,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -56791,7 +58265,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -56799,30 +58273,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kmap_local_page exists" >&5 -printf %s "checking whether kmap_local_page exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kmap_local_page exists" >&5 +$as_echo_n "checking whether kmap_local_page exists... " >&6; } cachevar="zfs_cv_kernel_kmap_local_page_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kmap_local_page -then : + if test -d build/kmap_local_page; then : - if test -f build/kmap_local_page/kmap_local_page.ko -then : + if test -f build/kmap_local_page/kmap_local_page.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kmap_local_page\" test, check that @@ -56834,48 +58305,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_KMAP_LOCAL_PAGE 1" >>confdefs.h +$as_echo "#define HAVE_KMAP_LOCAL_PAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether follow_down_one() is available" >&5 -printf %s "checking whether follow_down_one() is available... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether follow_down_one() is available" >&5 +$as_echo_n "checking whether follow_down_one() is available... " >&6; } cachevar="zfs_cv_kernel_follow_down_one_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/follow_down_one -then : + if test -d build/follow_down_one; then : - if test -f build/follow_down_one/follow_down_one.ko -then : + if test -f build/follow_down_one/follow_down_one.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"follow_down_one\" test, check that @@ -56887,13 +58355,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -56903,38 +58370,137 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether follow_down() takes a flags parameter" >&5 +$as_echo_n "checking whether follow_down() takes a flags parameter... " >&6; } + + cachevar="zfs_cv_kernel_follow_down_flags_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/follow_down_flags; then : + + if test -f build/follow_down_flags/follow_down_flags.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"follow_down_flags\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + +$as_echo "#define HAVE_FOLLOW_DOWN_FLAGS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfs_path_lookup() is exported" >&5 +$as_echo_n "checking whether vfs_path_lookup() is exported... " >&6; } + + grep -q -E '[[:space:]]vfs_path_lookup[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/namei.c; do + grep -q -E "EXPORT_SYMBOL.*(vfs_path_lookup)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + as_fn_error $? " + *** None of the expected \"follow_down()\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 + else : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VFS_PATH_LOOKUP_EXPORTED 1" >>confdefs.h + + + fi + else : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VFS_PATH_LOOKUP_EXPORTED 1" >>confdefs.h + + + fi + + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether submit_bio is member of struct block_device_operations" >&5 -printf %s "checking whether submit_bio is member of struct block_device_operations... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether submit_bio is member of struct block_device_operations" >&5 +$as_echo_n "checking whether submit_bio is member of struct block_device_operations... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_submit_bio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_submit_bio -then : + if test -d build/block_device_operations_submit_bio; then : - if test -f build/block_device_operations_submit_bio/block_device_operations_submit_bio.ko -then : + if test -f build/block_device_operations_submit_bio/block_device_operations_submit_bio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_submit_bio\" test, check that @@ -56946,40 +58512,36 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS 1" >>confdefs.h +$as_echo "#define HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists" >&5 -printf %s "checking whether blk_alloc_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists" >&5 +$as_echo_n "checking whether blk_alloc_disk() exists... " >&6; } cachevar="zfs_cv_kernel_blk_alloc_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_disk -then : + if test -d build/blk_alloc_disk; then : - if test -f build/blk_alloc_disk/blk_alloc_disk.ko -then : + if test -f build/blk_alloc_disk/blk_alloc_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_disk\" test, check that @@ -56991,39 +58553,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_DISK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 -printf %s "checking whether blk_cleanup_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 +$as_echo_n "checking whether blk_cleanup_disk() exists... " >&6; } cachevar="zfs_cv_kernel_blk_cleanup_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_cleanup_disk -then : + if test -d build/blk_cleanup_disk; then : - if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko -then : + if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_cleanup_disk\" test, check that @@ -57035,55 +58593,51 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists and takes 2 args" >&5 -printf %s "checking whether blk_alloc_disk() exists and takes 2 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists and takes 2 args" >&5 +$as_echo_n "checking whether blk_alloc_disk() exists and takes 2 args... " >&6; } cachevar="zfs_cv_kernel_blk_alloc_disk_2arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_disk_2arg -then : + if test -d build/blk_alloc_disk_2arg; then : - if test -f build/blk_alloc_disk_2arg/blk_alloc_disk_2arg.ko -then : + if test -f build/blk_alloc_disk_2arg/blk_alloc_disk_2arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_disk_2arg\" test, check that @@ -57095,39 +58649,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_DISK_2ARG 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_DISK_2ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct queue_limits has a features field" >&5 -printf %s "checking whether struct queue_limits has a features field... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct queue_limits has a features field" >&5 +$as_echo_n "checking whether struct queue_limits has a features field... " >&6; } cachevar="zfs_cv_kernel_blkdev_queue_limits_features_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_queue_limits_features -then : + if test -d build/blkdev_queue_limits_features; then : - if test -f build/blkdev_queue_limits_features/blkdev_queue_limits_features.ko -then : + if test -f build/blkdev_queue_limits_features/blkdev_queue_limits_features.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_queue_limits_features\" test, check that @@ -57139,47 +58689,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_QUEUE_LIMITS_FEATURES 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_QUEUE_LIMITS_FEATURES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 -printf %s "checking whether blk_cleanup_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 +$as_echo_n "checking whether blk_cleanup_disk() exists... " >&6; } cachevar="zfs_cv_kernel_blk_cleanup_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_cleanup_disk -then : + if test -d build/blk_cleanup_disk; then : - if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko -then : + if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_cleanup_disk\" test, check that @@ -57191,60 +58737,56 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_queue() expects request function" >&5 -printf %s "checking whether blk_alloc_queue() expects request function... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_queue() expects request function" >&5 +$as_echo_n "checking whether blk_alloc_queue() expects request function... " >&6; } cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_queue_request_fn -then : + if test -d build/blk_alloc_queue_request_fn; then : - if test -f build/blk_alloc_queue_request_fn/blk_alloc_queue_request_fn.ko -then : + if test -f build/blk_alloc_queue_request_fn/blk_alloc_queue_request_fn.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_queue_request_fn\" test, check that @@ -57256,51 +58798,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 -printf %s "checking whether make_request_fn() returns blk_qc_t... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 +$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN 1" >>confdefs.h -printf "%s\n" "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h +$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h -printf "%s\n" "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h +$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_rh_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_queue_request_fn_rh -then : + if test -d build/blk_alloc_queue_request_fn_rh; then : - if test -f build/blk_alloc_queue_request_fn_rh/blk_alloc_queue_request_fn_rh.ko -then : + if test -f build/blk_alloc_queue_request_fn_rh/blk_alloc_queue_request_fn_rh.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_queue_request_fn_rh\" test, check that @@ -57312,56 +58850,52 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn_rh() returns blk_qc_t" >&5 -printf %s "checking whether make_request_fn_rh() returns blk_qc_t... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn_rh() returns blk_qc_t" >&5 +$as_echo_n "checking whether make_request_fn_rh() returns blk_qc_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH 1" >>confdefs.h -printf "%s\n" "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h +$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h -printf "%s\n" "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h +$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 -printf %s "checking whether make_request_fn() returns blk_qc_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 +$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; } cachevar="zfs_cv_kernel_make_request_fn_blk_qc_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/make_request_fn_blk_qc_t -then : + if test -d build/make_request_fn_blk_qc_t; then : - if test -f build/make_request_fn_blk_qc_t/make_request_fn_blk_qc_t.ko -then : + if test -f build/make_request_fn_blk_qc_t/make_request_fn_blk_qc_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"make_request_fn_blk_qc_t\" test, check that @@ -57373,19 +58907,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h +$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h -printf "%s\n" "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h +$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -57395,7 +58928,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -57412,30 +58945,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether 6.3+ bdev_*_io_acct() are available" >&5 -printf %s "checking whether 6.3+ bdev_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 6.3+ bdev_*_io_acct() are available" >&5 +$as_echo_n "checking whether 6.3+ bdev_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_bdev_io_acct_63_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_io_acct_63 -then : + if test -d build/bdev_io_acct_63; then : - if test -f build/bdev_io_acct_63/bdev_io_acct_63.ko -then : + if test -f build/bdev_io_acct_63/bdev_io_acct_63.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_io_acct_63\" test, check that @@ -57447,44 +58977,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_IO_ACCT_63 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_IO_ACCT_63 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pre-6.3 bdev_*_io_acct() are available" >&5 -printf %s "checking whether pre-6.3 bdev_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pre-6.3 bdev_*_io_acct() are available" >&5 +$as_echo_n "checking whether pre-6.3 bdev_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_bdev_io_acct_old_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_io_acct_old -then : + if test -d build/bdev_io_acct_old; then : - if test -f build/bdev_io_acct_old/bdev_io_acct_old.ko -then : + if test -f build/bdev_io_acct_old/bdev_io_acct_old.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_io_acct_old\" test, check that @@ -57496,43 +59022,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_IO_ACCT_OLD 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_IO_ACCT_OLD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic disk_*_io_acct() are available" >&5 -printf %s "checking whether generic disk_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic disk_*_io_acct() are available" >&5 +$as_echo_n "checking whether generic disk_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_disk_io_acct_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/disk_io_acct -then : + if test -d build/disk_io_acct; then : - if test -f build/disk_io_acct/disk_io_acct.ko -then : + if test -f build/disk_io_acct/disk_io_acct.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"disk_io_acct\" test, check that @@ -57544,44 +59066,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DISK_IO_ACCT 1" >>confdefs.h +$as_echo "#define HAVE_DISK_IO_ACCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic bio_*_io_acct() are available" >&5 -printf %s "checking whether generic bio_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic bio_*_io_acct() are available" >&5 +$as_echo_n "checking whether generic bio_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_bio_io_acct_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_io_acct -then : + if test -d build/bio_io_acct; then : - if test -f build/bio_io_acct/bio_io_acct.ko -then : + if test -f build/bio_io_acct/bio_io_acct.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_io_acct\" test, check that @@ -57593,38 +59111,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_IO_ACCT 1" >>confdefs.h +$as_echo "#define HAVE_BIO_IO_ACCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_*_io_acct wants 4 args" >&5 -printf %s "checking whether generic_*_io_acct wants 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_*_io_acct wants 4 args" >&5 +$as_echo_n "checking whether generic_*_io_acct wants 4 args... " >&6; } cachevar="zfs_cv_kernel_generic_acct_4args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/generic_acct_4args/generic_acct_4args.ko -then : + if ! test -f build/generic_acct_4args/generic_acct_4args.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \ @@ -57657,7 +59171,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -57668,19 +59182,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_IO_ACCT_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_IO_ACCT_4ARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -57698,30 +59211,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel fpu is available" >&5 -printf %s "checking whether kernel fpu is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel fpu is available" >&5 +$as_echo_n "checking whether kernel fpu is available... " >&6; } cachevar="zfs_cv_kernel_kernel_fpu_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kernel_fpu_license -then : + if test -d build/kernel_fpu_license; then : - if test -f build/kernel_fpu_license/kernel_fpu_license.ko -then : + if test -f build/kernel_fpu_license/kernel_fpu_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kernel_fpu_license\" test, check that @@ -57733,36 +59243,32 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: kernel_fpu_*" >&5 -printf "%s\n" "kernel_fpu_*" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: kernel_fpu_*" >&5 +$as_echo "kernel_fpu_*" >&6; } -printf "%s\n" "#define HAVE_KERNEL_FPU 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU 1" >>confdefs.h -printf "%s\n" "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h +$as_echo "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel___kernel_fpu_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/__kernel_fpu_license/__kernel_fpu_license.ko -then : + if ! test -f build/__kernel_fpu_license/__kernel_fpu_license.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]__kernel_fpu_begin[[:space:]]' \ @@ -57795,7 +59301,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -57806,42 +59312,38 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: __kernel_fpu_*" >&5 -printf "%s\n" "__kernel_fpu_*" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: __kernel_fpu_*" >&5 +$as_echo "__kernel_fpu_*" >&6; } -printf "%s\n" "#define HAVE_UNDERSCORE_KERNEL_FPU 1" >>confdefs.h +$as_echo "#define HAVE_UNDERSCORE_KERNEL_FPU 1" >>confdefs.h -printf "%s\n" "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h +$as_echo "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_kernel_neon_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kernel_neon_license -then : + if test -d build/kernel_neon_license; then : - if test -f build/kernel_neon_license/kernel_neon_license.ko -then : + if test -f build/kernel_neon_license/kernel_neon_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kernel_neon_license\" test, check that @@ -57853,22 +59355,21 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: kernel_neon_*" >&5 -printf "%s\n" "kernel_neon_*" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: kernel_neon_*" >&5 +$as_echo "kernel_neon_*" >&6; } -printf "%s\n" "#define HAVE_KERNEL_NEON 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_NEON 1" >>confdefs.h -else $as_nop +else # catch-all - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -printf "%s\n" "internal" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL 1" >>confdefs.h fi @@ -57881,30 +59382,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel defines fmode_t" >&5 -printf %s "checking whether kernel defines fmode_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines fmode_t" >&5 +$as_echo_n "checking whether kernel defines fmode_t... " >&6; } cachevar="zfs_cv_kernel_type_fmode_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/type_fmode_t -then : + if test -d build/type_fmode_t; then : - if test -f build/type_fmode_t/type_fmode_t.ko -then : + if test -f build/type_fmode_t/type_fmode_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"type_fmode_t\" test, check that @@ -57916,13 +59414,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -57932,7 +59429,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -57940,30 +59437,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kuid_t/kgid_t is available" >&5 -printf %s "checking whether kuid_t/kgid_t is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kuid_t/kgid_t is available" >&5 +$as_echo_n "checking whether kuid_t/kgid_t is available... " >&6; } cachevar="zfs_cv_kernel_kuidgid_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kuidgid_t -then : + if test -d build/kuidgid_t; then : - if test -f build/kuidgid_t/kuidgid_t.ko -then : + if test -f build/kuidgid_t/kuidgid_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kuidgid_t\" test, check that @@ -57975,13 +59469,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -57991,7 +59484,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -57999,30 +59492,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether i_(uid|gid)_(read|write) exist" >&5 -printf %s "checking whether i_(uid|gid)_(read|write) exist... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether i_(uid|gid)_(read|write) exist" >&5 +$as_echo_n "checking whether i_(uid|gid)_(read|write) exist... " >&6; } cachevar="zfs_cv_kernel_i_uid_read_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/i_uid_read -then : + if test -d build/i_uid_read; then : - if test -f build/i_uid_read/i_uid_read.ko -then : + if test -f build/i_uid_read/i_uid_read.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"i_uid_read\" test, check that @@ -58034,13 +59524,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -58050,7 +59539,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -58058,30 +59547,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->rename() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->rename() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_inode_operations_rename_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_rename_mnt_idmap -then : + if test -d build/inode_operations_rename_mnt_idmap; then : - if test -f build/inode_operations_rename_mnt_idmap/inode_operations_rename_mnt_idmap.ko -then : + if test -f build/inode_operations_rename_mnt_idmap/inode_operations_rename_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_rename_mnt_idmap\" test, check that @@ -58093,44 +59579,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_RENAME_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_RENAME_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct user_namespace*" >&5 -printf %s "checking whether iops->rename() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->rename() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_inode_operations_rename_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_rename_userns -then : + if test -d build/inode_operations_rename_userns; then : - if test -f build/inode_operations_rename_userns/inode_operations_rename_userns.ko -then : + if test -f build/inode_operations_rename_userns/inode_operations_rename_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_rename_userns\" test, check that @@ -58142,71 +59624,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_IOPS_RENAME_USERNS 1" >>confdefs.h - - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() wants flags" >&5 -printf %s "checking whether iops->rename() wants flags... " >&6; } - - cachevar="zfs_cv_kernel_inode_operations_rename_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - if test -d build/inode_operations_rename_flags -then : - - if test -f build/inode_operations_rename_flags/inode_operations_rename_flags.ko -then : - - eval "$cachevar=yes" - -else $as_nop - - eval "$cachevar=no" - -fi - -else $as_nop - - as_fn_error $? " - *** No matching source for the \"inode_operations_rename_flags\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 - -fi - -fi - - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_RENAME_WANTS_FLAGS 1" >>confdefs.h + if test "x$cacheval" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_IOPS_RENAME_USERNS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -58215,30 +59644,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether totalram_pages() exists" >&5 -printf %s "checking whether totalram_pages() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether totalram_pages() exists" >&5 +$as_echo_n "checking whether totalram_pages() exists... " >&6; } cachevar="zfs_cv_kernel_totalram_pages_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/totalram_pages -then : + if test -d build/totalram_pages; then : - if test -f build/totalram_pages/totalram_pages.ko -then : + if test -f build/totalram_pages/totalram_pages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"totalram_pages\" test, check that @@ -58250,48 +59676,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TOTALRAM_PAGES_FUNC 1" >>confdefs.h +$as_echo "#define HAVE_TOTALRAM_PAGES_FUNC 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether totalhigh_pages() exists" >&5 -printf %s "checking whether totalhigh_pages() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether totalhigh_pages() exists" >&5 +$as_echo_n "checking whether totalhigh_pages() exists... " >&6; } cachevar="zfs_cv_kernel_totalhigh_pages_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/totalhigh_pages -then : + if test -d build/totalhigh_pages; then : - if test -f build/totalhigh_pages/totalhigh_pages.ko -then : + if test -f build/totalhigh_pages/totalhigh_pages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"totalhigh_pages\" test, check that @@ -58303,49 +59725,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TOTALHIGH_PAGES 1" >>confdefs.h +$as_echo "#define HAVE_TOTALHIGH_PAGES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether is inside percpu_ref.data" >&5 -printf %s "checking whether is inside percpu_ref.data... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is inside percpu_ref.data" >&5 +$as_echo_n "checking whether is inside percpu_ref.data... " >&6; } cachevar="zfs_cv_kernel_percpu_ref_count_in_data_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/percpu_ref_count_in_data -then : + if test -d build/percpu_ref_count_in_data; then : - if test -f build/percpu_ref_count_in_data/percpu_ref_count_in_data.ko -then : + if test -f build/percpu_ref_count_in_data/percpu_ref_count_in_data.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"percpu_ref_count_in_data\" test, check that @@ -58357,49 +59775,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define ZFS_PERCPU_REF_COUNT_IN_DATA 1" >>confdefs.h +$as_echo "#define ZFS_PERCPU_REF_COUNT_IN_DATA 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap* and request_mask" >&5 -printf %s "checking whether generic_fillattr requires struct mnt_idmap* and request_mask... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap* and request_mask" >&5 +$as_echo_n "checking whether generic_fillattr requires struct mnt_idmap* and request_mask... " >&6; } cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_reqmask_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/generic_fillattr_mnt_idmap_reqmask -then : + if test -d build/generic_fillattr_mnt_idmap_reqmask; then : - if test -f build/generic_fillattr_mnt_idmap_reqmask/generic_fillattr_mnt_idmap_reqmask.ko -then : + if test -f build/generic_fillattr_mnt_idmap_reqmask/generic_fillattr_mnt_idmap_reqmask.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"generic_fillattr_mnt_idmap_reqmask\" test, check that @@ -58411,44 +59825,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FILLATTR_IDMAP_REQMASK 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FILLATTR_IDMAP_REQMASK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap*" >&5 -printf %s "checking whether generic_fillattr requires struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap*" >&5 +$as_echo_n "checking whether generic_fillattr requires struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/generic_fillattr_mnt_idmap -then : + if test -d build/generic_fillattr_mnt_idmap; then : - if test -f build/generic_fillattr_mnt_idmap/generic_fillattr_mnt_idmap.ko -then : + if test -f build/generic_fillattr_mnt_idmap/generic_fillattr_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"generic_fillattr_mnt_idmap\" test, check that @@ -58460,44 +59870,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FILLATTR_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FILLATTR_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct user_namespace*" >&5 -printf %s "checking whether generic_fillattr requires struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct user_namespace*" >&5 +$as_echo_n "checking whether generic_fillattr requires struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_generic_fillattr_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/generic_fillattr_userns -then : + if test -d build/generic_fillattr_userns; then : - if test -f build/generic_fillattr_userns/generic_fillattr_userns.ko -then : + if test -f build/generic_fillattr_userns/generic_fillattr_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"generic_fillattr_userns\" test, check that @@ -58509,19 +59915,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FILLATTR_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FILLATTR_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -58533,30 +59938,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->mknod() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->mknod() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_mknod_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mknod_mnt_idmap -then : + if test -d build/mknod_mnt_idmap; then : - if test -f build/mknod_mnt_idmap/mknod_mnt_idmap.ko -then : + if test -f build/mknod_mnt_idmap/mknod_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mknod_mnt_idmap\" test, check that @@ -58568,43 +59970,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKNOD_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_MKNOD_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct user_namespace*" >&5 -printf %s "checking whether iops->mknod() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->mknod() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_mknod_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mknod_userns -then : + if test -d build/mknod_userns; then : - if test -f build/mknod_userns/mknod_userns.ko -then : + if test -f build/mknod_userns/mknod_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mknod_userns\" test, check that @@ -58616,19 +60014,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKNOD_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_MKNOD_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -58637,30 +60034,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->symlink() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->symlink() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_symlink_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/symlink_mnt_idmap -then : + if test -d build/symlink_mnt_idmap; then : - if test -f build/symlink_mnt_idmap/symlink_mnt_idmap.ko -then : + if test -f build/symlink_mnt_idmap/symlink_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"symlink_mnt_idmap\" test, check that @@ -58672,44 +60066,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_SYMLINK_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_SYMLINK_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct user_namespace*" >&5 -printf %s "checking whether iops->symlink() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->symlink() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_symlink_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/symlink_userns -then : + if test -d build/symlink_userns; then : - if test -f build/symlink_userns/symlink_userns.ko -then : + if test -f build/symlink_userns/symlink_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"symlink_userns\" test, check that @@ -58721,19 +60111,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_SYMLINK_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_SYMLINK_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -58742,30 +60131,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_max_segs() exists" >&5 -printf %s "checking whether bio_max_segs() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_max_segs() exists" >&5 +$as_echo_n "checking whether bio_max_segs() exists... " >&6; } cachevar="zfs_cv_kernel_bio_max_segs_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_max_segs -then : + if test -d build/bio_max_segs; then : - if test -f build/bio_max_segs/bio_max_segs.ko -then : + if test -f build/bio_max_segs/bio_max_segs.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_max_segs\" test, check that @@ -58777,49 +60163,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_MAX_SEGS 1" >>confdefs.h +$as_echo "#define HAVE_BIO_MAX_SEGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel_siginfo_t tyepedef exists" >&5 -printf %s "checking whether kernel_siginfo_t tyepedef exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel_siginfo_t tyepedef exists" >&5 +$as_echo_n "checking whether kernel_siginfo_t tyepedef exists... " >&6; } cachevar="zfs_cv_kernel_siginfo_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/siginfo -then : + if test -d build/siginfo; then : - if test -f build/siginfo/siginfo.ko -then : + if test -f build/siginfo/siginfo.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"siginfo\" test, check that @@ -58831,49 +60213,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SIGINFO 1" >>confdefs.h +$as_echo "#define HAVE_SIGINFO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct kobj_type.default_groups exists" >&5 -printf %s "checking whether struct kobj_type.default_groups exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct kobj_type.default_groups exists" >&5 +$as_echo_n "checking whether struct kobj_type.default_groups exists... " >&6; } cachevar="zfs_cv_kernel_sysfs_default_groups_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sysfs_default_groups -then : + if test -d build/sysfs_default_groups; then : - if test -f build/sysfs_default_groups/sysfs_default_groups.ko -then : + if test -f build/sysfs_default_groups/sysfs_default_groups.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"sysfs_default_groups\" test, check that @@ -58885,49 +60263,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SYSFS_DEFAULT_GROUPS 1" >>confdefs.h +$as_echo "#define HAVE_SYSFS_DEFAULT_GROUPS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether standalone exists" >&5 -printf %s "checking whether standalone exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether standalone exists" >&5 +$as_echo_n "checking whether standalone exists... " >&6; } cachevar="zfs_cv_kernel_has_standalone_linux_stdarg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_standalone_linux_stdarg -then : + if test -d build/has_standalone_linux_stdarg; then : - if test -f build/has_standalone_linux_stdarg/has_standalone_linux_stdarg.ko -then : + if test -f build/has_standalone_linux_stdarg/has_standalone_linux_stdarg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_standalone_linux_stdarg\" test, check that @@ -58939,48 +60313,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_STANDALONE_LINUX_STDARG 1" >>confdefs.h +$as_echo "#define HAVE_STANDALONE_LINUX_STDARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strlcpy() exists" >&5 -printf %s "checking whether strlcpy() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strlcpy() exists" >&5 +$as_echo_n "checking whether strlcpy() exists... " >&6; } cachevar="zfs_cv_kernel_kernel_has_strlcpy_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kernel_has_strlcpy -then : + if test -d build/kernel_has_strlcpy; then : - if test -f build/kernel_has_strlcpy/kernel_has_strlcpy.ko -then : + if test -f build/kernel_has_strlcpy/kernel_has_strlcpy.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kernel_has_strlcpy\" test, check that @@ -58992,48 +60362,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_KERNEL_STRLCPY 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_STRLCPY 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether folio_wait_bit() exists" >&5 -printf %s "checking whether folio_wait_bit() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether folio_wait_bit() exists" >&5 +$as_echo_n "checking whether folio_wait_bit() exists... " >&6; } cachevar="zfs_cv_kernel_pagemap_has_folio_wait_bit_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/pagemap_has_folio_wait_bit -then : + if test -d build/pagemap_has_folio_wait_bit; then : - if test -f build/pagemap_has_folio_wait_bit/pagemap_has_folio_wait_bit.ko -then : + if test -f build/pagemap_has_folio_wait_bit/pagemap_has_folio_wait_bit.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"pagemap_has_folio_wait_bit\" test, check that @@ -59045,48 +60411,93 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_PAGEMAP_FOLIO_WAIT_BIT 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readahead_page() exists" >&5 +$as_echo_n "checking whether readahead_page() exists... " >&6; } + + cachevar="zfs_cv_kernel_pagemap_has_readahead_page_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/pagemap_has_readahead_page; then : + + if test -f build/pagemap_has_readahead_page/pagemap_has_readahead_page.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"pagemap_has_readahead_page\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PAGEMAP_FOLIO_WAIT_BIT 1" >>confdefs.h +$as_echo "#define HAVE_PAGEMAP_READAHEAD_PAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether add_disk() returns int" >&5 -printf %s "checking whether add_disk() returns int... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether add_disk() returns int" >&5 +$as_echo_n "checking whether add_disk() returns int... " >&6; } cachevar="zfs_cv_kernel_add_disk_ret_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/add_disk_ret -then : + if test -d build/add_disk_ret; then : - if test -f build/add_disk_ret/add_disk_ret.ko -then : + if test -f build/add_disk_ret/add_disk_ret.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"add_disk_ret\" test, check that @@ -59098,49 +60509,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ADD_DISK_RET 1" >>confdefs.h +$as_echo "#define HAVE_ADD_DISK_RET 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kthread_complete_and_exit() is available" >&5 -printf %s "checking whether kthread_complete_and_exit() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kthread_complete_and_exit() is available" >&5 +$as_echo_n "checking whether kthread_complete_and_exit() is available... " >&6; } cachevar="zfs_cv_kernel_kthread_complete_and_exit_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kthread_complete_and_exit -then : + if test -d build/kthread_complete_and_exit; then : - if test -f build/kthread_complete_and_exit/kthread_complete_and_exit.ko -then : + if test -f build/kthread_complete_and_exit/kthread_complete_and_exit.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kthread_complete_and_exit\" test, check that @@ -59152,51 +60559,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define SPL_KTHREAD_COMPLETE_AND_EXIT kthread_complete_and_exit" >>confdefs.h +$as_echo "#define SPL_KTHREAD_COMPLETE_AND_EXIT kthread_complete_and_exit" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -printf "%s\n" "#define SPL_KTHREAD_COMPLETE_AND_EXIT complete_and_exit" >>confdefs.h +$as_echo "#define SPL_KTHREAD_COMPLETE_AND_EXIT complete_and_exit" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dequeue_signal() takes 4 arguments" >&5 -printf %s "checking whether dequeue_signal() takes 4 arguments... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dequeue_signal() takes 4 arguments" >&5 +$as_echo_n "checking whether dequeue_signal() takes 4 arguments... " >&6; } cachevar="zfs_cv_kernel_kthread_dequeue_signal_4arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kthread_dequeue_signal_4arg -then : + if test -d build/kthread_dequeue_signal_4arg; then : - if test -f build/kthread_dequeue_signal_4arg/kthread_dequeue_signal_4arg.ko -then : + if test -f build/kthread_dequeue_signal_4arg/kthread_dequeue_signal_4arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kthread_dequeue_signal_4arg\" test, check that @@ -59208,43 +60611,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DEQUEUE_SIGNAL_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_DEQUEUE_SIGNAL_4ARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether 3-arg dequeue_signal() takes a type argument" >&5 -printf %s "checking whether 3-arg dequeue_signal() takes a type argument... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 3-arg dequeue_signal() takes a type argument" >&5 +$as_echo_n "checking whether 3-arg dequeue_signal() takes a type argument... " >&6; } cachevar="zfs_cv_kernel_kthread_dequeue_signal_3arg_type_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kthread_dequeue_signal_3arg_type -then : + if test -d build/kthread_dequeue_signal_3arg_type; then : - if test -f build/kthread_dequeue_signal_3arg_type/kthread_dequeue_signal_3arg_type.ko -then : + if test -f build/kthread_dequeue_signal_3arg_type/kthread_dequeue_signal_3arg_type.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kthread_dequeue_signal_3arg_type\" test, check that @@ -59256,19 +60655,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DEQUEUE_SIGNAL_3ARG_TYPE 1" >>confdefs.h +$as_echo "#define HAVE_DEQUEUE_SIGNAL_3ARG_TYPE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -59278,30 +60676,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ZERO_PAGE() is GPL-only" >&5 -printf %s "checking whether ZERO_PAGE() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ZERO_PAGE() is GPL-only" >&5 +$as_echo_n "checking whether ZERO_PAGE() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_zero_page_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/zero_page_license -then : + if test -d build/zero_page_license; then : - if test -f build/zero_page_license/zero_page_license.ko -then : + if test -f build/zero_page_license/zero_page_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"zero_page_license\" test, check that @@ -59313,51 +60708,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ZERO_PAGE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_ZERO_PAGE_GPL_ONLY 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __copy_from_user_inatomic is available" >&5 -printf %s "checking whether __copy_from_user_inatomic is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether APIs for idmapped mount are present" >&5 +$as_echo_n "checking whether APIs for idmapped mount are present... " >&6; } - cachevar="zfs_cv_kernel___copy_from_user_inatomic_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_idmap_mnt_api_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/__copy_from_user_inatomic_license -then : + if test -d build/idmap_mnt_api; then : - if test -f build/__copy_from_user_inatomic_license/__copy_from_user_inatomic_license.ko -then : + if test -f build/idmap_mnt_api/idmap_mnt_api.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"__copy_from_user_inatomic_license\" test, check that + *** No matching source for the \"idmap_mnt_api\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -59366,53 +60757,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_IDMAP_MNT_API 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? " - *** The \`__copy_from_user_inatomic()\` Linux kernel function is - *** incompatible with the CDDL license and will prevent the module - *** linking stage from succeeding. OpenZFS cannot be compiled. - " "$LINENO" 5 + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether APIs for idmapped mount are present" >&5 -printf %s "checking whether APIs for idmapped mount are present... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether idmapped mounts have a user namespace" >&5 +$as_echo_n "checking whether idmapped mounts have a user namespace... " >&6; } - cachevar="zfs_cv_kernel_idmap_mnt_api_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_idmap_no_userns_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/idmap_mnt_api -then : + if test -d build/idmap_no_userns; then : - if test -f build/idmap_mnt_api/idmap_mnt_api.ko -then : + if test -f build/idmap_no_userns/idmap_no_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"idmap_mnt_api\" test, check that + *** No matching source for the \"idmap_no_userns\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -59421,51 +60806,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_MNT_API 1" >>confdefs.h +$as_echo "#define HAVE_IDMAP_NO_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether idmapped mounts have a user namespace" >&5 -printf %s "checking whether idmapped mounts have a user namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist" >&5 +$as_echo_n "checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist... " >&6; } - cachevar="zfs_cv_kernel_idmap_no_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_iattr_vfsid_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/idmap_no_userns -then : + if test -d build/iattr_vfsid; then : - if test -f build/idmap_no_userns/idmap_no_userns.ko -then : + if test -f build/iattr_vfsid/iattr_vfsid.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"idmap_no_userns\" test, check that + *** No matching source for the \"iattr_vfsid\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -59474,51 +60855,48 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_NO_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IATTR_VFSID 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist" >&5 -printf %s "checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist... " >&6; } - cachevar="zfs_cv_kernel_iattr_vfsid_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether int (*writepage_t)() takes struct folio*" >&5 +$as_echo_n "checking whether int (*writepage_t)() takes struct folio*... " >&6; } - if test -d build/iattr_vfsid -then : + cachevar="zfs_cv_kernel_writepage_t_folio_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -f build/iattr_vfsid/iattr_vfsid.ko -then : + if test -d build/writepage_t_folio; then : + + if test -f build/writepage_t_folio/writepage_t_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"iattr_vfsid\" test, check that + *** No matching source for the \"writepage_t_folio\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -59527,51 +60905,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IATTR_VFSID 1" >>confdefs.h +$as_echo "#define HAVE_WRITEPAGE_T_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether int (*writepage_t)() takes struct folio*" >&5 -printf %s "checking whether int (*writepage_t)() takes struct folio*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether write_cache_pages() is available" >&5 +$as_echo_n "checking whether write_cache_pages() is available... " >&6; } - cachevar="zfs_cv_kernel_writepage_t_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_write_cache_pages_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/writepage_t_folio -then : + if test -d build/write_cache_pages; then : - if test -f build/writepage_t_folio/writepage_t_folio.ko -then : + if test -f build/write_cache_pages/write_cache_pages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"writepage_t_folio\" test, check that + *** No matching source for the \"write_cache_pages\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -59580,48 +60954,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_WRITEPAGE_T_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_WRITE_CACHE_PAGES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct reclaim_state has reclaimed field" >&5 -printf %s "checking whether struct reclaim_state has reclaimed field... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct reclaim_state has reclaimed field" >&5 +$as_echo_n "checking whether struct reclaim_state has reclaimed field... " >&6; } cachevar="zfs_cv_kernel_reclaim_state_reclaimed_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/reclaim_state_reclaimed -then : + if test -d build/reclaim_state_reclaimed; then : - if test -f build/reclaim_state_reclaimed/reclaim_state_reclaimed.ko -then : + if test -f build/reclaim_state_reclaimed/reclaim_state_reclaimed.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"reclaim_state_reclaimed\" test, check that @@ -59633,48 +61004,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_RECLAIM_STATE_RECLAIMED 1" >>confdefs.h +$as_echo "#define HAVE_RECLAIM_STATE_RECLAIMED 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_table exists" >&5 -printf %s "checking whether register_sysctl_table exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_table exists" >&5 +$as_echo_n "checking whether register_sysctl_table exists... " >&6; } cachevar="zfs_cv_kernel_has_register_sysctl_table_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_register_sysctl_table -then : + if test -d build/has_register_sysctl_table; then : - if test -f build/has_register_sysctl_table/has_register_sysctl_table.ko -then : + if test -f build/has_register_sysctl_table/has_register_sysctl_table.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_register_sysctl_table\" test, check that @@ -59686,48 +61053,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REGISTER_SYSCTL_TABLE 1" >>confdefs.h +$as_echo "#define HAVE_REGISTER_SYSCTL_TABLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_sz exists" >&5 -printf %s "checking whether register_sysctl_sz exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_sz exists" >&5 +$as_echo_n "checking whether register_sysctl_sz exists... " >&6; } cachevar="zfs_cv_kernel_has_register_sysctl_sz_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_register_sysctl_sz -then : + if test -d build/has_register_sysctl_sz; then : - if test -f build/has_register_sysctl_sz/has_register_sysctl_sz.ko -then : + if test -f build/has_register_sysctl_sz/has_register_sysctl_sz.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_register_sysctl_sz\" test, check that @@ -59739,48 +61102,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REGISTER_SYSCTL_SZ 1" >>confdefs.h +$as_echo "#define HAVE_REGISTER_SYSCTL_SZ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether proc_handler ctl_table arg is const" >&5 -printf %s "checking whether proc_handler ctl_table arg is const... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether proc_handler ctl_table arg is const" >&5 +$as_echo_n "checking whether proc_handler ctl_table arg is const... " >&6; } cachevar="zfs_cv_kernel_has_proc_handler_ctl_table_const_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_proc_handler_ctl_table_const -then : + if test -d build/has_proc_handler_ctl_table_const; then : - if test -f build/has_proc_handler_ctl_table_const/has_proc_handler_ctl_table_const.ko -then : + if test -f build/has_proc_handler_ctl_table_const/has_proc_handler_ctl_table_const.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_proc_handler_ctl_table_const\" test, check that @@ -59792,48 +61151,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PROC_HANDLER_CTL_TABLE_CONST 1" >>confdefs.h +$as_echo "#define HAVE_PROC_HANDLER_CTL_TABLE_CONST 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copy_splice_read() exists" >&5 -printf %s "checking whether copy_splice_read() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copy_splice_read() exists" >&5 +$as_echo_n "checking whether copy_splice_read() exists... " >&6; } cachevar="zfs_cv_kernel_has_copy_splice_read_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_copy_splice_read -then : + if test -d build/has_copy_splice_read; then : - if test -f build/has_copy_splice_read/has_copy_splice_read.ko -then : + if test -f build/has_copy_splice_read/has_copy_splice_read.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_copy_splice_read\" test, check that @@ -59845,48 +61200,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_COPY_SPLICE_READ 1" >>confdefs.h +$as_echo "#define HAVE_COPY_SPLICE_READ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fsync_bdev() exists" >&5 -printf %s "checking whether fsync_bdev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fsync_bdev() exists" >&5 +$as_echo_n "checking whether fsync_bdev() exists... " >&6; } cachevar="zfs_cv_kernel_fsync_bdev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/fsync_bdev -then : + if test -d build/fsync_bdev; then : - if test -f build/fsync_bdev/fsync_bdev.ko -then : + if test -f build/fsync_bdev/fsync_bdev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"fsync_bdev\" test, check that @@ -59898,41 +61249,37 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FSYNC_BDEV 1" >>confdefs.h +$as_echo "#define HAVE_FSYNC_BDEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sync_blockdev() exists" >&5 -printf %s "checking whether sync_blockdev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sync_blockdev() exists" >&5 +$as_echo_n "checking whether sync_blockdev() exists... " >&6; } cachevar="zfs_cv_kernel_sync_blockdev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sync_blockdev -then : + if test -d build/sync_blockdev; then : - if test -f build/sync_blockdev/sync_blockdev.ko -then : + if test -f build/sync_blockdev/sync_blockdev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"sync_blockdev\" test, check that @@ -59944,16 +61291,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SYNC_BLOCKDEV 1" >>confdefs.h +$as_echo "#define HAVE_SYNC_BLOCKDEV 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -59963,7 +61309,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -59975,30 +61321,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether PG_error flag is available" >&5 -printf %s "checking whether PG_error flag is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PG_error flag is available" >&5 +$as_echo_n "checking whether PG_error flag is available... " >&6; } cachevar="zfs_cv_kernel_mm_page_flag_error_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mm_page_flag_error -then : + if test -d build/mm_page_flag_error; then : - if test -f build/mm_page_flag_error/mm_page_flag_error.ko -then : + if test -f build/mm_page_flag_error/mm_page_flag_error.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mm_page_flag_error\" test, check that @@ -60010,49 +61353,94 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_MM_PAGE_FLAG_ERROR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'flags' in 'struct page' is a struct" >&5 +$as_echo_n "checking whether 'flags' in 'struct page' is a struct... " >&6; } + + cachevar="zfs_cv_kernel_mm_page_flags_struct_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/mm_page_flags_struct; then : + + if test -f build/mm_page_flags_struct/mm_page_flags_struct.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"mm_page_flags_struct\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MM_PAGE_FLAG_ERROR 1" >>confdefs.h +$as_echo "#define HAVE_MM_PAGE_FLAGS_STRUCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether page_size() is available" >&5 -printf %s "checking whether page_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether page_size() is available" >&5 +$as_echo_n "checking whether page_size() is available... " >&6; } cachevar="zfs_cv_kernel_page_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/page_size -then : + if test -d build/page_size; then : - if test -f build/page_size/page_size.ko -then : + if test -f build/page_size/page_size.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"page_size\" test, check that @@ -60064,48 +61452,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MM_PAGE_SIZE 1" >>confdefs.h +$as_echo "#define HAVE_MM_PAGE_SIZE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether page_mapping() is available" >&5 -printf %s "checking whether page_mapping() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether page_mapping() is available" >&5 +$as_echo_n "checking whether page_mapping() is available... " >&6; } cachevar="zfs_cv_kernel_page_mapping_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/page_mapping -then : + if test -d build/page_mapping; then : - if test -f build/page_mapping/page_mapping.ko -then : + if test -f build/page_mapping/page_mapping.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"page_mapping\" test, check that @@ -60117,29 +61501,27 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MM_PAGE_MAPPING 1" >>confdefs.h +$as_echo "#define HAVE_MM_PAGE_MAPPING 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __assign_str() has one arg" >&5 -printf %s "checking whether __assign_str() has one arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __assign_str() has one arg" >&5 +$as_echo_n "checking whether __assign_str() has one arg... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -60238,8 +61620,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -60260,32 +61641,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h +$as_echo "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else @@ -60384,8 +61764,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -60406,26 +61785,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h +$as_echo "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -60436,30 +61814,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether file->f_version exists" >&5 -printf %s "checking whether file->f_version exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether file->f_version exists" >&5 +$as_echo_n "checking whether file->f_version exists... " >&6; } cachevar="zfs_cv_kernel_file_f_version_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/file_f_version -then : + if test -d build/file_f_version; then : - if test -f build/file_f_version/file_f_version.ko -then : + if test -f build/file_f_version/file_f_version.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"file_f_version\" test, check that @@ -60471,19 +61846,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FILE_F_VERSION 1" >>confdefs.h +$as_echo "#define HAVE_FILE_F_VERSION 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -60491,30 +61865,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pin_user_pages_unlocked() is available" >&5 -printf %s "checking whether pin_user_pages_unlocked() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pin_user_pages_unlocked() is available" >&5 +$as_echo_n "checking whether pin_user_pages_unlocked() is available... " >&6; } cachevar="zfs_cv_kernel_pin_user_pages_unlocked_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/pin_user_pages_unlocked -then : + if test -d build/pin_user_pages_unlocked; then : - if test -f build/pin_user_pages_unlocked/pin_user_pages_unlocked.ko -then : + if test -f build/pin_user_pages_unlocked/pin_user_pages_unlocked.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"pin_user_pages_unlocked\" test, check that @@ -60526,50 +61897,533 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_PIN_USER_PAGES_UNLOCKED 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether timer_delete_sync() is available" >&5 +$as_echo_n "checking whether timer_delete_sync() is available... " >&6; } + + cachevar="zfs_cv_kernel_timer_delete_sync_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/timer_delete_sync; then : + + if test -f build/timer_delete_sync/timer_delete_sync.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"timer_delete_sync\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_TIMER_DELETE_SYNC 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_wb_err" >&5 +$as_echo_n "checking whether super_block has s_wb_err... " >&6; } + + cachevar="zfs_cv_kernel_super_block_s_wb_err_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/super_block_s_wb_err; then : + + if test -f build/super_block_s_wb_err/super_block_s_wb_err.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"super_block_s_wb_err\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SUPER_BLOCK_S_WB_ERR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->free_inode() exists" >&5 +$as_echo_n "checking whether sops->free_inode() exists... " >&6; } + + cachevar="zfs_cv_kernel_super_operations_free_inode_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/super_operations_free_inode; then : + + if test -f build/super_operations_free_inode/super_operations_free_inode.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"super_operations_free_inode\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SOPS_FREE_INODE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ns_type is accessible through ns_common" >&5 +$as_echo_n "checking whether ns_type is accessible through ns_common... " >&6; } + + cachevar="zfs_cv_kernel_ns_common_type_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/ns_common_type; then : + + if test -f build/ns_common_type/ns_common_type.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"ns_common_type\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_NS_COMMON_TYPE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_generic_drop() exists" >&5 +$as_echo_n "checking whether inode_generic_drop() exists... " >&6; } + + cachevar="zfs_cv_kernel_inode_generic_drop_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/inode_generic_drop; then : + + if test -f build/inode_generic_drop/inode_generic_drop.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"inode_generic_drop\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_INODE_GENERIC_DROP 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kasan_enabled() is GPL-only" >&5 +$as_echo_n "checking whether kasan_enabled() is GPL-only... " >&6; } + + cachevar="zfs_cv_kernel_kasan_enabled_license_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/kasan_enabled_license; then : + + if test -f build/kasan_enabled_license/kasan_enabled_license.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"kasan_enabled_license\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_KASAN_ENABLED_GPL_ONLY 1" >>confdefs.h + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standalone filelock header" >&5 +$as_echo_n "checking for standalone filelock header... " >&6; } + + cachevar="zfs_cv_kernel_filelock_header_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/filelock_header; then : + + if test -f build/filelock_header/filelock_header.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"filelock_header\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_FILELOCK_HEADER 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to flush delay workqueue" >&5 +$as_echo_n "checking how to flush delay workqueue... " >&6; } + + cachevar="zfs_cv_kernel_flush_workqueue_internal_percpu_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/flush_workqueue_internal_percpu; then : + + if test -f build/flush_workqueue_internal_percpu/flush_workqueue_internal_percpu.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"flush_workqueue_internal_percpu\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + + cachevar="zfs_cv_kernel_flush_workqueue_percpu_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/flush_workqueue_percpu; then : + + if test -f build/flush_workqueue_percpu/flush_workqueue_percpu.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"flush_workqueue_percpu\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal+system" >&5 +$as_echo "internal+system" >&6; } + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal+percpu" >&5 +$as_echo "internal+percpu" >&6; } + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL 1" >>confdefs.h + + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_PERCPU 1" >>confdefs.h + + +fi + + +else + + + cachevar="zfs_cv_kernel_flush_workqueue_internal_system_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/flush_workqueue_internal_system; then : + + if test -f build/flush_workqueue_internal_system/flush_workqueue_internal_system.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"flush_workqueue_internal_system\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal+system" >&5 +$as_echo "internal+system" >&6; } -printf "%s\n" "#define HAVE_PIN_USER_PAGES_UNLOCKED 1" >>confdefs.h +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL 1" >>confdefs.h -else $as_nop +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } + +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi + case "$host_cpu" in powerpc*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cpu_has_feature() is GPL-only" >&5 -printf %s "checking whether cpu_has_feature() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpu_has_feature() is GPL-only" >&5 +$as_echo_n "checking whether cpu_has_feature() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_cpu_has_feature_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/cpu_has_feature_license -then : + if test -d build/cpu_has_feature_license; then : - if test -f build/cpu_has_feature_license/cpu_has_feature_license.ko -then : + if test -f build/cpu_has_feature_license/cpu_has_feature_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"cpu_has_feature_license\" test, check that @@ -60581,48 +62435,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_CPU_HAS_FEATURE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_CPU_HAS_FEATURE_GPL_ONLY 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 -printf %s "checking whether flush_dcache_page() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 +$as_echo_n "checking whether flush_dcache_page() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_flush_dcache_page_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/flush_dcache_page_license -then : + if test -d build/flush_dcache_page_license; then : - if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko -then : + if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"flush_dcache_page_license\" test, check that @@ -60634,18 +62484,17 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h fi @@ -60654,30 +62503,27 @@ ;; riscv*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 -printf %s "checking whether flush_dcache_page() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 +$as_echo_n "checking whether flush_dcache_page() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_flush_dcache_page_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/flush_dcache_page_license -then : + if test -d build/flush_dcache_page_license; then : - if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko -then : + if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"flush_dcache_page_license\" test, check that @@ -60689,18 +62535,17 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h fi @@ -60710,8 +62555,7 @@ esac - if test "$LINUX_OBJ" != "$LINUX" -then : + if test "$LINUX_OBJ" != "$LINUX"; then : KERNEL_MAKE="$KERNEL_MAKE O=$LINUX_OBJ" @@ -60745,7 +62589,82 @@ - gt_INTL_MACOSX + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + @@ -60782,12 +62701,11 @@ gt_expression_test_code= fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 -printf %s "checking for GNU gettext in libc... " >&6; } -if eval test \${$gt_func_gnugettext_libc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -60802,7 +62720,7 @@ $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -60812,18 +62730,17 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" -else $as_nop +else eval "$gt_func_gnugettext_libc=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -60856,12 +62773,11 @@ done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -printf %s "checking for iconv... " >&6; } -if test ${am_cv_func_iconv+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no @@ -60872,7 +62788,7 @@ #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -60881,11 +62797,10 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -60897,7 +62812,7 @@ #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -60906,26 +62821,24 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -printf "%s\n" "$am_cv_func_iconv" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -printf %s "checking for working iconv... " >&6; } -if test ${am_cv_func_iconv_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then @@ -60933,13 +62846,12 @@ fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -60951,7 +62863,7 @@ #endif int -main (void) +main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful @@ -61063,8 +62975,7 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -61076,8 +62987,8 @@ LIBS="$am_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -printf "%s\n" "$am_cv_func_iconv_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; @@ -61087,14 +62998,14 @@ fi if test "$am_func_iconv" = yes; then -printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h +$as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -printf %s "checking how to link with libiconv... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -printf "%s\n" "$LIBICONV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -61125,8 +63036,7 @@ # Check whether --with-libintl-prefix was given. -if test ${with_libintl_prefix+y} -then : +if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -61564,12 +63474,11 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 -printf %s "checking for GNU gettext in libintl... " >&6; } -if eval test \${$gt_func_gnugettext_libintl+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if eval \${$gt_func_gnugettext_libintl+:} false; then : + $as_echo_n "(cached) " >&6 +else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" @@ -61592,7 +63501,7 @@ $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -61602,13 +63511,12 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" -else $as_nop +else eval "$gt_func_gnugettext_libintl=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" @@ -61630,7 +63538,7 @@ $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -61640,22 +63548,21 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ @@ -61682,20 +63589,20 @@ if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then -printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h +$as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 -printf %s "checking whether to use NLS... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -printf "%s\n" "$USE_NLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 -printf %s "checking where the gettext function comes from... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" @@ -61705,18 +63612,18 @@ else gt_source="included intl directory" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 -printf "%s\n" "$gt_source" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 -printf %s "checking how to link with libintl... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 -printf "%s\n" "$LIBINTL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= @@ -61743,10 +63650,10 @@ fi -printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h -printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi @@ -61766,10 +63673,9 @@ # Check whether --with-mounthelperdir was given. -if test ${with_mounthelperdir+y} -then : +if test "${with_mounthelperdir+set}" = set; then : withval=$with_mounthelperdir; mounthelperdir=$withval -else $as_nop +else mounthelperdir=/sbin fi @@ -61778,10 +63684,9 @@ # Check whether --enable-sysvinit was given. -if test ${enable_sysvinit+y} -then : +if test "${enable_sysvinit+set}" = set; then : enableval=$enable_sysvinit; -else $as_nop +else enable_sysvinit=yes fi @@ -61789,34 +63694,30 @@ ZFS_INIT_SYSV=$enable_sysvinit - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dracut directory" >&5 -printf %s "checking for dracut directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dracut directory" >&5 +$as_echo_n "checking for dracut directory... " >&6; } # Check whether --with-dracutdir was given. -if test ${with_dracutdir+y} -then : +if test "${with_dracutdir+set}" = set; then : withval=$with_dracutdir; dracutdir=$withval -else $as_nop +else dracutdir=check fi - if test "x$dracutdir" = xcheck -then : + if test "x$dracutdir" = xcheck; then : path1=/usr/share/dracut path2=/usr/lib/dracut default=$path2 - if test -d "$path1" -then : + if test -d "$path1"; then : dracutdir="$path1" -else $as_nop +else - if test -d "$path2" -then : + if test -d "$path2"; then : dracutdir="$path2" -else $as_nop +else dracutdir="$default" fi @@ -61825,8 +63726,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dracutdir" >&5 -printf "%s\n" "$dracutdir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dracutdir" >&5 +$as_echo "$dracutdir" >&6; } if test -z "$BUILD_FREEBSD_TRUE"; then : @@ -61834,10 +63735,9 @@ # Check whether --with-pkgconfigdir was given. -if test ${with_pkgconfigdir+y} -then : +if test "${with_pkgconfigdir+set}" = set; then : withval=$with_pkgconfigdir; -else $as_nop +else with_pkgconfigdir='${prefix}/libdata/pkgconfig' fi @@ -61852,10 +63752,9 @@ # Check whether --with-pkgconfigdir was given. -if test ${with_pkgconfigdir+y} -then : +if test "${with_pkgconfigdir+set}" = set; then : withval=$with_pkgconfigdir; -else $as_nop +else with_pkgconfigdir='${libdir}/pkgconfig' fi @@ -61874,21 +63773,20 @@ _library_found= _pc_found= - if test -n "zlib" -then : + if test -n "zlib"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -printf %s "checking for zlib... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 +$as_echo_n "checking for zlib... " >&6; } if test -n "$ZLIB_CFLAGS"; then pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -61902,10 +63800,10 @@ pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -61919,8 +63817,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -61937,14 +63835,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS ZLIB_LIBS=$pkg_cv_ZLIB_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -61954,12 +63852,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$ZLIB_CFLAGS" != x -then : + if test "x$ZLIB_CFLAGS" != x; then : _header_found=1 fi - if test "x$ZLIB_LIBS" != x -then : + if test "x$ZLIB_LIBS" != x; then : _library_found=1 fi @@ -61977,12 +63873,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : ZLIB_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : ZLIB_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -61993,35 +63887,32 @@ { ac_cv_header_zlib_h=; unset ac_cv_header_zlib_h;} ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default " -if test "x$ac_cv_header_zlib_h" = xyes -then : +if test "x$ac_cv_header_zlib_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header zlib.h for library z is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : ZLIB_LIBS="$ZLIB_LIBS -lz" @@ -62029,12 +63920,11 @@ LDFLAGS="$LDFLAGS $ZLIB_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 -printf %s "checking for compress2 in -lz... " >&6; } -if test ${ac_cv_lib_z_compress2+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 +$as_echo_n "checking for compress2 in -lz... " >&6; } +if ${ac_cv_lib_z_compress2+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -62043,39 +63933,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char compress2 (); int -main (void) +main () { return compress2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_compress2=yes -else $as_nop +else ac_cv_lib_z_compress2=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 -printf "%s\n" "$ac_cv_lib_z_compress2" >&6; } -if test "x$ac_cv_lib_z_compress2" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 +$as_echo "$ac_cv_lib_z_compress2" >&6; } +if test "x$ac_cv_lib_z_compress2" = xyes; then : : -else $as_nop +else _libcheck= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5 -printf %s "checking for uncompress in -lz... " >&6; } -if test ${ac_cv_lib_z_uncompress+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5 +$as_echo_n "checking for uncompress in -lz... " >&6; } +if ${ac_cv_lib_z_uncompress+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -62084,39 +63974,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char uncompress (); int -main (void) +main () { return uncompress (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_uncompress=yes -else $as_nop +else ac_cv_lib_z_uncompress=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5 -printf "%s\n" "$ac_cv_lib_z_uncompress" >&6; } -if test "x$ac_cv_lib_z_uncompress" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5 +$as_echo "$ac_cv_lib_z_uncompress" >&6; } +if test "x$ac_cv_lib_z_uncompress" = xyes; then : : -else $as_nop +else _libcheck= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crc32 in -lz" >&5 -printf %s "checking for crc32 in -lz... " >&6; } -if test ${ac_cv_lib_z_crc32+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crc32 in -lz" >&5 +$as_echo_n "checking for crc32 in -lz... " >&6; } +if ${ac_cv_lib_z_crc32+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -62125,55 +64015,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char crc32 (); int -main (void) +main () { return crc32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_crc32=yes -else $as_nop +else ac_cv_lib_z_crc32=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_crc32" >&5 -printf "%s\n" "$ac_cv_lib_z_crc32" >&6; } -if test "x$ac_cv_lib_z_crc32" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_crc32" >&5 +$as_echo "$ac_cv_lib_z_crc32" >&6; } +if test "x$ac_cv_lib_z_crc32" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library z is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header zlib.h for library z See \`config.log' for more details" "$LINENO" 5; } @@ -62188,33 +64076,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : ZLIB_PC=zlib fi -printf "%s\n" "#define HAVE_ZLIB 1" >>confdefs.h +$as_echo "#define HAVE_ZLIB 1" >>confdefs.h -else $as_nop +else ZLIB_CFLAGS="" ZLIB_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find z via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find z via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find z via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find z via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "*** zlib-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -62225,34 +64111,30 @@ if test -z "$BUILD_LINUX_TRUE"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for udev directories" >&5 -printf %s "checking for udev directories... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev directories" >&5 +$as_echo_n "checking for udev directories... " >&6; } # Check whether --with-udevdir was given. -if test ${with_udevdir+y} -then : +if test "${with_udevdir+set}" = set; then : withval=$with_udevdir; udevdir=$withval -else $as_nop +else udevdir=check fi - if test "x$udevdir" = xcheck -then : + if test "x$udevdir" = xcheck; then : path1=/lib/udev path2=/usr/lib/udev default=$path2 - if test -d "$path1" -then : + if test -d "$path1"; then : udevdir="$path1" -else $as_nop +else - if test -d "$path2" -then : + if test -d "$path2"; then : udevdir="$path2" -else $as_nop +else udevdir="$default" fi @@ -62262,93 +64144,84 @@ # Check whether --with-udevruledir was given. -if test ${with_udevruledir+y} -then : +if test "${with_udevruledir+set}" = set; then : withval=$with_udevruledir; udevruledir=$withval -else $as_nop +else udevruledir="${udevdir}/rules.d" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $udevdir;$udevruledir" >&5 -printf "%s\n" "$udevdir;$udevruledir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $udevdir;$udevruledir" >&5 +$as_echo "$udevdir;$udevruledir" >&6; } # Check whether --enable-systemd was given. -if test ${enable_systemd+y} -then : +if test "${enable_systemd+set}" = set; then : enableval=$enable_systemd; enable_systemd=$enableval -else $as_nop +else enable_systemd=check fi # Check whether --with-systemdunitdir was given. -if test ${with_systemdunitdir+y} -then : +if test "${with_systemdunitdir+set}" = set; then : withval=$with_systemdunitdir; systemdunitdir=$withval -else $as_nop +else systemdunitdir=/usr/lib/systemd/system fi # Check whether --with-systemdpresetdir was given. -if test ${with_systemdpresetdir+y} -then : +if test "${with_systemdpresetdir+set}" = set; then : withval=$with_systemdpresetdir; systemdpresetdir=$withval -else $as_nop +else systemdpresetdir=/usr/lib/systemd/system-preset fi # Check whether --with-systemdmodulesloaddir was given. -if test ${with_systemdmodulesloaddir+y} -then : +if test "${with_systemdmodulesloaddir+set}" = set; then : withval=$with_systemdmodulesloaddir; systemdmodulesloaddir=$withval -else $as_nop +else systemdmodulesloaddir=/usr/lib/modules-load.d fi # Check whether --with-systemdgeneratordir was given. -if test ${with_systemdgeneratordir+y} -then : +if test "${with_systemdgeneratordir+set}" = set; then : withval=$with_systemdgeneratordir; systemdgeneratordir=$withval -else $as_nop +else systemdgeneratordir=/usr/lib/systemd/system-generators fi - if test "x$enable_systemd" = xcheck -then : + if test "x$enable_systemd" = xcheck; then : - if systemctl --version >/dev/null 2>&1 -then : + if systemctl --version >/dev/null 2>&1; then : enable_systemd=yes -else $as_nop +else enable_systemd=no fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd support" >&5 -printf %s "checking for systemd support... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_systemd" >&5 -printf "%s\n" "$enable_systemd" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd support" >&5 +$as_echo_n "checking for systemd support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_systemd" >&5 +$as_echo "$enable_systemd" >&6; } - if test "x$enable_systemd" = xyes -then : + if test "x$enable_systemd" = xyes; then : DEFINE_SYSTEMD='--with systemd --define "_unitdir $(systemdunitdir)" --define "_presetdir $(systemdpresetdir)" --define "_generatordir $(systemdgeneratordir)"' modulesloaddir=$systemdmodulesloaddir -else $as_nop +else DEFINE_SYSTEMD='--without systemd' @@ -62371,21 +64244,20 @@ _library_found= _pc_found= - if test -n "libudev" -then : + if test -n "libudev"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libudev" >&5 -printf %s "checking for libudev... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libudev" >&5 +$as_echo_n "checking for libudev... " >&6; } if test -n "$LIBUDEV_CFLAGS"; then pkg_cv_LIBUDEV_CFLAGS="$LIBUDEV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -62399,10 +64271,10 @@ pkg_cv_LIBUDEV_LIBS="$LIBUDEV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUDEV_LIBS=`$PKG_CONFIG --libs "libudev" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -62416,8 +64288,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -62434,14 +64306,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBUDEV_CFLAGS=$pkg_cv_LIBUDEV_CFLAGS LIBUDEV_LIBS=$pkg_cv_LIBUDEV_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -62451,12 +64323,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBUDEV_CFLAGS" != x -then : + if test "x$LIBUDEV_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBUDEV_LIBS" != x -then : + if test "x$LIBUDEV_LIBS" != x; then : _library_found=1 fi @@ -62474,12 +64344,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBUDEV_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUDEV_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -62490,35 +64358,32 @@ { ac_cv_header_libudev_h=; unset ac_cv_header_libudev_h;} ac_fn_c_check_header_compile "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default " -if test "x$ac_cv_header_libudev_h" = xyes -then : +if test "x$ac_cv_header_libudev_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header libudev.h for library udev is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUDEV_LIBS="$LIBUDEV_LIBS -ludev" @@ -62526,12 +64391,11 @@ LDFLAGS="$LDFLAGS $LIBUDEV_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -ludev" >&5 -printf %s "checking for main in -ludev... " >&6; } -if test ${ac_cv_lib_udev_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ludev" >&5 +$as_echo_n "checking for main in -ludev... " >&6; } +if ${ac_cv_lib_udev_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ludev $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -62539,53 +64403,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_udev_main=yes -else $as_nop +else ac_cv_lib_udev_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_main" >&5 -printf "%s\n" "$ac_cv_lib_udev_main" >&6; } -if test "x$ac_cv_lib_udev_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_main" >&5 +$as_echo "$ac_cv_lib_udev_main" >&6; } +if test "x$ac_cv_lib_udev_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library udev is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header libudev.h for library udev See \`config.log' for more details" "$LINENO" 5; } @@ -62600,37 +64459,34 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBUDEV_PC=libudev fi -printf "%s\n" "#define HAVE_LIBUDEV 1" >>confdefs.h +$as_echo "#define HAVE_LIBUDEV 1" >>confdefs.h user_libudev=yes -else $as_nop +else LIBUDEV_CFLAGS="" LIBUDEV_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find udev via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find udev via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find udev via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find udev via pkg-config or in the standard locations" >&2;} user_libudev=no fi - if test "x$user_libudev" = xyes -then : + if test "x$user_libudev" = xyes; then : CPPFLAGS_save="${CPPFLAGS}" @@ -62644,12 +64500,16 @@ CFLAGS="$CFLAGS $LIBUDEV_CFLAGS" LIBS="$LIBUDEV_LIBS $LIBS" - ac_fn_c_check_func "$LINENO" "udev_device_get_is_initialized" "ac_cv_func_udev_device_get_is_initialized" -if test "x$ac_cv_func_udev_device_get_is_initialized" = xyes -then : - printf "%s\n" "#define HAVE_UDEV_DEVICE_GET_IS_INITIALIZED 1" >>confdefs.h + for ac_func in udev_device_get_is_initialized +do : + ac_fn_c_check_func "$LINENO" "udev_device_get_is_initialized" "ac_cv_func_udev_device_get_is_initialized" +if test "x$ac_cv_func_udev_device_get_is_initialized" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UDEV_DEVICE_GET_IS_INITIALIZED 1 +_ACEOF fi +done @@ -62671,21 +64531,20 @@ _library_found= _pc_found= - if test -n "uuid" -then : + if test -n "uuid"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid" >&5 -printf %s "checking for uuid... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid" >&5 +$as_echo_n "checking for uuid... " >&6; } if test -n "$LIBUUID_CFLAGS"; then pkg_cv_LIBUUID_CFLAGS="$LIBUUID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -62699,10 +64558,10 @@ pkg_cv_LIBUUID_LIBS="$LIBUUID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUUID_LIBS=`$PKG_CONFIG --libs "uuid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -62716,8 +64575,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -62734,14 +64593,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBUUID_CFLAGS=$pkg_cv_LIBUUID_CFLAGS LIBUUID_LIBS=$pkg_cv_LIBUUID_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -62751,12 +64610,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBUUID_CFLAGS" != x -then : + if test "x$LIBUUID_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBUUID_LIBS" != x -then : + if test "x$LIBUUID_LIBS" != x; then : _library_found=1 fi @@ -62774,12 +64631,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBUUID_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUUID_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -62790,35 +64645,32 @@ { ac_cv_header_uuid_uuid_h=; unset ac_cv_header_uuid_uuid_h;} ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default " -if test "x$ac_cv_header_uuid_uuid_h" = xyes -then : +if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header uuid/uuid.h for library uuid is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUUID_LIBS="$LIBUUID_LIBS -luuid" @@ -62826,12 +64678,11 @@ LDFLAGS="$LDFLAGS $LIBUUID_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 -printf %s "checking for uuid_generate in -luuid... " >&6; } -if test ${ac_cv_lib_uuid_uuid_generate+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 +$as_echo_n "checking for uuid_generate in -luuid... " >&6; } +if ${ac_cv_lib_uuid_uuid_generate+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -62840,39 +64691,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char uuid_generate (); int -main (void) +main () { return uuid_generate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_generate=yes -else $as_nop +else ac_cv_lib_uuid_uuid_generate=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 -printf "%s\n" "$ac_cv_lib_uuid_uuid_generate" >&6; } -if test "x$ac_cv_lib_uuid_uuid_generate" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 +$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } +if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then : : -else $as_nop +else _libcheck= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_is_null in -luuid" >&5 -printf %s "checking for uuid_is_null in -luuid... " >&6; } -if test ${ac_cv_lib_uuid_uuid_is_null+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_is_null in -luuid" >&5 +$as_echo_n "checking for uuid_is_null in -luuid... " >&6; } +if ${ac_cv_lib_uuid_uuid_is_null+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -62881,55 +64732,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char uuid_is_null (); int -main (void) +main () { return uuid_is_null (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_is_null=yes -else $as_nop +else ac_cv_lib_uuid_uuid_is_null=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_is_null" >&5 -printf "%s\n" "$ac_cv_lib_uuid_uuid_is_null" >&6; } -if test "x$ac_cv_lib_uuid_uuid_is_null" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_is_null" >&5 +$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; } +if test "x$ac_cv_lib_uuid_uuid_is_null" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library uuid is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header uuid/uuid.h for library uuid See \`config.log' for more details" "$LINENO" 5; } @@ -62944,33 +64793,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBUUID_PC=uuid fi -printf "%s\n" "#define HAVE_LIBUUID 1" >>confdefs.h +$as_echo "#define HAVE_LIBUUID 1" >>confdefs.h -else $as_nop +else LIBUUID_CFLAGS="" LIBUUID_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find uuid via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find uuid via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find uuid via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find uuid via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "*** libuuid-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -62986,21 +64833,20 @@ _library_found= _pc_found= - if test -n "blkid" -then : + if test -n "blkid"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid" >&5 -printf %s "checking for blkid... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid" >&5 +$as_echo_n "checking for blkid... " >&6; } if test -n "$LIBBLKID_CFLAGS"; then pkg_cv_LIBBLKID_CFLAGS="$LIBBLKID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 ($PKG_CONFIG --exists --print-errors "blkid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBBLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63014,10 +64860,10 @@ pkg_cv_LIBBLKID_LIBS="$LIBBLKID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 ($PKG_CONFIG --exists --print-errors "blkid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBBLKID_LIBS=`$PKG_CONFIG --libs "blkid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63031,8 +64877,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -63049,14 +64895,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBBLKID_CFLAGS=$pkg_cv_LIBBLKID_CFLAGS LIBBLKID_LIBS=$pkg_cv_LIBBLKID_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -63066,12 +64912,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBBLKID_CFLAGS" != x -then : + if test "x$LIBBLKID_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBBLKID_LIBS" != x -then : + if test "x$LIBBLKID_LIBS" != x; then : _library_found=1 fi @@ -63089,12 +64933,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBBLKID_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBBLKID_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -63105,35 +64947,32 @@ { ac_cv_header_blkid_blkid_h=; unset ac_cv_header_blkid_blkid_h;} ac_fn_c_check_header_compile "$LINENO" "blkid/blkid.h" "ac_cv_header_blkid_blkid_h" "$ac_includes_default " -if test "x$ac_cv_header_blkid_blkid_h" = xyes -then : +if test "x$ac_cv_header_blkid_blkid_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header blkid/blkid.h for library blkid is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBBLKID_LIBS="$LIBBLKID_LIBS -lblkid" @@ -63141,12 +64980,11 @@ LDFLAGS="$LDFLAGS $LIBBLKID_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lblkid" >&5 -printf %s "checking for main in -lblkid... " >&6; } -if test ${ac_cv_lib_blkid_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lblkid" >&5 +$as_echo_n "checking for main in -lblkid... " >&6; } +if ${ac_cv_lib_blkid_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblkid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63154,53 +64992,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_blkid_main=yes -else $as_nop +else ac_cv_lib_blkid_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_main" >&5 -printf "%s\n" "$ac_cv_lib_blkid_main" >&6; } -if test "x$ac_cv_lib_blkid_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_main" >&5 +$as_echo "$ac_cv_lib_blkid_main" >&6; } +if test "x$ac_cv_lib_blkid_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library blkid is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header blkid/blkid.h for library blkid See \`config.log' for more details" "$LINENO" 5; } @@ -63215,33 +65048,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBBLKID_PC=blkid fi -printf "%s\n" "#define HAVE_LIBBLKID 1" >>confdefs.h +$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h -else $as_nop +else LIBBLKID_CFLAGS="" LIBBLKID_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find blkid via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find blkid via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find blkid via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find blkid via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? " *** blkid.h missing, libblkid-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -63250,29 +65081,146 @@ + for ac_header in sys/stat.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_STAT_H 1 +_ACEOF + have_stat_headers=yes +else + have_stat_headers=no +fi + +done + + + if test "x$have_stat_headers" = "xyes"; then : + + ac_fn_c_check_func "$LINENO" "statx" "ac_cv_func_statx" +if test "x$ac_cv_func_statx" = xyes; then : + + +$as_echo "#define HAVE_STATX 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STATX_MNT_ID" >&5 +$as_echo_n "checking for STATX_MNT_ID... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #define _GNU_SOURCE + #include + +int +main () +{ + + struct statx stx; + int mask = STATX_MNT_ID; + (void)mask; + (void)stx.stx_mnt_id; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_STATX_MNT_ID 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sys/stat.h not found; skipping statx support" >&5 +$as_echo "$as_me: WARNING: sys/stat.h not found; skipping statx support" >&2;} + +fi + + + ac_fn_c_check_func "$LINENO" "mount_setattr" "ac_cv_func_mount_setattr" +if test "x$ac_cv_func_mount_setattr" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct mount_attr" >&5 +$as_echo_n "checking for struct mount_attr... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + +int +main () +{ + + struct mount_attr attr = { + .attr_set = MOUNT_ATTR_RDONLY, + .attr_clr = MOUNT_ATTR_NOEXEC, + }; + (void) attr; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_MOUNT_SETATTR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + + fi # Check whether --with-tirpc was given. -if test ${with_tirpc+y} -then : +if test "${with_tirpc+set}" = set; then : withval=$with_tirpc; -else $as_nop +else with_tirpc=check fi have_xdr= - if test "x$with_tirpc" != "xyes" -then : + if test "x$with_tirpc" != "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing xdrmem_create" >&5 -printf %s "checking for library containing xdrmem_create... " >&6; } -if test ${ac_cv_search_xdrmem_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xdrmem_create" >&5 +$as_echo_n "checking for library containing xdrmem_create... " >&6; } +if ${ac_cv_search_xdrmem_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -63280,57 +65228,54 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char xdrmem_create (); int -main (void) +main () { return xdrmem_create (); ; return 0; } _ACEOF -for ac_lib in '' -do +for ac_lib in '' ; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_xdrmem_create=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_xdrmem_create+y} -then : + if ${ac_cv_search_xdrmem_create+:} false; then : break fi done -if test ${ac_cv_search_xdrmem_create+y} -then : +if ${ac_cv_search_xdrmem_create+:} false; then : -else $as_nop +else ac_cv_search_xdrmem_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_xdrmem_create" >&5 -printf "%s\n" "$ac_cv_search_xdrmem_create" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_xdrmem_create" >&5 +$as_echo "$ac_cv_search_xdrmem_create" >&6; } ac_res=$ac_cv_search_xdrmem_create -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_xdr=1 -else $as_nop +else - if test "x$with_tirpc" = "xno" -then : + if test "x$with_tirpc" = "xno"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "xdrmem_create() requires sunrpc support in libc if not using libtirpc See \`config.log' for more details" "$LINENO" 5; } @@ -63341,8 +65286,7 @@ fi - if test "x$have_xdr" = "x" -then : + if test "x$have_xdr" = "x"; then : @@ -63351,21 +65295,20 @@ _library_found= _pc_found= - if test -n "libtirpc" -then : + if test -n "libtirpc"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtirpc" >&5 -printf %s "checking for libtirpc... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtirpc" >&5 +$as_echo_n "checking for libtirpc... " >&6; } if test -n "$LIBTIRPC_CFLAGS"; then pkg_cv_LIBTIRPC_CFLAGS="$LIBTIRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBTIRPC_CFLAGS=`$PKG_CONFIG --cflags "libtirpc" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63379,10 +65322,10 @@ pkg_cv_LIBTIRPC_LIBS="$LIBTIRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBTIRPC_LIBS=`$PKG_CONFIG --libs "libtirpc" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63396,8 +65339,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -63414,14 +65357,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBTIRPC_CFLAGS=$pkg_cv_LIBTIRPC_CFLAGS LIBTIRPC_LIBS=$pkg_cv_LIBTIRPC_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -63431,12 +65374,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBTIRPC_CFLAGS" != x -then : + if test "x$LIBTIRPC_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBTIRPC_LIBS" != x -then : + if test "x$LIBTIRPC_LIBS" != x; then : _library_found=1 fi @@ -63454,12 +65395,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBTIRPC_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBTIRPC_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -63470,25 +65409,24 @@ { ac_cv_header_rpc_xdr_h=; unset ac_cv_header_rpc_xdr_h;} ac_fn_c_check_header_compile "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "$ac_includes_default " -if test "x$ac_cv_header_rpc_xdr_h" = xyes -then : +if test "x$ac_cv_header_rpc_xdr_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header rpc/xdr.h for library tirpc is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES LIBTIRPC_CFLAGS="-I$lt_sysroot$_prefixdir/include/tirpc" @@ -63496,8 +65434,7 @@ { ac_cv_header_rpc_xdr_h=; unset ac_cv_header_rpc_xdr_h;} ac_fn_c_check_header_compile "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "$ac_includes_default " -if test "x$ac_cv_header_rpc_xdr_h" = xyes -then : +if test "x$ac_cv_header_rpc_xdr_h" = xyes; then : _header_found=1 break @@ -63506,13 +65443,12 @@ + done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBTIRPC_LIBS="$LIBTIRPC_LIBS -ltirpc" @@ -63520,12 +65456,11 @@ LDFLAGS="$LDFLAGS $LIBTIRPC_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xdrmem_create in -ltirpc" >&5 -printf %s "checking for xdrmem_create in -ltirpc... " >&6; } -if test ${ac_cv_lib_tirpc_xdrmem_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdrmem_create in -ltirpc" >&5 +$as_echo_n "checking for xdrmem_create in -ltirpc... " >&6; } +if ${ac_cv_lib_tirpc_xdrmem_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ltirpc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63534,55 +65469,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char xdrmem_create (); int -main (void) +main () { return xdrmem_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tirpc_xdrmem_create=yes -else $as_nop +else ac_cv_lib_tirpc_xdrmem_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tirpc_xdrmem_create" >&5 -printf "%s\n" "$ac_cv_lib_tirpc_xdrmem_create" >&6; } -if test "x$ac_cv_lib_tirpc_xdrmem_create" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tirpc_xdrmem_create" >&5 +$as_echo "$ac_cv_lib_tirpc_xdrmem_create" >&6; } +if test "x$ac_cv_lib_tirpc_xdrmem_create" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library tirpc is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header rpc/xdr.h for library tirpc See \`config.log' for more details" "$LINENO" 5; } @@ -63597,42 +65530,39 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBTIRPC_PC=libtirpc fi -printf "%s\n" "#define HAVE_LIBTIRPC 1" >>confdefs.h +$as_echo "#define HAVE_LIBTIRPC 1" >>confdefs.h -else $as_nop +else LIBTIRPC_CFLAGS="" LIBTIRPC_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&2;} - if test "x$with_tirpc" = "xyes" -then : + if test "x$with_tirpc" = "xyes"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--with-tirpc was given, but libtirpc is not available, try installing libtirpc-devel See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "neither libc sunrpc support nor libtirpc is available, try installing libtirpc-devel See \`config.log' for more details" "$LINENO" 5; } @@ -63652,21 +65582,20 @@ _library_found= _pc_found= - if test -n "libcrypto" -then : + if test -n "libcrypto"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcrypto" >&5 -printf %s "checking for libcrypto... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrypto" >&5 +$as_echo_n "checking for libcrypto... " >&6; } if test -n "$LIBCRYPTO_CFLAGS"; then pkg_cv_LIBCRYPTO_CFLAGS="$LIBCRYPTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCRYPTO_CFLAGS=`$PKG_CONFIG --cflags "libcrypto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63680,10 +65609,10 @@ pkg_cv_LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCRYPTO_LIBS=`$PKG_CONFIG --libs "libcrypto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63697,8 +65626,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -63715,14 +65644,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBCRYPTO_CFLAGS=$pkg_cv_LIBCRYPTO_CFLAGS LIBCRYPTO_LIBS=$pkg_cv_LIBCRYPTO_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -63732,12 +65661,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBCRYPTO_CFLAGS" != x -then : + if test "x$LIBCRYPTO_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBCRYPTO_LIBS" != x -then : + if test "x$LIBCRYPTO_LIBS" != x; then : _library_found=1 fi @@ -63755,12 +65682,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBCRYPTO_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBCRYPTO_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -63771,35 +65696,32 @@ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;} ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default " -if test "x$ac_cv_header_openssl_evp_h" = xyes -then : +if test "x$ac_cv_header_openssl_evp_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header openssl/evp.h for library crypto is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -lcrypto" @@ -63807,12 +65729,11 @@ LDFLAGS="$LDFLAGS $LIBCRYPTO_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto" >&5 -printf %s "checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto... " >&6; } -if test ${ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto" >&5 +$as_echo_n "checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -63821,55 +65742,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char PKCS5_PBKDF2_HMAC_SHA1 (); int -main (void) +main () { return PKCS5_PBKDF2_HMAC_SHA1 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1=yes -else $as_nop +else ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&5 -printf "%s\n" "$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&6; } -if test "x$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&5 +$as_echo "$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&6; } +if test "x$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library crypto is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header openssl/evp.h for library crypto See \`config.log' for more details" "$LINENO" 5; } @@ -63884,33 +65803,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBCRYPTO_PC=libcrypto fi -printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h +$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h -else $as_nop +else LIBCRYPTO_CFLAGS="" LIBCRYPTO_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find crypto via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find crypto via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find crypto via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find crypto via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? " *** evp.h missing, libssl-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -63926,21 +65843,20 @@ _library_found= _pc_found= - if test -n "" -then : + if test -n ""; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for " >&5 -printf %s "checking for ... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5 +$as_echo_n "checking for ... " >&6; } if test -n "$LIBAIO_CFLAGS"; then pkg_cv_LIBAIO_CFLAGS="$LIBAIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBAIO_CFLAGS=`$PKG_CONFIG --cflags "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63954,10 +65870,10 @@ pkg_cv_LIBAIO_LIBS="$LIBAIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBAIO_LIBS=`$PKG_CONFIG --libs "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -63971,8 +65887,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -63989,14 +65905,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBAIO_CFLAGS=$pkg_cv_LIBAIO_CFLAGS LIBAIO_LIBS=$pkg_cv_LIBAIO_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -64006,12 +65922,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBAIO_CFLAGS" != x -then : + if test "x$LIBAIO_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBAIO_LIBS" != x -then : + if test "x$LIBAIO_LIBS" != x; then : _library_found=1 fi @@ -64029,12 +65943,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBAIO_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBAIO_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -64045,35 +65957,32 @@ { ac_cv_header_libaio_h=; unset ac_cv_header_libaio_h;} ac_fn_c_check_header_compile "$LINENO" "libaio.h" "ac_cv_header_libaio_h" "$ac_includes_default " -if test "x$ac_cv_header_libaio_h" = xyes -then : +if test "x$ac_cv_header_libaio_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header libaio.h for library aio is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBAIO_LIBS="$LIBAIO_LIBS -laio" @@ -64081,12 +65990,11 @@ LDFLAGS="$LDFLAGS $LIBAIO_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -laio" >&5 -printf %s "checking for main in -laio... " >&6; } -if test ${ac_cv_lib_aio_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laio" >&5 +$as_echo_n "checking for main in -laio... " >&6; } +if ${ac_cv_lib_aio_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-laio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -64094,53 +66002,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_aio_main=yes -else $as_nop +else ac_cv_lib_aio_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aio_main" >&5 -printf "%s\n" "$ac_cv_lib_aio_main" >&6; } -if test "x$ac_cv_lib_aio_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aio_main" >&5 +$as_echo "$ac_cv_lib_aio_main" >&6; } +if test "x$ac_cv_lib_aio_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library aio is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header libaio.h for library aio See \`config.log' for more details" "$LINENO" 5; } @@ -64155,37 +66058,35 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : fi -printf "%s\n" "#define HAVE_LIBAIO 1" >>confdefs.h +$as_echo "#define HAVE_LIBAIO 1" >>confdefs.h user_libaio=yes -else $as_nop +else LIBAIO_CFLAGS="" LIBAIO_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find aio via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find aio via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find aio via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find aio via pkg-config or in the standard locations" >&2;} user_libaio=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -latomic is required" >&5 -printf %s "checking whether -latomic is required... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -latomic is required" >&5 +$as_echo_n "checking whether -latomic is required... " >&6; } saved_libs="$LIBS" LIBS="$LIBS -latomic" @@ -64195,15 +66096,14 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : LIBS="$saved_libs" saved_cflags="$CFLAGS" @@ -64212,41 +66112,40 @@ /* end confdefs.h. */ #include "lib/libspl/atomic.c" int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -else $as_nop +else LIBATOMIC_LIBS="-latomic" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$saved_cflags" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -n "$LIBATOMIC_LIBS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi LIBS="$saved_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfetch" >&5 -printf %s "checking for libfetch... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfetch" >&5 +$as_echo_n "checking for libfetch... " >&6; } LIBFETCH_LIBS= LIBFETCH_IS_FETCH=0 LIBFETCH_IS_LIBCURL=0 @@ -64264,26 +66163,25 @@ #include int -main (void) +main () { fetchGetURL("", ""); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_libfetch=1 LIBFETCH_IS_FETCH=1 LIBFETCH_DYNAMIC=1 LIBFETCH_SONAME="libfetch.so.6" LIBFETCH_LIBS="-ldl" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: fetch(3)" >&5 -printf "%s\n" "fetch(3)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: fetch(3)" >&5 +$as_echo "fetch(3)" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$saved_libs" @@ -64296,12 +66194,12 @@ LIBFETCH_DYNAMIC=1 LIBFETCH_SONAME="libcurl.so.4" LIBFETCH_LIBS="-ldl" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libcurl" >&5 -printf "%s\n" "libcurl" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcurl" >&5 +$as_echo "libcurl" >&6; } else LIBFETCH_LIBS="$(curl-config --libs)" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libcurl (static)" >&5 -printf "%s\n" "libcurl (static)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcurl (static)" >&5 +$as_echo "libcurl (static)" >&6; } fi CCFLAGS="$CCFLAGS $(curl-config --cflags)" @@ -64309,24 +66207,32 @@ fi if test -z "$have_libfetch"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi -printf "%s\n" "#define LIBFETCH_IS_FETCH $LIBFETCH_IS_FETCH" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_IS_FETCH $LIBFETCH_IS_FETCH +_ACEOF -printf "%s\n" "#define LIBFETCH_IS_LIBCURL $LIBFETCH_IS_LIBCURL" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_IS_LIBCURL $LIBFETCH_IS_LIBCURL +_ACEOF -printf "%s\n" "#define LIBFETCH_DYNAMIC $LIBFETCH_DYNAMIC" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_DYNAMIC $LIBFETCH_DYNAMIC +_ACEOF -printf "%s\n" "#define LIBFETCH_SONAME \"$LIBFETCH_SONAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_SONAME "$LIBFETCH_SONAME" +_ACEOF @@ -64337,21 +66243,20 @@ _library_found= _pc_found= - if test -n "" -then : + if test -n ""; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for " >&5 -printf %s "checking for ... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5 +$as_echo_n "checking for ... " >&6; } if test -n "$AIO_H_CFLAGS"; then pkg_cv_AIO_H_CFLAGS="$AIO_H_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AIO_H_CFLAGS=`$PKG_CONFIG --cflags "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -64365,10 +66270,10 @@ pkg_cv_AIO_H_LIBS="$AIO_H_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AIO_H_LIBS=`$PKG_CONFIG --libs "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -64382,8 +66287,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -64400,14 +66305,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else AIO_H_CFLAGS=$pkg_cv_AIO_H_CFLAGS AIO_H_LIBS=$pkg_cv_AIO_H_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -64417,12 +66322,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$AIO_H_CFLAGS" != x -then : + if test "x$AIO_H_CFLAGS" != x; then : _header_found=1 fi - if test "x$AIO_H_LIBS" != x -then : + if test "x$AIO_H_LIBS" != x; then : _library_found=1 fi @@ -64440,12 +66343,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : AIO_H_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : AIO_H_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -64456,35 +66357,32 @@ { ac_cv_header_aio_h=; unset ac_cv_header_aio_h;} ac_fn_c_check_header_compile "$LINENO" "aio.h" "ac_cv_header_aio_h" "$ac_includes_default " -if test "x$ac_cv_header_aio_h" = xyes -then : +if test "x$ac_cv_header_aio_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header aio.h for library rt is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : AIO_H_LIBS="$AIO_H_LIBS -lrt" @@ -64492,12 +66390,11 @@ LDFLAGS="$LDFLAGS $AIO_H_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lio_listio in -lrt" >&5 -printf %s "checking for lio_listio in -lrt... " >&6; } -if test ${ac_cv_lib_rt_lio_listio+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lio_listio in -lrt" >&5 +$as_echo_n "checking for lio_listio in -lrt... " >&6; } +if ${ac_cv_lib_rt_lio_listio+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -64506,55 +66403,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char lio_listio (); int -main (void) +main () { return lio_listio (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_lio_listio=yes -else $as_nop +else ac_cv_lib_rt_lio_listio=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_lio_listio" >&5 -printf "%s\n" "$ac_cv_lib_rt_lio_listio" >&6; } -if test "x$ac_cv_lib_rt_lio_listio" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_lio_listio" >&5 +$as_echo "$ac_cv_lib_rt_lio_listio" >&6; } +if test "x$ac_cv_lib_rt_lio_listio" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library rt is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header aio.h for library rt See \`config.log' for more details" "$LINENO" 5; } @@ -64569,29 +66464,27 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : fi -printf "%s\n" "#define HAVE_AIO_H 1" >>confdefs.h +$as_echo "#define HAVE_AIO_H 1" >>confdefs.h -else $as_nop +else AIO_H_CFLAGS="" AIO_H_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find rt via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find rt via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find rt via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find rt via pkg-config or in the standard locations" >&2;} fi @@ -64599,17 +66492,15 @@ ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes -then : +if test "x$ac_cv_func_clock_gettime" = xyes; then : -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -printf %s "checking for clock_gettime in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -64618,36 +66509,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_gettime (); int -main (void) +main () { return clock_gettime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes -else $as_nop +else ac_cv_lib_rt_clock_gettime=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : LIBCLOCK_GETTIME=-lrt -else $as_nop +else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "*** clock_gettime is missing in libc and librt See \`config.log' for more details" "$LINENO" 5; } @@ -64659,59 +66551,55 @@ # Check whether --enable-pam was given. -if test ${enable_pam+y} -then : +if test "${enable_pam+set}" = set; then : enableval=$enable_pam; enable_pam=$enableval -else $as_nop +else enable_pam=check fi # Check whether --with-pammoduledir was given. -if test ${with_pammoduledir+y} -then : +if test "${with_pammoduledir+set}" = set; then : withval=$with_pammoduledir; pammoduledir="$withval" -else $as_nop +else pammoduledir=$libdir/security fi # Check whether --with-pamconfigsdir was given. -if test ${with_pamconfigsdir+y} -then : +if test "${with_pamconfigsdir+set}" = set; then : withval=$with_pamconfigsdir; pamconfigsdir="$withval" -else $as_nop +else pamconfigsdir='${datadir}/pam-configs' fi - if test "x$enable_pam" != "xno" -then : + if test "x$enable_pam" != "xno"; then : - for ac_header in security/pam_modules.h + for ac_header in security/pam_modules.h do : - ac_fn_c_check_header_compile "$LINENO" "security/pam_modules.h" "ac_cv_header_security_pam_modules_h" "$ac_includes_default" -if test "x$ac_cv_header_security_pam_modules_h" = xyes -then : - printf "%s\n" "#define HAVE_SECURITY_PAM_MODULES_H 1" >>confdefs.h + ac_fn_c_check_header_mongrel "$LINENO" "security/pam_modules.h" "ac_cv_header_security_pam_modules_h" "$ac_includes_default" +if test "x$ac_cv_header_security_pam_modules_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SECURITY_PAM_MODULES_H 1 +_ACEOF enable_pam=yes -else $as_nop +else - if test "x$enable_pam" = "xyes" -then : + if test "x$enable_pam" = "xyes"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? " *** security/pam_modules.h missing, libpam0g-dev package required See \`config.log' for more details" "$LINENO" 5; } -else $as_nop +else enable_pam=no @@ -64721,9 +66609,9 @@ done + fi - if test "x$enable_pam" = "xyes" -then : + if test "x$enable_pam" = "xyes"; then : DEFINE_PAM='--with pam' @@ -64742,12 +66630,11 @@ LIBS_save="${LIBS}" LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 -printf %s "checking for library containing backtrace... " >&6; } -if test ${ac_cv_search_backtrace+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +$as_echo_n "checking for library containing backtrace... " >&6; } +if ${ac_cv_search_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -64755,52 +66642,50 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char backtrace (); int -main (void) +main () { return backtrace (); ; return 0; } _ACEOF -for ac_lib in '' execinfo -do +for ac_lib in '' execinfo; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_backtrace=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_backtrace+y} -then : + if ${ac_cv_search_backtrace+:} false; then : break fi done -if test ${ac_cv_search_backtrace+y} -then : +if ${ac_cv_search_backtrace+:} false; then : -else $as_nop +else ac_cv_search_backtrace=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 -printf "%s\n" "$ac_cv_search_backtrace" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +$as_echo "$ac_cv_search_backtrace" >&6; } ac_res=$ac_cv_search_backtrace -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h +$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h BACKTRACE_LIBS="$LIBS" @@ -64819,16 +66704,14 @@ # Check whether --with-libunwind was given. -if test ${with_libunwind+y} -then : +if test "${with_libunwind+set}" = set; then : withval=$with_libunwind; -else $as_nop +else with_libunwind=auto fi - if test "x$with_libunwind" != "xno" -then : + if test "x$with_libunwind" != "xno"; then : @@ -64837,21 +66720,20 @@ _library_found= _pc_found= - if test -n "libunwind" -then : + if test -n "libunwind"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5 -printf %s "checking for libunwind... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5 +$as_echo_n "checking for libunwind... " >&6; } if test -n "$LIBUNWIND_CFLAGS"; then pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -64865,10 +66747,10 @@ pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -64882,8 +66764,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -64900,14 +66782,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -64917,12 +66799,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBUNWIND_CFLAGS" != x -then : + if test "x$LIBUNWIND_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBUNWIND_LIBS" != x -then : + if test "x$LIBUNWIND_LIBS" != x; then : _library_found=1 fi @@ -64940,12 +66820,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBUNWIND_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUNWIND_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -64956,35 +66834,32 @@ { ac_cv_header_libunwind_h=; unset ac_cv_header_libunwind_h;} ac_fn_c_check_header_compile "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default " -if test "x$ac_cv_header_libunwind_h" = xyes -then : +if test "x$ac_cv_header_libunwind_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header libunwind.h for library unwind is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUNWIND_LIBS="$LIBUNWIND_LIBS -lunwind" @@ -64992,12 +66867,11 @@ LDFLAGS="$LDFLAGS $LIBUNWIND_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lunwind" >&5 -printf %s "checking for main in -lunwind... " >&6; } -if test ${ac_cv_lib_unwind_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lunwind" >&5 +$as_echo_n "checking for main in -lunwind... " >&6; } +if ${ac_cv_lib_unwind_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lunwind $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -65005,53 +66879,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_unwind_main=yes -else $as_nop +else ac_cv_lib_unwind_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_main" >&5 -printf "%s\n" "$ac_cv_lib_unwind_main" >&6; } -if test "x$ac_cv_lib_unwind_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_main" >&5 +$as_echo "$ac_cv_lib_unwind_main" >&6; } +if test "x$ac_cv_lib_unwind_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library unwind is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header libunwind.h for library unwind See \`config.log' for more details" "$LINENO" 5; } @@ -65066,20 +66935,18 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBUNWIND_PC=libunwind fi -printf "%s\n" "#define HAVE_LIBUNWIND 1" >>confdefs.h +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h @@ -65092,8 +66959,8 @@ CFLAGS="$CFLAGS $LIBUNWIND_CFLAGS" LIBS="$LIBS $LIBUNWIND_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unw_get_elf_filename in libunwind" >&5 -printf %s "checking for unw_get_elf_filename in libunwind... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_get_elf_filename in libunwind" >&5 +$as_echo_n "checking for unw_get_elf_filename in libunwind... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -65102,7 +66969,7 @@ #include int -main (void) +main () { unw_get_elf_filename(0, 0, 0, 0); @@ -65112,23 +66979,56 @@ } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_LIBUNWIND_ELF 1" >>confdefs.h +$as_echo "#define HAVE_LIBUNWIND_ELF 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libunwind is llvm libunwind" >&5 +$as_echo_n "checking whether libunwind is llvm libunwind... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #if !defined(_LIBUNWIND_HIGHEST_DWARF_REGISTER) + #error "_LIBUNWIND_HIGHEST_DWARF_REGISTER is not defined" + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define IS_LIBUNWIND_LLVM 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="${CPPFLAGS_save}" CFLAGS="${CFLAGS_save}" @@ -65139,19 +67039,18 @@ -else $as_nop +else LIBUNWIND_CFLAGS="" LIBUNWIND_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find unwind via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find unwind via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find unwind via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find unwind via pkg-config or in the standard locations" >&2;} - if test "x$with_libunwind" = "xyes" -then : + if test "x$with_libunwind" = "xyes"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--with-libunwind was given, but libunwind is not available, try installing libunwind-devel See \`config.log' for more details" "$LINENO" 5; } @@ -65170,15 +67069,15 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/sysmacros.h" >&5 -printf %s "checking makedev() is declared in sys/sysmacros.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/sysmacros.h" >&5 +$as_echo_n "checking makedev() is declared in sys/sysmacros.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int k; @@ -65188,33 +67087,32 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MAKEDEV_IN_SYSMACROS 1" >>confdefs.h +$as_echo "#define HAVE_MAKEDEV_IN_SYSMACROS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/mkdev.h" >&5 -printf %s "checking makedev() is declared in sys/mkdev.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/mkdev.h" >&5 +$as_echo_n "checking makedev() is declared in sys/mkdev.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int k; @@ -65224,30 +67122,28 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MAKEDEV_IN_MKDEV 1" >>confdefs.h +$as_echo "#define HAVE_MAKEDEV_IN_MKDEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check whether --with-zfsexecdir was given. -if test ${with_zfsexecdir+y} -then : +if test "${with_zfsexecdir+set}" = set; then : withval=$with_zfsexecdir; zfsexecdir=$withval -else $as_nop +else zfsexecdir="${libexecdir}/zfs" fi @@ -65255,47 +67151,28 @@ - ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe" -if test "x$ac_cv_func_execvpe" = xyes -then : - printf "%s\n" "#define HAVE_EXECVPE 1" >>confdefs.h + for ac_func in execvpe issetugid mlockall strlcat strlcpy gettid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" -if test "x$ac_cv_func_issetugid" = xyes -then : - printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h +done -fi -ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall" -if test "x$ac_cv_func_mlockall" = xyes -then : - printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = xyes -then : - printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes -then : - printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h + ;; + all) + -fi -ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid" -if test "x$ac_cv_func_gettid" = xyes -then : - printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h -fi - ;; - all) @@ -65311,12 +67188,81 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyPreferredLanguages(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyPreferredLanguages=yes +else + gt_cv_func_CFLocaleCopyPreferredLanguages=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then +$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi - gt_INTL_MACOSX @@ -65353,12 +67299,11 @@ gt_expression_test_code= fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 -printf %s "checking for GNU gettext in libc... " >&6; } -if eval test \${$gt_func_gnugettext_libc+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -65373,7 +67318,7 @@ $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -65383,18 +67328,17 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" -else $as_nop +else eval "$gt_func_gnugettext_libc=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -65427,12 +67371,11 @@ done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -printf %s "checking for iconv... " >&6; } -if test ${am_cv_func_iconv+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no @@ -65443,7 +67386,7 @@ #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -65452,11 +67395,10 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -65468,7 +67410,7 @@ #include int -main (void) +main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -65477,26 +67419,24 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -printf "%s\n" "$am_cv_func_iconv" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -printf %s "checking for working iconv... " >&6; } -if test ${am_cv_func_iconv_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then @@ -65504,13 +67444,12 @@ fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -65522,7 +67461,7 @@ #endif int -main (void) +main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful @@ -65634,8 +67573,7 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -65647,8 +67585,8 @@ LIBS="$am_save_LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -printf "%s\n" "$am_cv_func_iconv_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; @@ -65658,14 +67596,14 @@ fi if test "$am_func_iconv" = yes; then -printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h +$as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -printf %s "checking how to link with libiconv... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -printf "%s\n" "$LIBICONV" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -65696,8 +67634,7 @@ # Check whether --with-libintl-prefix was given. -if test ${with_libintl_prefix+y} -then : +if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -66135,12 +68072,11 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 -printf %s "checking for GNU gettext in libintl... " >&6; } -if eval test \${$gt_func_gnugettext_libintl+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if eval \${$gt_func_gnugettext_libintl+:} false; then : + $as_echo_n "(cached) " >&6 +else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" @@ -66163,7 +68099,7 @@ $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -66173,13 +68109,12 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" -else $as_nop +else eval "$gt_func_gnugettext_libintl=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" @@ -66201,7 +68136,7 @@ $gt_revision_test_code int -main (void) +main () { bindtextdomain ("", ""); @@ -66211,22 +68146,21 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ @@ -66253,20 +68187,20 @@ if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then -printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h +$as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 -printf %s "checking whether to use NLS... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -printf "%s\n" "$USE_NLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 -printf %s "checking where the gettext function comes from... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" @@ -66276,18 +68210,18 @@ else gt_source="included intl directory" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 -printf "%s\n" "$gt_source" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 -printf %s "checking how to link with libintl... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 -printf "%s\n" "$LIBINTL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= @@ -66314,10 +68248,10 @@ fi -printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h -printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi @@ -66337,10 +68271,9 @@ # Check whether --with-mounthelperdir was given. -if test ${with_mounthelperdir+y} -then : +if test "${with_mounthelperdir+set}" = set; then : withval=$with_mounthelperdir; mounthelperdir=$withval -else $as_nop +else mounthelperdir=/sbin fi @@ -66349,10 +68282,9 @@ # Check whether --enable-sysvinit was given. -if test ${enable_sysvinit+y} -then : +if test "${enable_sysvinit+set}" = set; then : enableval=$enable_sysvinit; -else $as_nop +else enable_sysvinit=yes fi @@ -66360,34 +68292,30 @@ ZFS_INIT_SYSV=$enable_sysvinit - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dracut directory" >&5 -printf %s "checking for dracut directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dracut directory" >&5 +$as_echo_n "checking for dracut directory... " >&6; } # Check whether --with-dracutdir was given. -if test ${with_dracutdir+y} -then : +if test "${with_dracutdir+set}" = set; then : withval=$with_dracutdir; dracutdir=$withval -else $as_nop +else dracutdir=check fi - if test "x$dracutdir" = xcheck -then : + if test "x$dracutdir" = xcheck; then : path1=/usr/share/dracut path2=/usr/lib/dracut default=$path2 - if test -d "$path1" -then : + if test -d "$path1"; then : dracutdir="$path1" -else $as_nop +else - if test -d "$path2" -then : + if test -d "$path2"; then : dracutdir="$path2" -else $as_nop +else dracutdir="$default" fi @@ -66396,8 +68324,8 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dracutdir" >&5 -printf "%s\n" "$dracutdir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dracutdir" >&5 +$as_echo "$dracutdir" >&6; } if test -z "$BUILD_FREEBSD_TRUE"; then : @@ -66405,10 +68333,9 @@ # Check whether --with-pkgconfigdir was given. -if test ${with_pkgconfigdir+y} -then : +if test "${with_pkgconfigdir+set}" = set; then : withval=$with_pkgconfigdir; -else $as_nop +else with_pkgconfigdir='${prefix}/libdata/pkgconfig' fi @@ -66423,10 +68350,9 @@ # Check whether --with-pkgconfigdir was given. -if test ${with_pkgconfigdir+y} -then : +if test "${with_pkgconfigdir+set}" = set; then : withval=$with_pkgconfigdir; -else $as_nop +else with_pkgconfigdir='${libdir}/pkgconfig' fi @@ -66445,21 +68371,20 @@ _library_found= _pc_found= - if test -n "zlib" -then : + if test -n "zlib"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 -printf %s "checking for zlib... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 +$as_echo_n "checking for zlib... " >&6; } if test -n "$ZLIB_CFLAGS"; then pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -66473,10 +68398,10 @@ pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5 ($PKG_CONFIG --exists --print-errors "zlib") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -66490,8 +68415,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -66508,14 +68433,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS ZLIB_LIBS=$pkg_cv_ZLIB_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -66525,12 +68450,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$ZLIB_CFLAGS" != x -then : + if test "x$ZLIB_CFLAGS" != x; then : _header_found=1 fi - if test "x$ZLIB_LIBS" != x -then : + if test "x$ZLIB_LIBS" != x; then : _library_found=1 fi @@ -66548,12 +68471,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : ZLIB_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : ZLIB_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -66564,35 +68485,32 @@ { ac_cv_header_zlib_h=; unset ac_cv_header_zlib_h;} ac_fn_c_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default " -if test "x$ac_cv_header_zlib_h" = xyes -then : +if test "x$ac_cv_header_zlib_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header zlib.h for library z is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : ZLIB_LIBS="$ZLIB_LIBS -lz" @@ -66600,12 +68518,11 @@ LDFLAGS="$LDFLAGS $ZLIB_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 -printf %s "checking for compress2 in -lz... " >&6; } -if test ${ac_cv_lib_z_compress2+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5 +$as_echo_n "checking for compress2 in -lz... " >&6; } +if ${ac_cv_lib_z_compress2+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -66614,39 +68531,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char compress2 (); int -main (void) +main () { return compress2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_compress2=yes -else $as_nop +else ac_cv_lib_z_compress2=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 -printf "%s\n" "$ac_cv_lib_z_compress2" >&6; } -if test "x$ac_cv_lib_z_compress2" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5 +$as_echo "$ac_cv_lib_z_compress2" >&6; } +if test "x$ac_cv_lib_z_compress2" = xyes; then : : -else $as_nop +else _libcheck= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5 -printf %s "checking for uncompress in -lz... " >&6; } -if test ${ac_cv_lib_z_uncompress+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5 +$as_echo_n "checking for uncompress in -lz... " >&6; } +if ${ac_cv_lib_z_uncompress+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -66655,39 +68572,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char uncompress (); int -main (void) +main () { return uncompress (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_uncompress=yes -else $as_nop +else ac_cv_lib_z_uncompress=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5 -printf "%s\n" "$ac_cv_lib_z_uncompress" >&6; } -if test "x$ac_cv_lib_z_uncompress" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5 +$as_echo "$ac_cv_lib_z_uncompress" >&6; } +if test "x$ac_cv_lib_z_uncompress" = xyes; then : : -else $as_nop +else _libcheck= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crc32 in -lz" >&5 -printf %s "checking for crc32 in -lz... " >&6; } -if test ${ac_cv_lib_z_crc32+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crc32 in -lz" >&5 +$as_echo_n "checking for crc32 in -lz... " >&6; } +if ${ac_cv_lib_z_crc32+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -66696,55 +68613,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char crc32 (); int -main (void) +main () { return crc32 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_crc32=yes -else $as_nop +else ac_cv_lib_z_crc32=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_crc32" >&5 -printf "%s\n" "$ac_cv_lib_z_crc32" >&6; } -if test "x$ac_cv_lib_z_crc32" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_crc32" >&5 +$as_echo "$ac_cv_lib_z_crc32" >&6; } +if test "x$ac_cv_lib_z_crc32" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library z is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header zlib.h for library z See \`config.log' for more details" "$LINENO" 5; } @@ -66759,33 +68674,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : ZLIB_PC=zlib fi -printf "%s\n" "#define HAVE_ZLIB 1" >>confdefs.h +$as_echo "#define HAVE_ZLIB 1" >>confdefs.h -else $as_nop +else ZLIB_CFLAGS="" ZLIB_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find z via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find z via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find z via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find z via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "*** zlib-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -66796,34 +68709,30 @@ if test -z "$BUILD_LINUX_TRUE"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for udev directories" >&5 -printf %s "checking for udev directories... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev directories" >&5 +$as_echo_n "checking for udev directories... " >&6; } # Check whether --with-udevdir was given. -if test ${with_udevdir+y} -then : +if test "${with_udevdir+set}" = set; then : withval=$with_udevdir; udevdir=$withval -else $as_nop +else udevdir=check fi - if test "x$udevdir" = xcheck -then : + if test "x$udevdir" = xcheck; then : path1=/lib/udev path2=/usr/lib/udev default=$path2 - if test -d "$path1" -then : + if test -d "$path1"; then : udevdir="$path1" -else $as_nop +else - if test -d "$path2" -then : + if test -d "$path2"; then : udevdir="$path2" -else $as_nop +else udevdir="$default" fi @@ -66833,93 +68742,84 @@ # Check whether --with-udevruledir was given. -if test ${with_udevruledir+y} -then : +if test "${with_udevruledir+set}" = set; then : withval=$with_udevruledir; udevruledir=$withval -else $as_nop +else udevruledir="${udevdir}/rules.d" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $udevdir;$udevruledir" >&5 -printf "%s\n" "$udevdir;$udevruledir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $udevdir;$udevruledir" >&5 +$as_echo "$udevdir;$udevruledir" >&6; } # Check whether --enable-systemd was given. -if test ${enable_systemd+y} -then : +if test "${enable_systemd+set}" = set; then : enableval=$enable_systemd; enable_systemd=$enableval -else $as_nop +else enable_systemd=check fi # Check whether --with-systemdunitdir was given. -if test ${with_systemdunitdir+y} -then : +if test "${with_systemdunitdir+set}" = set; then : withval=$with_systemdunitdir; systemdunitdir=$withval -else $as_nop +else systemdunitdir=/usr/lib/systemd/system fi # Check whether --with-systemdpresetdir was given. -if test ${with_systemdpresetdir+y} -then : +if test "${with_systemdpresetdir+set}" = set; then : withval=$with_systemdpresetdir; systemdpresetdir=$withval -else $as_nop +else systemdpresetdir=/usr/lib/systemd/system-preset fi # Check whether --with-systemdmodulesloaddir was given. -if test ${with_systemdmodulesloaddir+y} -then : +if test "${with_systemdmodulesloaddir+set}" = set; then : withval=$with_systemdmodulesloaddir; systemdmodulesloaddir=$withval -else $as_nop +else systemdmodulesloaddir=/usr/lib/modules-load.d fi # Check whether --with-systemdgeneratordir was given. -if test ${with_systemdgeneratordir+y} -then : +if test "${with_systemdgeneratordir+set}" = set; then : withval=$with_systemdgeneratordir; systemdgeneratordir=$withval -else $as_nop +else systemdgeneratordir=/usr/lib/systemd/system-generators fi - if test "x$enable_systemd" = xcheck -then : + if test "x$enable_systemd" = xcheck; then : - if systemctl --version >/dev/null 2>&1 -then : + if systemctl --version >/dev/null 2>&1; then : enable_systemd=yes -else $as_nop +else enable_systemd=no fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd support" >&5 -printf %s "checking for systemd support... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_systemd" >&5 -printf "%s\n" "$enable_systemd" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd support" >&5 +$as_echo_n "checking for systemd support... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_systemd" >&5 +$as_echo "$enable_systemd" >&6; } - if test "x$enable_systemd" = xyes -then : + if test "x$enable_systemd" = xyes; then : DEFINE_SYSTEMD='--with systemd --define "_unitdir $(systemdunitdir)" --define "_presetdir $(systemdpresetdir)" --define "_generatordir $(systemdgeneratordir)"' modulesloaddir=$systemdmodulesloaddir -else $as_nop +else DEFINE_SYSTEMD='--without systemd' @@ -66942,21 +68842,20 @@ _library_found= _pc_found= - if test -n "libudev" -then : + if test -n "libudev"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libudev" >&5 -printf %s "checking for libudev... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libudev" >&5 +$as_echo_n "checking for libudev... " >&6; } if test -n "$LIBUDEV_CFLAGS"; then pkg_cv_LIBUDEV_CFLAGS="$LIBUDEV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -66970,10 +68869,10 @@ pkg_cv_LIBUDEV_LIBS="$LIBUDEV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUDEV_LIBS=`$PKG_CONFIG --libs "libudev" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -66987,8 +68886,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -67005,14 +68904,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBUDEV_CFLAGS=$pkg_cv_LIBUDEV_CFLAGS LIBUDEV_LIBS=$pkg_cv_LIBUDEV_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -67022,12 +68921,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBUDEV_CFLAGS" != x -then : + if test "x$LIBUDEV_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBUDEV_LIBS" != x -then : + if test "x$LIBUDEV_LIBS" != x; then : _library_found=1 fi @@ -67045,12 +68942,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBUDEV_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUDEV_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -67061,35 +68956,32 @@ { ac_cv_header_libudev_h=; unset ac_cv_header_libudev_h;} ac_fn_c_check_header_compile "$LINENO" "libudev.h" "ac_cv_header_libudev_h" "$ac_includes_default " -if test "x$ac_cv_header_libudev_h" = xyes -then : +if test "x$ac_cv_header_libudev_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header libudev.h for library udev is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUDEV_LIBS="$LIBUDEV_LIBS -ludev" @@ -67097,12 +68989,11 @@ LDFLAGS="$LDFLAGS $LIBUDEV_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -ludev" >&5 -printf %s "checking for main in -ludev... " >&6; } -if test ${ac_cv_lib_udev_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ludev" >&5 +$as_echo_n "checking for main in -ludev... " >&6; } +if ${ac_cv_lib_udev_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ludev $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -67110,53 +69001,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_udev_main=yes -else $as_nop +else ac_cv_lib_udev_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_main" >&5 -printf "%s\n" "$ac_cv_lib_udev_main" >&6; } -if test "x$ac_cv_lib_udev_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udev_main" >&5 +$as_echo "$ac_cv_lib_udev_main" >&6; } +if test "x$ac_cv_lib_udev_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library udev is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header libudev.h for library udev See \`config.log' for more details" "$LINENO" 5; } @@ -67171,37 +69057,34 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBUDEV_PC=libudev fi -printf "%s\n" "#define HAVE_LIBUDEV 1" >>confdefs.h +$as_echo "#define HAVE_LIBUDEV 1" >>confdefs.h user_libudev=yes -else $as_nop +else LIBUDEV_CFLAGS="" LIBUDEV_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find udev via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find udev via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find udev via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find udev via pkg-config or in the standard locations" >&2;} user_libudev=no fi - if test "x$user_libudev" = xyes -then : + if test "x$user_libudev" = xyes; then : CPPFLAGS_save="${CPPFLAGS}" @@ -67215,12 +69098,16 @@ CFLAGS="$CFLAGS $LIBUDEV_CFLAGS" LIBS="$LIBUDEV_LIBS $LIBS" - ac_fn_c_check_func "$LINENO" "udev_device_get_is_initialized" "ac_cv_func_udev_device_get_is_initialized" -if test "x$ac_cv_func_udev_device_get_is_initialized" = xyes -then : - printf "%s\n" "#define HAVE_UDEV_DEVICE_GET_IS_INITIALIZED 1" >>confdefs.h + for ac_func in udev_device_get_is_initialized +do : + ac_fn_c_check_func "$LINENO" "udev_device_get_is_initialized" "ac_cv_func_udev_device_get_is_initialized" +if test "x$ac_cv_func_udev_device_get_is_initialized" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UDEV_DEVICE_GET_IS_INITIALIZED 1 +_ACEOF fi +done @@ -67242,21 +69129,20 @@ _library_found= _pc_found= - if test -n "uuid" -then : + if test -n "uuid"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid" >&5 -printf %s "checking for uuid... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid" >&5 +$as_echo_n "checking for uuid... " >&6; } if test -n "$LIBUUID_CFLAGS"; then pkg_cv_LIBUUID_CFLAGS="$LIBUUID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUUID_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -67270,10 +69156,10 @@ pkg_cv_LIBUUID_LIBS="$LIBUUID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUUID_LIBS=`$PKG_CONFIG --libs "uuid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -67287,8 +69173,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -67305,14 +69191,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBUUID_CFLAGS=$pkg_cv_LIBUUID_CFLAGS LIBUUID_LIBS=$pkg_cv_LIBUUID_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -67322,12 +69208,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBUUID_CFLAGS" != x -then : + if test "x$LIBUUID_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBUUID_LIBS" != x -then : + if test "x$LIBUUID_LIBS" != x; then : _library_found=1 fi @@ -67345,12 +69229,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBUUID_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUUID_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -67361,35 +69243,32 @@ { ac_cv_header_uuid_uuid_h=; unset ac_cv_header_uuid_uuid_h;} ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default " -if test "x$ac_cv_header_uuid_uuid_h" = xyes -then : +if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header uuid/uuid.h for library uuid is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUUID_LIBS="$LIBUUID_LIBS -luuid" @@ -67397,12 +69276,11 @@ LDFLAGS="$LDFLAGS $LIBUUID_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 -printf %s "checking for uuid_generate in -luuid... " >&6; } -if test ${ac_cv_lib_uuid_uuid_generate+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 +$as_echo_n "checking for uuid_generate in -luuid... " >&6; } +if ${ac_cv_lib_uuid_uuid_generate+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -67411,39 +69289,39 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char uuid_generate (); int -main (void) +main () { return uuid_generate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_generate=yes -else $as_nop +else ac_cv_lib_uuid_uuid_generate=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 -printf "%s\n" "$ac_cv_lib_uuid_uuid_generate" >&6; } -if test "x$ac_cv_lib_uuid_uuid_generate" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 +$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } +if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then : : -else $as_nop +else _libcheck= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_is_null in -luuid" >&5 -printf %s "checking for uuid_is_null in -luuid... " >&6; } -if test ${ac_cv_lib_uuid_uuid_is_null+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_is_null in -luuid" >&5 +$as_echo_n "checking for uuid_is_null in -luuid... " >&6; } +if ${ac_cv_lib_uuid_uuid_is_null+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -67452,55 +69330,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char uuid_is_null (); int -main (void) +main () { return uuid_is_null (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_is_null=yes -else $as_nop +else ac_cv_lib_uuid_uuid_is_null=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_is_null" >&5 -printf "%s\n" "$ac_cv_lib_uuid_uuid_is_null" >&6; } -if test "x$ac_cv_lib_uuid_uuid_is_null" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_is_null" >&5 +$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; } +if test "x$ac_cv_lib_uuid_uuid_is_null" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library uuid is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header uuid/uuid.h for library uuid See \`config.log' for more details" "$LINENO" 5; } @@ -67515,33 +69391,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBUUID_PC=uuid fi -printf "%s\n" "#define HAVE_LIBUUID 1" >>confdefs.h +$as_echo "#define HAVE_LIBUUID 1" >>confdefs.h -else $as_nop +else LIBUUID_CFLAGS="" LIBUUID_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find uuid via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find uuid via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find uuid via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find uuid via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "*** libuuid-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -67557,21 +69431,20 @@ _library_found= _pc_found= - if test -n "blkid" -then : + if test -n "blkid"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blkid" >&5 -printf %s "checking for blkid... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid" >&5 +$as_echo_n "checking for blkid... " >&6; } if test -n "$LIBBLKID_CFLAGS"; then pkg_cv_LIBBLKID_CFLAGS="$LIBBLKID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 ($PKG_CONFIG --exists --print-errors "blkid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBBLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -67585,10 +69458,10 @@ pkg_cv_LIBBLKID_LIBS="$LIBBLKID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid\""; } >&5 ($PKG_CONFIG --exists --print-errors "blkid") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBBLKID_LIBS=`$PKG_CONFIG --libs "blkid" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -67602,8 +69475,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -67620,14 +69493,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBBLKID_CFLAGS=$pkg_cv_LIBBLKID_CFLAGS LIBBLKID_LIBS=$pkg_cv_LIBBLKID_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -67637,12 +69510,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBBLKID_CFLAGS" != x -then : + if test "x$LIBBLKID_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBBLKID_LIBS" != x -then : + if test "x$LIBBLKID_LIBS" != x; then : _library_found=1 fi @@ -67660,12 +69531,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBBLKID_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBBLKID_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -67676,35 +69545,32 @@ { ac_cv_header_blkid_blkid_h=; unset ac_cv_header_blkid_blkid_h;} ac_fn_c_check_header_compile "$LINENO" "blkid/blkid.h" "ac_cv_header_blkid_blkid_h" "$ac_includes_default " -if test "x$ac_cv_header_blkid_blkid_h" = xyes -then : +if test "x$ac_cv_header_blkid_blkid_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header blkid/blkid.h for library blkid is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBBLKID_LIBS="$LIBBLKID_LIBS -lblkid" @@ -67712,12 +69578,11 @@ LDFLAGS="$LDFLAGS $LIBBLKID_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lblkid" >&5 -printf %s "checking for main in -lblkid... " >&6; } -if test ${ac_cv_lib_blkid_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lblkid" >&5 +$as_echo_n "checking for main in -lblkid... " >&6; } +if ${ac_cv_lib_blkid_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblkid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -67725,53 +69590,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_blkid_main=yes -else $as_nop +else ac_cv_lib_blkid_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_main" >&5 -printf "%s\n" "$ac_cv_lib_blkid_main" >&6; } -if test "x$ac_cv_lib_blkid_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_main" >&5 +$as_echo "$ac_cv_lib_blkid_main" >&6; } +if test "x$ac_cv_lib_blkid_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library blkid is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header blkid/blkid.h for library blkid See \`config.log' for more details" "$LINENO" 5; } @@ -67786,33 +69646,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBBLKID_PC=blkid fi -printf "%s\n" "#define HAVE_LIBBLKID 1" >>confdefs.h +$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h -else $as_nop +else LIBBLKID_CFLAGS="" LIBBLKID_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find blkid via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find blkid via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find blkid via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find blkid via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? " *** blkid.h missing, libblkid-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -67821,29 +69679,146 @@ + for ac_header in sys/stat.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_stat_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_STAT_H 1 +_ACEOF + have_stat_headers=yes +else + have_stat_headers=no +fi + +done + + + if test "x$have_stat_headers" = "xyes"; then : + + ac_fn_c_check_func "$LINENO" "statx" "ac_cv_func_statx" +if test "x$ac_cv_func_statx" = xyes; then : + + +$as_echo "#define HAVE_STATX 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STATX_MNT_ID" >&5 +$as_echo_n "checking for STATX_MNT_ID... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #define _GNU_SOURCE + #include + +int +main () +{ + + struct statx stx; + int mask = STATX_MNT_ID; + (void)mask; + (void)stx.stx_mnt_id; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_STATX_MNT_ID 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sys/stat.h not found; skipping statx support" >&5 +$as_echo "$as_me: WARNING: sys/stat.h not found; skipping statx support" >&2;} + +fi + + + ac_fn_c_check_func "$LINENO" "mount_setattr" "ac_cv_func_mount_setattr" +if test "x$ac_cv_func_mount_setattr" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct mount_attr" >&5 +$as_echo_n "checking for struct mount_attr... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + +int +main () +{ + + struct mount_attr attr = { + .attr_set = MOUNT_ATTR_RDONLY, + .attr_clr = MOUNT_ATTR_NOEXEC, + }; + (void) attr; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_MOUNT_SETATTR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + + fi # Check whether --with-tirpc was given. -if test ${with_tirpc+y} -then : +if test "${with_tirpc+set}" = set; then : withval=$with_tirpc; -else $as_nop +else with_tirpc=check fi have_xdr= - if test "x$with_tirpc" != "xyes" -then : + if test "x$with_tirpc" != "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing xdrmem_create" >&5 -printf %s "checking for library containing xdrmem_create... " >&6; } -if test ${ac_cv_search_xdrmem_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xdrmem_create" >&5 +$as_echo_n "checking for library containing xdrmem_create... " >&6; } +if ${ac_cv_search_xdrmem_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -67851,57 +69826,54 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char xdrmem_create (); int -main (void) +main () { return xdrmem_create (); ; return 0; } _ACEOF -for ac_lib in '' -do +for ac_lib in '' ; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_xdrmem_create=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_xdrmem_create+y} -then : + if ${ac_cv_search_xdrmem_create+:} false; then : break fi done -if test ${ac_cv_search_xdrmem_create+y} -then : +if ${ac_cv_search_xdrmem_create+:} false; then : -else $as_nop +else ac_cv_search_xdrmem_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_xdrmem_create" >&5 -printf "%s\n" "$ac_cv_search_xdrmem_create" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_xdrmem_create" >&5 +$as_echo "$ac_cv_search_xdrmem_create" >&6; } ac_res=$ac_cv_search_xdrmem_create -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_xdr=1 -else $as_nop +else - if test "x$with_tirpc" = "xno" -then : + if test "x$with_tirpc" = "xno"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "xdrmem_create() requires sunrpc support in libc if not using libtirpc See \`config.log' for more details" "$LINENO" 5; } @@ -67912,8 +69884,7 @@ fi - if test "x$have_xdr" = "x" -then : + if test "x$have_xdr" = "x"; then : @@ -67922,21 +69893,20 @@ _library_found= _pc_found= - if test -n "libtirpc" -then : + if test -n "libtirpc"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtirpc" >&5 -printf %s "checking for libtirpc... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtirpc" >&5 +$as_echo_n "checking for libtirpc... " >&6; } if test -n "$LIBTIRPC_CFLAGS"; then pkg_cv_LIBTIRPC_CFLAGS="$LIBTIRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBTIRPC_CFLAGS=`$PKG_CONFIG --cflags "libtirpc" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -67950,10 +69920,10 @@ pkg_cv_LIBTIRPC_LIBS="$LIBTIRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtirpc\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtirpc") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBTIRPC_LIBS=`$PKG_CONFIG --libs "libtirpc" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -67967,8 +69937,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -67985,14 +69955,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBTIRPC_CFLAGS=$pkg_cv_LIBTIRPC_CFLAGS LIBTIRPC_LIBS=$pkg_cv_LIBTIRPC_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -68002,12 +69972,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBTIRPC_CFLAGS" != x -then : + if test "x$LIBTIRPC_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBTIRPC_LIBS" != x -then : + if test "x$LIBTIRPC_LIBS" != x; then : _library_found=1 fi @@ -68025,12 +69993,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBTIRPC_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBTIRPC_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -68041,25 +70007,24 @@ { ac_cv_header_rpc_xdr_h=; unset ac_cv_header_rpc_xdr_h;} ac_fn_c_check_header_compile "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "$ac_includes_default " -if test "x$ac_cv_header_rpc_xdr_h" = xyes -then : +if test "x$ac_cv_header_rpc_xdr_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header rpc/xdr.h for library tirpc is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES LIBTIRPC_CFLAGS="-I$lt_sysroot$_prefixdir/include/tirpc" @@ -68067,8 +70032,7 @@ { ac_cv_header_rpc_xdr_h=; unset ac_cv_header_rpc_xdr_h;} ac_fn_c_check_header_compile "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "$ac_includes_default " -if test "x$ac_cv_header_rpc_xdr_h" = xyes -then : +if test "x$ac_cv_header_rpc_xdr_h" = xyes; then : _header_found=1 break @@ -68077,13 +70041,12 @@ + done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBTIRPC_LIBS="$LIBTIRPC_LIBS -ltirpc" @@ -68091,12 +70054,11 @@ LDFLAGS="$LDFLAGS $LIBTIRPC_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xdrmem_create in -ltirpc" >&5 -printf %s "checking for xdrmem_create in -ltirpc... " >&6; } -if test ${ac_cv_lib_tirpc_xdrmem_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdrmem_create in -ltirpc" >&5 +$as_echo_n "checking for xdrmem_create in -ltirpc... " >&6; } +if ${ac_cv_lib_tirpc_xdrmem_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ltirpc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -68105,55 +70067,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char xdrmem_create (); int -main (void) +main () { return xdrmem_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tirpc_xdrmem_create=yes -else $as_nop +else ac_cv_lib_tirpc_xdrmem_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tirpc_xdrmem_create" >&5 -printf "%s\n" "$ac_cv_lib_tirpc_xdrmem_create" >&6; } -if test "x$ac_cv_lib_tirpc_xdrmem_create" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tirpc_xdrmem_create" >&5 +$as_echo "$ac_cv_lib_tirpc_xdrmem_create" >&6; } +if test "x$ac_cv_lib_tirpc_xdrmem_create" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library tirpc is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header rpc/xdr.h for library tirpc See \`config.log' for more details" "$LINENO" 5; } @@ -68168,42 +70128,39 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBTIRPC_PC=libtirpc fi -printf "%s\n" "#define HAVE_LIBTIRPC 1" >>confdefs.h +$as_echo "#define HAVE_LIBTIRPC 1" >>confdefs.h -else $as_nop +else LIBTIRPC_CFLAGS="" LIBTIRPC_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find tirpc via pkg-config or in the standard locations" >&2;} - if test "x$with_tirpc" = "xyes" -then : + if test "x$with_tirpc" = "xyes"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--with-tirpc was given, but libtirpc is not available, try installing libtirpc-devel See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "neither libc sunrpc support nor libtirpc is available, try installing libtirpc-devel See \`config.log' for more details" "$LINENO" 5; } @@ -68223,21 +70180,20 @@ _library_found= _pc_found= - if test -n "libcrypto" -then : + if test -n "libcrypto"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcrypto" >&5 -printf %s "checking for libcrypto... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcrypto" >&5 +$as_echo_n "checking for libcrypto... " >&6; } if test -n "$LIBCRYPTO_CFLAGS"; then pkg_cv_LIBCRYPTO_CFLAGS="$LIBCRYPTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCRYPTO_CFLAGS=`$PKG_CONFIG --cflags "libcrypto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -68251,10 +70207,10 @@ pkg_cv_LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCRYPTO_LIBS=`$PKG_CONFIG --libs "libcrypto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -68268,8 +70224,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -68286,14 +70242,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBCRYPTO_CFLAGS=$pkg_cv_LIBCRYPTO_CFLAGS LIBCRYPTO_LIBS=$pkg_cv_LIBCRYPTO_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -68303,12 +70259,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBCRYPTO_CFLAGS" != x -then : + if test "x$LIBCRYPTO_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBCRYPTO_LIBS" != x -then : + if test "x$LIBCRYPTO_LIBS" != x; then : _library_found=1 fi @@ -68326,12 +70280,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBCRYPTO_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBCRYPTO_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -68342,35 +70294,32 @@ { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;} ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default " -if test "x$ac_cv_header_openssl_evp_h" = xyes -then : +if test "x$ac_cv_header_openssl_evp_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header openssl/evp.h for library crypto is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -lcrypto" @@ -68378,12 +70327,11 @@ LDFLAGS="$LDFLAGS $LIBCRYPTO_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto" >&5 -printf %s "checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto... " >&6; } -if test ${ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto" >&5 +$as_echo_n "checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -68392,55 +70340,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char PKCS5_PBKDF2_HMAC_SHA1 (); int -main (void) +main () { return PKCS5_PBKDF2_HMAC_SHA1 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1=yes -else $as_nop +else ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&5 -printf "%s\n" "$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&6; } -if test "x$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&5 +$as_echo "$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" >&6; } +if test "x$ac_cv_lib_crypto_PKCS5_PBKDF2_HMAC_SHA1" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library crypto is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header openssl/evp.h for library crypto See \`config.log' for more details" "$LINENO" 5; } @@ -68455,33 +70401,31 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBCRYPTO_PC=libcrypto fi -printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h +$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h -else $as_nop +else LIBCRYPTO_CFLAGS="" LIBCRYPTO_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find crypto via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find crypto via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find crypto via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find crypto via pkg-config or in the standard locations" >&2;} - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? " *** evp.h missing, libssl-devel package required See \`config.log' for more details" "$LINENO" 5; } @@ -68497,21 +70441,20 @@ _library_found= _pc_found= - if test -n "" -then : + if test -n ""; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for " >&5 -printf %s "checking for ... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5 +$as_echo_n "checking for ... " >&6; } if test -n "$LIBAIO_CFLAGS"; then pkg_cv_LIBAIO_CFLAGS="$LIBAIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBAIO_CFLAGS=`$PKG_CONFIG --cflags "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -68525,10 +70468,10 @@ pkg_cv_LIBAIO_LIBS="$LIBAIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBAIO_LIBS=`$PKG_CONFIG --libs "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -68542,8 +70485,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -68560,14 +70503,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBAIO_CFLAGS=$pkg_cv_LIBAIO_CFLAGS LIBAIO_LIBS=$pkg_cv_LIBAIO_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -68577,12 +70520,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBAIO_CFLAGS" != x -then : + if test "x$LIBAIO_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBAIO_LIBS" != x -then : + if test "x$LIBAIO_LIBS" != x; then : _library_found=1 fi @@ -68600,12 +70541,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBAIO_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBAIO_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -68616,35 +70555,32 @@ { ac_cv_header_libaio_h=; unset ac_cv_header_libaio_h;} ac_fn_c_check_header_compile "$LINENO" "libaio.h" "ac_cv_header_libaio_h" "$ac_includes_default " -if test "x$ac_cv_header_libaio_h" = xyes -then : +if test "x$ac_cv_header_libaio_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header libaio.h for library aio is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBAIO_LIBS="$LIBAIO_LIBS -laio" @@ -68652,12 +70588,11 @@ LDFLAGS="$LDFLAGS $LIBAIO_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -laio" >&5 -printf %s "checking for main in -laio... " >&6; } -if test ${ac_cv_lib_aio_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laio" >&5 +$as_echo_n "checking for main in -laio... " >&6; } +if ${ac_cv_lib_aio_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-laio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -68665,53 +70600,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_aio_main=yes -else $as_nop +else ac_cv_lib_aio_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aio_main" >&5 -printf "%s\n" "$ac_cv_lib_aio_main" >&6; } -if test "x$ac_cv_lib_aio_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aio_main" >&5 +$as_echo "$ac_cv_lib_aio_main" >&6; } +if test "x$ac_cv_lib_aio_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library aio is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header libaio.h for library aio See \`config.log' for more details" "$LINENO" 5; } @@ -68726,37 +70656,35 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : fi -printf "%s\n" "#define HAVE_LIBAIO 1" >>confdefs.h +$as_echo "#define HAVE_LIBAIO 1" >>confdefs.h user_libaio=yes -else $as_nop +else LIBAIO_CFLAGS="" LIBAIO_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find aio via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find aio via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find aio via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find aio via pkg-config or in the standard locations" >&2;} user_libaio=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -latomic is required" >&5 -printf %s "checking whether -latomic is required... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -latomic is required" >&5 +$as_echo_n "checking whether -latomic is required... " >&6; } saved_libs="$LIBS" LIBS="$LIBS -latomic" @@ -68766,15 +70694,14 @@ /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : LIBS="$saved_libs" saved_cflags="$CFLAGS" @@ -68783,41 +70710,40 @@ /* end confdefs.h. */ #include "lib/libspl/atomic.c" int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -else $as_nop +else LIBATOMIC_LIBS="-latomic" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$saved_cflags" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -n "$LIBATOMIC_LIBS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi LIBS="$saved_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libfetch" >&5 -printf %s "checking for libfetch... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfetch" >&5 +$as_echo_n "checking for libfetch... " >&6; } LIBFETCH_LIBS= LIBFETCH_IS_FETCH=0 LIBFETCH_IS_LIBCURL=0 @@ -68835,26 +70761,25 @@ #include int -main (void) +main () { fetchGetURL("", ""); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_libfetch=1 LIBFETCH_IS_FETCH=1 LIBFETCH_DYNAMIC=1 LIBFETCH_SONAME="libfetch.so.6" LIBFETCH_LIBS="-ldl" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: fetch(3)" >&5 -printf "%s\n" "fetch(3)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: fetch(3)" >&5 +$as_echo "fetch(3)" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$saved_libs" @@ -68867,12 +70792,12 @@ LIBFETCH_DYNAMIC=1 LIBFETCH_SONAME="libcurl.so.4" LIBFETCH_LIBS="-ldl" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libcurl" >&5 -printf "%s\n" "libcurl" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcurl" >&5 +$as_echo "libcurl" >&6; } else LIBFETCH_LIBS="$(curl-config --libs)" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libcurl (static)" >&5 -printf "%s\n" "libcurl (static)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcurl (static)" >&5 +$as_echo "libcurl (static)" >&6; } fi CCFLAGS="$CCFLAGS $(curl-config --cflags)" @@ -68880,24 +70805,32 @@ fi if test -z "$have_libfetch"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi -printf "%s\n" "#define LIBFETCH_IS_FETCH $LIBFETCH_IS_FETCH" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_IS_FETCH $LIBFETCH_IS_FETCH +_ACEOF -printf "%s\n" "#define LIBFETCH_IS_LIBCURL $LIBFETCH_IS_LIBCURL" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_IS_LIBCURL $LIBFETCH_IS_LIBCURL +_ACEOF -printf "%s\n" "#define LIBFETCH_DYNAMIC $LIBFETCH_DYNAMIC" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_DYNAMIC $LIBFETCH_DYNAMIC +_ACEOF -printf "%s\n" "#define LIBFETCH_SONAME \"$LIBFETCH_SONAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBFETCH_SONAME "$LIBFETCH_SONAME" +_ACEOF @@ -68908,21 +70841,20 @@ _library_found= _pc_found= - if test -n "" -then : + if test -n ""; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for " >&5 -printf %s "checking for ... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for " >&5 +$as_echo_n "checking for ... " >&6; } if test -n "$AIO_H_CFLAGS"; then pkg_cv_AIO_H_CFLAGS="$AIO_H_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AIO_H_CFLAGS=`$PKG_CONFIG --cflags "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -68936,10 +70868,10 @@ pkg_cv_AIO_H_LIBS="$AIO_H_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\""; } >&5 ($PKG_CONFIG --exists --print-errors "") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AIO_H_LIBS=`$PKG_CONFIG --libs "" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -68953,8 +70885,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -68971,14 +70903,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else AIO_H_CFLAGS=$pkg_cv_AIO_H_CFLAGS AIO_H_LIBS=$pkg_cv_AIO_H_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -68988,12 +70920,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$AIO_H_CFLAGS" != x -then : + if test "x$AIO_H_CFLAGS" != x; then : _header_found=1 fi - if test "x$AIO_H_LIBS" != x -then : + if test "x$AIO_H_LIBS" != x; then : _library_found=1 fi @@ -69011,12 +70941,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : AIO_H_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : AIO_H_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -69027,35 +70955,32 @@ { ac_cv_header_aio_h=; unset ac_cv_header_aio_h;} ac_fn_c_check_header_compile "$LINENO" "aio.h" "ac_cv_header_aio_h" "$ac_includes_default " -if test "x$ac_cv_header_aio_h" = xyes -then : +if test "x$ac_cv_header_aio_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header aio.h for library rt is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : AIO_H_LIBS="$AIO_H_LIBS -lrt" @@ -69063,12 +70988,11 @@ LDFLAGS="$LDFLAGS $AIO_H_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lio_listio in -lrt" >&5 -printf %s "checking for lio_listio in -lrt... " >&6; } -if test ${ac_cv_lib_rt_lio_listio+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lio_listio in -lrt" >&5 +$as_echo_n "checking for lio_listio in -lrt... " >&6; } +if ${ac_cv_lib_rt_lio_listio+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -69077,55 +71001,53 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char lio_listio (); int -main (void) +main () { return lio_listio (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_lio_listio=yes -else $as_nop +else ac_cv_lib_rt_lio_listio=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_lio_listio" >&5 -printf "%s\n" "$ac_cv_lib_rt_lio_listio" >&6; } -if test "x$ac_cv_lib_rt_lio_listio" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_lio_listio" >&5 +$as_echo "$ac_cv_lib_rt_lio_listio" >&6; } +if test "x$ac_cv_lib_rt_lio_listio" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library rt is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header aio.h for library rt See \`config.log' for more details" "$LINENO" 5; } @@ -69140,29 +71062,27 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : fi -printf "%s\n" "#define HAVE_AIO_H 1" >>confdefs.h +$as_echo "#define HAVE_AIO_H 1" >>confdefs.h -else $as_nop +else AIO_H_CFLAGS="" AIO_H_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find rt via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find rt via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find rt via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find rt via pkg-config or in the standard locations" >&2;} fi @@ -69170,17 +71090,15 @@ ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes -then : +if test "x$ac_cv_func_clock_gettime" = xyes; then : -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -printf %s "checking for clock_gettime in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -69189,36 +71107,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_gettime (); int -main (void) +main () { return clock_gettime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes -else $as_nop +else ac_cv_lib_rt_clock_gettime=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : LIBCLOCK_GETTIME=-lrt -else $as_nop +else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "*** clock_gettime is missing in libc and librt See \`config.log' for more details" "$LINENO" 5; } @@ -69230,59 +71149,55 @@ # Check whether --enable-pam was given. -if test ${enable_pam+y} -then : +if test "${enable_pam+set}" = set; then : enableval=$enable_pam; enable_pam=$enableval -else $as_nop +else enable_pam=check fi # Check whether --with-pammoduledir was given. -if test ${with_pammoduledir+y} -then : +if test "${with_pammoduledir+set}" = set; then : withval=$with_pammoduledir; pammoduledir="$withval" -else $as_nop +else pammoduledir=$libdir/security fi # Check whether --with-pamconfigsdir was given. -if test ${with_pamconfigsdir+y} -then : +if test "${with_pamconfigsdir+set}" = set; then : withval=$with_pamconfigsdir; pamconfigsdir="$withval" -else $as_nop +else pamconfigsdir='${datadir}/pam-configs' fi - if test "x$enable_pam" != "xno" -then : + if test "x$enable_pam" != "xno"; then : - for ac_header in security/pam_modules.h + for ac_header in security/pam_modules.h do : - ac_fn_c_check_header_compile "$LINENO" "security/pam_modules.h" "ac_cv_header_security_pam_modules_h" "$ac_includes_default" -if test "x$ac_cv_header_security_pam_modules_h" = xyes -then : - printf "%s\n" "#define HAVE_SECURITY_PAM_MODULES_H 1" >>confdefs.h + ac_fn_c_check_header_mongrel "$LINENO" "security/pam_modules.h" "ac_cv_header_security_pam_modules_h" "$ac_includes_default" +if test "x$ac_cv_header_security_pam_modules_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SECURITY_PAM_MODULES_H 1 +_ACEOF enable_pam=yes -else $as_nop +else - if test "x$enable_pam" = "xyes" -then : + if test "x$enable_pam" = "xyes"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? " *** security/pam_modules.h missing, libpam0g-dev package required See \`config.log' for more details" "$LINENO" 5; } -else $as_nop +else enable_pam=no @@ -69292,9 +71207,9 @@ done + fi - if test "x$enable_pam" = "xyes" -then : + if test "x$enable_pam" = "xyes"; then : DEFINE_PAM='--with pam' @@ -69313,12 +71228,11 @@ LIBS_save="${LIBS}" LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 -printf %s "checking for library containing backtrace... " >&6; } -if test ${ac_cv_search_backtrace+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +$as_echo_n "checking for library containing backtrace... " >&6; } +if ${ac_cv_search_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -69326,52 +71240,50 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char backtrace (); int -main (void) +main () { return backtrace (); ; return 0; } _ACEOF -for ac_lib in '' execinfo -do +for ac_lib in '' execinfo; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_backtrace=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_backtrace+y} -then : + if ${ac_cv_search_backtrace+:} false; then : break fi done -if test ${ac_cv_search_backtrace+y} -then : +if ${ac_cv_search_backtrace+:} false; then : -else $as_nop +else ac_cv_search_backtrace=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 -printf "%s\n" "$ac_cv_search_backtrace" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +$as_echo "$ac_cv_search_backtrace" >&6; } ac_res=$ac_cv_search_backtrace -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h +$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h BACKTRACE_LIBS="$LIBS" @@ -69390,16 +71302,14 @@ # Check whether --with-libunwind was given. -if test ${with_libunwind+y} -then : +if test "${with_libunwind+set}" = set; then : withval=$with_libunwind; -else $as_nop +else with_libunwind=auto fi - if test "x$with_libunwind" != "xno" -then : + if test "x$with_libunwind" != "xno"; then : @@ -69408,21 +71318,20 @@ _library_found= _pc_found= - if test -n "libunwind" -then : + if test -n "libunwind"; then : pkg_failed=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5 -printf %s "checking for libunwind... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5 +$as_echo_n "checking for libunwind... " >&6; } if test -n "$LIBUNWIND_CFLAGS"; then pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -69436,10 +71345,10 @@ pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -69453,8 +71362,8 @@ if test $pkg_failed = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -69471,14 +71380,14 @@ : elif test $pkg_failed = untried; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } : else LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } _header_found=1 _library_found=1 @@ -69488,12 +71397,10 @@ fi # set _header_found/_library_found if the user passed in CFLAGS/LIBS - if test "x$LIBUNWIND_CFLAGS" != x -then : + if test "x$LIBUNWIND_CFLAGS" != x; then : _header_found=1 fi - if test "x$LIBUNWIND_LIBS" != x -then : + if test "x$LIBUNWIND_LIBS" != x; then : _library_found=1 fi @@ -69511,12 +71418,10 @@ for _prefixdir in /usr /usr/local do - if test "x$_prefixdir" != "x/usr" -then : + if test "x$_prefixdir" != "x/usr"; then : LIBUNWIND_CFLAGS="-I$lt_sysroot$_prefixdir/include" - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUNWIND_LIBS="-L$lt_sysroot$_prefixdir/lib" @@ -69527,35 +71432,32 @@ { ac_cv_header_libunwind_h=; unset ac_cv_header_libunwind_h;} ac_fn_c_check_header_compile "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default " -if test "x$ac_cv_header_libunwind_h" = xyes -then : +if test "x$ac_cv_header_libunwind_h" = xyes; then : _header_found=1 break -else $as_nop - if test "x$_header_found" = "x1" -then : +else + if test "x$_header_found" = "x1"; then : # if pkg-config or the user set CFLAGS, fail if the header is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "header libunwind.h for library unwind is not usable See \`config.log' for more details" "$LINENO" 5; } fi fi + # search for header under HEADER-PREFIXES done - if test "x$_header_found" = "x1" -then : + if test "x$_header_found" = "x1"; then : - if test "x$_library_found" = x -then : + if test "x$_library_found" = x; then : LIBUNWIND_LIBS="$LIBUNWIND_LIBS -lunwind" @@ -69563,12 +71465,11 @@ LDFLAGS="$LDFLAGS $LIBUNWIND_LIBS" _libcheck=1 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lunwind" >&5 -printf %s "checking for main in -lunwind... " >&6; } -if test ${ac_cv_lib_unwind_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lunwind" >&5 +$as_echo_n "checking for main in -lunwind... " >&6; } +if ${ac_cv_lib_unwind_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lunwind $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -69576,53 +71477,48 @@ int -main (void) +main () { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_unwind_main=yes -else $as_nop +else ac_cv_lib_unwind_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_main" >&5 -printf "%s\n" "$ac_cv_lib_unwind_main" >&6; } -if test "x$ac_cv_lib_unwind_main" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_main" >&5 +$as_echo "$ac_cv_lib_unwind_main" >&6; } +if test "x$ac_cv_lib_unwind_main" = xyes; then : : -else $as_nop +else _libcheck= fi - if test "x$_libcheck" = "x1" -then : + if test "x$_libcheck" = "x1"; then : _library_found=1 -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if pkg-config or the user set LIBS, fail if the library is unusable - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "library unwind is not usable See \`config.log' for more details" "$LINENO" 5; } fi -elif test "x$_library_found" = "x1" -then : +elif test "x$_library_found" = "x1"; then : # if the user set LIBS, fail if we didn't find the header - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find header libunwind.h for library unwind See \`config.log' for more details" "$LINENO" 5; } @@ -69637,20 +71533,18 @@ LIBS="${LIBS_save}" - if test "x$_header_found" = "x1" && test "x$_library_found" = "x1" -then : + if test "x$_header_found" = "x1" && test "x$_library_found" = "x1"; then : - if test "x$_pc_found" = "x1" -then : + if test "x$_pc_found" = "x1"; then : LIBUNWIND_PC=libunwind fi -printf "%s\n" "#define HAVE_LIBUNWIND 1" >>confdefs.h +$as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h @@ -69663,8 +71557,8 @@ CFLAGS="$CFLAGS $LIBUNWIND_CFLAGS" LIBS="$LIBS $LIBUNWIND_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unw_get_elf_filename in libunwind" >&5 -printf %s "checking for unw_get_elf_filename in libunwind... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_get_elf_filename in libunwind" >&5 +$as_echo_n "checking for unw_get_elf_filename in libunwind... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -69673,7 +71567,7 @@ #include int -main (void) +main () { unw_get_elf_filename(0, 0, 0, 0); @@ -69683,23 +71577,56 @@ } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_LIBUNWIND_ELF 1" >>confdefs.h +$as_echo "#define HAVE_LIBUNWIND_ELF 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libunwind is llvm libunwind" >&5 +$as_echo_n "checking whether libunwind is llvm libunwind... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + #if !defined(_LIBUNWIND_HIGHEST_DWARF_REGISTER) + #error "_LIBUNWIND_HIGHEST_DWARF_REGISTER is not defined" + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define IS_LIBUNWIND_LLVM 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="${CPPFLAGS_save}" CFLAGS="${CFLAGS_save}" @@ -69710,19 +71637,18 @@ -else $as_nop +else LIBUNWIND_CFLAGS="" LIBUNWIND_LIBS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find unwind via pkg-config or in the standard locations" >&5 -printf "%s\n" "$as_me: WARNING: cannot find unwind via pkg-config or in the standard locations" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find unwind via pkg-config or in the standard locations" >&5 +$as_echo "$as_me: WARNING: cannot find unwind via pkg-config or in the standard locations" >&2;} - if test "x$with_libunwind" = "xyes" -then : + if test "x$with_libunwind" = "xyes"; then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--with-libunwind was given, but libunwind is not available, try installing libunwind-devel See \`config.log' for more details" "$LINENO" 5; } @@ -69741,15 +71667,15 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/sysmacros.h" >&5 -printf %s "checking makedev() is declared in sys/sysmacros.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/sysmacros.h" >&5 +$as_echo_n "checking makedev() is declared in sys/sysmacros.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int k; @@ -69759,33 +71685,32 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MAKEDEV_IN_SYSMACROS 1" >>confdefs.h +$as_echo "#define HAVE_MAKEDEV_IN_SYSMACROS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/mkdev.h" >&5 -printf %s "checking makedev() is declared in sys/mkdev.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking makedev() is declared in sys/mkdev.h" >&5 +$as_echo_n "checking makedev() is declared in sys/mkdev.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int k; @@ -69795,30 +71720,28 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MAKEDEV_IN_MKDEV 1" >>confdefs.h +$as_echo "#define HAVE_MAKEDEV_IN_MKDEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check whether --with-zfsexecdir was given. -if test ${with_zfsexecdir+y} -then : +if test "${with_zfsexecdir+set}" = set; then : withval=$with_zfsexecdir; zfsexecdir=$withval -else $as_nop +else zfsexecdir="${libexecdir}/zfs" fi @@ -69826,42 +71749,17 @@ - ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe" -if test "x$ac_cv_func_execvpe" = xyes -then : - printf "%s\n" "#define HAVE_EXECVPE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" -if test "x$ac_cv_func_issetugid" = xyes -then : - printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall" -if test "x$ac_cv_func_mlockall" = xyes -then : - printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = xyes -then : - printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes -then : - printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "gettid" "ac_cv_func_gettid" -if test "x$ac_cv_func_gettid" = xyes -then : - printf "%s\n" "#define HAVE_GETTID 1" >>confdefs.h + for ac_func in execvpe issetugid mlockall strlcat strlcpy gettid +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done @@ -69872,44 +71770,38 @@ # Check whether --with-linux was given. -if test ${with_linux+y} -then : +if test "${with_linux+set}" = set; then : withval=$with_linux; kernelsrc="$withval" fi # Check whether --with-linux-obj was given. -if test ${with_linux_obj+y} -then : +if test "${with_linux_obj+set}" = set; then : withval=$with_linux_obj; kernelbuild="$withval" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel source and build directories" >&5 -printf %s "checking kernel source and build directories... " >&6; } - if test -n "$kernelsrc" && test -z "$kernelbuild" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source and build directories" >&5 +$as_echo_n "checking kernel source and build directories... " >&6; } + if test -n "$kernelsrc" && test -z "$kernelbuild"; then : kernelbuild="$kernelsrc" -elif test -z "$kernelsrc" -then : +elif test -z "$kernelsrc"; then : if test -e "/lib/modules/$(uname -r)/source" && \ - test -e "/lib/modules/$(uname -r)/build" -then : + test -e "/lib/modules/$(uname -r)/build"; then : src="/lib/modules/$(uname -r)/source" build="/lib/modules/$(uname -r)/build" -elif test -e "/lib/modules/$(uname -r)/build" -then : +elif test -e "/lib/modules/$(uname -r)/build"; then : build="/lib/modules/$(uname -r)/build" src="$build" -else $as_nop +else src= @@ -69936,31 +71828,28 @@ fi - if test -n "$src" && test -e "$src" -then : + if test -n "$src" && test -e "$src"; then : kernelsrc=$(readlink -e "$src") -else $as_nop +else kernelsrc="Not found" fi - if test -n "$build" && test -e "$build" -then : + if test -n "$build" && test -e "$build"; then : kernelbuild=$(readlink -e "$build") -else $as_nop +else kernelbuild="Not found" fi -else $as_nop +else - if test "$kernelsrc" = "NONE" -then : + if test "$kernelsrc" = "NONE"; then : kernsrcver=NONE @@ -69969,18 +71858,17 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel source directory" >&5 -printf %s "checking kernel source directory... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kernelsrc" >&5 -printf "%s\n" "$kernelsrc" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel build directory" >&5 -printf %s "checking kernel build directory... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kernelbuild" >&5 -printf "%s\n" "$kernelbuild" >&6; } - if test ! -d "$kernelsrc" || test ! -d "$kernelbuild" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source directory" >&5 +$as_echo_n "checking kernel source directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelsrc" >&5 +$as_echo "$kernelsrc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel build directory" >&5 +$as_echo_n "checking kernel build directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelbuild" >&5 +$as_echo "$kernelbuild" >&6; } + if test ! -d "$kernelsrc" || test ! -d "$kernelbuild"; then : as_fn_error $? " *** Please make sure the kernel devel package for your distribution @@ -69990,47 +71878,42 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel source version" >&5 -printf %s "checking kernel source version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source version" >&5 +$as_echo_n "checking kernel source version... " >&6; } utsrelease1=$kernelbuild/include/linux/version.h utsrelease2=$kernelbuild/include/linux/utsrelease.h utsrelease3=$kernelbuild/include/generated/utsrelease.h - if test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1 -then : + if test -r $utsrelease1 && grep -qF UTS_RELEASE $utsrelease1; then : utsrelease=$utsrelease1 -elif test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2 -then : +elif test -r $utsrelease2 && grep -qF UTS_RELEASE $utsrelease2; then : utsrelease=$utsrelease2 -elif test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3 -then : +elif test -r $utsrelease3 && grep -qF UTS_RELEASE $utsrelease3; then : utsrelease=$utsrelease3 fi - if test -n "$utsrelease" -then : + if test -n "$utsrelease"; then : kernsrcver=$($AWK '/UTS_RELEASE/ { gsub(/"/, "", $3); print $3 }' $utsrelease) - if test -z "$kernsrcver" -then : + if test -z "$kernsrcver"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 -printf "%s\n" "Not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 +$as_echo "Not found" >&6; } as_fn_error $? " *** Cannot determine kernel version. " "$LINENO" 5 fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 -printf "%s\n" "Not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5 +$as_echo "Not found" >&6; } if test "x$enable_linux_builtin" != xyes; then as_fn_error $? " *** Cannot find UTS_RELEASE definition. @@ -70043,54 +71926,11 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kernsrcver" >&5 -printf "%s\n" "$kernsrcver" >&6; } - - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "$kernsrcver" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "$ZFS_META_KVER_MIN" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - : - else - as_fn_error $? " - *** Cannot build against kernel version $kernsrcver. - *** The minimum supported kernel version is $ZFS_META_KVER_MIN. - " "$LINENO" 5 - - fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernsrcver" >&5 +$as_echo "$kernsrcver" >&6; } # Check whether --enable-linux-experimental was given. -if test ${enable_linux_experimental+y} -then : +if test "${enable_linux_experimental+set}" = set; then : enableval=$enable_linux_experimental; fi @@ -70188,17 +72028,15 @@ fi - if test "x$kern_max_version_ok" != "xyes" -then : + if test "x$kern_max_version_ok" != "xyes"; then : - if test "x$enable_linux_experimental" == "xyes" -then : + if test "x$enable_linux_experimental" == "xyes"; then : -printf "%s\n" "#define HAVE_LINUX_EXPERIMENTAL 1" >>confdefs.h +$as_echo "#define HAVE_LINUX_EXPERIMENTAL 1" >>confdefs.h -else $as_nop +else as_fn_error $? " *** Cannot build against kernel version $kernsrcver. @@ -70222,12 +72060,10 @@ # Check whether --with-qat was given. -if test ${with_qat+y} -then : - withval=$with_qat; if test "$withval" = "yes" -then : +if test "${with_qat+set}" = set; then : + withval=$with_qat; if test "$withval" = "yes"; then : as_fn_error $? "--with-qat=PATH requires a PATH" "$LINENO" 5 -else $as_nop +else qatsrc="$withval" fi fi @@ -70235,22 +72071,19 @@ # Check whether --with-qat-obj was given. -if test ${with_qat_obj+y} -then : +if test "${with_qat_obj+set}" = set; then : withval=$with_qat_obj; qatbuild="$withval" fi - if test ! -z "${qatsrc}" -then : + if test ! -z "${qatsrc}"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking qat source directory" >&5 -printf %s "checking qat source directory... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qatsrc" >&5 -printf "%s\n" "$qatsrc" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking qat source directory" >&5 +$as_echo_n "checking qat source directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qatsrc" >&5 +$as_echo "$qatsrc" >&6; } QAT_SRC="${qatsrc}/quickassist" - if test ! -e "$QAT_SRC/include/cpa.h" -then : + if test ! -e "$QAT_SRC/include/cpa.h"; then : as_fn_error $? " *** Please make sure the qat driver package is installed @@ -70263,23 +72096,20 @@ fi - if test ! -z "${qatsrc}" -then : + if test ! -z "${qatsrc}"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking qat build directory" >&5 -printf %s "checking qat build directory... " >&6; } - if test -z "$qatbuild" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking qat build directory" >&5 +$as_echo_n "checking qat build directory... " >&6; } + if test -z "$qatbuild"; then : qatbuild="${qatsrc}/build" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $qatbuild" >&5 -printf "%s\n" "$qatbuild" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qatbuild" >&5 +$as_echo "$qatbuild" >&6; } QAT_OBJ=${qatbuild} - if ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko" -then : + if ! test -e "$QAT_OBJ/icp_qa_al.ko" && ! test -e "$QAT_OBJ/qat_api.ko"; then : as_fn_error $? " *** Please make sure the qat driver is installed then try again. @@ -70292,26 +72122,24 @@ -printf "%s\n" "#define HAVE_QAT 1" >>confdefs.h +$as_echo "#define HAVE_QAT 1" >>confdefs.h fi - if test ! -z "${qatsrc}" -then : + if test ! -z "${qatsrc}"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking qat file for module symbols" >&5 -printf %s "checking qat file for module symbols... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking qat file for module symbols" >&5 +$as_echo_n "checking qat file for module symbols... " >&6; } QAT_SYMBOLS=$QAT_SRC/lookaside/access_layer/src/Module.symvers - if test -r $QAT_SYMBOLS -then : + if test -r $QAT_SYMBOLS; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $QAT_SYMBOLS" >&5 -printf "%s\n" "$QAT_SYMBOLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QAT_SYMBOLS" >&5 +$as_echo "$QAT_SYMBOLS" >&6; } -else $as_nop +else as_fn_error $? " *** Please make sure the qat driver is installed then try again. @@ -70329,8 +72157,7 @@ cachevar="zfs_cv_kernel_config_modules_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_modules || mkdir -p build/config_modules @@ -70375,14 +72202,12 @@ echo "obj-m := config_modules.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_modules/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_modules_license || mkdir -p build/config_modules_license @@ -70427,8 +72252,7 @@ echo "obj-m := config_modules_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_modules_license/" >>build/Makefile fi @@ -70442,8 +72266,7 @@ cachevar="zfs_cv_kernel_config_block_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_block || mkdir -p build/config_block @@ -70488,14 +72311,12 @@ echo "obj-m := config_block.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_block/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_block_license || mkdir -p build/config_block_license @@ -70540,8 +72361,7 @@ echo "obj-m := config_block_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_block_license/" >>build/Makefile fi @@ -70555,8 +72375,7 @@ cachevar="zfs_cv_kernel_config_debug_lock_alloc_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_debug_lock_alloc || mkdir -p build/config_debug_lock_alloc @@ -70605,14 +72424,12 @@ echo "obj-m := config_debug_lock_alloc.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_debug_lock_alloc/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/config_debug_lock_alloc_license || mkdir -p build/config_debug_lock_alloc_license @@ -70661,8 +72478,7 @@ echo "obj-m := config_debug_lock_alloc_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_debug_lock_alloc_license/" >>build/Makefile fi @@ -70676,8 +72492,7 @@ cachevar="zfs_cv_kernel_config_trim_unusued_ksyms_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_trim_unusued_ksyms || mkdir -p build/config_trim_unusued_ksyms @@ -70722,14 +72537,12 @@ echo "obj-m := config_trim_unusued_ksyms.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_trim_unusued_ksyms/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_trim_unusued_ksyms_license || mkdir -p build/config_trim_unusued_ksyms_license @@ -70774,8 +72587,7 @@ echo "obj-m := config_trim_unusued_ksyms_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_trim_unusued_ksyms_license/" >>build/Makefile fi @@ -70789,8 +72601,7 @@ cachevar="zfs_cv_kernel_config_zlib_deflate_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_zlib_deflate || mkdir -p build/config_zlib_deflate @@ -70836,14 +72647,12 @@ echo "obj-m := config_zlib_deflate.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_deflate/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_zlib_deflate_license || mkdir -p build/config_zlib_deflate_license @@ -70889,8 +72698,7 @@ echo "obj-m := config_zlib_deflate_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_deflate_license/" >>build/Makefile fi @@ -70904,8 +72712,7 @@ cachevar="zfs_cv_kernel_config_zlib_inflate_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/config_zlib_inflate || mkdir -p build/config_zlib_inflate @@ -70951,14 +72758,12 @@ echo "obj-m := config_zlib_inflate.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_inflate/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/config_zlib_inflate_license || mkdir -p build/config_zlib_inflate_license @@ -71004,8 +72809,7 @@ echo "obj-m := config_zlib_inflate_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += config_zlib_inflate_license/" >>build/Makefile fi @@ -71016,8 +72820,48 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kernel config option compatibility" >&5 -printf %s "checking for kernel config option compatibility... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel config option compatibility" >&5 +$as_echo_n "checking for kernel config option compatibility... " >&6; } + + if test "x" != "x"; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking " >&5 +$as_echo_n "checking ... " >&6; } + + if test "x$silent" != "xyes" -a -t 6; then : + + _zfs_linux_test_progress_text="" + + ( + total=$(wc -l < build/Makefile) + count=0 + + while kill -0 $$ 2>/dev/null ; do + + if test "$count" -lt "$total" ; then + if ! test -f build/build.log ; then + count=$total + else + count_n=$(awk '/CC/ && /\/[^\.]+\.o$/ { c++ } END { print c }' build/build.log 2>/dev/null) + if test "x$count_n" != "x" ; then + count=$count_n + fi + fi + + printf '\rchecking %s... %d/%d' "" "$count" "$total" >&6 + fi + + sleep 0.5 + done + ) & + + _zfs_linux_test_progress_pid=$! + +fi + + +fi @@ -71037,20 +72881,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/Makefile build/Makefile.compile.config mv build/build.log build/build.log.config -else $as_nop +else as_fn_error $? " *** Unable to compile test source to determine kernel interfaces." "$LINENO" 5 @@ -71059,17 +72902,14 @@ - if test "x$enable_linux_builtin" = "xno" -then : + if test "x$enable_linux_builtin" = "xno"; then : for dir in $(awk '/^obj-m/ { print $3 }' \ build/Makefile.compile.config); do name=${dir%/} - if test -f build/$name/$name.o -then : + if test -f build/$name/$name.o; then : - if test "${name##*_}" = "license" -then : + if test "${name##*_}" = "license"; then : @@ -71089,20 +72929,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/$name/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/$name/Makefile build/$name/Makefile.modpost.config cat build/$name/build.log >>build/build.log.config -else $as_nop +else as_fn_error $? " *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 @@ -71112,13 +72951,13 @@ echo "obj-n += $dir" >>build/Makefile -else $as_nop +else echo "obj-m += $dir" >>build/Makefile fi -else $as_nop +else echo "obj-n += $dir" >>build/Makefile @@ -71143,20 +72982,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/Makefile build/Makefile.modpost.config cat build/build.log >>build/build.log.config -else $as_nop +else as_fn_error $? " *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 @@ -71165,13 +73003,12 @@ -else $as_nop +else for dir in $(awk '/^obj-m/ { print $3 }' \ build/Makefile.compile.config); do name=${dir%/} - if test -f build/$name/$name.o -then : + if test -f build/$name/$name.o; then : touch build/$name/$name.ko @@ -71180,37 +73017,52 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + if test "x" != "x"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_MODULES is defined" >&5 -printf %s "checking whether CONFIG_MODULES is defined... " >&6; } - if test "x$enable_linux_builtin" != xyes -then : + if test "x$_zfs_linux_test_progress_pid" != "x"; then : + + kill $_zfs_linux_test_progress_pid 2>/dev/null + wait $_zfs_linux_test_progress_pid 2>/dev/null + printf '\r\033\1332Kchecking %s... ' "$_zfs_linux_test_progress_text" >&6 + _zfs_linux_test_progress_pid= + _zfs_linux_test_progress_text= + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_MODULES is defined" >&5 +$as_echo_n "checking whether CONFIG_MODULES is defined... " >&6; } + if test "x$enable_linux_builtin" != xyes; then : cachevar="zfs_cv_kernel_config_modules_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_modules -then : + if test -d build/config_modules; then : - if test -f build/config_modules/config_modules.ko -then : + if test -f build/config_modules/config_modules.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_modules\" test, check that @@ -71222,16 +73074,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required loadable module *** support! @@ -71255,11 +73106,10 @@ fi -else $as_nop +else - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -71315,8 +73165,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -71337,23 +73186,22 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 -printf "%s\n" "not needed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 +$as_echo "not needed" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: error" >&5 -printf "%s\n" "error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } as_fn_error $? " *** This kernel is unable to compile object files. *** @@ -71365,7 +73213,7 @@ -else $as_nop +else @@ -71421,8 +73269,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -71443,23 +73290,22 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 -printf "%s\n" "not needed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5 +$as_echo "not needed" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: error" >&5 -printf "%s\n" "error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5 +$as_echo "error" >&6; } as_fn_error $? " *** This kernel is unable to compile object files. *** @@ -71477,30 +73323,27 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_BLOCK is defined" >&5 -printf %s "checking whether CONFIG_BLOCK is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_BLOCK is defined" >&5 +$as_echo_n "checking whether CONFIG_BLOCK is defined... " >&6; } cachevar="zfs_cv_kernel_config_block_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_block -then : + if test -d build/config_block; then : - if test -f build/config_block/config_block.ko -then : + if test -f build/config_block/config_block.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_block\" test, check that @@ -71512,16 +73355,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required block device support. *** Rebuild the kernel with CONFIG_BLOCK=y set." "$LINENO" 5 @@ -71530,30 +73372,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mutex_lock() is GPL-only" >&5 -printf %s "checking whether mutex_lock() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mutex_lock() is GPL-only" >&5 +$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_config_debug_lock_alloc_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_debug_lock_alloc_license -then : + if test -d build/config_debug_lock_alloc_license; then : - if test -f build/config_debug_lock_alloc_license/config_debug_lock_alloc_license.ko -then : + if test -f build/config_debug_lock_alloc_license/config_debug_lock_alloc_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_debug_lock_alloc_license\" test, check that @@ -71565,16 +73404,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } as_fn_error $? " *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible *** with the CDDL license and will prevent the module linking stage @@ -71585,30 +73423,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5 -printf %s "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_TRIM_UNUSED_KSYM is disabled" >&5 +$as_echo_n "checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... " >&6; } cachevar="zfs_cv_kernel_config_trim_unusued_ksyms_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_trim_unusued_ksyms -then : + if test -d build/config_trim_unusued_ksyms; then : - if test -f build/config_trim_unusued_ksyms/config_trim_unusued_ksyms.ko -then : + if test -f build/config_trim_unusued_ksyms/config_trim_unusued_ksyms.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_trim_unusued_ksyms\" test, check that @@ -71620,18 +73455,16 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - if test "x$enable_linux_builtin" != xyes -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "x$enable_linux_builtin" != xyes; then : as_fn_error $? " *** This kernel has unused symbols trimming enabled, please disable. @@ -71643,30 +73476,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5 -printf %s "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_DEFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_DEFLATE is defined... " >&6; } cachevar="zfs_cv_kernel_config_zlib_deflate_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_zlib_deflate -then : + if test -d build/config_zlib_deflate; then : - if test -f build/config_zlib_deflate/config_zlib_deflate.ko -then : + if test -f build/config_zlib_deflate/config_zlib_deflate.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_zlib_deflate\" test, check that @@ -71678,16 +73508,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required zlib deflate support. *** Rebuild the kernel with CONFIG_ZLIB_DEFLATE=y|m set." "$LINENO" 5 @@ -71696,30 +73525,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_INFLATE is defined" >&5 -printf %s "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_ZLIB_INFLATE is defined" >&5 +$as_echo_n "checking whether CONFIG_ZLIB_INFLATE is defined... " >&6; } cachevar="zfs_cv_kernel_config_zlib_inflate_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/config_zlib_inflate -then : + if test -d build/config_zlib_inflate; then : - if test -f build/config_zlib_inflate/config_zlib_inflate.ko -then : + if test -f build/config_zlib_inflate/config_zlib_inflate.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"config_zlib_inflate\" test, check that @@ -71731,16 +73557,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** This kernel does not include the required zlib inflate support. *** Rebuild the kernel with CONFIG_ZLIB_INFLATE=y|m set." "$LINENO" 5 @@ -71751,24 +73576,21 @@ modpost=$LINUX/scripts/Makefile.modpost - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel file name for module symbols" >&5 -printf %s "checking kernel file name for module symbols... " >&6; } - if test "x$enable_linux_builtin" != xyes -a -f "$modpost" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel file name for module symbols" >&5 +$as_echo_n "checking kernel file name for module symbols... " >&6; } + if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then : - if grep -q Modules.symvers $modpost -then : + if grep -q Modules.symvers $modpost; then : LINUX_SYMBOLS=Modules.symvers -else $as_nop +else LINUX_SYMBOLS=Module.symvers fi - if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS" -then : + if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then : as_fn_error $? " *** Please make sure the kernel devel package for your distribution @@ -71779,22 +73601,21 @@ fi -else $as_nop +else LINUX_SYMBOLS=NONE fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINUX_SYMBOLS" >&5 -printf "%s\n" "$LINUX_SYMBOLS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_SYMBOLS" >&5 +$as_echo "$LINUX_SYMBOLS" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpu headers are available" >&5 -printf %s "checking whether fpu headers are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpu headers are available" >&5 +$as_echo_n "checking whether fpu headers are available... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -71854,8 +73675,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -71876,23 +73696,21 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -71952,8 +73770,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -71974,32 +73791,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi -else $as_nop +else @@ -72059,8 +73875,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72081,26 +73896,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi @@ -72109,16 +73923,16 @@ fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 -printf "%s\n" "i387.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 +$as_echo "i387.h" >&6; } fi -else $as_nop +else @@ -72178,8 +73992,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72200,23 +74013,21 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_API_HEADER 1" >>confdefs.h - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -72276,8 +74087,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72298,32 +74108,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi -else $as_nop +else @@ -72383,8 +74192,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72405,26 +74213,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 -printf "%s\n" "asm/fpu/api.h asm/fpu/internal.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h asm/fpu/internal.h" >&5 +$as_echo "asm/fpu/api.h asm/fpu/internal.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 -printf "%s\n" "asm/fpu/api.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: asm/fpu/api.h" >&5 +$as_echo "asm/fpu/api.h" >&6; } fi @@ -72433,10 +74240,10 @@ fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 -printf "%s\n" "i387.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: i387.h" >&5 +$as_echo "i387.h" >&6; } fi @@ -72447,11 +74254,10 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether objtool header is available" >&5 -printf %s "checking whether objtool header is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether objtool header is available" >&5 +$as_echo_n "checking whether objtool header is available... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -72510,8 +74316,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72532,32 +74337,33 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + objtool_header=$LINUX/include/linux/objtool.h -printf "%s\n" "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 -printf "%s\n" "linux/objtool.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 +$as_echo "linux/objtool.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 -printf "%s\n" "linux/frame.h" >&6; } + objtool_header=$LINUX/include/linux/frame.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 +$as_echo "linux/frame.h" >&6; } fi -else $as_nop +else @@ -72616,8 +74422,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72638,26 +74443,27 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + objtool_header=$LINUX/include/linux/objtool.h -printf "%s\n" "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_OBJTOOL_HEADER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 -printf "%s\n" "linux/objtool.h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/objtool.h" >&5 +$as_echo "linux/objtool.h" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 -printf "%s\n" "linux/frame.h" >&6; } + objtool_header=$LINUX/include/linux/frame.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux/frame.h" >&5 +$as_echo "linux/frame.h" >&6; } fi @@ -72667,24 +74473,25 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/zfs minor is available" >&5 -printf %s "checking whether /dev/zfs minor is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zfs minor is available" >&5 +$as_echo_n "checking whether /dev/zfs minor is available... " >&6; } for i in $(seq 249 -1 200); do if ! grep -q "^#define\s\+.*_MINOR\s\+.*$i" \ ${LINUX}/include/linux/miscdevice.h; then ZFS_DEVICE_MINOR="$i" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZFS_DEVICE_MINOR" >&5 -printf "%s\n" "$ZFS_DEVICE_MINOR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZFS_DEVICE_MINOR" >&5 +$as_echo "$ZFS_DEVICE_MINOR" >&6; } -printf "%s\n" "#define ZFS_DEVICE_MINOR $ZFS_DEVICE_MINOR" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ZFS_DEVICE_MINOR $ZFS_DEVICE_MINOR +_ACEOF break fi done - if test -z "$ZFS_DEVICE_MINOR" -then : + if test -z "$ZFS_DEVICE_MINOR"; then : as_fn_error $? " *** No available misc minor numbers available for use." "$LINENO" 5 @@ -72692,11 +74499,10 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DECLARE_EVENT_CLASS() is available" >&5 -printf %s "checking whether DECLARE_EVENT_CLASS() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DECLARE_EVENT_CLASS() is available" >&5 +$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -72795,8 +74601,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72817,32 +74622,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h +$as_echo "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else @@ -72941,8 +74745,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -72963,26 +74766,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h +$as_echo "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -72999,8 +74801,7 @@ cachevar="zfs_cv_kernel_type_intptr_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/type_intptr_t || mkdir -p build/type_intptr_t @@ -73045,14 +74846,12 @@ echo "obj-m := type_intptr_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_intptr_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/type_intptr_t_license || mkdir -p build/type_intptr_t_license @@ -73097,8 +74896,7 @@ echo "obj-m := type_intptr_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_intptr_t_license/" >>build/Makefile fi @@ -73115,8 +74913,7 @@ cachevar="zfs_cv_kernel_objtool_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/objtool || mkdir -p build/objtool @@ -73165,14 +74962,12 @@ echo "obj-m := objtool.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += objtool/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/objtool_license || mkdir -p build/objtool_license @@ -73221,8 +75016,7 @@ echo "obj-m := objtool_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += objtool_license/" >>build/Makefile fi @@ -73235,8 +75029,7 @@ cachevar="zfs_cv_kernel_stack_frame_non_standard_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/stack_frame_non_standard || mkdir -p build/stack_frame_non_standard @@ -73287,14 +75080,12 @@ echo "obj-m := stack_frame_non_standard.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += stack_frame_non_standard/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/stack_frame_non_standard_license || mkdir -p build/stack_frame_non_standard_license @@ -73345,8 +75136,7 @@ echo "obj-m := stack_frame_non_standard_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += stack_frame_non_standard_license/" >>build/Makefile fi @@ -73357,11 +75147,119 @@ + cachevar="zfs_cv_kernel_config_objtool_werror_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/config_objtool_werror || mkdir -p build/config_objtool_werror +cat confdefs.h - <<_ACEOF >build/config_objtool_werror/config_objtool_werror.c + +#include + + #if !defined(CONFIG_OBJTOOL_WERROR) + #error "CONFIG_OBJTOOL_WERROR is not defined." + #endif + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/config_objtool_werror || mkdir -p build/config_objtool_werror + + file=build/config_objtool_werror/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/config_objtool_werror + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := config_objtool_werror.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += config_objtool_werror/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/config_objtool_werror_license || mkdir -p build/config_objtool_werror_license +cat confdefs.h - <<_ACEOF >build/config_objtool_werror_license/config_objtool_werror_license.c + +#include + + #if !defined(CONFIG_OBJTOOL_WERROR) + #error "CONFIG_OBJTOOL_WERROR is not defined." + #endif + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/config_objtool_werror_license || mkdir -p build/config_objtool_werror_license + + file=build/config_objtool_werror_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/config_objtool_werror_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := config_objtool_werror_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += config_objtool_werror_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_access_ok_type_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/access_ok_type || mkdir -p build/access_ok_type @@ -73409,14 +75307,12 @@ echo "obj-m := access_ok_type.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += access_ok_type/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/access_ok_type_license || mkdir -p build/access_ok_type_license @@ -73464,8 +75360,7 @@ echo "obj-m := access_ok_type_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += access_ok_type_license/" >>build/Makefile fi @@ -73479,8 +75374,7 @@ cachevar="zfs_cv_kernel_pde_data_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/pde_data || mkdir -p build/pde_data @@ -73525,14 +75419,12 @@ echo "obj-m := pde_data.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pde_data/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/pde_data_license || mkdir -p build/pde_data_license @@ -73577,8 +75469,7 @@ echo "obj-m := pde_data_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pde_data_license/" >>build/Makefile fi @@ -73592,8 +75483,7 @@ cachevar="zfs_cv_kernel_generic_fadvise_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fadvise || mkdir -p build/generic_fadvise @@ -73642,14 +75532,12 @@ echo "obj-m := generic_fadvise.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fadvise/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fadvise_license || mkdir -p build/generic_fadvise_license @@ -73698,8 +75586,7 @@ echo "obj-m := generic_fadvise_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fadvise_license/" >>build/Makefile fi @@ -73714,8 +75601,7 @@ cachevar="zfs_cv_kernel_sched_rt_header_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/sched_rt_header || mkdir -p build/sched_rt_header @@ -73761,14 +75647,12 @@ echo "obj-m := sched_rt_header.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sched_rt_header/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/sched_rt_header_license || mkdir -p build/sched_rt_header_license @@ -73814,8 +75698,7 @@ echo "obj-m := sched_rt_header_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sched_rt_header_license/" >>build/Makefile fi @@ -73830,8 +75713,7 @@ cachevar="zfs_cv_kernel_usleep_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/usleep_range || mkdir -p build/usleep_range @@ -73876,14 +75758,12 @@ echo "obj-m := usleep_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += usleep_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/usleep_range_license || mkdir -p build/usleep_range_license @@ -73928,8 +75808,7 @@ echo "obj-m := usleep_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += usleep_range_license/" >>build/Makefile fi @@ -73943,8 +75822,7 @@ cachevar="zfs_cv_kernel___vmalloc_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/__vmalloc || mkdir -p build/__vmalloc @@ -73992,14 +75870,12 @@ echo "obj-m := __vmalloc.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __vmalloc/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/__vmalloc_license || mkdir -p build/__vmalloc_license @@ -74047,8 +75923,7 @@ echo "obj-m := __vmalloc_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __vmalloc_license/" >>build/Makefile fi @@ -74063,8 +75938,7 @@ cachevar="zfs_cv_kernel_timestamp_truncate_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/timestamp_truncate || mkdir -p build/timestamp_truncate @@ -74113,14 +75987,12 @@ echo "obj-m := timestamp_truncate.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += timestamp_truncate/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/timestamp_truncate_license || mkdir -p build/timestamp_truncate_license @@ -74169,8 +76041,7 @@ echo "obj-m := timestamp_truncate_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += timestamp_truncate_license/" >>build/Makefile fi @@ -74183,8 +76054,7 @@ cachevar="zfs_cv_kernel_inode_get_ctime_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_get_ctime || mkdir -p build/inode_get_ctime @@ -74232,14 +76102,12 @@ echo "obj-m := inode_get_ctime.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_ctime/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_get_ctime_license || mkdir -p build/inode_get_ctime_license @@ -74287,8 +76155,7 @@ echo "obj-m := inode_get_ctime_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_ctime_license/" >>build/Makefile fi @@ -74301,8 +76168,7 @@ cachevar="zfs_cv_kernel_inode_set_ctime_to_ts_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_set_ctime_to_ts || mkdir -p build/inode_set_ctime_to_ts @@ -74351,14 +76217,12 @@ echo "obj-m := inode_set_ctime_to_ts.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_ctime_to_ts/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_set_ctime_to_ts_license || mkdir -p build/inode_set_ctime_to_ts_license @@ -74407,8 +76271,7 @@ echo "obj-m := inode_set_ctime_to_ts_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_ctime_to_ts_license/" >>build/Makefile fi @@ -74421,8 +76284,7 @@ cachevar="zfs_cv_kernel_inode_get_atime_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_get_atime || mkdir -p build/inode_get_atime @@ -74470,14 +76332,12 @@ echo "obj-m := inode_get_atime.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_atime/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_get_atime_license || mkdir -p build/inode_get_atime_license @@ -74525,8 +76385,7 @@ echo "obj-m := inode_get_atime_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_atime_license/" >>build/Makefile fi @@ -74538,8 +76397,7 @@ cachevar="zfs_cv_kernel_inode_get_mtime_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_get_mtime || mkdir -p build/inode_get_mtime @@ -74587,14 +76445,12 @@ echo "obj-m := inode_get_mtime.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_mtime/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_get_mtime_license || mkdir -p build/inode_get_mtime_license @@ -74642,8 +76498,7 @@ echo "obj-m := inode_get_mtime_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_get_mtime_license/" >>build/Makefile fi @@ -74656,8 +76511,7 @@ cachevar="zfs_cv_kernel_inode_set_atime_to_ts_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_set_atime_to_ts || mkdir -p build/inode_set_atime_to_ts @@ -74706,14 +76560,12 @@ echo "obj-m := inode_set_atime_to_ts.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_atime_to_ts/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_set_atime_to_ts_license || mkdir -p build/inode_set_atime_to_ts_license @@ -74762,8 +76614,7 @@ echo "obj-m := inode_set_atime_to_ts_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_atime_to_ts_license/" >>build/Makefile fi @@ -74775,8 +76626,7 @@ cachevar="zfs_cv_kernel_inode_set_mtime_to_ts_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_set_mtime_to_ts || mkdir -p build/inode_set_mtime_to_ts @@ -74825,14 +76675,12 @@ echo "obj-m := inode_set_mtime_to_ts.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_mtime_to_ts/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_set_mtime_to_ts_license || mkdir -p build/inode_set_mtime_to_ts_license @@ -74881,8 +76729,7 @@ echo "obj-m := inode_set_mtime_to_ts_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_set_mtime_to_ts_license/" >>build/Makefile fi @@ -74896,8 +76743,7 @@ cachevar="zfs_cv_kernel_proc_ops_struct_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/proc_ops_struct || mkdir -p build/proc_ops_struct @@ -74961,14 +76807,12 @@ echo "obj-m := proc_ops_struct.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += proc_ops_struct/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/proc_ops_struct_license || mkdir -p build/proc_ops_struct_license @@ -75032,8 +76876,7 @@ echo "obj-m := proc_ops_struct_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += proc_ops_struct_license/" >>build/Makefile fi @@ -75048,8 +76891,7 @@ cachevar="zfs_cv_kernel_block_device_operations_check_events_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_check_events || mkdir -p build/block_device_operations_check_events @@ -75103,14 +76945,12 @@ echo "obj-m := block_device_operations_check_events.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_check_events/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_check_events_license || mkdir -p build/block_device_operations_check_events_license @@ -75164,8 +77004,7 @@ echo "obj-m := block_device_operations_check_events_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_check_events_license/" >>build/Makefile fi @@ -75179,8 +77018,7 @@ cachevar="zfs_cv_kernel_block_device_operations_release_void_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_release_void || mkdir -p build/block_device_operations_release_void @@ -75236,14 +77074,12 @@ echo "obj-m := block_device_operations_release_void.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_release_void_license || mkdir -p build/block_device_operations_release_void_license @@ -75299,8 +77135,7 @@ echo "obj-m := block_device_operations_release_void_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void_license/" >>build/Makefile fi @@ -75314,8 +77149,7 @@ cachevar="zfs_cv_kernel_block_device_operations_release_void_1arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_release_void_1arg || mkdir -p build/block_device_operations_release_void_1arg @@ -75371,14 +77205,12 @@ echo "obj-m := block_device_operations_release_void_1arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void_1arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_release_void_1arg_license || mkdir -p build/block_device_operations_release_void_1arg_license @@ -75434,8 +77266,7 @@ echo "obj-m := block_device_operations_release_void_1arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_release_void_1arg_license/" >>build/Makefile fi @@ -75449,8 +77280,7 @@ cachevar="zfs_cv_kernel_block_device_operations_revalidate_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_revalidate_disk || mkdir -p build/block_device_operations_revalidate_disk @@ -75503,14 +77333,12 @@ echo "obj-m := block_device_operations_revalidate_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_revalidate_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_revalidate_disk_license || mkdir -p build/block_device_operations_revalidate_disk_license @@ -75563,8 +77391,7 @@ echo "obj-m := block_device_operations_revalidate_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_revalidate_disk_license/" >>build/Makefile fi @@ -75576,12 +77403,138 @@ + cachevar="zfs_cv_kernel_block_device_operations_getgeo_gendisk_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/block_device_operations_getgeo_gendisk || mkdir -p build/block_device_operations_getgeo_gendisk +cat confdefs.h - <<_ACEOF >build/block_device_operations_getgeo_gendisk/block_device_operations_getgeo_gendisk.c + +#include + + #include + + static int blk_getgeo(struct gendisk *disk, struct hd_geometry *geo) + { + (void) disk, (void) geo; + return (0); + } + + static const struct block_device_operations + bops __attribute__ ((unused)) = { + .getgeo = blk_getgeo, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/block_device_operations_getgeo_gendisk || mkdir -p build/block_device_operations_getgeo_gendisk + + file=build/block_device_operations_getgeo_gendisk/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/block_device_operations_getgeo_gendisk + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := block_device_operations_getgeo_gendisk.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += block_device_operations_getgeo_gendisk/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/block_device_operations_getgeo_gendisk_license || mkdir -p build/block_device_operations_getgeo_gendisk_license +cat confdefs.h - <<_ACEOF >build/block_device_operations_getgeo_gendisk_license/block_device_operations_getgeo_gendisk_license.c + +#include + + #include + + static int blk_getgeo(struct gendisk *disk, struct hd_geometry *geo) + { + (void) disk, (void) geo; + return (0); + } + + static const struct block_device_operations + bops __attribute__ ((unused)) = { + .getgeo = blk_getgeo, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/block_device_operations_getgeo_gendisk_license || mkdir -p build/block_device_operations_getgeo_gendisk_license + + file=build/block_device_operations_getgeo_gendisk_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/block_device_operations_getgeo_gendisk_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := block_device_operations_getgeo_gendisk_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += block_device_operations_getgeo_gendisk_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_bio_set_op_attrs_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_set_op_attrs || mkdir -p build/bio_set_op_attrs @@ -75627,14 +77580,12 @@ echo "obj-m := bio_set_op_attrs.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_op_attrs/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_set_op_attrs_license || mkdir -p build/bio_set_op_attrs_license @@ -75680,8 +77631,7 @@ echo "obj-m := bio_set_op_attrs_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_op_attrs_license/" >>build/Makefile fi @@ -75695,8 +77645,7 @@ cachevar="zfs_cv_kernel_bio_set_dev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_set_dev || mkdir -p build/bio_set_dev @@ -75744,14 +77693,12 @@ echo "obj-m := bio_set_dev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/bio_set_dev_license || mkdir -p build/bio_set_dev_license @@ -75799,8 +77746,7 @@ echo "obj-m := bio_set_dev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev_license/" >>build/Makefile fi @@ -75814,8 +77760,7 @@ cachevar="zfs_cv_kernel_current_bio_list_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/current_bio_list || mkdir -p build/current_bio_list @@ -75860,14 +77805,12 @@ echo "obj-m := current_bio_list.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += current_bio_list/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/current_bio_list_license || mkdir -p build/current_bio_list_license @@ -75912,8 +77855,7 @@ echo "obj-m := current_bio_list_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += current_bio_list_license/" >>build/Makefile fi @@ -75927,8 +77869,7 @@ cachevar="zfs_cv_kernel_blkg_tryget_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkg_tryget || mkdir -p build/blkg_tryget @@ -75977,14 +77918,12 @@ echo "obj-m := blkg_tryget.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkg_tryget/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/blkg_tryget_license || mkdir -p build/blkg_tryget_license @@ -76033,8 +77972,7 @@ echo "obj-m := blkg_tryget_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkg_tryget_license/" >>build/Makefile fi @@ -76048,8 +77986,7 @@ cachevar="zfs_cv_kernel_bio_bdev_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_bdev_disk || mkdir -p build/bio_bdev_disk @@ -76097,14 +78034,12 @@ echo "obj-m := bio_bdev_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_bdev_disk_license || mkdir -p build/bio_bdev_disk_license @@ -76152,8 +78087,7 @@ echo "obj-m := bio_bdev_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_disk_license/" >>build/Makefile fi @@ -76167,8 +78101,7 @@ cachevar="zfs_cv_kernel_bio_bdev_submit_bio_void_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_bdev_submit_bio_void || mkdir -p build/bio_bdev_submit_bio_void @@ -76214,14 +78147,12 @@ echo "obj-m := bio_bdev_submit_bio_void.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_submit_bio_void/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_bdev_submit_bio_void_license || mkdir -p build/bio_bdev_submit_bio_void_license @@ -76267,8 +78198,7 @@ echo "obj-m := bio_bdev_submit_bio_void_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_bdev_submit_bio_void_license/" >>build/Makefile fi @@ -76282,8 +78212,7 @@ cachevar="zfs_cv_kernel_bio_set_dev_macro_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_set_dev_macro || mkdir -p build/bio_set_dev_macro @@ -76331,14 +78260,12 @@ echo "obj-m := bio_set_dev_macro.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev_macro/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/bio_set_dev_macro_license || mkdir -p build/bio_set_dev_macro_license @@ -76386,8 +78313,7 @@ echo "obj-m := bio_set_dev_macro_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_set_dev_macro_license/" >>build/Makefile fi @@ -76401,8 +78327,7 @@ cachevar="zfs_cv_kernel_bio_alloc_4arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_alloc_4arg || mkdir -p build/bio_alloc_4arg @@ -76452,14 +78377,12 @@ echo "obj-m := bio_alloc_4arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_alloc_4arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_alloc_4arg_license || mkdir -p build/bio_alloc_4arg_license @@ -76509,8 +78432,7 @@ echo "obj-m := bio_alloc_4arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_alloc_4arg_license/" >>build/Makefile fi @@ -76526,8 +78448,7 @@ cachevar="zfs_cv_kernel_blkdev_get_by_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_get_by_path || mkdir -p build/blkdev_get_by_path @@ -76578,14 +78499,12 @@ echo "obj-m := blkdev_get_by_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_get_by_path_license || mkdir -p build/blkdev_get_by_path_license @@ -76636,8 +78555,7 @@ echo "obj-m := blkdev_get_by_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path_license/" >>build/Makefile fi @@ -76651,8 +78569,7 @@ cachevar="zfs_cv_kernel_blkdev_get_by_path_4arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_get_by_path_4arg || mkdir -p build/blkdev_get_by_path_4arg @@ -76672,9 +78589,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdev = blkdev_get_by_path(path, mode, holder, &h); + bdev = blkdev_get_by_path(path, mode, holder, NULL); ; return 0; @@ -76704,14 +78620,12 @@ echo "obj-m := blkdev_get_by_path_4arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path_4arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_get_by_path_4arg_license || mkdir -p build/blkdev_get_by_path_4arg_license @@ -76731,9 +78645,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdev = blkdev_get_by_path(path, mode, holder, &h); + bdev = blkdev_get_by_path(path, mode, holder, NULL); ; return 0; @@ -76763,8 +78676,7 @@ echo "obj-m := blkdev_get_by_path_4arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_get_by_path_4arg_license/" >>build/Makefile fi @@ -76778,8 +78690,7 @@ cachevar="zfs_cv_kernel_bdev_open_by_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_open_by_path || mkdir -p build/bdev_open_by_path @@ -76799,9 +78710,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdh = bdev_open_by_path(path, mode, holder, &h); + bdh = bdev_open_by_path(path, mode, holder, NULL); ; return 0; @@ -76831,14 +78741,12 @@ echo "obj-m := bdev_open_by_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_open_by_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_open_by_path_license || mkdir -p build/bdev_open_by_path_license @@ -76858,9 +78766,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - bdh = bdev_open_by_path(path, mode, holder, &h); + bdh = bdev_open_by_path(path, mode, holder, NULL); ; return 0; @@ -76890,8 +78797,7 @@ echo "obj-m := bdev_open_by_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_open_by_path_license/" >>build/Makefile fi @@ -76905,8 +78811,7 @@ cachevar="zfs_cv_kernel_bdev_file_open_by_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_file_open_by_path || mkdir -p build/bdev_file_open_by_path @@ -76926,9 +78831,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - file = bdev_file_open_by_path(path, mode, holder, &h); + file = bdev_file_open_by_path(path, mode, holder, NULL); ; return 0; @@ -76958,14 +78862,12 @@ echo "obj-m := bdev_file_open_by_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_file_open_by_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_file_open_by_path_license || mkdir -p build/bdev_file_open_by_path_license @@ -76985,9 +78887,8 @@ const char *path = "path"; fmode_t mode = 0; void *holder = NULL; - struct blk_holder_ops h; - file = bdev_file_open_by_path(path, mode, holder, &h); + file = bdev_file_open_by_path(path, mode, holder, NULL); ; return 0; @@ -77017,8 +78918,7 @@ echo "obj-m := bdev_file_open_by_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_file_open_by_path_license/" >>build/Makefile fi @@ -77032,8 +78932,7 @@ cachevar="zfs_cv_kernel_blkdev_put_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_put || mkdir -p build/blkdev_put @@ -77082,14 +78981,12 @@ echo "obj-m := blkdev_put.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_put_license || mkdir -p build/blkdev_put_license @@ -77138,8 +79035,7 @@ echo "obj-m := blkdev_put_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put_license/" >>build/Makefile fi @@ -77153,8 +79049,7 @@ cachevar="zfs_cv_kernel_blkdev_put_holder_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_put_holder || mkdir -p build/blkdev_put_holder @@ -77203,14 +79098,12 @@ echo "obj-m := blkdev_put_holder.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put_holder/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_put_holder_license || mkdir -p build/blkdev_put_holder_license @@ -77259,8 +79152,7 @@ echo "obj-m := blkdev_put_holder_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_put_holder_license/" >>build/Makefile fi @@ -77274,8 +79166,7 @@ cachevar="zfs_cv_kernel_bdev_release_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_release || mkdir -p build/bdev_release @@ -77322,14 +79213,12 @@ echo "obj-m := bdev_release.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_release/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_release_license || mkdir -p build/bdev_release_license @@ -77376,8 +79265,7 @@ echo "obj-m := bdev_release_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_release_license/" >>build/Makefile fi @@ -77391,8 +79279,7 @@ cachevar="zfs_cv_kernel_blkdev_reread_part_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_reread_part || mkdir -p build/blkdev_reread_part @@ -77441,14 +79328,12 @@ echo "obj-m := blkdev_reread_part.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_reread_part/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_reread_part_license || mkdir -p build/blkdev_reread_part_license @@ -77497,8 +79382,7 @@ echo "obj-m := blkdev_reread_part_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_reread_part_license/" >>build/Makefile fi @@ -77512,8 +79396,7 @@ cachevar="zfs_cv_kernel_invalidate_bdev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/invalidate_bdev || mkdir -p build/invalidate_bdev @@ -77560,14 +79443,12 @@ echo "obj-m := invalidate_bdev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += invalidate_bdev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/invalidate_bdev_license || mkdir -p build/invalidate_bdev_license @@ -77614,8 +79495,7 @@ echo "obj-m := invalidate_bdev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += invalidate_bdev_license/" >>build/Makefile fi @@ -77629,8 +79509,7 @@ cachevar="zfs_cv_kernel_lookup_bdev_devt_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/lookup_bdev_devt || mkdir -p build/lookup_bdev_devt @@ -77679,14 +79558,12 @@ echo "obj-m := lookup_bdev_devt.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_devt/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/lookup_bdev_devt_license || mkdir -p build/lookup_bdev_devt_license @@ -77735,8 +79612,7 @@ echo "obj-m := lookup_bdev_devt_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_devt_license/" >>build/Makefile fi @@ -77749,8 +79625,7 @@ cachevar="zfs_cv_kernel_lookup_bdev_1arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/lookup_bdev_1arg || mkdir -p build/lookup_bdev_1arg @@ -77799,14 +79674,12 @@ echo "obj-m := lookup_bdev_1arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_1arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/lookup_bdev_1arg_license || mkdir -p build/lookup_bdev_1arg_license @@ -77855,8 +79728,7 @@ echo "obj-m := lookup_bdev_1arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_bdev_1arg_license/" >>build/Makefile fi @@ -77870,8 +79742,7 @@ cachevar="zfs_cv_kernel_bdev_logical_block_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_logical_block_size || mkdir -p build/bdev_logical_block_size @@ -77917,14 +79788,12 @@ echo "obj-m := bdev_logical_block_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_logical_block_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_logical_block_size_license || mkdir -p build/bdev_logical_block_size_license @@ -77970,8 +79839,7 @@ echo "obj-m := bdev_logical_block_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_logical_block_size_license/" >>build/Makefile fi @@ -77985,8 +79853,7 @@ cachevar="zfs_cv_kernel_bdev_physical_block_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_physical_block_size || mkdir -p build/bdev_physical_block_size @@ -78032,14 +79899,12 @@ echo "obj-m := bdev_physical_block_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_physical_block_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_physical_block_size_license || mkdir -p build/bdev_physical_block_size_license @@ -78085,8 +79950,7 @@ echo "obj-m := bdev_physical_block_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_physical_block_size_license/" >>build/Makefile fi @@ -78100,8 +79964,7 @@ cachevar="zfs_cv_kernel_check_disk_change_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/check_disk_change || mkdir -p build/check_disk_change @@ -78150,14 +80013,12 @@ echo "obj-m := check_disk_change.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += check_disk_change/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/check_disk_change_license || mkdir -p build/check_disk_change_license @@ -78206,8 +80067,7 @@ echo "obj-m := check_disk_change_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += check_disk_change_license/" >>build/Makefile fi @@ -78221,8 +80081,7 @@ cachevar="zfs_cv_kernel_bdev_check_media_change_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_check_media_change || mkdir -p build/bdev_check_media_change @@ -78271,14 +80130,12 @@ echo "obj-m := bdev_check_media_change.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_check_media_change/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_check_media_change_license || mkdir -p build/bdev_check_media_change_license @@ -78327,8 +80184,7 @@ echo "obj-m := bdev_check_media_change_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_check_media_change_license/" >>build/Makefile fi @@ -78342,8 +80198,7 @@ cachevar="zfs_cv_kernel_bdev_whole_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_whole || mkdir -p build/bdev_whole @@ -78389,14 +80244,12 @@ echo "obj-m := bdev_whole.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_whole/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_whole_license || mkdir -p build/bdev_whole_license @@ -78442,8 +80295,7 @@ echo "obj-m := bdev_whole_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_whole_license/" >>build/Makefile fi @@ -78457,8 +80309,7 @@ cachevar="zfs_cv_kernel_bdev_nr_bytes_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_nr_bytes || mkdir -p build/bdev_nr_bytes @@ -78505,14 +80356,12 @@ echo "obj-m := bdev_nr_bytes.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_nr_bytes/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_nr_bytes_license || mkdir -p build/bdev_nr_bytes_license @@ -78559,8 +80408,7 @@ echo "obj-m := bdev_nr_bytes_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_nr_bytes_license/" >>build/Makefile fi @@ -78574,8 +80422,7 @@ cachevar="zfs_cv_kernel_bdevname_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdevname || mkdir -p build/bdevname @@ -78624,14 +80471,12 @@ echo "obj-m := bdevname.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdevname/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdevname_license || mkdir -p build/bdevname_license @@ -78680,8 +80525,7 @@ echo "obj-m := bdevname_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdevname_license/" >>build/Makefile fi @@ -78695,8 +80539,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_noflags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_noflags || mkdir -p build/blkdev_issue_discard_noflags @@ -78747,14 +80590,12 @@ echo "obj-m := blkdev_issue_discard_noflags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_noflags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_noflags_license || mkdir -p build/blkdev_issue_discard_noflags_license @@ -78805,8 +80646,7 @@ echo "obj-m := blkdev_issue_discard_noflags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_noflags_license/" >>build/Makefile fi @@ -78818,8 +80658,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_flags || mkdir -p build/blkdev_issue_discard_flags @@ -78871,14 +80710,12 @@ echo "obj-m := blkdev_issue_discard_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_flags_license || mkdir -p build/blkdev_issue_discard_flags_license @@ -78930,8 +80767,7 @@ echo "obj-m := blkdev_issue_discard_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_flags_license/" >>build/Makefile fi @@ -78943,8 +80779,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_async_noflags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_async_noflags || mkdir -p build/blkdev_issue_discard_async_noflags @@ -78996,14 +80831,12 @@ echo "obj-m := blkdev_issue_discard_async_noflags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_noflags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_async_noflags_license || mkdir -p build/blkdev_issue_discard_async_noflags_license @@ -79055,8 +80888,7 @@ echo "obj-m := blkdev_issue_discard_async_noflags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_noflags_license/" >>build/Makefile fi @@ -79068,8 +80900,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_discard_async_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_discard_async_flags || mkdir -p build/blkdev_issue_discard_async_flags @@ -79122,14 +80953,12 @@ echo "obj-m := blkdev_issue_discard_async_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_discard_async_flags_license || mkdir -p build/blkdev_issue_discard_async_flags_license @@ -79182,8 +81011,7 @@ echo "obj-m := blkdev_issue_discard_async_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_discard_async_flags_license/" >>build/Makefile fi @@ -79195,8 +81023,7 @@ cachevar="zfs_cv_kernel_blkdev_issue_secure_erase_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_issue_secure_erase || mkdir -p build/blkdev_issue_secure_erase @@ -79247,14 +81074,12 @@ echo "obj-m := blkdev_issue_secure_erase.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_secure_erase/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_issue_secure_erase_license || mkdir -p build/blkdev_issue_secure_erase_license @@ -79305,8 +81130,7 @@ echo "obj-m := blkdev_issue_secure_erase_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_issue_secure_erase_license/" >>build/Makefile fi @@ -79320,8 +81144,7 @@ cachevar="zfs_cv_kernel_bdev_kobj_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_kobj || mkdir -p build/bdev_kobj @@ -79370,14 +81193,12 @@ echo "obj-m := bdev_kobj.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_kobj/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_kobj_license || mkdir -p build/bdev_kobj_license @@ -79426,8 +81247,7 @@ echo "obj-m := bdev_kobj_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_kobj_license/" >>build/Makefile fi @@ -79441,8 +81261,7 @@ cachevar="zfs_cv_kernel_part_to_dev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/part_to_dev || mkdir -p build/part_to_dev @@ -79490,14 +81309,12 @@ echo "obj-m := part_to_dev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += part_to_dev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/part_to_dev_license || mkdir -p build/part_to_dev_license @@ -79545,8 +81362,7 @@ echo "obj-m := part_to_dev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += part_to_dev_license/" >>build/Makefile fi @@ -79560,8 +81376,7 @@ cachevar="zfs_cv_kernel_disk_check_media_change_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/disk_check_media_change || mkdir -p build/disk_check_media_change @@ -79610,14 +81425,12 @@ echo "obj-m := disk_check_media_change.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_check_media_change/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/disk_check_media_change_license || mkdir -p build/disk_check_media_change_license @@ -79666,8 +81479,7 @@ echo "obj-m := disk_check_media_change_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_check_media_change_license/" >>build/Makefile fi @@ -79681,8 +81493,7 @@ cachevar="zfs_cv_kernel_blk_sts_resv_conflict_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_sts_resv_conflict || mkdir -p build/blk_sts_resv_conflict @@ -79727,14 +81538,12 @@ echo "obj-m := blk_sts_resv_conflict.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_sts_resv_conflict/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_sts_resv_conflict_license || mkdir -p build/blk_sts_resv_conflict_license @@ -79779,8 +81588,7 @@ echo "obj-m := blk_sts_resv_conflict_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_sts_resv_conflict_license/" >>build/Makefile fi @@ -79794,8 +81602,7 @@ cachevar="zfs_cv_kernel_blk_mode_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_mode_t || mkdir -p build/blk_mode_t @@ -79841,14 +81648,12 @@ echo "obj-m := blk_mode_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mode_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_mode_t_license || mkdir -p build/blk_mode_t_license @@ -79894,8 +81699,7 @@ echo "obj-m := blk_mode_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mode_t_license/" >>build/Makefile fi @@ -79911,8 +81715,7 @@ cachevar="zfs_cv_kernel_blk_plug_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_plug || mkdir -p build/blk_plug @@ -79960,14 +81763,12 @@ echo "obj-m := blk_plug.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_plug/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_plug_license || mkdir -p build/blk_plug_license @@ -80015,8 +81816,7 @@ echo "obj-m := blk_plug_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_plug_license/" >>build/Makefile fi @@ -80030,8 +81830,7 @@ cachevar="zfs_cv_kernel_blk_queue_bdi_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_bdi || mkdir -p build/blk_queue_bdi @@ -80078,14 +81877,12 @@ echo "obj-m := blk_queue_bdi.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_bdi/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_bdi_license || mkdir -p build/blk_queue_bdi_license @@ -80132,8 +81929,7 @@ echo "obj-m := blk_queue_bdi_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_bdi_license/" >>build/Makefile fi @@ -80147,8 +81943,7 @@ cachevar="zfs_cv_kernel_blk_queue_disk_bdi_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_disk_bdi || mkdir -p build/blk_queue_disk_bdi @@ -80198,14 +81993,12 @@ echo "obj-m := blk_queue_disk_bdi.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_disk_bdi/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_disk_bdi_license || mkdir -p build/blk_queue_disk_bdi_license @@ -80255,8 +82048,7 @@ echo "obj-m := blk_queue_disk_bdi_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_disk_bdi_license/" >>build/Makefile fi @@ -80270,8 +82062,7 @@ cachevar="zfs_cv_kernel_blk_queue_update_readahead_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_update_readahead || mkdir -p build/blk_queue_update_readahead @@ -80317,14 +82108,12 @@ echo "obj-m := blk_queue_update_readahead.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_update_readahead/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_update_readahead_license || mkdir -p build/blk_queue_update_readahead_license @@ -80370,8 +82159,7 @@ echo "obj-m := blk_queue_update_readahead_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_update_readahead_license/" >>build/Makefile fi @@ -80384,8 +82172,7 @@ cachevar="zfs_cv_kernel_disk_update_readahead_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/disk_update_readahead || mkdir -p build/disk_update_readahead @@ -80431,14 +82218,12 @@ echo "obj-m := disk_update_readahead.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_update_readahead/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/disk_update_readahead_license || mkdir -p build/disk_update_readahead_license @@ -80484,8 +82269,7 @@ echo "obj-m := disk_update_readahead_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_update_readahead_license/" >>build/Makefile fi @@ -80499,8 +82283,7 @@ cachevar="zfs_cv_kernel_bdev_max_discard_sectors_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_max_discard_sectors || mkdir -p build/bdev_max_discard_sectors @@ -80548,14 +82331,12 @@ echo "obj-m := bdev_max_discard_sectors.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_discard_sectors/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_max_discard_sectors_license || mkdir -p build/bdev_max_discard_sectors_license @@ -80603,8 +82384,7 @@ echo "obj-m := bdev_max_discard_sectors_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_discard_sectors_license/" >>build/Makefile fi @@ -80617,8 +82397,7 @@ cachevar="zfs_cv_kernel_blk_queue_discard_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_discard || mkdir -p build/blk_queue_discard @@ -80667,14 +82446,12 @@ echo "obj-m := blk_queue_discard.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_discard/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_discard_license || mkdir -p build/blk_queue_discard_license @@ -80723,8 +82500,7 @@ echo "obj-m := blk_queue_discard_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_discard_license/" >>build/Makefile fi @@ -80738,8 +82514,7 @@ cachevar="zfs_cv_kernel_bdev_max_secure_erase_sectors_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_max_secure_erase_sectors || mkdir -p build/bdev_max_secure_erase_sectors @@ -80787,14 +82562,12 @@ echo "obj-m := bdev_max_secure_erase_sectors.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_secure_erase_sectors/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_max_secure_erase_sectors_license || mkdir -p build/bdev_max_secure_erase_sectors_license @@ -80842,8 +82615,7 @@ echo "obj-m := bdev_max_secure_erase_sectors_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_max_secure_erase_sectors_license/" >>build/Makefile fi @@ -80856,8 +82628,7 @@ cachevar="zfs_cv_kernel_blk_queue_secure_erase_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_secure_erase || mkdir -p build/blk_queue_secure_erase @@ -80906,14 +82677,12 @@ echo "obj-m := blk_queue_secure_erase.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_secure_erase/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_secure_erase_license || mkdir -p build/blk_queue_secure_erase_license @@ -80962,8 +82731,7 @@ echo "obj-m := blk_queue_secure_erase_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_secure_erase_license/" >>build/Makefile fi @@ -80977,8 +82745,7 @@ cachevar="zfs_cv_kernel_blk_queue_max_hw_sectors_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_max_hw_sectors || mkdir -p build/blk_queue_max_hw_sectors @@ -81024,14 +82791,12 @@ echo "obj-m := blk_queue_max_hw_sectors.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_hw_sectors/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_max_hw_sectors_license || mkdir -p build/blk_queue_max_hw_sectors_license @@ -81077,8 +82842,7 @@ echo "obj-m := blk_queue_max_hw_sectors_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_hw_sectors_license/" >>build/Makefile fi @@ -81092,8 +82856,7 @@ cachevar="zfs_cv_kernel_blk_queue_max_segments_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_queue_max_segments || mkdir -p build/blk_queue_max_segments @@ -81139,14 +82902,12 @@ echo "obj-m := blk_queue_max_segments.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_segments/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_queue_max_segments_license || mkdir -p build/blk_queue_max_segments_license @@ -81192,8 +82953,7 @@ echo "obj-m := blk_queue_max_segments_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_queue_max_segments_license/" >>build/Makefile fi @@ -81205,10 +82965,120 @@ + cachevar="zfs_cv_kernel_blk_queue_rot_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/blk_queue_rot || mkdir -p build/blk_queue_rot +cat confdefs.h - <<_ACEOF >build/blk_queue_rot/blk_queue_rot.c + +#include + + #include + + +int +main (void) +{ + + struct request_queue *q __attribute__ ((unused)) = NULL; + (void) blk_queue_rot(q); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/blk_queue_rot || mkdir -p build/blk_queue_rot + + file=build/blk_queue_rot/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/blk_queue_rot + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := blk_queue_rot.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += blk_queue_rot/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/blk_queue_rot_license || mkdir -p build/blk_queue_rot_license +cat confdefs.h - <<_ACEOF >build/blk_queue_rot_license/blk_queue_rot_license.c + +#include + + #include + + +int +main (void) +{ + + struct request_queue *q __attribute__ ((unused)) = NULL; + (void) blk_queue_rot(q); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/blk_queue_rot_license || mkdir -p build/blk_queue_rot_license + + file=build/blk_queue_rot_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/blk_queue_rot_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := blk_queue_rot_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += blk_queue_rot_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_blk_mq_rq_hctx_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_mq_rq_hctx || mkdir -p build/blk_mq_rq_hctx @@ -81256,14 +83126,12 @@ echo "obj-m := blk_mq_rq_hctx.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mq_rq_hctx/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_mq_rq_hctx_license || mkdir -p build/blk_mq_rq_hctx_license @@ -81311,8 +83179,7 @@ echo "obj-m := blk_mq_rq_hctx_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_mq_rq_hctx_license/" >>build/Makefile fi @@ -81328,8 +83195,7 @@ cachevar="zfs_cv_kernel_genhd_fl_ext_devt_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/genhd_fl_ext_devt || mkdir -p build/genhd_fl_ext_devt @@ -81374,14 +83240,12 @@ echo "obj-m := genhd_fl_ext_devt.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_ext_devt/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/genhd_fl_ext_devt_license || mkdir -p build/genhd_fl_ext_devt_license @@ -81426,8 +83290,7 @@ echo "obj-m := genhd_fl_ext_devt_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_ext_devt_license/" >>build/Makefile fi @@ -81440,8 +83303,7 @@ cachevar="zfs_cv_kernel_genhd_fl_no_part_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/genhd_fl_no_part || mkdir -p build/genhd_fl_no_part @@ -81486,14 +83348,12 @@ echo "obj-m := genhd_fl_no_part.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_no_part/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/genhd_fl_no_part_license || mkdir -p build/genhd_fl_no_part_license @@ -81538,8 +83398,7 @@ echo "obj-m := genhd_fl_no_part_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += genhd_fl_no_part_license/" >>build/Makefile fi @@ -81554,8 +83413,7 @@ cachevar="zfs_cv_kernel_revalidate_disk_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/revalidate_disk_size || mkdir -p build/revalidate_disk_size @@ -81601,14 +83459,12 @@ echo "obj-m := revalidate_disk_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/revalidate_disk_size_license || mkdir -p build/revalidate_disk_size_license @@ -81654,8 +83510,7 @@ echo "obj-m := revalidate_disk_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk_size_license/" >>build/Makefile fi @@ -81668,8 +83523,7 @@ cachevar="zfs_cv_kernel_revalidate_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/revalidate_disk || mkdir -p build/revalidate_disk @@ -81715,14 +83569,12 @@ echo "obj-m := revalidate_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/revalidate_disk_license || mkdir -p build/revalidate_disk_license @@ -81768,8 +83620,7 @@ echo "obj-m := revalidate_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += revalidate_disk_license/" >>build/Makefile fi @@ -81783,8 +83634,7 @@ cachevar="zfs_cv_kernel_get_disk_ro_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/get_disk_ro || mkdir -p build/get_disk_ro @@ -81830,14 +83680,12 @@ echo "obj-m := get_disk_ro.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += get_disk_ro/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/get_disk_ro_license || mkdir -p build/get_disk_ro_license @@ -81883,8 +83731,7 @@ echo "obj-m := get_disk_ro_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += get_disk_ro_license/" >>build/Makefile fi @@ -81898,8 +83745,7 @@ cachevar="zfs_cv_kernel_discard_granularity_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/discard_granularity || mkdir -p build/discard_granularity @@ -81945,14 +83791,12 @@ echo "obj-m := discard_granularity.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += discard_granularity/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/discard_granularity_license || mkdir -p build/discard_granularity_license @@ -81998,8 +83842,7 @@ echo "obj-m := discard_granularity_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += discard_granularity_license/" >>build/Makefile fi @@ -82013,8 +83856,7 @@ cachevar="zfs_cv_kernel_inode_owner_or_capable_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_owner_or_capable || mkdir -p build/inode_owner_or_capable @@ -82060,14 +83902,12 @@ echo "obj-m := inode_owner_or_capable.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_owner_or_capable_license || mkdir -p build/inode_owner_or_capable_license @@ -82113,8 +83953,7 @@ echo "obj-m := inode_owner_or_capable_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_license/" >>build/Makefile fi @@ -82127,8 +83966,7 @@ cachevar="zfs_cv_kernel_inode_owner_or_capable_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_owner_or_capable_userns || mkdir -p build/inode_owner_or_capable_userns @@ -82174,14 +84012,12 @@ echo "obj-m := inode_owner_or_capable_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_owner_or_capable_userns_license || mkdir -p build/inode_owner_or_capable_userns_license @@ -82227,8 +84063,7 @@ echo "obj-m := inode_owner_or_capable_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_userns_license/" >>build/Makefile fi @@ -82241,8 +84076,7 @@ cachevar="zfs_cv_kernel_inode_owner_or_capable_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_owner_or_capable_mnt_idmap || mkdir -p build/inode_owner_or_capable_mnt_idmap @@ -82289,14 +84123,12 @@ echo "obj-m := inode_owner_or_capable_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_owner_or_capable_mnt_idmap_license || mkdir -p build/inode_owner_or_capable_mnt_idmap_license @@ -82343,8 +84175,7 @@ echo "obj-m := inode_owner_or_capable_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_owner_or_capable_mnt_idmap_license/" >>build/Makefile fi @@ -82359,8 +84190,7 @@ cachevar="zfs_cv_kernel_const_xattr_handler_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/const_xattr_handler || mkdir -p build/const_xattr_handler @@ -82418,14 +84248,12 @@ echo "obj-m := const_xattr_handler.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += const_xattr_handler/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/const_xattr_handler_license || mkdir -p build/const_xattr_handler_license @@ -82483,8 +84311,7 @@ echo "obj-m := const_xattr_handler_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += const_xattr_handler_license/" >>build/Makefile fi @@ -82498,8 +84325,7 @@ cachevar="zfs_cv_kernel_xattr_handler_get_dentry_inode_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_get_dentry_inode_flags || mkdir -p build/xattr_handler_get_dentry_inode_flags @@ -82551,14 +84377,12 @@ echo "obj-m := xattr_handler_get_dentry_inode_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_get_dentry_inode_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_get_dentry_inode_flags_license || mkdir -p build/xattr_handler_get_dentry_inode_flags_license @@ -82610,8 +84434,7 @@ echo "obj-m := xattr_handler_get_dentry_inode_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_get_dentry_inode_flags_license/" >>build/Makefile fi @@ -82625,8 +84448,7 @@ cachevar="zfs_cv_kernel_xattr_handler_set_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_set_mnt_idmap || mkdir -p build/xattr_handler_set_mnt_idmap @@ -82680,14 +84502,12 @@ echo "obj-m := xattr_handler_set_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_set_mnt_idmap_license || mkdir -p build/xattr_handler_set_mnt_idmap_license @@ -82741,8 +84561,7 @@ echo "obj-m := xattr_handler_set_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_mnt_idmap_license/" >>build/Makefile fi @@ -82755,8 +84574,7 @@ cachevar="zfs_cv_kernel_xattr_handler_set_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_set_userns || mkdir -p build/xattr_handler_set_userns @@ -82810,14 +84628,12 @@ echo "obj-m := xattr_handler_set_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_set_userns_license || mkdir -p build/xattr_handler_set_userns_license @@ -82871,8 +84687,7 @@ echo "obj-m := xattr_handler_set_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_userns_license/" >>build/Makefile fi @@ -82885,8 +84700,7 @@ cachevar="zfs_cv_kernel_xattr_handler_set_dentry_inode_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/xattr_handler_set_dentry_inode || mkdir -p build/xattr_handler_set_dentry_inode @@ -82939,14 +84753,12 @@ echo "obj-m := xattr_handler_set_dentry_inode.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_dentry_inode/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/xattr_handler_set_dentry_inode_license || mkdir -p build/xattr_handler_set_dentry_inode_license @@ -82999,8 +84811,7 @@ echo "obj-m := xattr_handler_set_dentry_inode_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += xattr_handler_set_dentry_inode_license/" >>build/Makefile fi @@ -83016,8 +84827,7 @@ cachevar="zfs_cv_kernel_posix_acl_equiv_mode_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/posix_acl_equiv_mode || mkdir -p build/posix_acl_equiv_mode @@ -83064,14 +84874,12 @@ echo "obj-m := posix_acl_equiv_mode.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += posix_acl_equiv_mode/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/posix_acl_equiv_mode_license || mkdir -p build/posix_acl_equiv_mode_license @@ -83118,8 +84926,7 @@ echo "obj-m := posix_acl_equiv_mode_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += posix_acl_equiv_mode_license/" >>build/Makefile fi @@ -83131,23 +84938,143 @@ - cachevar="zfs_cv_kernel_inode_operations_get_acl_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_posix_acl_to_xattr_alloc_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/inode_operations_get_acl || mkdir -p build/inode_operations_get_acl -cat confdefs.h - <<_ACEOF >build/inode_operations_get_acl/inode_operations_get_acl.c +test -d build/posix_acl_to_xattr_alloc || mkdir -p build/posix_acl_to_xattr_alloc +cat confdefs.h - <<_ACEOF >build/posix_acl_to_xattr_alloc/posix_acl_to_xattr_alloc.c #include #include + #include - static struct posix_acl *get_acl_fn(struct inode *inode, int type) - { return NULL; } - static const struct inode_operations +int +main (void) +{ + + struct user_namespace *ns = NULL; + struct posix_acl *acl = NULL; + size_t size = 0; + gfp_t gfp = 0; + void *xattr = NULL; + xattr = posix_acl_to_xattr(ns, acl, &size, gfp); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/posix_acl_to_xattr_alloc || mkdir -p build/posix_acl_to_xattr_alloc + + file=build/posix_acl_to_xattr_alloc/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/posix_acl_to_xattr_alloc + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := posix_acl_to_xattr_alloc.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += posix_acl_to_xattr_alloc/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/posix_acl_to_xattr_alloc_license || mkdir -p build/posix_acl_to_xattr_alloc_license +cat confdefs.h - <<_ACEOF >build/posix_acl_to_xattr_alloc_license/posix_acl_to_xattr_alloc_license.c + +#include + + #include + #include + + +int +main (void) +{ + + struct user_namespace *ns = NULL; + struct posix_acl *acl = NULL; + size_t size = 0; + gfp_t gfp = 0; + void *xattr = NULL; + xattr = posix_acl_to_xattr(ns, acl, &size, gfp); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/posix_acl_to_xattr_alloc_license || mkdir -p build/posix_acl_to_xattr_alloc_license + + file=build/posix_acl_to_xattr_alloc_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/posix_acl_to_xattr_alloc_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := posix_acl_to_xattr_alloc_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += posix_acl_to_xattr_alloc_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_inode_operations_get_acl_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/inode_operations_get_acl || mkdir -p build/inode_operations_get_acl +cat confdefs.h - <<_ACEOF >build/inode_operations_get_acl/inode_operations_get_acl.c + +#include + + #include + + static struct posix_acl *get_acl_fn(struct inode *inode, int type) + { return NULL; } + + static const struct inode_operations iops __attribute__ ((unused)) = { .get_acl = get_acl_fn, }; @@ -83185,14 +85112,12 @@ echo "obj-m := inode_operations_get_acl.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_get_acl_license || mkdir -p build/inode_operations_get_acl_license @@ -83243,8 +85168,7 @@ echo "obj-m := inode_operations_get_acl_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl_license/" >>build/Makefile fi @@ -83257,8 +85181,7 @@ cachevar="zfs_cv_kernel_inode_operations_get_acl_rcu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_get_acl_rcu || mkdir -p build/inode_operations_get_acl_rcu @@ -83309,14 +85232,12 @@ echo "obj-m := inode_operations_get_acl_rcu.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl_rcu/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_get_acl_rcu_license || mkdir -p build/inode_operations_get_acl_rcu_license @@ -83367,8 +85288,7 @@ echo "obj-m := inode_operations_get_acl_rcu_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_acl_rcu_license/" >>build/Makefile fi @@ -83381,8 +85301,7 @@ cachevar="zfs_cv_kernel_inode_operations_get_inode_acl_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_get_inode_acl || mkdir -p build/inode_operations_get_inode_acl @@ -83433,14 +85352,12 @@ echo "obj-m := inode_operations_get_inode_acl.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_inode_acl/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_get_inode_acl_license || mkdir -p build/inode_operations_get_inode_acl_license @@ -83491,8 +85408,7 @@ echo "obj-m := inode_operations_get_inode_acl_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_get_inode_acl_license/" >>build/Makefile fi @@ -83506,8 +85422,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_mnt_idmap_dentry_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl_mnt_idmap_dentry || mkdir -p build/inode_operations_set_acl_mnt_idmap_dentry @@ -83559,14 +85474,12 @@ echo "obj-m := inode_operations_set_acl_mnt_idmap_dentry.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_mnt_idmap_dentry/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_mnt_idmap_dentry_license || mkdir -p build/inode_operations_set_acl_mnt_idmap_dentry_license @@ -83618,8 +85531,7 @@ echo "obj-m := inode_operations_set_acl_mnt_idmap_dentry_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_mnt_idmap_dentry_license/" >>build/Makefile fi @@ -83631,8 +85543,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_dentry_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl_userns_dentry || mkdir -p build/inode_operations_set_acl_userns_dentry @@ -83684,14 +85595,12 @@ echo "obj-m := inode_operations_set_acl_userns_dentry.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns_dentry/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_userns_dentry_license || mkdir -p build/inode_operations_set_acl_userns_dentry_license @@ -83743,8 +85652,7 @@ echo "obj-m := inode_operations_set_acl_userns_dentry_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns_dentry_license/" >>build/Makefile fi @@ -83756,8 +85664,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl_userns || mkdir -p build/inode_operations_set_acl_userns @@ -83809,14 +85716,12 @@ echo "obj-m := inode_operations_set_acl_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_userns_license || mkdir -p build/inode_operations_set_acl_userns_license @@ -83868,8 +85773,7 @@ echo "obj-m := inode_operations_set_acl_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_userns_license/" >>build/Makefile fi @@ -83881,8 +85785,7 @@ cachevar="zfs_cv_kernel_inode_operations_set_acl_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_set_acl || mkdir -p build/inode_operations_set_acl @@ -83933,14 +85836,12 @@ echo "obj-m := inode_operations_set_acl.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_set_acl_license || mkdir -p build/inode_operations_set_acl_license @@ -83991,8 +85892,7 @@ echo "obj-m := inode_operations_set_acl_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_set_acl_license/" >>build/Makefile fi @@ -84007,8 +85907,7 @@ cachevar="zfs_cv_kernel_inode_operations_setattr_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_setattr_mnt_idmap || mkdir -p build/inode_operations_setattr_mnt_idmap @@ -84061,14 +85960,12 @@ echo "obj-m := inode_operations_setattr_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_setattr_mnt_idmap_license || mkdir -p build/inode_operations_setattr_mnt_idmap_license @@ -84121,8 +86018,7 @@ echo "obj-m := inode_operations_setattr_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_mnt_idmap_license/" >>build/Makefile fi @@ -84135,8 +86031,7 @@ cachevar="zfs_cv_kernel_inode_operations_setattr_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_setattr_userns || mkdir -p build/inode_operations_setattr_userns @@ -84189,14 +86084,12 @@ echo "obj-m := inode_operations_setattr_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_setattr_userns_license || mkdir -p build/inode_operations_setattr_userns_license @@ -84249,8 +86142,7 @@ echo "obj-m := inode_operations_setattr_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_setattr_userns_license/" >>build/Makefile fi @@ -84264,8 +86156,7 @@ cachevar="zfs_cv_kernel_inode_operations_getattr_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_getattr_mnt_idmap || mkdir -p build/inode_operations_getattr_mnt_idmap @@ -84319,14 +86210,12 @@ echo "obj-m := inode_operations_getattr_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_getattr_mnt_idmap_license || mkdir -p build/inode_operations_getattr_mnt_idmap_license @@ -84380,8 +86269,7 @@ echo "obj-m := inode_operations_getattr_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_mnt_idmap_license/" >>build/Makefile fi @@ -84394,8 +86282,7 @@ cachevar="zfs_cv_kernel_inode_operations_getattr_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_getattr_userns || mkdir -p build/inode_operations_getattr_userns @@ -84449,14 +86336,12 @@ echo "obj-m := inode_operations_getattr_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_getattr_userns_license || mkdir -p build/inode_operations_getattr_userns_license @@ -84510,8 +86395,7 @@ echo "obj-m := inode_operations_getattr_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_userns_license/" >>build/Makefile fi @@ -84524,8 +86408,7 @@ cachevar="zfs_cv_kernel_inode_operations_getattr_path_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_getattr_path || mkdir -p build/inode_operations_getattr_path @@ -84578,14 +86461,12 @@ echo "obj-m := inode_operations_getattr_path.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_path/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_getattr_path_license || mkdir -p build/inode_operations_getattr_path_license @@ -84638,8 +86519,7 @@ echo "obj-m := inode_operations_getattr_path_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_getattr_path_license/" >>build/Makefile fi @@ -84651,10 +86531,120 @@ + cachevar="zfs_cv_kernel_inode_state_read_once_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/inode_state_read_once || mkdir -p build/inode_state_read_once +cat confdefs.h - <<_ACEOF >build/inode_state_read_once/inode_state_read_once.c + +#include + + #include + + +int +main (void) +{ + + struct inode i = {}; + inode_state_read_once(&i); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/inode_state_read_once || mkdir -p build/inode_state_read_once + + file=build/inode_state_read_once/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_state_read_once + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := inode_state_read_once.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += inode_state_read_once/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/inode_state_read_once_license || mkdir -p build/inode_state_read_once_license +cat confdefs.h - <<_ACEOF >build/inode_state_read_once_license/inode_state_read_once_license.c + +#include + + #include + + +int +main (void) +{ + + struct inode i = {}; + inode_state_read_once(&i); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/inode_state_read_once_license || mkdir -p build/inode_state_read_once_license + + file=build/inode_state_read_once_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_state_read_once_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := inode_state_read_once_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += inode_state_read_once_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_super_operations_show_options_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/super_operations_show_options || mkdir -p build/super_operations_show_options @@ -84705,14 +86695,12 @@ echo "obj-m := super_operations_show_options.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_operations_show_options/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/super_operations_show_options_license || mkdir -p build/super_operations_show_options_license @@ -84763,8 +86751,7 @@ echo "obj-m := super_operations_show_options_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_operations_show_options_license/" >>build/Makefile fi @@ -84779,8 +86766,7 @@ cachevar="zfs_cv_kernel_super_block_s_shrink_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/super_block_s_shrink || mkdir -p build/super_block_s_shrink @@ -84829,14 +86815,12 @@ echo "obj-m := super_block_s_shrink.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/super_block_s_shrink_license || mkdir -p build/super_block_s_shrink_license @@ -84885,8 +86869,7 @@ echo "obj-m := super_block_s_shrink_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink_license/" >>build/Makefile fi @@ -84900,8 +86883,7 @@ cachevar="zfs_cv_kernel_super_block_s_shrink_ptr_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/super_block_s_shrink_ptr || mkdir -p build/super_block_s_shrink_ptr @@ -84955,14 +86937,12 @@ echo "obj-m := super_block_s_shrink_ptr.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink_ptr/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/super_block_s_shrink_ptr_license || mkdir -p build/super_block_s_shrink_ptr_license @@ -85016,8 +86996,7 @@ echo "obj-m := super_block_s_shrink_ptr_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += super_block_s_shrink_ptr_license/" >>build/Makefile fi @@ -85031,8 +87010,7 @@ cachevar="zfs_cv_kernel_register_shrinker_vararg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/register_shrinker_vararg || mkdir -p build/register_shrinker_vararg @@ -85084,14 +87062,12 @@ echo "obj-m := register_shrinker_vararg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += register_shrinker_vararg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/register_shrinker_vararg_license || mkdir -p build/register_shrinker_vararg_license @@ -85143,8 +87119,7 @@ echo "obj-m := register_shrinker_vararg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += register_shrinker_vararg_license/" >>build/Makefile fi @@ -85158,8 +87133,7 @@ cachevar="zfs_cv_kernel_shrinker_register_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/shrinker_register || mkdir -p build/shrinker_register @@ -85211,14 +87185,12 @@ echo "obj-m := shrinker_register.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += shrinker_register/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/shrinker_register_license || mkdir -p build/shrinker_register_license @@ -85270,8 +87242,7 @@ echo "obj-m := shrinker_register_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += shrinker_register_license/" >>build/Makefile fi @@ -85284,10 +87255,129 @@ + cachevar="zfs_cv_kernel_mkdir_return_dentry_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/mkdir_return_dentry || mkdir -p build/mkdir_return_dentry +cat confdefs.h - <<_ACEOF >build/mkdir_return_dentry/mkdir_return_dentry.c + +#include + + #include + + static struct dentry *mkdir(struct mnt_idmap *idmap, + struct inode *inode, struct dentry *dentry, + umode_t umode) { return dentry; } + static const struct inode_operations + iops __attribute__ ((unused)) = { + .mkdir = mkdir, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mkdir_return_dentry || mkdir -p build/mkdir_return_dentry + + file=build/mkdir_return_dentry/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mkdir_return_dentry + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mkdir_return_dentry.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mkdir_return_dentry/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/mkdir_return_dentry_license || mkdir -p build/mkdir_return_dentry_license +cat confdefs.h - <<_ACEOF >build/mkdir_return_dentry_license/mkdir_return_dentry_license.c + +#include + + #include + + static struct dentry *mkdir(struct mnt_idmap *idmap, + struct inode *inode, struct dentry *dentry, + umode_t umode) { return dentry; } + static const struct inode_operations + iops __attribute__ ((unused)) = { + .mkdir = mkdir, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mkdir_return_dentry_license || mkdir -p build/mkdir_return_dentry_license + + file=build/mkdir_return_dentry_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mkdir_return_dentry_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mkdir_return_dentry_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mkdir_return_dentry_license/" >>build/Makefile +fi + + +fi + +fi + + + cachevar="zfs_cv_kernel_mkdir_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mkdir_mnt_idmap || mkdir -p build/mkdir_mnt_idmap @@ -85338,14 +87428,12 @@ echo "obj-m := mkdir_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mkdir_mnt_idmap_license || mkdir -p build/mkdir_mnt_idmap_license @@ -85396,8 +87484,7 @@ echo "obj-m := mkdir_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_mnt_idmap_license/" >>build/Makefile fi @@ -85410,8 +87497,7 @@ cachevar="zfs_cv_kernel_mkdir_user_namespace_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mkdir_user_namespace || mkdir -p build/mkdir_user_namespace @@ -85463,14 +87549,12 @@ echo "obj-m := mkdir_user_namespace.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_user_namespace/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mkdir_user_namespace_license || mkdir -p build/mkdir_user_namespace_license @@ -85522,8 +87606,7 @@ echo "obj-m := mkdir_user_namespace_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mkdir_user_namespace_license/" >>build/Makefile fi @@ -85536,8 +87619,7 @@ cachevar="zfs_cv_kernel_inode_operations_mkdir_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_mkdir || mkdir -p build/inode_operations_mkdir @@ -85588,14 +87670,12 @@ echo "obj-m := inode_operations_mkdir.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_mkdir/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_mkdir_license || mkdir -p build/inode_operations_mkdir_license @@ -85646,8 +87726,7 @@ echo "obj-m := inode_operations_mkdir_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_mkdir_license/" >>build/Makefile fi @@ -85661,8 +87740,7 @@ cachevar="zfs_cv_kernel_lookup_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/lookup_flags || mkdir -p build/lookup_flags @@ -85714,14 +87792,12 @@ echo "obj-m := lookup_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/lookup_flags_license || mkdir -p build/lookup_flags_license @@ -85773,8 +87849,7 @@ echo "obj-m := lookup_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += lookup_flags_license/" >>build/Makefile fi @@ -85786,10 +87861,356 @@ + cachevar="zfs_cv_kernel_generic_permission_idmap_mntidmap_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/generic_permission_idmap_mntidmap || mkdir -p build/generic_permission_idmap_mntidmap +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_mntidmap/generic_permission_idmap_mntidmap.c + +#include + + #include + + +int +main (void) +{ + + struct mnt_idmap *idmap = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(idmap, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_mntidmap || mkdir -p build/generic_permission_idmap_mntidmap + + file=build/generic_permission_idmap_mntidmap/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_mntidmap + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_mntidmap.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_mntidmap/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/generic_permission_idmap_mntidmap_license || mkdir -p build/generic_permission_idmap_mntidmap_license +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_mntidmap_license/generic_permission_idmap_mntidmap_license.c + +#include + + #include + + +int +main (void) +{ + + struct mnt_idmap *idmap = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(idmap, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_mntidmap_license || mkdir -p build/generic_permission_idmap_mntidmap_license + + file=build/generic_permission_idmap_mntidmap_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_mntidmap_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_mntidmap_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_mntidmap_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_generic_permission_idmap_userns_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/generic_permission_idmap_userns || mkdir -p build/generic_permission_idmap_userns +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_userns/generic_permission_idmap_userns.c + +#include + + #include + + +int +main (void) +{ + + struct user_namespace *userns = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(userns, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_userns || mkdir -p build/generic_permission_idmap_userns + + file=build/generic_permission_idmap_userns/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_userns + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_userns.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_userns/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/generic_permission_idmap_userns_license || mkdir -p build/generic_permission_idmap_userns_license +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_userns_license/generic_permission_idmap_userns_license.c + +#include + + #include + + +int +main (void) +{ + + struct user_namespace *userns = NULL; + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(userns, inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_userns_license || mkdir -p build/generic_permission_idmap_userns_license + + file=build/generic_permission_idmap_userns_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_userns_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_userns_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_userns_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_generic_permission_idmap_none_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/generic_permission_idmap_none || mkdir -p build/generic_permission_idmap_none +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_none/generic_permission_idmap_none.c + +#include + + #include + + +int +main (void) +{ + + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_none || mkdir -p build/generic_permission_idmap_none + + file=build/generic_permission_idmap_none/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_none + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_none.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_none/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/generic_permission_idmap_none_license || mkdir -p build/generic_permission_idmap_none_license +cat confdefs.h - <<_ACEOF >build/generic_permission_idmap_none_license/generic_permission_idmap_none_license.c + +#include + + #include + + +int +main (void) +{ + + struct inode *inode = NULL; + int mask = 0; + int ret = generic_permission(inode, mask); + (void) ret; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/generic_permission_idmap_none_license || mkdir -p build/generic_permission_idmap_none_license + + file=build/generic_permission_idmap_none_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/generic_permission_idmap_none_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := generic_permission_idmap_none_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += generic_permission_idmap_none_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_create_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/create_mnt_idmap || mkdir -p build/create_mnt_idmap @@ -85842,14 +88263,12 @@ echo "obj-m := create_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/create_mnt_idmap_license || mkdir -p build/create_mnt_idmap_license @@ -85902,8 +88321,7 @@ echo "obj-m := create_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_mnt_idmap_license/" >>build/Makefile fi @@ -85916,8 +88334,7 @@ cachevar="zfs_cv_kernel_create_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/create_userns || mkdir -p build/create_userns @@ -85970,14 +88387,12 @@ echo "obj-m := create_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/create_userns_license || mkdir -p build/create_userns_license @@ -86030,8 +88445,7 @@ echo "obj-m := create_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_userns_license/" >>build/Makefile fi @@ -86044,8 +88458,7 @@ cachevar="zfs_cv_kernel_create_flags_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/create_flags || mkdir -p build/create_flags @@ -86097,14 +88510,12 @@ echo "obj-m := create_flags.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_flags/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/create_flags_license || mkdir -p build/create_flags_license @@ -86156,8 +88567,7 @@ echo "obj-m := create_flags_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += create_flags_license/" >>build/Makefile fi @@ -86171,8 +88581,7 @@ cachevar="zfs_cv_kernel_permission_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/permission_mnt_idmap || mkdir -p build/permission_mnt_idmap @@ -86224,14 +88633,12 @@ echo "obj-m := permission_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/permission_mnt_idmap_license || mkdir -p build/permission_mnt_idmap_license @@ -86283,8 +88690,7 @@ echo "obj-m := permission_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_mnt_idmap_license/" >>build/Makefile fi @@ -86297,8 +88703,7 @@ cachevar="zfs_cv_kernel_permission_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/permission_userns || mkdir -p build/permission_userns @@ -86350,14 +88755,12 @@ echo "obj-m := permission_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/permission_userns_license || mkdir -p build/permission_userns_license @@ -86409,8 +88812,7 @@ echo "obj-m := permission_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += permission_userns_license/" >>build/Makefile fi @@ -86424,8 +88826,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile_mnt_idmap || mkdir -p build/inode_operations_tmpfile_mnt_idmap @@ -86475,14 +88876,12 @@ echo "obj-m := inode_operations_tmpfile_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_mnt_idmap_license || mkdir -p build/inode_operations_tmpfile_mnt_idmap_license @@ -86532,8 +88931,7 @@ echo "obj-m := inode_operations_tmpfile_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_mnt_idmap_license/" >>build/Makefile fi @@ -86545,8 +88943,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile || mkdir -p build/inode_operations_tmpfile @@ -86596,14 +88993,12 @@ echo "obj-m := inode_operations_tmpfile.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_license || mkdir -p build/inode_operations_tmpfile_license @@ -86653,8 +89048,7 @@ echo "obj-m := inode_operations_tmpfile_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_license/" >>build/Makefile fi @@ -86666,8 +89060,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile_dentry_userns || mkdir -p build/inode_operations_tmpfile_dentry_userns @@ -86717,14 +89110,12 @@ echo "obj-m := inode_operations_tmpfile_dentry_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_dentry_userns_license || mkdir -p build/inode_operations_tmpfile_dentry_userns_license @@ -86774,8 +89165,7 @@ echo "obj-m := inode_operations_tmpfile_dentry_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry_userns_license/" >>build/Makefile fi @@ -86787,8 +89177,7 @@ cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_tmpfile_dentry || mkdir -p build/inode_operations_tmpfile_dentry @@ -86837,14 +89226,12 @@ echo "obj-m := inode_operations_tmpfile_dentry.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_tmpfile_dentry_license || mkdir -p build/inode_operations_tmpfile_dentry_license @@ -86893,8 +89280,7 @@ echo "obj-m := inode_operations_tmpfile_dentry_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_tmpfile_dentry_license/" >>build/Makefile fi @@ -86909,8 +89295,7 @@ cachevar="zfs_cv_kernel_dentry_operations_d_automount_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/dentry_operations_d_automount || mkdir -p build/dentry_operations_d_automount @@ -86957,14 +89342,12 @@ echo "obj-m := dentry_operations_d_automount.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_automount/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/dentry_operations_d_automount_license || mkdir -p build/dentry_operations_d_automount_license @@ -87011,8 +89394,7 @@ echo "obj-m := dentry_operations_d_automount_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_automount_license/" >>build/Makefile fi @@ -87026,8 +89408,7 @@ cachevar="zfs_cv_kernel_dentry_operations_d_revalidate_4args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/dentry_operations_d_revalidate_4args || mkdir -p build/dentry_operations_d_revalidate_4args @@ -87076,14 +89457,12 @@ echo "obj-m := dentry_operations_d_revalidate_4args.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_revalidate_4args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/dentry_operations_d_revalidate_4args_license || mkdir -p build/dentry_operations_d_revalidate_4args_license @@ -87132,8 +89511,7 @@ echo "obj-m := dentry_operations_d_revalidate_4args_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += dentry_operations_d_revalidate_4args_license/" >>build/Makefile fi @@ -87148,8 +89526,7 @@ cachevar="zfs_cv_kernel_export_operations_commit_metadata_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/export_operations_commit_metadata || mkdir -p build/export_operations_commit_metadata @@ -87196,14 +89573,12 @@ echo "obj-m := export_operations_commit_metadata.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += export_operations_commit_metadata/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/export_operations_commit_metadata_license || mkdir -p build/export_operations_commit_metadata_license @@ -87250,8 +89625,7 @@ echo "obj-m := export_operations_commit_metadata_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += export_operations_commit_metadata_license/" >>build/Makefile fi @@ -87265,8 +89639,7 @@ cachevar="zfs_cv_kernel_setattr_prepare_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/setattr_prepare || mkdir -p build/setattr_prepare @@ -87314,14 +89687,12 @@ echo "obj-m := setattr_prepare.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/setattr_prepare_license || mkdir -p build/setattr_prepare_license @@ -87369,8 +89740,7 @@ echo "obj-m := setattr_prepare_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_license/" >>build/Makefile fi @@ -87383,8 +89753,7 @@ cachevar="zfs_cv_kernel_setattr_prepare_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/setattr_prepare_userns || mkdir -p build/setattr_prepare_userns @@ -87433,14 +89802,12 @@ echo "obj-m := setattr_prepare_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/setattr_prepare_userns_license || mkdir -p build/setattr_prepare_userns_license @@ -87489,8 +89856,7 @@ echo "obj-m := setattr_prepare_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_userns_license/" >>build/Makefile fi @@ -87503,8 +89869,7 @@ cachevar="zfs_cv_kernel_setattr_prepare_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/setattr_prepare_mnt_idmap || mkdir -p build/setattr_prepare_mnt_idmap @@ -87553,14 +89918,12 @@ echo "obj-m := setattr_prepare_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/setattr_prepare_mnt_idmap_license || mkdir -p build/setattr_prepare_mnt_idmap_license @@ -87609,8 +89972,7 @@ echo "obj-m := setattr_prepare_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += setattr_prepare_mnt_idmap_license/" >>build/Makefile fi @@ -87624,8 +89986,7 @@ cachevar="zfs_cv_kernel_insert_inode_locked_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/insert_inode_locked || mkdir -p build/insert_inode_locked @@ -87670,14 +90031,12 @@ echo "obj-m := insert_inode_locked.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += insert_inode_locked/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/insert_inode_locked_license || mkdir -p build/insert_inode_locked_license @@ -87722,8 +90081,7 @@ echo "obj-m := insert_inode_locked_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += insert_inode_locked_license/" >>build/Makefile fi @@ -87735,10 +90093,461 @@ + + cachevar="zfs_cv_kernel_d_obtain_alias_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/d_obtain_alias || mkdir -p build/d_obtain_alias +cat confdefs.h - <<_ACEOF >build/d_obtain_alias/d_obtain_alias.c + +#include + + #include + + +int +main (void) +{ + + d_obtain_alias(NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_obtain_alias || mkdir -p build/d_obtain_alias + + file=build/d_obtain_alias/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_obtain_alias + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_obtain_alias.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_obtain_alias/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/d_obtain_alias_license || mkdir -p build/d_obtain_alias_license +cat confdefs.h - <<_ACEOF >build/d_obtain_alias_license/d_obtain_alias_license.c + +#include + + #include + + +int +main (void) +{ + + d_obtain_alias(NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_obtain_alias_license || mkdir -p build/d_obtain_alias_license + + file=build/d_obtain_alias_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_obtain_alias_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_obtain_alias_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_obtain_alias_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_d_set_d_op_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/d_set_d_op || mkdir -p build/d_set_d_op +cat confdefs.h - <<_ACEOF >build/d_set_d_op/d_set_d_op.c + +#include + + #include + + +int +main (void) +{ + + d_set_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_set_d_op || mkdir -p build/d_set_d_op + + file=build/d_set_d_op/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_set_d_op + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_set_d_op.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_set_d_op/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/d_set_d_op_license || mkdir -p build/d_set_d_op_license +cat confdefs.h - <<_ACEOF >build/d_set_d_op_license/d_set_d_op_license.c + +#include + + #include + + +int +main (void) +{ + + d_set_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/d_set_d_op_license || mkdir -p build/d_set_d_op_license + + file=build/d_set_d_op_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/d_set_d_op_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := d_set_d_op_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += d_set_d_op_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_set_default_d_op_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/set_default_d_op || mkdir -p build/set_default_d_op +cat confdefs.h - <<_ACEOF >build/set_default_d_op/set_default_d_op.c + +#include + + #include + + +int +main (void) +{ + + set_default_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/set_default_d_op || mkdir -p build/set_default_d_op + + file=build/set_default_d_op/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_default_d_op + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := set_default_d_op.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += set_default_d_op/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/set_default_d_op_license || mkdir -p build/set_default_d_op_license +cat confdefs.h - <<_ACEOF >build/set_default_d_op_license/set_default_d_op_license.c + +#include + + #include + + +int +main (void) +{ + + set_default_d_op(NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/set_default_d_op_license || mkdir -p build/set_default_d_op_license + + file=build/set_default_d_op_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_default_d_op_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := set_default_d_op_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += set_default_d_op_license/" >>build/Makefile +fi + + +fi + +fi + + + + + + cachevar="zfs_cv_kernel_dentry_alias_d_u_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/dentry_alias_d_u || mkdir -p build/dentry_alias_d_u +cat confdefs.h - <<_ACEOF >build/dentry_alias_d_u/dentry_alias_d_u.c + +#include + + #include + #include + #include + + +int +main (void) +{ + + struct inode *inode __attribute__ ((unused)) = NULL; + struct dentry *dentry __attribute__ ((unused)) = NULL; + hlist_for_each_entry(dentry, &inode->i_dentry, + d_u.d_alias) { + d_drop(dentry); + } + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/dentry_alias_d_u || mkdir -p build/dentry_alias_d_u + + file=build/dentry_alias_d_u/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/dentry_alias_d_u + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := dentry_alias_d_u.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += dentry_alias_d_u/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/dentry_alias_d_u_license || mkdir -p build/dentry_alias_d_u_license +cat confdefs.h - <<_ACEOF >build/dentry_alias_d_u_license/dentry_alias_d_u_license.c + +#include + + #include + #include + #include + + +int +main (void) +{ + + struct inode *inode __attribute__ ((unused)) = NULL; + struct dentry *dentry __attribute__ ((unused)) = NULL; + hlist_for_each_entry(dentry, &inode->i_dentry, + d_u.d_alias) { + d_drop(dentry); + } + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/dentry_alias_d_u_license || mkdir -p build/dentry_alias_d_u_license + + file=build/dentry_alias_d_u_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/dentry_alias_d_u_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := dentry_alias_d_u_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += dentry_alias_d_u_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_truncate_setsize_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/truncate_setsize || mkdir -p build/truncate_setsize @@ -87783,14 +90592,12 @@ echo "obj-m := truncate_setsize.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += truncate_setsize/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/truncate_setsize_license || mkdir -p build/truncate_setsize_license @@ -87835,8 +90642,7 @@ echo "obj-m := truncate_setsize_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += truncate_setsize_license/" >>build/Makefile fi @@ -87851,8 +90657,7 @@ cachevar="zfs_cv_kernel_security_inode_init_security_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/security_inode_init_security || mkdir -p build/security_inode_init_security @@ -87902,14 +90707,12 @@ echo "obj-m := security_inode_init_security.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += security_inode_init_security/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/security_inode_init_security_license || mkdir -p build/security_inode_init_security_license @@ -87959,8 +90762,7 @@ echo "obj-m := security_inode_init_security_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += security_inode_init_security_license/" >>build/Makefile fi @@ -87973,35 +90775,81 @@ - cachevar="zfs_cv_kernel_file_system_type_mount_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_fs_context_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/file_system_type_mount || mkdir -p build/file_system_type_mount -cat confdefs.h - <<_ACEOF >build/file_system_type_mount/file_system_type_mount.c +test -d build/fs_context || mkdir -p build/fs_context +cat confdefs.h - <<_ACEOF >build/fs_context/fs_context.c #include - #include + #include + #include + + +int +main (void) +{ + + static struct fs_context fs __attribute__ ((unused)) = { 0 }; + static struct fs_context *fsp __attribute__ ((unused)); + fsp = vfs_dup_fs_context(&fs); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/fs_context || mkdir -p build/fs_context + + file=build/fs_context/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_context + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := fs_context.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += fs_context/" >>build/Makefile +fi + - static struct dentry * - mount(struct file_system_type *fs_type, int flags, - const char *osname, void *data) { - struct dentry *d = NULL; - return (d); - } + if test -n "" ; then : - static struct file_system_type fst __attribute__ ((unused)) = { - .mount = mount, - }; + +test -d build/fs_context_license || mkdir -p build/fs_context_license +cat confdefs.h - <<_ACEOF >build/fs_context_license/fs_context_license.c + +#include + + #include + #include int main (void) { + static struct fs_context fs __attribute__ ((unused)) = { 0 }; + static struct fs_context *fsp __attribute__ ((unused)); + fsp = vfs_dup_fs_context(&fs); + ; return 0; } @@ -88009,60 +90857,124 @@ MODULE_DESCRIPTION("conftest"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE("Dual BSD/GPL"); +MODULE_LICENSE(); _ACEOF test -d build || mkdir -p build - test -d build/file_system_type_mount || mkdir -p build/file_system_type_mount + test -d build/fs_context_license || mkdir -p build/fs_context_license - file=build/file_system_type_mount/Makefile + file=build/fs_context_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/file_system_type_mount +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_context_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := file_system_type_mount.o" >>$file + echo "obj-m := fs_context_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += file_system_type_mount/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += fs_context_license/" >>build/Makefile fi - if test -n "" -then : +fi +fi -test -d build/file_system_type_mount_license || mkdir -p build/file_system_type_mount_license -cat confdefs.h - <<_ACEOF >build/file_system_type_mount_license/file_system_type_mount_license.c + + + + cachevar="zfs_cv_kernel_fs_parse_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/fs_parse || mkdir -p build/fs_parse +cat confdefs.h - <<_ACEOF >build/fs_parse/fs_parse.c #include - #include + #include + #include + + +int +main (void) +{ + + static const struct fs_parameter_spec specs[] = { + {} + }; + int test __attribute__ ((unused)); + struct fs_context *fc __attribute__ ((unused)) = NULL; + struct fs_parameter param __attribute__ ((unused)); + struct fs_parse_result result __attribute__ ((unused)); + test = fs_parse(fc, specs, ¶m, &result); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + - static struct dentry * - mount(struct file_system_type *fs_type, int flags, - const char *osname, void *data) { - struct dentry *d = NULL; - return (d); - } + test -d build || mkdir -p build + test -d build/fs_parse || mkdir -p build/fs_parse + + file=build/fs_parse/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_parse + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := fs_parse.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += fs_parse/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/fs_parse_license || mkdir -p build/fs_parse_license +cat confdefs.h - <<_ACEOF >build/fs_parse_license/fs_parse_license.c + +#include - static struct file_system_type fst __attribute__ ((unused)) = { - .mount = mount, - }; + #include + #include int main (void) { + static const struct fs_parameter_spec specs[] = { + {} + }; + int test __attribute__ ((unused)); + struct fs_context *fc __attribute__ ((unused)) = NULL; + struct fs_parameter param __attribute__ ((unused)); + struct fs_parse_result result __attribute__ ((unused)); + test = fs_parse(fc, specs, ¶m, &result); + ; return 0; } @@ -88076,24 +90988,23 @@ test -d build || mkdir -p build - test -d build/file_system_type_mount_license || mkdir -p build/file_system_type_mount_license + test -d build/fs_parse_license || mkdir -p build/fs_parse_license - file=build/file_system_type_mount_license/Makefile + file=build/fs_parse_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/file_system_type_mount_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/fs_parse_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := file_system_type_mount_license.o" >>$file + echo "obj-m := fs_parse_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += file_system_type_mount_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += fs_parse_license/" >>build/Makefile fi @@ -88104,25 +91015,25 @@ - cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_vfs_parse_fs_string_3args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/sb_dying || mkdir -p build/sb_dying -cat confdefs.h - <<_ACEOF >build/sb_dying/sb_dying.c +test -d build/vfs_parse_fs_string_3args || mkdir -p build/vfs_parse_fs_string_3args +cat confdefs.h - <<_ACEOF >build/vfs_parse_fs_string_3args/vfs_parse_fs_string_3args.c #include #include + #include int main (void) { - (void) SB_DYING; + vfs_parse_fs_string(NULL, NULL, NULL); ; return 0; @@ -88137,44 +91048,43 @@ test -d build || mkdir -p build - test -d build/sb_dying || mkdir -p build/sb_dying + test -d build/vfs_parse_fs_string_3args || mkdir -p build/vfs_parse_fs_string_3args - file=build/sb_dying/Makefile + file=build/vfs_parse_fs_string_3args/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_parse_fs_string_3args ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sb_dying.o" >>$file + echo "obj-m := vfs_parse_fs_string_3args.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sb_dying/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_parse_fs_string_3args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : -test -d build/sb_dying_license || mkdir -p build/sb_dying_license -cat confdefs.h - <<_ACEOF >build/sb_dying_license/sb_dying_license.c +test -d build/vfs_parse_fs_string_3args_license || mkdir -p build/vfs_parse_fs_string_3args_license +cat confdefs.h - <<_ACEOF >build/vfs_parse_fs_string_3args_license/vfs_parse_fs_string_3args_license.c #include #include + #include int main (void) { - (void) SB_DYING; + vfs_parse_fs_string(NULL, NULL, NULL); ; return 0; @@ -88189,24 +91099,23 @@ test -d build || mkdir -p build - test -d build/sb_dying_license || mkdir -p build/sb_dying_license + test -d build/vfs_parse_fs_string_3args_license || mkdir -p build/vfs_parse_fs_string_3args_license - file=build/sb_dying_license/Makefile + file=build/vfs_parse_fs_string_3args_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_parse_fs_string_3args_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sb_dying_license.o" >>$file + echo "obj-m := vfs_parse_fs_string_3args_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sb_dying_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_parse_fs_string_3args_license/" >>build/Makefile fi @@ -88217,14 +91126,13 @@ - cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/set_nlink || mkdir -p build/set_nlink -cat confdefs.h - <<_ACEOF >build/set_nlink/set_nlink.c +test -d build/sb_dying || mkdir -p build/sb_dying +cat confdefs.h - <<_ACEOF >build/sb_dying/sb_dying.c #include @@ -88235,9 +91143,7 @@ main (void) { - struct inode node; - unsigned int link = 0; - (void) set_nlink(&node, link); + (void) SB_DYING; ; return 0; @@ -88252,33 +91158,31 @@ test -d build || mkdir -p build - test -d build/set_nlink || mkdir -p build/set_nlink + test -d build/sb_dying || mkdir -p build/sb_dying - file=build/set_nlink/Makefile + file=build/sb_dying/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := set_nlink.o" >>$file + echo "obj-m := sb_dying.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += set_nlink/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += sb_dying/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : -test -d build/set_nlink_license || mkdir -p build/set_nlink_license -cat confdefs.h - <<_ACEOF >build/set_nlink_license/set_nlink_license.c +test -d build/sb_dying_license || mkdir -p build/sb_dying_license +cat confdefs.h - <<_ACEOF >build/sb_dying_license/sb_dying_license.c #include @@ -88289,9 +91193,7 @@ main (void) { - struct inode node; - unsigned int link = 0; - (void) set_nlink(&node, link); + (void) SB_DYING; ; return 0; @@ -88306,24 +91208,23 @@ test -d build || mkdir -p build - test -d build/set_nlink_license || mkdir -p build/set_nlink_license + test -d build/sb_dying_license || mkdir -p build/sb_dying_license - file=build/set_nlink_license/Makefile + file=build/sb_dying_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sb_dying_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := set_nlink_license.o" >>$file + echo "obj-m := sb_dying_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += set_nlink_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += sb_dying_license/" >>build/Makefile fi @@ -88334,14 +91235,13 @@ - cachevar="zfs_cv_kernel_sget_5args_$_zfs_linux_cache_checksum" + cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : -test -d build/sget_5args || mkdir -p build/sget_5args -cat confdefs.h - <<_ACEOF >build/sget_5args/sget_5args.c +test -d build/set_nlink || mkdir -p build/set_nlink +cat confdefs.h - <<_ACEOF >build/set_nlink/set_nlink.c #include @@ -88352,12 +91252,9 @@ main (void) { - struct file_system_type *type = NULL; - int (*test)(struct super_block *,void *) = NULL; - int (*set)(struct super_block *,void *) = NULL; - int flags = 0; - void *data = NULL; - (void) sget(type, test, set, flags, data); + struct inode node; + unsigned int link = 0; + (void) set_nlink(&node, link); ; return 0; @@ -88372,33 +91269,31 @@ test -d build || mkdir -p build - test -d build/sget_5args || mkdir -p build/sget_5args + test -d build/set_nlink || mkdir -p build/set_nlink - file=build/sget_5args/Makefile + file=build/set_nlink/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sget_5args +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sget_5args.o" >>$file + echo "obj-m := set_nlink.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sget_5args/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += set_nlink/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : -test -d build/sget_5args_license || mkdir -p build/sget_5args_license -cat confdefs.h - <<_ACEOF >build/sget_5args_license/sget_5args_license.c +test -d build/set_nlink_license || mkdir -p build/set_nlink_license +cat confdefs.h - <<_ACEOF >build/set_nlink_license/set_nlink_license.c #include @@ -88409,12 +91304,9 @@ main (void) { - struct file_system_type *type = NULL; - int (*test)(struct super_block *,void *) = NULL; - int (*set)(struct super_block *,void *) = NULL; - int flags = 0; - void *data = NULL; - (void) sget(type, test, set, flags, data); + struct inode node; + unsigned int link = 0; + (void) set_nlink(&node, link); ; return 0; @@ -88429,24 +91321,23 @@ test -d build || mkdir -p build - test -d build/sget_5args_license || mkdir -p build/sget_5args_license + test -d build/set_nlink_license || mkdir -p build/set_nlink_license - file=build/sget_5args_license/Makefile + file=build/set_nlink_license/Makefile cat - <<_ACEOF >$file # Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/sget_5args_license +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/set_nlink_license ccflags-y := -Werror $FRAME_LARGER_THAN _ACEOF - echo "obj-m := sget_5args_license.o" >>$file + echo "obj-m := set_nlink_license.o" >>$file - if test "xyes" = "xyes" -then : - echo "obj-m += sget_5args_license/" >>build/Makefile + if test "xyes" = "xyes"; then : + echo "obj-m += set_nlink_license/" >>build/Makefile fi @@ -88459,8 +91350,7 @@ cachevar="zfs_cv_kernel_vfs_has_filemap_dirty_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_filemap_dirty_folio || mkdir -p build/vfs_has_filemap_dirty_folio @@ -88509,14 +91399,12 @@ echo "obj-m := vfs_has_filemap_dirty_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_filemap_dirty_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_filemap_dirty_folio_license || mkdir -p build/vfs_has_filemap_dirty_folio_license @@ -88565,8 +91453,7 @@ echo "obj-m := vfs_has_filemap_dirty_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_filemap_dirty_folio_license/" >>build/Makefile fi @@ -88580,8 +91467,7 @@ cachevar="zfs_cv_kernel_vfs_has_read_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_read_folio || mkdir -p build/vfs_has_read_folio @@ -88635,14 +91521,12 @@ echo "obj-m := vfs_has_read_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_read_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_read_folio_license || mkdir -p build/vfs_has_read_folio_license @@ -88696,8 +91580,7 @@ echo "obj-m := vfs_has_read_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_read_folio_license/" >>build/Makefile fi @@ -88711,8 +91594,7 @@ cachevar="zfs_cv_kernel_vfs_has_migrate_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_migrate_folio || mkdir -p build/vfs_has_migrate_folio @@ -88761,14 +91643,12 @@ echo "obj-m := vfs_has_migrate_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migrate_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_migrate_folio_license || mkdir -p build/vfs_has_migrate_folio_license @@ -88817,8 +91697,7 @@ echo "obj-m := vfs_has_migrate_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migrate_folio_license/" >>build/Makefile fi @@ -88832,8 +91711,7 @@ cachevar="zfs_cv_kernel_vfs_has_migratepage_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_migratepage || mkdir -p build/vfs_has_migratepage @@ -88882,14 +91760,12 @@ echo "obj-m := vfs_has_migratepage.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migratepage/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_migratepage_license || mkdir -p build/vfs_has_migratepage_license @@ -88938,8 +91814,7 @@ echo "obj-m := vfs_has_migratepage_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_migratepage_license/" >>build/Makefile fi @@ -88953,8 +91828,7 @@ cachevar="zfs_cv_kernel_vfs_fsync_2args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_fsync_2args || mkdir -p build/vfs_fsync_2args @@ -88999,14 +91873,12 @@ echo "obj-m := vfs_fsync_2args.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_fsync_2args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_fsync_2args_license || mkdir -p build/vfs_fsync_2args_license @@ -89051,8 +91923,7 @@ echo "obj-m := vfs_fsync_2args_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_fsync_2args_license/" >>build/Makefile fi @@ -89066,8 +91937,7 @@ cachevar="zfs_cv_kernel_vfs_has_readpages_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_readpages || mkdir -p build/vfs_has_readpages @@ -89115,14 +91985,12 @@ echo "obj-m := vfs_has_readpages.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_readpages/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_readpages_license || mkdir -p build/vfs_has_readpages_license @@ -89170,8 +92038,7 @@ echo "obj-m := vfs_has_readpages_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_readpages_license/" >>build/Makefile fi @@ -89183,10 +92050,124 @@ + cachevar="zfs_cv_kernel_vfs_has_writepage_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/vfs_has_writepage || mkdir -p build/vfs_has_writepage +cat confdefs.h - <<_ACEOF >build/vfs_has_writepage/vfs_has_writepage.c + +#include + + #include + + static const struct address_space_operations + aops __attribute__ ((unused)) = { + .writepage = NULL, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/vfs_has_writepage || mkdir -p build/vfs_has_writepage + + file=build/vfs_has_writepage/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_has_writepage + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := vfs_has_writepage.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_has_writepage/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/vfs_has_writepage_license || mkdir -p build/vfs_has_writepage_license +cat confdefs.h - <<_ACEOF >build/vfs_has_writepage_license/vfs_has_writepage_license.c + +#include + + #include + + static const struct address_space_operations + aops __attribute__ ((unused)) = { + .writepage = NULL, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/vfs_has_writepage_license || mkdir -p build/vfs_has_writepage_license + + file=build/vfs_has_writepage_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/vfs_has_writepage_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := vfs_has_writepage_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += vfs_has_writepage_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_vfs_has_set_page_dirty_nobuffers_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_has_set_page_dirty_nobuffers || mkdir -p build/vfs_has_set_page_dirty_nobuffers @@ -89235,14 +92216,12 @@ echo "obj-m := vfs_has_set_page_dirty_nobuffers.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_set_page_dirty_nobuffers/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_has_set_page_dirty_nobuffers_license || mkdir -p build/vfs_has_set_page_dirty_nobuffers_license @@ -89291,8 +92270,7 @@ echo "obj-m := vfs_has_set_page_dirty_nobuffers_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_has_set_page_dirty_nobuffers_license/" >>build/Makefile fi @@ -89306,8 +92284,7 @@ cachevar="zfs_cv_kernel_fault_in_iov_iter_readable_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/fault_in_iov_iter_readable || mkdir -p build/fault_in_iov_iter_readable @@ -89357,14 +92334,12 @@ echo "obj-m := fault_in_iov_iter_readable.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fault_in_iov_iter_readable/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/fault_in_iov_iter_readable_license || mkdir -p build/fault_in_iov_iter_readable_license @@ -89414,8 +92389,7 @@ echo "obj-m := fault_in_iov_iter_readable_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fault_in_iov_iter_readable_license/" >>build/Makefile fi @@ -89428,8 +92402,7 @@ cachevar="zfs_cv_kernel_iov_iter_type_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iov_iter_type || mkdir -p build/iov_iter_type @@ -89476,14 +92449,12 @@ echo "obj-m := iov_iter_type.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_type/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iov_iter_type_license || mkdir -p build/iov_iter_type_license @@ -89530,8 +92501,7 @@ echo "obj-m := iov_iter_type_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_type_license/" >>build/Makefile fi @@ -89544,8 +92514,7 @@ cachevar="zfs_cv_kernel_iov_iter_get_pages2_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iov_iter_get_pages2 || mkdir -p build/iov_iter_get_pages2 @@ -89598,14 +92567,12 @@ echo "obj-m := iov_iter_get_pages2.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_get_pages2/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iov_iter_get_pages2_license || mkdir -p build/iov_iter_get_pages2_license @@ -89658,8 +92625,7 @@ echo "obj-m := iov_iter_get_pages2_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iov_iter_get_pages2_license/" >>build/Makefile fi @@ -89672,8 +92638,7 @@ cachevar="zfs_cv_kernel_iter_is_ubuf_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iter_is_ubuf || mkdir -p build/iter_is_ubuf @@ -89721,14 +92686,12 @@ echo "obj-m := iter_is_ubuf.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_is_ubuf/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iter_is_ubuf_license || mkdir -p build/iter_is_ubuf_license @@ -89776,8 +92739,7 @@ echo "obj-m := iter_is_ubuf_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_is_ubuf_license/" >>build/Makefile fi @@ -89790,8 +92752,7 @@ cachevar="zfs_cv_kernel_iter_iov_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iter_iov || mkdir -p build/iter_iov @@ -89838,14 +92799,12 @@ echo "obj-m := iter_iov.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_iov/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iter_iov_license || mkdir -p build/iter_iov_license @@ -89892,8 +92851,7 @@ echo "obj-m := iter_iov_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iter_iov_license/" >>build/Makefile fi @@ -89907,8 +92865,7 @@ cachevar="zfs_cv_kernel_generic_copy_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_copy_file_range || mkdir -p build/generic_copy_file_range @@ -89960,14 +92917,12 @@ echo "obj-m := generic_copy_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_copy_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_copy_file_range_license || mkdir -p build/generic_copy_file_range_license @@ -90019,8 +92974,7 @@ echo "obj-m := generic_copy_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_copy_file_range_license/" >>build/Makefile fi @@ -90034,8 +92988,7 @@ cachevar="zfs_cv_kernel_splice_copy_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/splice_copy_file_range || mkdir -p build/splice_copy_file_range @@ -90086,14 +93039,12 @@ echo "obj-m := splice_copy_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += splice_copy_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/splice_copy_file_range_license || mkdir -p build/splice_copy_file_range_license @@ -90144,8 +93095,7 @@ echo "obj-m := splice_copy_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += splice_copy_file_range_license/" >>build/Makefile fi @@ -90159,8 +93109,7 @@ cachevar="zfs_cv_kernel_vfs_remap_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_remap_file_range || mkdir -p build/vfs_remap_file_range @@ -90217,14 +93166,12 @@ echo "obj-m := vfs_remap_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_remap_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_remap_file_range_license || mkdir -p build/vfs_remap_file_range_license @@ -90281,8 +93228,7 @@ echo "obj-m := vfs_remap_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_remap_file_range_license/" >>build/Makefile fi @@ -90296,8 +93242,7 @@ cachevar="zfs_cv_kernel_vfs_clone_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_clone_file_range || mkdir -p build/vfs_clone_file_range @@ -90354,14 +93299,12 @@ echo "obj-m := vfs_clone_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_clone_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_clone_file_range_license || mkdir -p build/vfs_clone_file_range_license @@ -90418,8 +93361,7 @@ echo "obj-m := vfs_clone_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_clone_file_range_license/" >>build/Makefile fi @@ -90433,8 +93375,7 @@ cachevar="zfs_cv_kernel_vfs_dedupe_file_range_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/vfs_dedupe_file_range || mkdir -p build/vfs_dedupe_file_range @@ -90491,14 +93432,12 @@ echo "obj-m := vfs_dedupe_file_range.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_dedupe_file_range/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/vfs_dedupe_file_range_license || mkdir -p build/vfs_dedupe_file_range_license @@ -90555,8 +93494,7 @@ echo "obj-m := vfs_dedupe_file_range_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += vfs_dedupe_file_range_license/" >>build/Makefile fi @@ -90570,8 +93508,7 @@ cachevar="zfs_cv_kernel_kmap_atomic_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kmap_atomic || mkdir -p build/kmap_atomic @@ -90586,7 +93523,7 @@ main (void) { - struct page page; + struct page page = {}; kmap_atomic(&page); ; @@ -90617,14 +93554,12 @@ echo "obj-m := kmap_atomic.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_atomic/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kmap_atomic_license || mkdir -p build/kmap_atomic_license @@ -90639,7 +93574,7 @@ main (void) { - struct page page; + struct page page = {}; kmap_atomic(&page); ; @@ -90670,8 +93605,7 @@ echo "obj-m := kmap_atomic_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_atomic_license/" >>build/Makefile fi @@ -90685,8 +93619,7 @@ cachevar="zfs_cv_kernel_kmap_local_page_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kmap_local_page || mkdir -p build/kmap_local_page @@ -90732,14 +93665,12 @@ echo "obj-m := kmap_local_page.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_local_page/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kmap_local_page_license || mkdir -p build/kmap_local_page_license @@ -90785,8 +93716,7 @@ echo "obj-m := kmap_local_page_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kmap_local_page_license/" >>build/Makefile fi @@ -90798,10 +93728,10 @@ + cachevar="zfs_cv_kernel_follow_down_one_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/follow_down_one || mkdir -p build/follow_down_one @@ -90847,14 +93777,12 @@ echo "obj-m := follow_down_one.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += follow_down_one/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/follow_down_one_license || mkdir -p build/follow_down_one_license @@ -90900,8 +93828,7 @@ echo "obj-m := follow_down_one_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += follow_down_one_license/" >>build/Makefile fi @@ -90913,10 +93840,121 @@ + cachevar="zfs_cv_kernel_follow_down_flags_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/follow_down_flags || mkdir -p build/follow_down_flags +cat confdefs.h - <<_ACEOF >build/follow_down_flags/follow_down_flags.c + +#include + + #include + + +int +main (void) +{ + + struct path *p = NULL; + follow_down(p, 0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/follow_down_flags || mkdir -p build/follow_down_flags + + file=build/follow_down_flags/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/follow_down_flags + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := follow_down_flags.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += follow_down_flags/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/follow_down_flags_license || mkdir -p build/follow_down_flags_license +cat confdefs.h - <<_ACEOF >build/follow_down_flags_license/follow_down_flags_license.c + +#include + + #include + + +int +main (void) +{ + + struct path *p = NULL; + follow_down(p, 0); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/follow_down_flags_license || mkdir -p build/follow_down_flags_license + + file=build/follow_down_flags_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/follow_down_flags_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := follow_down_flags_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += follow_down_flags_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_make_request_fn_blk_qc_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/make_request_fn_blk_qc_t || mkdir -p build/make_request_fn_blk_qc_t @@ -90963,14 +94001,12 @@ echo "obj-m := make_request_fn_blk_qc_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += make_request_fn_blk_qc_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/make_request_fn_blk_qc_t_license || mkdir -p build/make_request_fn_blk_qc_t_license @@ -91017,8 +94053,7 @@ echo "obj-m := make_request_fn_blk_qc_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += make_request_fn_blk_qc_t_license/" >>build/Makefile fi @@ -91031,8 +94066,7 @@ cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_queue_request_fn || mkdir -p build/blk_alloc_queue_request_fn @@ -91080,14 +94114,12 @@ echo "obj-m := blk_alloc_queue_request_fn.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_queue_request_fn_license || mkdir -p build/blk_alloc_queue_request_fn_license @@ -91135,8 +94167,7 @@ echo "obj-m := blk_alloc_queue_request_fn_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn_license/" >>build/Makefile fi @@ -91149,8 +94180,7 @@ cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_rh_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_queue_request_fn_rh || mkdir -p build/blk_alloc_queue_request_fn_rh @@ -91198,14 +94228,12 @@ echo "obj-m := blk_alloc_queue_request_fn_rh.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn_rh/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_queue_request_fn_rh_license || mkdir -p build/blk_alloc_queue_request_fn_rh_license @@ -91253,8 +94281,7 @@ echo "obj-m := blk_alloc_queue_request_fn_rh_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_queue_request_fn_rh_license/" >>build/Makefile fi @@ -91267,8 +94294,7 @@ cachevar="zfs_cv_kernel_block_device_operations_submit_bio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/block_device_operations_submit_bio || mkdir -p build/block_device_operations_submit_bio @@ -91314,14 +94340,12 @@ echo "obj-m := block_device_operations_submit_bio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_submit_bio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/block_device_operations_submit_bio_license || mkdir -p build/block_device_operations_submit_bio_license @@ -91367,8 +94391,7 @@ echo "obj-m := block_device_operations_submit_bio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += block_device_operations_submit_bio_license/" >>build/Makefile fi @@ -91381,8 +94404,7 @@ cachevar="zfs_cv_kernel_blk_alloc_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_disk || mkdir -p build/blk_alloc_disk @@ -91428,14 +94450,12 @@ echo "obj-m := blk_alloc_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_disk_license || mkdir -p build/blk_alloc_disk_license @@ -91481,8 +94501,7 @@ echo "obj-m := blk_alloc_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk_license/" >>build/Makefile fi @@ -91495,8 +94514,7 @@ cachevar="zfs_cv_kernel_blk_alloc_disk_2arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_alloc_disk_2arg || mkdir -p build/blk_alloc_disk_2arg @@ -91543,14 +94561,12 @@ echo "obj-m := blk_alloc_disk_2arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk_2arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_alloc_disk_2arg_license || mkdir -p build/blk_alloc_disk_2arg_license @@ -91597,8 +94613,7 @@ echo "obj-m := blk_alloc_disk_2arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_alloc_disk_2arg_license/" >>build/Makefile fi @@ -91611,8 +94626,7 @@ cachevar="zfs_cv_kernel_blkdev_queue_limits_features_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blkdev_queue_limits_features || mkdir -p build/blkdev_queue_limits_features @@ -91658,14 +94672,12 @@ echo "obj-m := blkdev_queue_limits_features.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_queue_limits_features/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blkdev_queue_limits_features_license || mkdir -p build/blkdev_queue_limits_features_license @@ -91711,8 +94723,7 @@ echo "obj-m := blkdev_queue_limits_features_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blkdev_queue_limits_features_license/" >>build/Makefile fi @@ -91725,8 +94736,7 @@ cachevar="zfs_cv_kernel_blk_cleanup_disk_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/blk_cleanup_disk || mkdir -p build/blk_cleanup_disk @@ -91772,14 +94782,12 @@ echo "obj-m := blk_cleanup_disk.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_cleanup_disk/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/blk_cleanup_disk_license || mkdir -p build/blk_cleanup_disk_license @@ -91825,8 +94833,7 @@ echo "obj-m := blk_cleanup_disk_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += blk_cleanup_disk_license/" >>build/Makefile fi @@ -91840,8 +94847,7 @@ cachevar="zfs_cv_kernel_bdev_io_acct_63_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_io_acct_63 || mkdir -p build/bdev_io_acct_63 @@ -91893,14 +94899,12 @@ echo "obj-m := bdev_io_acct_63.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_63/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_io_acct_63_license || mkdir -p build/bdev_io_acct_63_license @@ -91952,8 +94956,7 @@ echo "obj-m := bdev_io_acct_63_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_63_license/" >>build/Makefile fi @@ -91966,8 +94969,7 @@ cachevar="zfs_cv_kernel_bdev_io_acct_old_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bdev_io_acct_old || mkdir -p build/bdev_io_acct_old @@ -92019,14 +95021,12 @@ echo "obj-m := bdev_io_acct_old.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_old/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bdev_io_acct_old_license || mkdir -p build/bdev_io_acct_old_license @@ -92078,8 +95078,7 @@ echo "obj-m := bdev_io_acct_old_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bdev_io_acct_old_license/" >>build/Makefile fi @@ -92092,8 +95091,7 @@ cachevar="zfs_cv_kernel_disk_io_acct_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/disk_io_acct || mkdir -p build/disk_io_acct @@ -92143,14 +95141,12 @@ echo "obj-m := disk_io_acct.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_io_acct/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/disk_io_acct_license || mkdir -p build/disk_io_acct_license @@ -92200,8 +95196,7 @@ echo "obj-m := disk_io_acct_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += disk_io_acct_license/" >>build/Makefile fi @@ -92214,8 +95209,7 @@ cachevar="zfs_cv_kernel_bio_io_acct_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_io_acct || mkdir -p build/bio_io_acct @@ -92264,14 +95258,12 @@ echo "obj-m := bio_io_acct.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_io_acct/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_io_acct_license || mkdir -p build/bio_io_acct_license @@ -92320,8 +95312,7 @@ echo "obj-m := bio_io_acct_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_io_acct_license/" >>build/Makefile fi @@ -92334,8 +95325,7 @@ cachevar="zfs_cv_kernel_generic_acct_4args_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_acct_4args || mkdir -p build/generic_acct_4args @@ -92386,14 +95376,12 @@ echo "obj-m := generic_acct_4args.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_acct_4args/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_acct_4args_license || mkdir -p build/generic_acct_4args_license @@ -92444,8 +95432,7 @@ echo "obj-m := generic_acct_4args_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_acct_4args_license/" >>build/Makefile fi @@ -92459,8 +95446,7 @@ cachevar="zfs_cv_kernel_kernel_fpu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kernel_fpu || mkdir -p build/kernel_fpu @@ -92514,14 +95500,12 @@ echo "obj-m := kernel_fpu.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_fpu/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/kernel_fpu_license || mkdir -p build/kernel_fpu_license @@ -92575,8 +95559,7 @@ echo "obj-m := kernel_fpu_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_fpu_license/" >>build/Makefile fi @@ -92589,8 +95572,7 @@ cachevar="zfs_cv_kernel___kernel_fpu_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/__kernel_fpu || mkdir -p build/__kernel_fpu @@ -92644,14 +95626,12 @@ echo "obj-m := __kernel_fpu.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __kernel_fpu/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/__kernel_fpu_license || mkdir -p build/__kernel_fpu_license @@ -92705,8 +95685,7 @@ echo "obj-m := __kernel_fpu_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += __kernel_fpu_license/" >>build/Makefile fi @@ -92719,8 +95698,7 @@ cachevar="zfs_cv_kernel_kernel_neon_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kernel_neon || mkdir -p build/kernel_neon @@ -92766,14 +95744,12 @@ echo "obj-m := kernel_neon.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_neon/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/kernel_neon_license || mkdir -p build/kernel_neon_license @@ -92819,8 +95795,7 @@ echo "obj-m := kernel_neon_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_neon_license/" >>build/Makefile fi @@ -92834,8 +95809,7 @@ cachevar="zfs_cv_kernel_type_fmode_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/type_fmode_t || mkdir -p build/type_fmode_t @@ -92880,14 +95854,12 @@ echo "obj-m := type_fmode_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_fmode_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/type_fmode_t_license || mkdir -p build/type_fmode_t_license @@ -92932,8 +95904,7 @@ echo "obj-m := type_fmode_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += type_fmode_t_license/" >>build/Makefile fi @@ -92947,8 +95918,7 @@ cachevar="zfs_cv_kernel_kuidgid_t_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kuidgid_t || mkdir -p build/kuidgid_t @@ -92994,14 +95964,12 @@ echo "obj-m := kuidgid_t.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kuidgid_t/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kuidgid_t_license || mkdir -p build/kuidgid_t_license @@ -93047,8 +96015,7 @@ echo "obj-m := kuidgid_t_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kuidgid_t_license/" >>build/Makefile fi @@ -93062,8 +96029,7 @@ cachevar="zfs_cv_kernel_i_uid_read_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/i_uid_read || mkdir -p build/i_uid_read @@ -93109,14 +96075,12 @@ echo "obj-m := i_uid_read.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += i_uid_read/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/i_uid_read_license || mkdir -p build/i_uid_read_license @@ -93162,8 +96126,7 @@ echo "obj-m := i_uid_read_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += i_uid_read_license/" >>build/Makefile fi @@ -93175,134 +96138,9 @@ - cachevar="zfs_cv_kernel_inode_operations_rename_flags_$_zfs_linux_cache_checksum" - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : - - -test -d build/inode_operations_rename_flags || mkdir -p build/inode_operations_rename_flags -cat confdefs.h - <<_ACEOF >build/inode_operations_rename_flags/inode_operations_rename_flags.c - -#include - - #include - static int rename_fn(struct inode *sip, struct dentry *sdp, - struct inode *tip, struct dentry *tdp, - unsigned int flags) { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .rename = rename_fn, - }; - - -int -main (void) -{ - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE("Dual BSD/GPL"); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/inode_operations_rename_flags || mkdir -p build/inode_operations_rename_flags - - file=build/inode_operations_rename_flags/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_operations_rename_flags - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := inode_operations_rename_flags.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += inode_operations_rename_flags/" >>build/Makefile -fi - - - if test -n "" -then : - - -test -d build/inode_operations_rename_flags_license || mkdir -p build/inode_operations_rename_flags_license -cat confdefs.h - <<_ACEOF >build/inode_operations_rename_flags_license/inode_operations_rename_flags_license.c - -#include - - #include - static int rename_fn(struct inode *sip, struct dentry *sdp, - struct inode *tip, struct dentry *tdp, - unsigned int flags) { return 0; } - - static const struct inode_operations - iops __attribute__ ((unused)) = { - .rename = rename_fn, - }; - - -int -main (void) -{ - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/inode_operations_rename_flags_license || mkdir -p build/inode_operations_rename_flags_license - - file=build/inode_operations_rename_flags_license/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_operations_rename_flags_license - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := inode_operations_rename_flags_license.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += inode_operations_rename_flags_license/" >>build/Makefile -fi - - -fi - -fi - - - cachevar="zfs_cv_kernel_inode_operations_rename_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_rename_userns || mkdir -p build/inode_operations_rename_userns @@ -93353,14 +96191,12 @@ echo "obj-m := inode_operations_rename_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_rename_userns_license || mkdir -p build/inode_operations_rename_userns_license @@ -93411,8 +96247,7 @@ echo "obj-m := inode_operations_rename_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_userns_license/" >>build/Makefile fi @@ -93425,8 +96260,7 @@ cachevar="zfs_cv_kernel_inode_operations_rename_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/inode_operations_rename_mnt_idmap || mkdir -p build/inode_operations_rename_mnt_idmap @@ -93477,14 +96311,12 @@ echo "obj-m := inode_operations_rename_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/inode_operations_rename_mnt_idmap_license || mkdir -p build/inode_operations_rename_mnt_idmap_license @@ -93535,8 +96367,7 @@ echo "obj-m := inode_operations_rename_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += inode_operations_rename_mnt_idmap_license/" >>build/Makefile fi @@ -93550,8 +96381,7 @@ cachevar="zfs_cv_kernel_totalram_pages_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/totalram_pages || mkdir -p build/totalram_pages @@ -93597,14 +96427,12 @@ echo "obj-m := totalram_pages.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalram_pages/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/totalram_pages_license || mkdir -p build/totalram_pages_license @@ -93650,8 +96478,7 @@ echo "obj-m := totalram_pages_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalram_pages_license/" >>build/Makefile fi @@ -93665,8 +96492,7 @@ cachevar="zfs_cv_kernel_totalhigh_pages_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/totalhigh_pages || mkdir -p build/totalhigh_pages @@ -93712,14 +96538,12 @@ echo "obj-m := totalhigh_pages.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalhigh_pages/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/totalhigh_pages_license || mkdir -p build/totalhigh_pages_license @@ -93765,8 +96589,7 @@ echo "obj-m := totalhigh_pages_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += totalhigh_pages_license/" >>build/Makefile fi @@ -93781,8 +96604,7 @@ cachevar="zfs_cv_kernel_percpu_ref_count_in_data_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/percpu_ref_count_in_data || mkdir -p build/percpu_ref_count_in_data @@ -93829,14 +96651,12 @@ echo "obj-m := percpu_ref_count_in_data.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += percpu_ref_count_in_data/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/percpu_ref_count_in_data_license || mkdir -p build/percpu_ref_count_in_data_license @@ -93883,8 +96703,7 @@ echo "obj-m := percpu_ref_count_in_data_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += percpu_ref_count_in_data_license/" >>build/Makefile fi @@ -93899,8 +96718,7 @@ cachevar="zfs_cv_kernel_generic_fillattr_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fillattr_userns || mkdir -p build/generic_fillattr_userns @@ -93948,14 +96766,12 @@ echo "obj-m := generic_fillattr_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fillattr_userns_license || mkdir -p build/generic_fillattr_userns_license @@ -94003,8 +96819,7 @@ echo "obj-m := generic_fillattr_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_userns_license/" >>build/Makefile fi @@ -94017,8 +96832,7 @@ cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fillattr_mnt_idmap || mkdir -p build/generic_fillattr_mnt_idmap @@ -94066,14 +96880,12 @@ echo "obj-m := generic_fillattr_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fillattr_mnt_idmap_license || mkdir -p build/generic_fillattr_mnt_idmap_license @@ -94121,8 +96933,7 @@ echo "obj-m := generic_fillattr_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap_license/" >>build/Makefile fi @@ -94135,8 +96946,7 @@ cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_reqmask_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/generic_fillattr_mnt_idmap_reqmask || mkdir -p build/generic_fillattr_mnt_idmap_reqmask @@ -94184,14 +96994,12 @@ echo "obj-m := generic_fillattr_mnt_idmap_reqmask.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap_reqmask/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/generic_fillattr_mnt_idmap_reqmask_license || mkdir -p build/generic_fillattr_mnt_idmap_reqmask_license @@ -94239,8 +97047,7 @@ echo "obj-m := generic_fillattr_mnt_idmap_reqmask_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += generic_fillattr_mnt_idmap_reqmask_license/" >>build/Makefile fi @@ -94254,8 +97061,7 @@ cachevar="zfs_cv_kernel_mknod_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mknod_mnt_idmap || mkdir -p build/mknod_mnt_idmap @@ -94308,14 +97114,12 @@ echo "obj-m := mknod_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mknod_mnt_idmap_license || mkdir -p build/mknod_mnt_idmap_license @@ -94368,8 +97172,7 @@ echo "obj-m := mknod_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_mnt_idmap_license/" >>build/Makefile fi @@ -94382,8 +97185,7 @@ cachevar="zfs_cv_kernel_mknod_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mknod_userns || mkdir -p build/mknod_userns @@ -94436,14 +97238,12 @@ echo "obj-m := mknod_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mknod_userns_license || mkdir -p build/mknod_userns_license @@ -94496,8 +97296,7 @@ echo "obj-m := mknod_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mknod_userns_license/" >>build/Makefile fi @@ -94511,8 +97310,7 @@ cachevar="zfs_cv_kernel_symlink_mnt_idmap_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/symlink_mnt_idmap || mkdir -p build/symlink_mnt_idmap @@ -94564,14 +97362,12 @@ echo "obj-m := symlink_mnt_idmap.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_mnt_idmap/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/symlink_mnt_idmap_license || mkdir -p build/symlink_mnt_idmap_license @@ -94623,8 +97419,7 @@ echo "obj-m := symlink_mnt_idmap_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_mnt_idmap_license/" >>build/Makefile fi @@ -94636,8 +97431,7 @@ cachevar="zfs_cv_kernel_symlink_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/symlink_userns || mkdir -p build/symlink_userns @@ -94690,14 +97484,12 @@ echo "obj-m := symlink_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/symlink_userns_license || mkdir -p build/symlink_userns_license @@ -94750,8 +97542,7 @@ echo "obj-m := symlink_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += symlink_userns_license/" >>build/Makefile fi @@ -94765,8 +97556,7 @@ cachevar="zfs_cv_kernel_bio_max_segs_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/bio_max_segs || mkdir -p build/bio_max_segs @@ -94811,14 +97601,12 @@ echo "obj-m := bio_max_segs.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_max_segs/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/bio_max_segs_license || mkdir -p build/bio_max_segs_license @@ -94863,8 +97651,7 @@ echo "obj-m := bio_max_segs_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += bio_max_segs_license/" >>build/Makefile fi @@ -94878,8 +97665,7 @@ cachevar="zfs_cv_kernel_siginfo_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/siginfo || mkdir -p build/siginfo @@ -94924,14 +97710,12 @@ echo "obj-m := siginfo.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += siginfo/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/siginfo_license || mkdir -p build/siginfo_license @@ -94976,8 +97760,7 @@ echo "obj-m := siginfo_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += siginfo_license/" >>build/Makefile fi @@ -94992,8 +97775,7 @@ cachevar="zfs_cv_kernel_sysfs_default_groups_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/sysfs_default_groups || mkdir -p build/sysfs_default_groups @@ -95039,14 +97821,12 @@ echo "obj-m := sysfs_default_groups.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sysfs_default_groups/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/sysfs_default_groups_license || mkdir -p build/sysfs_default_groups_license @@ -95092,8 +97872,7 @@ echo "obj-m := sysfs_default_groups_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sysfs_default_groups_license/" >>build/Makefile fi @@ -95108,8 +97887,7 @@ cachevar="zfs_cv_kernel_has_standalone_linux_stdarg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_standalone_linux_stdarg || mkdir -p build/has_standalone_linux_stdarg @@ -95157,14 +97935,12 @@ echo "obj-m := has_standalone_linux_stdarg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_standalone_linux_stdarg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_standalone_linux_stdarg_license || mkdir -p build/has_standalone_linux_stdarg_license @@ -95212,8 +97988,7 @@ echo "obj-m := has_standalone_linux_stdarg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_standalone_linux_stdarg_license/" >>build/Makefile fi @@ -95227,8 +98002,7 @@ cachevar="zfs_cv_kernel_kernel_has_strlcpy_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kernel_has_strlcpy || mkdir -p build/kernel_has_strlcpy @@ -95276,14 +98050,12 @@ echo "obj-m := kernel_has_strlcpy.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_has_strlcpy/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kernel_has_strlcpy_license || mkdir -p build/kernel_has_strlcpy_license @@ -95331,8 +98103,7 @@ echo "obj-m := kernel_has_strlcpy_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kernel_has_strlcpy_license/" >>build/Makefile fi @@ -95346,8 +98117,7 @@ cachevar="zfs_cv_kernel_pagemap_has_folio_wait_bit_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/pagemap_has_folio_wait_bit || mkdir -p build/pagemap_has_folio_wait_bit @@ -95394,14 +98164,12 @@ echo "obj-m := pagemap_has_folio_wait_bit.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pagemap_has_folio_wait_bit/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/pagemap_has_folio_wait_bit_license || mkdir -p build/pagemap_has_folio_wait_bit_license @@ -95448,8 +98216,7 @@ echo "obj-m := pagemap_has_folio_wait_bit_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pagemap_has_folio_wait_bit_license/" >>build/Makefile fi @@ -95461,10 +98228,122 @@ + cachevar="zfs_cv_kernel_pagemap_has_readahead_page_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/pagemap_has_readahead_page || mkdir -p build/pagemap_has_readahead_page +cat confdefs.h - <<_ACEOF >build/pagemap_has_readahead_page/pagemap_has_readahead_page.c + +#include + + #include + + +int +main (void) +{ + + struct page *p __attribute__ ((unused)) = NULL; + struct readahead_control *ractl __attribute__ ((unused)) = NULL; + p = readahead_page(ractl); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/pagemap_has_readahead_page || mkdir -p build/pagemap_has_readahead_page + + file=build/pagemap_has_readahead_page/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/pagemap_has_readahead_page + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := pagemap_has_readahead_page.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += pagemap_has_readahead_page/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/pagemap_has_readahead_page_license || mkdir -p build/pagemap_has_readahead_page_license +cat confdefs.h - <<_ACEOF >build/pagemap_has_readahead_page_license/pagemap_has_readahead_page_license.c + +#include + + #include + + +int +main (void) +{ + + struct page *p __attribute__ ((unused)) = NULL; + struct readahead_control *ractl __attribute__ ((unused)) = NULL; + p = readahead_page(ractl); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/pagemap_has_readahead_page_license || mkdir -p build/pagemap_has_readahead_page_license + + file=build/pagemap_has_readahead_page_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/pagemap_has_readahead_page_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := pagemap_has_readahead_page_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += pagemap_has_readahead_page_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_add_disk_ret_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/add_disk_ret || mkdir -p build/add_disk_ret @@ -95510,14 +98389,12 @@ echo "obj-m := add_disk_ret.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += add_disk_ret/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/add_disk_ret_license || mkdir -p build/add_disk_ret_license @@ -95563,8 +98440,7 @@ echo "obj-m := add_disk_ret_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += add_disk_ret_license/" >>build/Makefile fi @@ -95579,8 +98455,7 @@ cachevar="zfs_cv_kernel_kthread_complete_and_exit_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kthread_complete_and_exit || mkdir -p build/kthread_complete_and_exit @@ -95628,14 +98503,12 @@ echo "obj-m := kthread_complete_and_exit.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_complete_and_exit/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kthread_complete_and_exit_license || mkdir -p build/kthread_complete_and_exit_license @@ -95683,8 +98556,7 @@ echo "obj-m := kthread_complete_and_exit_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_complete_and_exit_license/" >>build/Makefile fi @@ -95698,8 +98570,7 @@ cachevar="zfs_cv_kernel_kthread_dequeue_signal_4arg_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kthread_dequeue_signal_4arg || mkdir -p build/kthread_dequeue_signal_4arg @@ -95750,14 +98621,12 @@ echo "obj-m := kthread_dequeue_signal_4arg.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_4arg/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kthread_dequeue_signal_4arg_license || mkdir -p build/kthread_dequeue_signal_4arg_license @@ -95808,8 +98677,7 @@ echo "obj-m := kthread_dequeue_signal_4arg_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_4arg_license/" >>build/Makefile fi @@ -95822,8 +98690,7 @@ cachevar="zfs_cv_kernel_kthread_dequeue_signal_3arg_type_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/kthread_dequeue_signal_3arg_type || mkdir -p build/kthread_dequeue_signal_3arg_type @@ -95873,14 +98740,12 @@ echo "obj-m := kthread_dequeue_signal_3arg_type.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_3arg_type/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/kthread_dequeue_signal_3arg_type_license || mkdir -p build/kthread_dequeue_signal_3arg_type_license @@ -95930,8 +98795,7 @@ echo "obj-m := kthread_dequeue_signal_3arg_type_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += kthread_dequeue_signal_3arg_type_license/" >>build/Makefile fi @@ -95946,8 +98810,7 @@ cachevar="zfs_cv_kernel_zero_page_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/zero_page || mkdir -p build/zero_page @@ -95993,14 +98856,12 @@ echo "obj-m := zero_page.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += zero_page/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/zero_page_license || mkdir -p build/zero_page_license @@ -96046,8 +98907,7 @@ echo "obj-m := zero_page_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += zero_page_license/" >>build/Makefile fi @@ -96059,123 +98919,9 @@ - cachevar="zfs_cv_kernel___copy_from_user_inatomic_$_zfs_linux_cache_checksum" - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : - - -test -d build/__copy_from_user_inatomic || mkdir -p build/__copy_from_user_inatomic -cat confdefs.h - <<_ACEOF >build/__copy_from_user_inatomic/__copy_from_user_inatomic.c - -#include - - #include - - -int -main (void) -{ - - int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0); - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE("Dual BSD/GPL"); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/__copy_from_user_inatomic || mkdir -p build/__copy_from_user_inatomic - - file=build/__copy_from_user_inatomic/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/__copy_from_user_inatomic - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := __copy_from_user_inatomic.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += __copy_from_user_inatomic/" >>build/Makefile -fi - - - if test -n "ZFS_META_LICENSE" -then : - - -test -d build/__copy_from_user_inatomic_license || mkdir -p build/__copy_from_user_inatomic_license -cat confdefs.h - <<_ACEOF >build/__copy_from_user_inatomic_license/__copy_from_user_inatomic_license.c - -#include - - #include - - -int -main (void) -{ - - int result __attribute__ ((unused)) = __copy_from_user_inatomic(NULL, NULL, 0); - - ; - return 0; -} - -MODULE_DESCRIPTION("conftest"); -MODULE_AUTHOR(ZFS_META_AUTHOR); -MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); -MODULE_LICENSE(ZFS_META_LICENSE); - -_ACEOF - - - test -d build || mkdir -p build - test -d build/__copy_from_user_inatomic_license || mkdir -p build/__copy_from_user_inatomic_license - - file=build/__copy_from_user_inatomic_license/Makefile - - cat - <<_ACEOF >$file -# Example command line to manually build source -# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/__copy_from_user_inatomic_license - -ccflags-y := -Werror $FRAME_LARGER_THAN -_ACEOF - - - - echo "obj-m := __copy_from_user_inatomic_license.o" >>$file - - if test "xyes" = "xyes" -then : - echo "obj-m += __copy_from_user_inatomic_license/" >>build/Makefile -fi - - -fi - -fi - - - - cachevar="zfs_cv_kernel_idmap_mnt_api_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/idmap_mnt_api || mkdir -p build/idmap_mnt_api @@ -96221,14 +98967,12 @@ echo "obj-m := idmap_mnt_api.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_mnt_api/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/idmap_mnt_api_license || mkdir -p build/idmap_mnt_api_license @@ -96274,8 +99018,7 @@ echo "obj-m := idmap_mnt_api_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_mnt_api_license/" >>build/Makefile fi @@ -96289,8 +99032,7 @@ cachevar="zfs_cv_kernel_idmap_no_userns_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/idmap_no_userns || mkdir -p build/idmap_no_userns @@ -96336,14 +99078,12 @@ echo "obj-m := idmap_no_userns.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_no_userns/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/idmap_no_userns_license || mkdir -p build/idmap_no_userns_license @@ -96389,8 +99129,7 @@ echo "obj-m := idmap_no_userns_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += idmap_no_userns_license/" >>build/Makefile fi @@ -96404,8 +99143,7 @@ cachevar="zfs_cv_kernel_iattr_vfsid_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/iattr_vfsid || mkdir -p build/iattr_vfsid @@ -96452,14 +99190,12 @@ echo "obj-m := iattr_vfsid.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iattr_vfsid/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/iattr_vfsid_license || mkdir -p build/iattr_vfsid_license @@ -96506,8 +99242,7 @@ echo "obj-m := iattr_vfsid_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += iattr_vfsid_license/" >>build/Makefile fi @@ -96519,10 +99254,10 @@ + cachevar="zfs_cv_kernel_writepage_t_folio_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/writepage_t_folio || mkdir -p build/writepage_t_folio @@ -96569,14 +99304,12 @@ echo "obj-m := writepage_t_folio.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += writepage_t_folio/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/writepage_t_folio_license || mkdir -p build/writepage_t_folio_license @@ -96623,8 +99356,7 @@ echo "obj-m := writepage_t_folio_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += writepage_t_folio_license/" >>build/Makefile fi @@ -96636,10 +99368,119 @@ + cachevar="zfs_cv_kernel_write_cache_pages_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/write_cache_pages || mkdir -p build/write_cache_pages +cat confdefs.h - <<_ACEOF >build/write_cache_pages/write_cache_pages.c + +#include + + #include + + +int +main (void) +{ + + (void) write_cache_pages(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/write_cache_pages || mkdir -p build/write_cache_pages + + file=build/write_cache_pages/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/write_cache_pages + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := write_cache_pages.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += write_cache_pages/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/write_cache_pages_license || mkdir -p build/write_cache_pages_license +cat confdefs.h - <<_ACEOF >build/write_cache_pages_license/write_cache_pages_license.c + +#include + + #include + + +int +main (void) +{ + + (void) write_cache_pages(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/write_cache_pages_license || mkdir -p build/write_cache_pages_license + + file=build/write_cache_pages_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/write_cache_pages_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := write_cache_pages_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += write_cache_pages_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_reclaim_state_reclaimed_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/reclaim_state_reclaimed || mkdir -p build/reclaim_state_reclaimed @@ -96686,14 +99527,12 @@ echo "obj-m := reclaim_state_reclaimed.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += reclaim_state_reclaimed/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/reclaim_state_reclaimed_license || mkdir -p build/reclaim_state_reclaimed_license @@ -96740,8 +99579,7 @@ echo "obj-m := reclaim_state_reclaimed_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += reclaim_state_reclaimed_license/" >>build/Makefile fi @@ -96755,8 +99593,7 @@ cachevar="zfs_cv_kernel_has_register_sysctl_table_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_register_sysctl_table || mkdir -p build/has_register_sysctl_table @@ -96807,14 +99644,12 @@ echo "obj-m := has_register_sysctl_table.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_table/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_register_sysctl_table_license || mkdir -p build/has_register_sysctl_table_license @@ -96865,8 +99700,7 @@ echo "obj-m := has_register_sysctl_table_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_table_license/" >>build/Makefile fi @@ -96880,8 +99714,7 @@ cachevar="zfs_cv_kernel_has_register_sysctl_sz_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_register_sysctl_sz || mkdir -p build/has_register_sysctl_sz @@ -96927,14 +99760,12 @@ echo "obj-m := has_register_sysctl_sz.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_sz/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_register_sysctl_sz_license || mkdir -p build/has_register_sysctl_sz_license @@ -96980,8 +99811,7 @@ echo "obj-m := has_register_sysctl_sz_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_register_sysctl_sz_license/" >>build/Makefile fi @@ -96995,8 +99825,7 @@ cachevar="zfs_cv_kernel_has_proc_handler_ctl_table_const_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_proc_handler_ctl_table_const || mkdir -p build/has_proc_handler_ctl_table_const @@ -97052,14 +99881,12 @@ echo "obj-m := has_proc_handler_ctl_table_const.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_proc_handler_ctl_table_const/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_proc_handler_ctl_table_const_license || mkdir -p build/has_proc_handler_ctl_table_const_license @@ -97115,8 +99942,7 @@ echo "obj-m := has_proc_handler_ctl_table_const_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_proc_handler_ctl_table_const_license/" >>build/Makefile fi @@ -97130,8 +99956,7 @@ cachevar="zfs_cv_kernel_has_copy_splice_read_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/has_copy_splice_read || mkdir -p build/has_copy_splice_read @@ -97178,14 +100003,12 @@ echo "obj-m := has_copy_splice_read.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_copy_splice_read/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/has_copy_splice_read_license || mkdir -p build/has_copy_splice_read_license @@ -97232,8 +100055,7 @@ echo "obj-m := has_copy_splice_read_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += has_copy_splice_read_license/" >>build/Makefile fi @@ -97247,8 +100069,7 @@ cachevar="zfs_cv_kernel_fsync_bdev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/fsync_bdev || mkdir -p build/fsync_bdev @@ -97293,14 +100114,12 @@ echo "obj-m := fsync_bdev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fsync_bdev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/fsync_bdev_license || mkdir -p build/fsync_bdev_license @@ -97345,8 +100164,7 @@ echo "obj-m := fsync_bdev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += fsync_bdev_license/" >>build/Makefile fi @@ -97359,8 +100177,7 @@ cachevar="zfs_cv_kernel_sync_blockdev_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/sync_blockdev || mkdir -p build/sync_blockdev @@ -97405,14 +100222,12 @@ echo "obj-m := sync_blockdev.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sync_blockdev/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/sync_blockdev_license || mkdir -p build/sync_blockdev_license @@ -97457,8 +100272,7 @@ echo "obj-m := sync_blockdev_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += sync_blockdev_license/" >>build/Makefile fi @@ -97473,8 +100287,7 @@ cachevar="zfs_cv_kernel_mm_page_flag_error_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/mm_page_flag_error || mkdir -p build/mm_page_flag_error @@ -97520,14 +100333,12 @@ echo "obj-m := mm_page_flag_error.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mm_page_flag_error/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/mm_page_flag_error_license || mkdir -p build/mm_page_flag_error_license @@ -97573,8 +100384,7 @@ echo "obj-m := mm_page_flag_error_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += mm_page_flag_error_license/" >>build/Makefile fi @@ -97586,11 +100396,123 @@ + cachevar="zfs_cv_kernel_mm_page_flags_struct_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/mm_page_flags_struct || mkdir -p build/mm_page_flags_struct +cat confdefs.h - <<_ACEOF >build/mm_page_flags_struct/mm_page_flags_struct.c + +#include + + #include + + static const struct page p __attribute__ ((unused)) = { + .flags = { .f = 0 } + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mm_page_flags_struct || mkdir -p build/mm_page_flags_struct + + file=build/mm_page_flags_struct/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mm_page_flags_struct + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mm_page_flags_struct.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mm_page_flags_struct/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/mm_page_flags_struct_license || mkdir -p build/mm_page_flags_struct_license +cat confdefs.h - <<_ACEOF >build/mm_page_flags_struct_license/mm_page_flags_struct_license.c + +#include + + #include + + static const struct page p __attribute__ ((unused)) = { + .flags = { .f = 0 } + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/mm_page_flags_struct_license || mkdir -p build/mm_page_flags_struct_license + + file=build/mm_page_flags_struct_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/mm_page_flags_struct_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := mm_page_flags_struct_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += mm_page_flags_struct_license/" >>build/Makefile +fi + + +fi + +fi + + + + cachevar="zfs_cv_kernel_page_size_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/page_size || mkdir -p build/page_size @@ -97636,14 +100558,12 @@ echo "obj-m := page_size.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_size/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/page_size_license || mkdir -p build/page_size_license @@ -97689,8 +100609,7 @@ echo "obj-m := page_size_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_size_license/" >>build/Makefile fi @@ -97704,8 +100623,7 @@ cachevar="zfs_cv_kernel_page_mapping_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/page_mapping || mkdir -p build/page_mapping @@ -97751,14 +100669,12 @@ echo "obj-m := page_mapping.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_mapping/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/page_mapping_license || mkdir -p build/page_mapping_license @@ -97804,8 +100720,7 @@ echo "obj-m := page_mapping_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += page_mapping_license/" >>build/Makefile fi @@ -97820,8 +100735,7 @@ cachevar="zfs_cv_kernel_file_f_version_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/file_f_version || mkdir -p build/file_f_version @@ -97868,14 +100782,12 @@ echo "obj-m := file_f_version.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += file_f_version/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/file_f_version_license || mkdir -p build/file_f_version_license @@ -97922,8 +100834,7 @@ echo "obj-m := file_f_version_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += file_f_version_license/" >>build/Makefile fi @@ -97938,8 +100849,7 @@ cachevar="zfs_cv_kernel_pin_user_pages_unlocked_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/pin_user_pages_unlocked || mkdir -p build/pin_user_pages_unlocked @@ -97991,14 +100901,12 @@ echo "obj-m := pin_user_pages_unlocked.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pin_user_pages_unlocked/" >>build/Makefile fi - if test -n "" -then : + if test -n "" ; then : test -d build/pin_user_pages_unlocked_license || mkdir -p build/pin_user_pages_unlocked_license @@ -98050,8 +100958,7 @@ echo "obj-m := pin_user_pages_unlocked_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += pin_user_pages_unlocked_license/" >>build/Makefile fi @@ -98061,14 +100968,1230 @@ fi + + + + cachevar="zfs_cv_kernel_timer_delete_sync_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/timer_delete_sync || mkdir -p build/timer_delete_sync +cat confdefs.h - <<_ACEOF >build/timer_delete_sync/timer_delete_sync.c + +#include + + #include + + +int +main (void) +{ + + struct timer_list *timer __attribute__((unused)) = NULL; + timer_delete_sync(timer); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/timer_delete_sync || mkdir -p build/timer_delete_sync + + file=build/timer_delete_sync/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/timer_delete_sync + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := timer_delete_sync.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += timer_delete_sync/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/timer_delete_sync_license || mkdir -p build/timer_delete_sync_license +cat confdefs.h - <<_ACEOF >build/timer_delete_sync_license/timer_delete_sync_license.c + +#include + + #include + + +int +main (void) +{ + + struct timer_list *timer __attribute__((unused)) = NULL; + timer_delete_sync(timer); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/timer_delete_sync_license || mkdir -p build/timer_delete_sync_license + + file=build/timer_delete_sync_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/timer_delete_sync_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := timer_delete_sync_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += timer_delete_sync_license/" >>build/Makefile +fi + + +fi + +fi + + + + + + cachevar="zfs_cv_kernel_super_block_s_wb_err_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/super_block_s_wb_err || mkdir -p build/super_block_s_wb_err +cat confdefs.h - <<_ACEOF >build/super_block_s_wb_err/super_block_s_wb_err.c + +#include + + #include + + static const struct super_block + sb __attribute__ ((unused)) = { + .s_wb_err = 0, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/super_block_s_wb_err || mkdir -p build/super_block_s_wb_err + + file=build/super_block_s_wb_err/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_block_s_wb_err + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := super_block_s_wb_err.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += super_block_s_wb_err/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/super_block_s_wb_err_license || mkdir -p build/super_block_s_wb_err_license +cat confdefs.h - <<_ACEOF >build/super_block_s_wb_err_license/super_block_s_wb_err_license.c + +#include + + #include + + static const struct super_block + sb __attribute__ ((unused)) = { + .s_wb_err = 0, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/super_block_s_wb_err_license || mkdir -p build/super_block_s_wb_err_license + + file=build/super_block_s_wb_err_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_block_s_wb_err_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := super_block_s_wb_err_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += super_block_s_wb_err_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_super_operations_free_inode_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/super_operations_free_inode || mkdir -p build/super_operations_free_inode +cat confdefs.h - <<_ACEOF >build/super_operations_free_inode/super_operations_free_inode.c + +#include + + #include + + static void free_inode(struct inode *) { } + + static struct super_operations sops __attribute__ ((unused)) = { + .free_inode = free_inode, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/super_operations_free_inode || mkdir -p build/super_operations_free_inode + + file=build/super_operations_free_inode/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_operations_free_inode + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := super_operations_free_inode.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += super_operations_free_inode/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/super_operations_free_inode_license || mkdir -p build/super_operations_free_inode_license +cat confdefs.h - <<_ACEOF >build/super_operations_free_inode_license/super_operations_free_inode_license.c + +#include + + #include + + static void free_inode(struct inode *) { } + + static struct super_operations sops __attribute__ ((unused)) = { + .free_inode = free_inode, + }; + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/super_operations_free_inode_license || mkdir -p build/super_operations_free_inode_license + + file=build/super_operations_free_inode_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/super_operations_free_inode_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := super_operations_free_inode_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += super_operations_free_inode_license/" >>build/Makefile +fi + + +fi + +fi + + + + + + cachevar="zfs_cv_kernel_ns_common_type_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/ns_common_type || mkdir -p build/ns_common_type +cat confdefs.h - <<_ACEOF >build/ns_common_type/ns_common_type.c + +#include + + #include + + +int +main (void) +{ + + struct user_namespace ns; + ns.ns.ns_type = 0; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/ns_common_type || mkdir -p build/ns_common_type + + file=build/ns_common_type/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/ns_common_type + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := ns_common_type.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += ns_common_type/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/ns_common_type_license || mkdir -p build/ns_common_type_license +cat confdefs.h - <<_ACEOF >build/ns_common_type_license/ns_common_type_license.c + +#include + + #include + + +int +main (void) +{ + + struct user_namespace ns; + ns.ns.ns_type = 0; + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/ns_common_type_license || mkdir -p build/ns_common_type_license + + file=build/ns_common_type_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/ns_common_type_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := ns_common_type_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += ns_common_type_license/" >>build/Makefile +fi + + +fi + +fi + + + + + + cachevar="zfs_cv_kernel_inode_generic_drop_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/inode_generic_drop || mkdir -p build/inode_generic_drop +cat confdefs.h - <<_ACEOF >build/inode_generic_drop/inode_generic_drop.c + +#include + + #include + + +int +main (void) +{ + + struct inode *ip = NULL; + inode_generic_drop(ip); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/inode_generic_drop || mkdir -p build/inode_generic_drop + + file=build/inode_generic_drop/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_generic_drop + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := inode_generic_drop.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += inode_generic_drop/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/inode_generic_drop_license || mkdir -p build/inode_generic_drop_license +cat confdefs.h - <<_ACEOF >build/inode_generic_drop_license/inode_generic_drop_license.c + +#include + + #include + + +int +main (void) +{ + + struct inode *ip = NULL; + inode_generic_drop(ip); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/inode_generic_drop_license || mkdir -p build/inode_generic_drop_license + + file=build/inode_generic_drop_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/inode_generic_drop_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := inode_generic_drop_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += inode_generic_drop_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_kasan_enabled_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/kasan_enabled || mkdir -p build/kasan_enabled +cat confdefs.h - <<_ACEOF >build/kasan_enabled/kasan_enabled.c + +#include + + #include + + +int +main (void) +{ + + kasan_enabled(); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/kasan_enabled || mkdir -p build/kasan_enabled + + file=build/kasan_enabled/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/kasan_enabled + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := kasan_enabled.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += kasan_enabled/" >>build/Makefile +fi + + + if test -n "ZFS_META_LICENSE" ; then : + + +test -d build/kasan_enabled_license || mkdir -p build/kasan_enabled_license +cat confdefs.h - <<_ACEOF >build/kasan_enabled_license/kasan_enabled_license.c + +#include + + #include + + +int +main (void) +{ + + kasan_enabled(); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(ZFS_META_LICENSE); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/kasan_enabled_license || mkdir -p build/kasan_enabled_license + + file=build/kasan_enabled_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/kasan_enabled_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := kasan_enabled_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += kasan_enabled_license/" >>build/Makefile +fi + + +fi + +fi + + + + + cachevar="zfs_cv_kernel_filelock_header_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/filelock_header || mkdir -p build/filelock_header +cat confdefs.h - <<_ACEOF >build/filelock_header/filelock_header.c + +#include + + #include + #include + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/filelock_header || mkdir -p build/filelock_header + + file=build/filelock_header/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/filelock_header + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := filelock_header.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += filelock_header/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/filelock_header_license || mkdir -p build/filelock_header_license +cat confdefs.h - <<_ACEOF >build/filelock_header_license/filelock_header_license.c + +#include + + #include + #include + + +int +main (void) +{ + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/filelock_header_license || mkdir -p build/filelock_header_license + + file=build/filelock_header_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/filelock_header_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := filelock_header_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += filelock_header_license/" >>build/Makefile +fi + + +fi + +fi + + + + + + cachevar="zfs_cv_kernel_flush_workqueue_system_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_workqueue_system || mkdir -p build/flush_workqueue_system +cat confdefs.h - <<_ACEOF >build/flush_workqueue_system/flush_workqueue_system.c + +#include + + #include + + +int +main (void) +{ + + flush_workqueue(system_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_system || mkdir -p build/flush_workqueue_system + + file=build/flush_workqueue_system/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_system + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_system.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_system/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/flush_workqueue_system_license || mkdir -p build/flush_workqueue_system_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_system_license/flush_workqueue_system_license.c + +#include + + #include + + +int +main (void) +{ + + flush_workqueue(system_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_system_license || mkdir -p build/flush_workqueue_system_license + + file=build/flush_workqueue_system_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_system_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_system_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_system_license/" >>build/Makefile +fi + + +fi + +fi + + + cachevar="zfs_cv_kernel_flush_workqueue_percpu_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_workqueue_percpu || mkdir -p build/flush_workqueue_percpu +cat confdefs.h - <<_ACEOF >build/flush_workqueue_percpu/flush_workqueue_percpu.c + +#include + + #include + + +int +main (void) +{ + + flush_workqueue(system_percpu_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_percpu || mkdir -p build/flush_workqueue_percpu + + file=build/flush_workqueue_percpu/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_percpu + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_percpu.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_percpu/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/flush_workqueue_percpu_license || mkdir -p build/flush_workqueue_percpu_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_percpu_license/flush_workqueue_percpu_license.c + +#include + + #include + + +int +main (void) +{ + + flush_workqueue(system_percpu_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_percpu_license || mkdir -p build/flush_workqueue_percpu_license + + file=build/flush_workqueue_percpu_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_percpu_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_percpu_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_percpu_license/" >>build/Makefile +fi + + +fi + +fi + + + cachevar="zfs_cv_kernel_flush_workqueue_internal_system_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_workqueue_internal_system || mkdir -p build/flush_workqueue_internal_system +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_system/flush_workqueue_internal_system.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_system || mkdir -p build/flush_workqueue_internal_system + + file=build/flush_workqueue_internal_system/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_system + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_system.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_system/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/flush_workqueue_internal_system_license || mkdir -p build/flush_workqueue_internal_system_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_system_license/flush_workqueue_internal_system_license.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_system_license || mkdir -p build/flush_workqueue_internal_system_license + + file=build/flush_workqueue_internal_system_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_system_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_system_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_system_license/" >>build/Makefile +fi + + +fi + +fi + + + cachevar="zfs_cv_kernel_flush_workqueue_internal_percpu_$_zfs_linux_cache_checksum" + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "x"; then : + + +test -d build/flush_workqueue_internal_percpu || mkdir -p build/flush_workqueue_internal_percpu +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_percpu/flush_workqueue_internal_percpu.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_percpu_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE("Dual BSD/GPL"); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_percpu || mkdir -p build/flush_workqueue_internal_percpu + + file=build/flush_workqueue_internal_percpu/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_percpu + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_percpu.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_percpu/" >>build/Makefile +fi + + + if test -n "" ; then : + + +test -d build/flush_workqueue_internal_percpu_license || mkdir -p build/flush_workqueue_internal_percpu_license +cat confdefs.h - <<_ACEOF >build/flush_workqueue_internal_percpu_license/flush_workqueue_internal_percpu_license.c + +#include + + #include + + +int +main (void) +{ + + __flush_workqueue(system_percpu_wq); + + ; + return 0; +} + +MODULE_DESCRIPTION("conftest"); +MODULE_AUTHOR(ZFS_META_AUTHOR); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); +MODULE_LICENSE(); + +_ACEOF + + + test -d build || mkdir -p build + test -d build/flush_workqueue_internal_percpu_license || mkdir -p build/flush_workqueue_internal_percpu_license + + file=build/flush_workqueue_internal_percpu_license/Makefile + + cat - <<_ACEOF >$file +# Example command line to manually build source +# make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/flush_workqueue_internal_percpu_license + +ccflags-y := -Werror $FRAME_LARGER_THAN +_ACEOF + + + + echo "obj-m := flush_workqueue_internal_percpu_license.o" >>$file + + if test "xyes" = "xyes"; then : + echo "obj-m += flush_workqueue_internal_percpu_license/" >>build/Makefile +fi + + +fi + +fi + + + case "$host_cpu" in powerpc*) cachevar="zfs_cv_kernel_cpu_has_feature_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/cpu_has_feature || mkdir -p build/cpu_has_feature @@ -98118,14 +102241,12 @@ echo "obj-m := cpu_has_feature.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += cpu_has_feature/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/cpu_has_feature_license || mkdir -p build/cpu_has_feature_license @@ -98175,8 +102296,7 @@ echo "obj-m := cpu_has_feature_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += cpu_has_feature_license/" >>build/Makefile fi @@ -98190,8 +102310,7 @@ cachevar="zfs_cv_kernel_flush_dcache_page_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page @@ -98236,14 +102355,12 @@ echo "obj-m := flush_dcache_page.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += flush_dcache_page/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license @@ -98288,8 +102405,7 @@ echo "obj-m := flush_dcache_page_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += flush_dcache_page_license/" >>build/Makefile fi @@ -98305,8 +102421,7 @@ cachevar="zfs_cv_kernel_flush_dcache_page_$_zfs_linux_cache_checksum" eval "cacheval=\$$cachevar" - if test "x$cacheval" = "x" -then : + if test "x$cacheval" = "x"; then : test -d build/flush_dcache_page || mkdir -p build/flush_dcache_page @@ -98351,14 +102466,12 @@ echo "obj-m := flush_dcache_page.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += flush_dcache_page/" >>build/Makefile fi - if test -n "ZFS_META_LICENSE" -then : + if test -n "ZFS_META_LICENSE" ; then : test -d build/flush_dcache_page_license || mkdir -p build/flush_dcache_page_license @@ -98403,8 +102516,7 @@ echo "obj-m := flush_dcache_page_license.o" >>$file - if test "xyes" = "xyes" -then : + if test "xyes" = "xyes"; then : echo "obj-m += flush_dcache_page_license/" >>build/Makefile fi @@ -98417,8 +102529,46 @@ ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for available kernel interfaces" >&5 -printf %s "checking for available kernel interfaces... " >&6; } + + if test "xfor available kernel interfaces" != "x"; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for available kernel interfaces" >&5 +$as_echo_n "checking for available kernel interfaces... " >&6; } + + if test "x$silent" != "xyes" -a -t 6; then : + + _zfs_linux_test_progress_text="for available kernel interfaces" + + ( + total=$(wc -l < build/Makefile) + count=0 + + while kill -0 $$ 2>/dev/null ; do + + if test "$count" -lt "$total" ; then + if ! test -f build/build.log ; then + count=$total + else + count_n=$(awk '/CC/ && /\/[^\.]+\.o$/ { c++ } END { print c }' build/build.log 2>/dev/null) + if test "x$count_n" != "x" ; then + count=$count_n + fi + fi + + printf '\rchecking %s... %d/%d' "for available kernel interfaces" "$count" "$total" >&6 + fi + + sleep 0.5 + done + ) & + + _zfs_linux_test_progress_pid=$! + +fi + + +fi @@ -98438,20 +102588,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/Makefile build/Makefile.compile.kabi mv build/build.log build/build.log.kabi -else $as_nop +else as_fn_error $? " *** Unable to compile test source to determine kernel interfaces." "$LINENO" 5 @@ -98460,17 +102609,14 @@ - if test "x$enable_linux_builtin" = "xno" -then : + if test "x$enable_linux_builtin" = "xno"; then : for dir in $(awk '/^obj-m/ { print $3 }' \ build/Makefile.compile.kabi); do name=${dir%/} - if test -f build/$name/$name.o -then : + if test -f build/$name/$name.o; then : - if test "${name##*_}" = "license" -then : + if test "${name##*_}" = "license"; then : @@ -98490,20 +102636,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/$name/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/$name/Makefile build/$name/Makefile.modpost.kabi cat build/$name/build.log >>build/build.log.kabi -else $as_nop +else as_fn_error $? " *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 @@ -98513,13 +102658,13 @@ echo "obj-n += $dir" >>build/Makefile -else $as_nop +else echo "obj-m += $dir" >>build/Makefile fi -else $as_nop +else echo "obj-n += $dir" >>build/Makefile @@ -98544,20 +102689,19 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/build.log' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : mv build/Makefile build/Makefile.modpost.kabi cat build/build.log >>build/build.log.kabi -else $as_nop +else as_fn_error $? " *** Unable to modpost test source to determine kernel interfaces." "$LINENO" 5 @@ -98566,13 +102710,12 @@ -else $as_nop +else for dir in $(awk '/^obj-m/ { print $3 }' \ build/Makefile.compile.kabi); do name=${dir%/} - if test -f build/$name/$name.o -then : + if test -f build/$name/$name.o; then : touch build/$name/$name.ko @@ -98581,37 +102724,51 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + if test "xfor available kernel interfaces" != "x"; then : + + + if test "x$_zfs_linux_test_progress_pid" != "x"; then : + + kill $_zfs_linux_test_progress_pid 2>/dev/null + wait $_zfs_linux_test_progress_pid 2>/dev/null + printf '\r\033\1332Kchecking %s... ' "$_zfs_linux_test_progress_text" >&6 + _zfs_linux_test_progress_pid= + _zfs_linux_test_progress_text= + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + + +fi + - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel defines intptr_t" >&5 -printf %s "checking whether kernel defines intptr_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines intptr_t" >&5 +$as_echo_n "checking whether kernel defines intptr_t... " >&6; } cachevar="zfs_cv_kernel_type_intptr_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/type_intptr_t -then : + if test -d build/type_intptr_t; then : - if test -f build/type_intptr_t/type_intptr_t.ko -then : + if test -f build/type_intptr_t/type_intptr_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"type_intptr_t\" test, check that @@ -98623,19 +102780,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_KERNEL_INTPTR_T 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_INTPTR_T 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -98643,30 +102799,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether access_ok() has 'type' parameter" >&5 -printf %s "checking whether access_ok() has 'type' parameter... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether access_ok() has 'type' parameter" >&5 +$as_echo_n "checking whether access_ok() has 'type' parameter... " >&6; } cachevar="zfs_cv_kernel_access_ok_type_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/access_ok_type -then : + if test -d build/access_ok_type; then : - if test -f build/access_ok_type/access_ok_type.ko -then : + if test -f build/access_ok_type/access_ok_type.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"access_ok_type\" test, check that @@ -98678,48 +102831,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ACCESS_OK_TYPE 1" >>confdefs.h +$as_echo "#define HAVE_ACCESS_OK_TYPE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compile-time stack validation (objtool) is available" >&5 -printf %s "checking whether compile-time stack validation (objtool) is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compile-time stack validation (objtool) is available" >&5 +$as_echo_n "checking whether compile-time stack validation (objtool) is available... " >&6; } cachevar="zfs_cv_kernel_objtool_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/objtool -then : + if test -d build/objtool; then : - if test -f build/objtool/objtool.ko -then : + if test -f build/objtool/objtool.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"objtool\" test, check that @@ -98731,39 +102880,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_KERNEL_OBJTOOL 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_OBJTOOL 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether STACK_FRAME_NON_STANDARD is defined" >&5 -printf %s "checking whether STACK_FRAME_NON_STANDARD is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether STACK_FRAME_NON_STANDARD is defined" >&5 +$as_echo_n "checking whether STACK_FRAME_NON_STANDARD is defined... " >&6; } cachevar="zfs_cv_kernel_stack_frame_non_standard_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/stack_frame_non_standard -then : + if test -d build/stack_frame_non_standard; then : - if test -f build/stack_frame_non_standard/stack_frame_non_standard.ko -then : + if test -f build/stack_frame_non_standard/stack_frame_non_standard.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"stack_frame_non_standard\" test, check that @@ -98775,56 +102920,118 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +$as_echo "#define HAVE_STACK_FRAME_NON_STANDARD 1" >>confdefs.h -printf "%s\n" "#define HAVE_STACK_FRAME_NON_STANDARD 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether STACK_FRAME_NON_STANDARD asm macro is defined" >&5 +$as_echo_n "checking whether STACK_FRAME_NON_STANDARD asm macro is defined... " >&6; } + sp='[[:space:]]' + dotmacro='[.]macro' + regexp="^$sp*$dotmacro$sp+STACK_FRAME_NON_STANDARD$sp" + if $EGREP -s -q "$regexp" $objtool_header; then : -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_STACK_FRAME_NON_STANDARD_ASM 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CONFIG_OBJTOOL_WERROR is defined" >&5 +$as_echo_n "checking whether CONFIG_OBJTOOL_WERROR is defined... " >&6; } + + cachevar="zfs_cv_kernel_config_objtool_werror_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/config_objtool_werror; then : + + if test -f build/config_objtool_werror/config_objtool_werror.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"config_objtool_werror\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CONFIG_OBJTOOL_WERROR_DEFINED=yes + +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pde_data() is lowercase" >&5 -printf %s "checking whether pde_data() is lowercase... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pde_data() is lowercase" >&5 +$as_echo_n "checking whether pde_data() is lowercase... " >&6; } cachevar="zfs_cv_kernel_pde_data_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/pde_data -then : + if test -d build/pde_data; then : - if test -f build/pde_data/pde_data.ko -then : + if test -f build/pde_data/pde_data.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"pde_data\" test, check that @@ -98836,45 +103043,41 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define SPL_PDE_DATA pde_data" >>confdefs.h +$as_echo "#define SPL_PDE_DATA pde_data" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -printf "%s\n" "#define SPL_PDE_DATA PDE_DATA" >>confdefs.h +$as_echo "#define SPL_PDE_DATA PDE_DATA" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fadvise() is available" >&5 -printf %s "checking whether generic_fadvise() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fadvise() is available" >&5 +$as_echo_n "checking whether generic_fadvise() is available... " >&6; } cachevar="zfs_cv_kernel_generic_fadvise_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/generic_fadvise/generic_fadvise.ko -then : + if ! test -f build/generic_fadvise/generic_fadvise.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]generic_fadvise[[:space:]]' \ @@ -98907,7 +103110,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -98918,49 +103121,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FADVISE 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FADVISE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether header linux/sched/rt.h exists" >&5 -printf %s "checking whether header linux/sched/rt.h exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether header linux/sched/rt.h exists" >&5 +$as_echo_n "checking whether header linux/sched/rt.h exists... " >&6; } cachevar="zfs_cv_kernel_sched_rt_header_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sched_rt_header -then : + if test -d build/sched_rt_header; then : - if test -f build/sched_rt_header/sched_rt_header.ko -then : + if test -f build/sched_rt_header/sched_rt_header.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"sched_rt_header\" test, check that @@ -98972,13 +103171,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -98988,7 +103186,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -98997,30 +103195,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether usleep_range() is available" >&5 -printf %s "checking whether usleep_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usleep_range() is available" >&5 +$as_echo_n "checking whether usleep_range() is available... " >&6; } cachevar="zfs_cv_kernel_usleep_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/usleep_range -then : + if test -d build/usleep_range; then : - if test -f build/usleep_range/usleep_range.ko -then : + if test -f build/usleep_range/usleep_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"usleep_range\" test, check that @@ -99032,13 +103227,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -99048,7 +103242,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -99056,30 +103250,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __vmalloc(ptr, flags, pageflags) is available" >&5 -printf %s "checking whether __vmalloc(ptr, flags, pageflags) is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __vmalloc(ptr, flags, pageflags) is available" >&5 +$as_echo_n "checking whether __vmalloc(ptr, flags, pageflags) is available... " >&6; } cachevar="zfs_cv_kernel___vmalloc_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/__vmalloc -then : + if test -d build/__vmalloc; then : - if test -f build/__vmalloc/__vmalloc.ko -then : + if test -f build/__vmalloc/__vmalloc.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"__vmalloc\" test, check that @@ -99091,48 +103282,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VMALLOC_PAGE_KERNEL 1" >>confdefs.h +$as_echo "#define HAVE_VMALLOC_PAGE_KERNEL 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether timestamp_truncate() exists" >&5 -printf %s "checking whether timestamp_truncate() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether timestamp_truncate() exists" >&5 +$as_echo_n "checking whether timestamp_truncate() exists... " >&6; } cachevar="zfs_cv_kernel_timestamp_truncate_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/timestamp_truncate -then : + if test -d build/timestamp_truncate; then : - if test -f build/timestamp_truncate/timestamp_truncate.ko -then : + if test -f build/timestamp_truncate/timestamp_truncate.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"timestamp_truncate\" test, check that @@ -99144,47 +103331,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_TIMESTAMP_TRUNCATE 1" >>confdefs.h +$as_echo "#define HAVE_INODE_TIMESTAMP_TRUNCATE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_get_ctime() exists" >&5 -printf %s "checking whether inode_get_ctime() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_get_ctime() exists" >&5 +$as_echo_n "checking whether inode_get_ctime() exists... " >&6; } cachevar="zfs_cv_kernel_inode_get_ctime_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_get_ctime -then : + if test -d build/inode_get_ctime; then : - if test -f build/inode_get_ctime/inode_get_ctime.ko -then : + if test -f build/inode_get_ctime/inode_get_ctime.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_get_ctime\" test, check that @@ -99196,47 +103379,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_GET_CTIME 1" >>confdefs.h +$as_echo "#define HAVE_INODE_GET_CTIME 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_set_ctime_to_ts() exists" >&5 -printf %s "checking whether inode_set_ctime_to_ts() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_set_ctime_to_ts() exists" >&5 +$as_echo_n "checking whether inode_set_ctime_to_ts() exists... " >&6; } cachevar="zfs_cv_kernel_inode_set_ctime_to_ts_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_set_ctime_to_ts -then : + if test -d build/inode_set_ctime_to_ts; then : - if test -f build/inode_set_ctime_to_ts/inode_set_ctime_to_ts.ko -then : + if test -f build/inode_set_ctime_to_ts/inode_set_ctime_to_ts.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_set_ctime_to_ts\" test, check that @@ -99248,47 +103427,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_SET_CTIME_TO_TS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_SET_CTIME_TO_TS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_get_atime() exists" >&5 -printf %s "checking whether inode_get_atime() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_get_atime() exists" >&5 +$as_echo_n "checking whether inode_get_atime() exists... " >&6; } cachevar="zfs_cv_kernel_inode_get_atime_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_get_atime -then : + if test -d build/inode_get_atime; then : - if test -f build/inode_get_atime/inode_get_atime.ko -then : + if test -f build/inode_get_atime/inode_get_atime.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_get_atime\" test, check that @@ -99300,47 +103475,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_GET_ATIME 1" >>confdefs.h +$as_echo "#define HAVE_INODE_GET_ATIME 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_set_atime_to_ts() exists" >&5 -printf %s "checking whether inode_set_atime_to_ts() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_set_atime_to_ts() exists" >&5 +$as_echo_n "checking whether inode_set_atime_to_ts() exists... " >&6; } cachevar="zfs_cv_kernel_inode_set_atime_to_ts_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_set_atime_to_ts -then : + if test -d build/inode_set_atime_to_ts; then : - if test -f build/inode_set_atime_to_ts/inode_set_atime_to_ts.ko -then : + if test -f build/inode_set_atime_to_ts/inode_set_atime_to_ts.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_set_atime_to_ts\" test, check that @@ -99352,47 +103523,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_SET_ATIME_TO_TS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_SET_ATIME_TO_TS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_get_mtime() exists" >&5 -printf %s "checking whether inode_get_mtime() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_get_mtime() exists" >&5 +$as_echo_n "checking whether inode_get_mtime() exists... " >&6; } cachevar="zfs_cv_kernel_inode_get_mtime_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_get_mtime -then : + if test -d build/inode_get_mtime; then : - if test -f build/inode_get_mtime/inode_get_mtime.ko -then : + if test -f build/inode_get_mtime/inode_get_mtime.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_get_mtime\" test, check that @@ -99404,47 +103571,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_GET_MTIME 1" >>confdefs.h +$as_echo "#define HAVE_INODE_GET_MTIME 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_set_mtime_to_ts() exists" >&5 -printf %s "checking whether inode_set_mtime_to_ts() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_set_mtime_to_ts() exists" >&5 +$as_echo_n "checking whether inode_set_mtime_to_ts() exists... " >&6; } cachevar="zfs_cv_kernel_inode_set_mtime_to_ts_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_set_mtime_to_ts -then : + if test -d build/inode_set_mtime_to_ts; then : - if test -f build/inode_set_mtime_to_ts/inode_set_mtime_to_ts.ko -then : + if test -f build/inode_set_mtime_to_ts/inode_set_mtime_to_ts.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_set_mtime_to_ts\" test, check that @@ -99456,48 +103619,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_SET_MTIME_TO_TS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_SET_MTIME_TO_TS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether proc_ops structure exists" >&5 -printf %s "checking whether proc_ops structure exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether proc_ops structure exists" >&5 +$as_echo_n "checking whether proc_ops structure exists... " >&6; } cachevar="zfs_cv_kernel_proc_ops_struct_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/proc_ops_struct -then : + if test -d build/proc_ops_struct; then : - if test -f build/proc_ops_struct/proc_ops_struct.ko -then : + if test -f build/proc_ops_struct/proc_ops_struct.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"proc_ops_struct\" test, check that @@ -99509,49 +103668,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PROC_OPS_STRUCT 1" >>confdefs.h +$as_echo "#define HAVE_PROC_OPS_STRUCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->check_events() exists" >&5 -printf %s "checking whether bops->check_events() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->check_events() exists" >&5 +$as_echo_n "checking whether bops->check_events() exists... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_check_events_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_check_events -then : + if test -d build/block_device_operations_check_events; then : - if test -f build/block_device_operations_check_events/block_device_operations_check_events.ko -then : + if test -f build/block_device_operations_check_events/block_device_operations_check_events.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_check_events\" test, check that @@ -99563,13 +103718,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -99579,7 +103733,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -99587,30 +103741,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 2 args" >&5 -printf %s "checking whether bops->release() is void and takes 2 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 2 args" >&5 +$as_echo_n "checking whether bops->release() is void and takes 2 args... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_release_void_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_release_void -then : + if test -d build/block_device_operations_release_void; then : - if test -f build/block_device_operations_release_void/block_device_operations_release_void.ko -then : + if test -f build/block_device_operations_release_void/block_device_operations_release_void.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_release_void\" test, check that @@ -99622,40 +103773,36 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 1 arg" >&5 -printf %s "checking whether bops->release() is void and takes 1 arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->release() is void and takes 1 arg" >&5 +$as_echo_n "checking whether bops->release() is void and takes 1 arg... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_release_void_1arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_release_void_1arg -then : + if test -d build/block_device_operations_release_void_1arg; then : - if test -f build/block_device_operations_release_void_1arg/block_device_operations_release_void_1arg.ko -then : + if test -f build/block_device_operations_release_void_1arg/block_device_operations_release_void_1arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_release_void_1arg\" test, check that @@ -99667,16 +103814,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG 1" >>confdefs.h +$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -99686,7 +103832,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -99697,30 +103843,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bops->revalidate_disk() exists" >&5 -printf %s "checking whether bops->revalidate_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->revalidate_disk() exists" >&5 +$as_echo_n "checking whether bops->revalidate_disk() exists... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_revalidate_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_revalidate_disk -then : + if test -d build/block_device_operations_revalidate_disk; then : - if test -f build/block_device_operations_revalidate_disk/block_device_operations_revalidate_disk.ko -then : + if test -f build/block_device_operations_revalidate_disk/block_device_operations_revalidate_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_revalidate_disk\" test, check that @@ -99732,19 +103875,67 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + +$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bops->getgeo() takes gendisk as first arg" >&5 +$as_echo_n "checking whether bops->getgeo() takes gendisk as first arg... " >&6; } + + cachevar="zfs_cv_kernel_block_device_operations_getgeo_gendisk_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/block_device_operations_getgeo_gendisk; then : + + if test -f build/block_device_operations_getgeo_gendisk/block_device_operations_getgeo_gendisk.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"block_device_operations_getgeo_gendisk\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -99752,30 +103943,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_set_op_attrs is available" >&5 -printf %s "checking whether bio_set_op_attrs is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_op_attrs is available" >&5 +$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; } cachevar="zfs_cv_kernel_bio_set_op_attrs_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_set_op_attrs -then : + if test -d build/bio_set_op_attrs; then : - if test -f build/bio_set_op_attrs/bio_set_op_attrs.ko -then : + if test -f build/bio_set_op_attrs/bio_set_op_attrs.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_set_op_attrs\" test, check that @@ -99787,48 +103975,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_SET_OP_ATTRS 1" >>confdefs.h +$as_echo "#define HAVE_BIO_SET_OP_ATTRS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is GPL-only" >&5 -printf %s "checking whether bio_set_dev() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is GPL-only" >&5 +$as_echo_n "checking whether bio_set_dev() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_bio_set_dev_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_set_dev_license -then : + if test -d build/bio_set_dev_license; then : - if test -f build/bio_set_dev_license/bio_set_dev_license.ko -then : + if test -f build/bio_set_dev_license/bio_set_dev_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_set_dev_license\" test, check that @@ -99840,47 +104024,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_SET_DEV_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_BIO_SET_DEV_GPL_ONLY 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is a macro" >&5 -printf %s "checking whether bio_set_dev() is a macro... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_set_dev() is a macro" >&5 +$as_echo_n "checking whether bio_set_dev() is a macro... " >&6; } cachevar="zfs_cv_kernel_bio_set_dev_macro_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_set_dev_macro -then : + if test -d build/bio_set_dev_macro; then : - if test -f build/bio_set_dev_macro/bio_set_dev_macro.ko -then : + if test -f build/bio_set_dev_macro/bio_set_dev_macro.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_set_dev_macro\" test, check that @@ -99892,48 +104072,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_SET_DEV_MACRO 1" >>confdefs.h +$as_echo "#define HAVE_BIO_SET_DEV_MACRO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether current->bio_list exists" >&5 -printf %s "checking whether current->bio_list exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current->bio_list exists" >&5 +$as_echo_n "checking whether current->bio_list exists... " >&6; } cachevar="zfs_cv_kernel_current_bio_list_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/current_bio_list -then : + if test -d build/current_bio_list; then : - if test -f build/current_bio_list/current_bio_list.ko -then : + if test -f build/current_bio_list/current_bio_list.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"current_bio_list\" test, check that @@ -99945,13 +104121,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -99961,7 +104136,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -99969,30 +104144,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is available" >&5 -printf %s "checking whether blkg_tryget() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is available" >&5 +$as_echo_n "checking whether blkg_tryget() is available... " >&6; } cachevar="zfs_cv_kernel_blkg_tryget_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkg_tryget -then : + if test -d build/blkg_tryget; then : - if test -f build/blkg_tryget/blkg_tryget.ko -then : + if test -f build/blkg_tryget/blkg_tryget.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkg_tryget\" test, check that @@ -100004,39 +104176,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKG_TRYGET 1" >>confdefs.h +$as_echo "#define HAVE_BLKG_TRYGET 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is GPL-only" >&5 -printf %s "checking whether blkg_tryget() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkg_tryget() is GPL-only" >&5 +$as_echo_n "checking whether blkg_tryget() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_blkg_tryget_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkg_tryget_license -then : + if test -d build/blkg_tryget_license; then : - if test -f build/blkg_tryget_license/blkg_tryget_license.ko -then : + if test -f build/blkg_tryget_license/blkg_tryget_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkg_tryget_license\" test, check that @@ -100048,56 +104216,52 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKG_TRYGET_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_BLKG_TRYGET_GPL_ONLY 1" >>confdefs.h fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio->bi_bdev->bd_disk exists" >&5 -printf %s "checking whether bio->bi_bdev->bd_disk exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio->bi_bdev->bd_disk exists" >&5 +$as_echo_n "checking whether bio->bi_bdev->bd_disk exists... " >&6; } cachevar="zfs_cv_kernel_bio_bdev_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_bdev_disk -then : + if test -d build/bio_bdev_disk; then : - if test -f build/bio_bdev_disk/bio_bdev_disk.ko -then : + if test -f build/bio_bdev_disk/bio_bdev_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_bdev_disk\" test, check that @@ -100109,48 +104273,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_BDEV_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BIO_BDEV_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether block_device_operations->submit_bio() returns void" >&5 -printf %s "checking whether block_device_operations->submit_bio() returns void... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether block_device_operations->submit_bio() returns void" >&5 +$as_echo_n "checking whether block_device_operations->submit_bio() returns void... " >&6; } cachevar="zfs_cv_kernel_bio_bdev_submit_bio_void_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_bdev_submit_bio_void -then : + if test -d build/bio_bdev_submit_bio_void; then : - if test -f build/bio_bdev_submit_bio_void/bio_bdev_submit_bio_void.ko -then : + if test -f build/bio_bdev_submit_bio_void/bio_bdev_submit_bio_void.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_bdev_submit_bio_void\" test, check that @@ -100162,48 +104322,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_alloc() wants 4 args" >&5 -printf %s "checking whether bio_alloc() wants 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_alloc() wants 4 args" >&5 +$as_echo_n "checking whether bio_alloc() wants 4 args... " >&6; } cachevar="zfs_cv_kernel_bio_alloc_4arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_alloc_4arg -then : + if test -d build/bio_alloc_4arg; then : - if test -f build/bio_alloc_4arg/bio_alloc_4arg.ko -then : + if test -f build/bio_alloc_4arg/bio_alloc_4arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_alloc_4arg\" test, check that @@ -100215,19 +104371,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_ALLOC_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_BIO_ALLOC_4ARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -100235,30 +104390,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 3 args" >&5 -printf %s "checking whether blkdev_get_by_path() exists and takes 3 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 3 args" >&5 +$as_echo_n "checking whether blkdev_get_by_path() exists and takes 3 args... " >&6; } cachevar="zfs_cv_kernel_blkdev_get_by_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_get_by_path -then : + if test -d build/blkdev_get_by_path; then : - if test -f build/blkdev_get_by_path/blkdev_get_by_path.ko -then : + if test -f build/blkdev_get_by_path/blkdev_get_by_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_get_by_path\" test, check that @@ -100270,40 +104422,36 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 4 args" >&5 -printf %s "checking whether blkdev_get_by_path() exists and takes 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() exists and takes 4 args" >&5 +$as_echo_n "checking whether blkdev_get_by_path() exists and takes 4 args... " >&6; } cachevar="zfs_cv_kernel_blkdev_get_by_path_4arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_get_by_path_4arg -then : + if test -d build/blkdev_get_by_path_4arg; then : - if test -f build/blkdev_get_by_path_4arg/blkdev_get_by_path_4arg.ko -then : + if test -f build/blkdev_get_by_path_4arg/blkdev_get_by_path_4arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_get_by_path_4arg\" test, check that @@ -100315,43 +104463,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BLKDEV_GET_BY_PATH_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_GET_BY_PATH_4ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_open_by_path() exists" >&5 -printf %s "checking whether bdev_open_by_path() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_open_by_path() exists" >&5 +$as_echo_n "checking whether bdev_open_by_path() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_open_by_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_open_by_path -then : + if test -d build/bdev_open_by_path; then : - if test -f build/bdev_open_by_path/bdev_open_by_path.ko -then : + if test -f build/bdev_open_by_path/bdev_open_by_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_open_by_path\" test, check that @@ -100363,43 +104507,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BDEV_OPEN_BY_PATH 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_OPEN_BY_PATH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_file_open_by_path() exists" >&5 -printf %s "checking whether bdev_file_open_by_path() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_file_open_by_path() exists" >&5 +$as_echo_n "checking whether bdev_file_open_by_path() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_file_open_by_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_file_open_by_path -then : + if test -d build/bdev_file_open_by_path; then : - if test -f build/bdev_file_open_by_path/bdev_file_open_by_path.ko -then : + if test -f build/bdev_file_open_by_path/bdev_file_open_by_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_file_open_by_path\" test, check that @@ -100411,19 +104551,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BDEV_FILE_OPEN_BY_PATH 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_FILE_OPEN_BY_PATH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** None of the expected \"blkdev_get_by_path()\" interfaces were detected. @@ -100432,7 +104571,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -100449,30 +104588,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() exists" >&5 -printf %s "checking whether blkdev_put() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() exists" >&5 +$as_echo_n "checking whether blkdev_put() exists... " >&6; } cachevar="zfs_cv_kernel_blkdev_put_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_put -then : + if test -d build/blkdev_put; then : - if test -f build/blkdev_put/blkdev_put.ko -then : + if test -f build/blkdev_put/blkdev_put.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_put\" test, check that @@ -100484,43 +104620,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_PUT 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_PUT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() accepts void* as arg 2" >&5 -printf %s "checking whether blkdev_put() accepts void* as arg 2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_put() accepts void* as arg 2" >&5 +$as_echo_n "checking whether blkdev_put() accepts void* as arg 2... " >&6; } cachevar="zfs_cv_kernel_blkdev_put_holder_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_put_holder -then : + if test -d build/blkdev_put_holder; then : - if test -f build/blkdev_put_holder/blkdev_put_holder.ko -then : + if test -f build/blkdev_put_holder/blkdev_put_holder.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_put_holder\" test, check that @@ -100532,43 +104664,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_PUT_HOLDER 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_PUT_HOLDER 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_release() exists" >&5 -printf %s "checking whether bdev_release() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_release() exists" >&5 +$as_echo_n "checking whether bdev_release() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_release_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_release -then : + if test -d build/bdev_release; then : - if test -f build/bdev_release/bdev_release.ko -then : + if test -f build/bdev_release/bdev_release.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_release\" test, check that @@ -100580,19 +104708,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_RELEASE 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_RELEASE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -100604,30 +104731,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_reread_part() exists" >&5 -printf %s "checking whether blkdev_reread_part() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_reread_part() exists" >&5 +$as_echo_n "checking whether blkdev_reread_part() exists... " >&6; } cachevar="zfs_cv_kernel_blkdev_reread_part_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_reread_part -then : + if test -d build/blkdev_reread_part; then : - if test -f build/blkdev_reread_part/blkdev_reread_part.ko -then : + if test -f build/blkdev_reread_part/blkdev_reread_part.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_reread_part\" test, check that @@ -100639,48 +104763,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_REREAD_PART 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_REREAD_PART 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether invalidate_bdev() exists" >&5 -printf %s "checking whether invalidate_bdev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether invalidate_bdev() exists" >&5 +$as_echo_n "checking whether invalidate_bdev() exists... " >&6; } cachevar="zfs_cv_kernel_invalidate_bdev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/invalidate_bdev -then : + if test -d build/invalidate_bdev; then : - if test -f build/invalidate_bdev/invalidate_bdev.ko -then : + if test -f build/invalidate_bdev/invalidate_bdev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"invalidate_bdev\" test, check that @@ -100692,13 +104812,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -100708,7 +104827,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -100716,24 +104835,21 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants dev_t arg" >&5 -printf %s "checking whether lookup_bdev() wants dev_t arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants dev_t arg" >&5 +$as_echo_n "checking whether lookup_bdev() wants dev_t arg... " >&6; } cachevar="zfs_cv_kernel_lookup_bdev_devt_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/lookup_bdev_devt/lookup_bdev_devt.ko -then : + if ! test -f build/lookup_bdev_devt/lookup_bdev_devt.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \ @@ -100766,7 +104882,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -100777,38 +104893,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DEVT_LOOKUP_BDEV 1" >>confdefs.h +$as_echo "#define HAVE_DEVT_LOOKUP_BDEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants 1 arg" >&5 -printf %s "checking whether lookup_bdev() wants 1 arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() wants 1 arg" >&5 +$as_echo_n "checking whether lookup_bdev() wants 1 arg... " >&6; } cachevar="zfs_cv_kernel_lookup_bdev_1arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/lookup_bdev_1arg/lookup_bdev_1arg.ko -then : + if ! test -f build/lookup_bdev_1arg/lookup_bdev_1arg.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \ @@ -100841,7 +104953,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -100852,16 +104964,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_1ARG_LOOKUP_BDEV 1" >>confdefs.h +$as_echo "#define HAVE_1ARG_LOOKUP_BDEV 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -100871,7 +104982,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -100882,30 +104993,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_logical_block_size() is available" >&5 -printf %s "checking whether bdev_logical_block_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_logical_block_size() is available" >&5 +$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_logical_block_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_logical_block_size -then : + if test -d build/bdev_logical_block_size; then : - if test -f build/bdev_logical_block_size/bdev_logical_block_size.ko -then : + if test -f build/bdev_logical_block_size/bdev_logical_block_size.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_logical_block_size\" test, check that @@ -100917,13 +105025,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -100933,7 +105040,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -100941,30 +105048,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_physical_block_size() is available" >&5 -printf %s "checking whether bdev_physical_block_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_physical_block_size() is available" >&5 +$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_physical_block_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_physical_block_size -then : + if test -d build/bdev_physical_block_size; then : - if test -f build/bdev_physical_block_size/bdev_physical_block_size.ko -then : + if test -f build/bdev_physical_block_size/bdev_physical_block_size.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_physical_block_size\" test, check that @@ -100976,13 +105080,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -100992,7 +105095,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -101000,30 +105103,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether check_disk_change() exists" >&5 -printf %s "checking whether check_disk_change() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether check_disk_change() exists" >&5 +$as_echo_n "checking whether check_disk_change() exists... " >&6; } cachevar="zfs_cv_kernel_check_disk_change_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/check_disk_change -then : + if test -d build/check_disk_change; then : - if test -f build/check_disk_change/check_disk_change.ko -then : + if test -f build/check_disk_change/check_disk_change.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"check_disk_change\" test, check that @@ -101035,48 +105135,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_CHECK_DISK_CHANGE 1" >>confdefs.h +$as_echo "#define HAVE_CHECK_DISK_CHANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_check_media_change() exists" >&5 -printf %s "checking whether bdev_check_media_change() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_check_media_change() exists" >&5 +$as_echo_n "checking whether bdev_check_media_change() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_check_media_change_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_check_media_change -then : + if test -d build/bdev_check_media_change; then : - if test -f build/bdev_check_media_change/bdev_check_media_change.ko -then : + if test -f build/bdev_check_media_change/bdev_check_media_change.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_check_media_change\" test, check that @@ -101088,48 +105184,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_CHECK_MEDIA_CHANGE 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_CHECK_MEDIA_CHANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_whole() is available" >&5 -printf %s "checking whether bdev_whole() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_whole() is available" >&5 +$as_echo_n "checking whether bdev_whole() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_whole_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_whole -then : + if test -d build/bdev_whole; then : - if test -f build/bdev_whole/bdev_whole.ko -then : + if test -f build/bdev_whole/bdev_whole.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_whole\" test, check that @@ -101141,48 +105233,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_WHOLE 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_WHOLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_nr_bytes() is available" >&5 -printf %s "checking whether bdev_nr_bytes() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_nr_bytes() is available" >&5 +$as_echo_n "checking whether bdev_nr_bytes() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_nr_bytes_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_nr_bytes -then : + if test -d build/bdev_nr_bytes; then : - if test -f build/bdev_nr_bytes/bdev_nr_bytes.ko -then : + if test -f build/bdev_nr_bytes/bdev_nr_bytes.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_nr_bytes\" test, check that @@ -101194,48 +105282,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_NR_BYTES 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_NR_BYTES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdevname() exists" >&5 -printf %s "checking whether bdevname() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdevname() exists" >&5 +$as_echo_n "checking whether bdevname() exists... " >&6; } cachevar="zfs_cv_kernel_bdevname_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdevname -then : + if test -d build/bdevname; then : - if test -f build/bdevname/bdevname.ko -then : + if test -f build/bdevname/bdevname.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdevname\" test, check that @@ -101247,77 +105331,73 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BDEVNAME 1" >>confdefs.h +$as_echo "#define HAVE_BDEVNAME 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() handles ERESTARTSYS" >&5 -printf %s "checking whether blkdev_get_by_path() handles ERESTARTSYS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() handles ERESTARTSYS" >&5 +$as_echo_n "checking whether blkdev_get_by_path() handles ERESTARTSYS... " >&6; } as_arg_v1=$LINUX_VERSION as_arg_v2=5.13.0 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null case $? in #( 1) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_GET_ERESTARTSYS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_GET_ERESTARTSYS 1" >>confdefs.h ;; #( 0) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; #( 2) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; #( *) : ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard() is available" >&5 -printf %s "checking whether blkdev_issue_discard() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard() is available" >&5 +$as_echo_n "checking whether blkdev_issue_discard() is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_noflags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_noflags -then : + if test -d build/blkdev_issue_discard_noflags; then : - if test -f build/blkdev_issue_discard_noflags/blkdev_issue_discard_noflags.ko -then : + if test -f build/blkdev_issue_discard_noflags/blkdev_issue_discard_noflags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_noflags\" test, check that @@ -101329,46 +105409,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard(flags) is available" >&5 -printf %s "checking whether blkdev_issue_discard(flags) is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_discard(flags) is available" >&5 +$as_echo_n "checking whether blkdev_issue_discard(flags) is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_flags -then : + if test -d build/blkdev_issue_discard_flags; then : - if test -f build/blkdev_issue_discard_flags/blkdev_issue_discard_flags.ko -then : + if test -f build/blkdev_issue_discard_flags/blkdev_issue_discard_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_flags\" test, check that @@ -101380,46 +105456,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_FLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_FLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard() is available" >&5 -printf %s "checking whether __blkdev_issue_discard() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard() is available" >&5 +$as_echo_n "checking whether __blkdev_issue_discard() is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_async_noflags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_async_noflags -then : + if test -d build/blkdev_issue_discard_async_noflags; then : - if test -f build/blkdev_issue_discard_async_noflags/blkdev_issue_discard_async_noflags.ko -then : + if test -f build/blkdev_issue_discard_async_noflags/blkdev_issue_discard_async_noflags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_async_noflags\" test, check that @@ -101431,46 +105503,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard(flags) is available" >&5 -printf %s "checking whether __blkdev_issue_discard(flags) is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __blkdev_issue_discard(flags) is available" >&5 +$as_echo_n "checking whether __blkdev_issue_discard(flags) is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_discard_async_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_discard_async_flags -then : + if test -d build/blkdev_issue_discard_async_flags; then : - if test -f build/blkdev_issue_discard_async_flags/blkdev_issue_discard_async_flags.ko -then : + if test -f build/blkdev_issue_discard_async_flags/blkdev_issue_discard_async_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_discard_async_flags\" test, check that @@ -101482,46 +105550,42 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_secure_erase() is available" >&5 -printf %s "checking whether blkdev_issue_secure_erase() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_issue_secure_erase() is available" >&5 +$as_echo_n "checking whether blkdev_issue_secure_erase() is available... " >&6; } cachevar="zfs_cv_kernel_blkdev_issue_secure_erase_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_issue_secure_erase -then : + if test -d build/blkdev_issue_secure_erase; then : - if test -f build/blkdev_issue_secure_erase/blkdev_issue_secure_erase.ko -then : + if test -f build/blkdev_issue_secure_erase/blkdev_issue_secure_erase.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_issue_secure_erase\" test, check that @@ -101533,48 +105597,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_ISSUE_SECURE_ERASE 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_ISSUE_SECURE_ERASE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_kobj() exists" >&5 -printf %s "checking whether bdev_kobj() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_kobj() exists" >&5 +$as_echo_n "checking whether bdev_kobj() exists... " >&6; } cachevar="zfs_cv_kernel_bdev_kobj_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_kobj -then : + if test -d build/bdev_kobj; then : - if test -f build/bdev_kobj/bdev_kobj.ko -then : + if test -f build/bdev_kobj/bdev_kobj.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_kobj\" test, check that @@ -101586,48 +105646,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_KOBJ 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_KOBJ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether part_to_dev() exists" >&5 -printf %s "checking whether part_to_dev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether part_to_dev() exists" >&5 +$as_echo_n "checking whether part_to_dev() exists... " >&6; } cachevar="zfs_cv_kernel_part_to_dev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/part_to_dev -then : + if test -d build/part_to_dev; then : - if test -f build/part_to_dev/part_to_dev.ko -then : + if test -f build/part_to_dev/part_to_dev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"part_to_dev\" test, check that @@ -101639,48 +105695,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PART_TO_DEV 1" >>confdefs.h +$as_echo "#define HAVE_PART_TO_DEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether disk_check_media_change() exists" >&5 -printf %s "checking whether disk_check_media_change() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether disk_check_media_change() exists" >&5 +$as_echo_n "checking whether disk_check_media_change() exists... " >&6; } cachevar="zfs_cv_kernel_disk_check_media_change_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/disk_check_media_change -then : + if test -d build/disk_check_media_change; then : - if test -f build/disk_check_media_change/disk_check_media_change.ko -then : + if test -f build/disk_check_media_change/disk_check_media_change.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"disk_check_media_change\" test, check that @@ -101692,48 +105744,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DISK_CHECK_MEDIA_CHANGE 1" >>confdefs.h +$as_echo "#define HAVE_DISK_CHECK_MEDIA_CHANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether BLK_STS_RESV_CONFLICT is defined" >&5 -printf %s "checking whether BLK_STS_RESV_CONFLICT is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BLK_STS_RESV_CONFLICT is defined" >&5 +$as_echo_n "checking whether BLK_STS_RESV_CONFLICT is defined... " >&6; } cachevar="zfs_cv_kernel_blk_sts_resv_conflict_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_sts_resv_conflict -then : + if test -d build/blk_sts_resv_conflict; then : - if test -f build/blk_sts_resv_conflict/blk_sts_resv_conflict.ko -then : + if test -f build/blk_sts_resv_conflict/blk_sts_resv_conflict.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_sts_resv_conflict\" test, check that @@ -101745,48 +105793,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_BLK_STS_RESV_CONFLICT 1" >>confdefs.h +$as_echo "#define HAVE_BLK_STS_RESV_CONFLICT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_mode_t is defined" >&5 -printf %s "checking whether blk_mode_t is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_mode_t is defined" >&5 +$as_echo_n "checking whether blk_mode_t is defined... " >&6; } cachevar="zfs_cv_kernel_blk_mode_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_mode_t -then : + if test -d build/blk_mode_t; then : - if test -f build/blk_mode_t/blk_mode_t.ko -then : + if test -f build/blk_mode_t/blk_mode_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_mode_t\" test, check that @@ -101798,19 +105842,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_MODE_T 1" >>confdefs.h +$as_echo "#define HAVE_BLK_MODE_T 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -101818,30 +105861,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct blk_plug is available" >&5 -printf %s "checking whether struct blk_plug is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct blk_plug is available" >&5 +$as_echo_n "checking whether struct blk_plug is available... " >&6; } cachevar="zfs_cv_kernel_blk_plug_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_plug -then : + if test -d build/blk_plug; then : - if test -f build/blk_plug/blk_plug.ko -then : + if test -f build/blk_plug/blk_plug.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_plug\" test, check that @@ -101853,13 +105893,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -101869,7 +105908,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -101877,30 +105916,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue bdi is dynamic" >&5 -printf %s "checking whether blk_queue bdi is dynamic... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue bdi is dynamic" >&5 +$as_echo_n "checking whether blk_queue bdi is dynamic... " >&6; } cachevar="zfs_cv_kernel_blk_queue_bdi_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_bdi -then : + if test -d build/blk_queue_bdi; then : - if test -f build/blk_queue_bdi/blk_queue_bdi.ko -then : + if test -f build/blk_queue_bdi/blk_queue_bdi.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_bdi\" test, check that @@ -101912,48 +105948,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_BDI_DYNAMIC 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_BDI_DYNAMIC 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether backing_dev_info is available through queue gendisk" >&5 -printf %s "checking whether backing_dev_info is available through queue gendisk... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether backing_dev_info is available through queue gendisk" >&5 +$as_echo_n "checking whether backing_dev_info is available through queue gendisk... " >&6; } cachevar="zfs_cv_kernel_blk_queue_disk_bdi_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_disk_bdi -then : + if test -d build/blk_queue_disk_bdi; then : - if test -f build/blk_queue_disk_bdi/blk_queue_disk_bdi.ko -then : + if test -f build/blk_queue_disk_bdi/blk_queue_disk_bdi.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_disk_bdi\" test, check that @@ -101965,48 +105997,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_DISK_BDI 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_DISK_BDI 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_update_readahead() exists" >&5 -printf %s "checking whether blk_queue_update_readahead() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_update_readahead() exists" >&5 +$as_echo_n "checking whether blk_queue_update_readahead() exists... " >&6; } cachevar="zfs_cv_kernel_blk_queue_update_readahead_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_update_readahead -then : + if test -d build/blk_queue_update_readahead; then : - if test -f build/blk_queue_update_readahead/blk_queue_update_readahead.ko -then : + if test -f build/blk_queue_update_readahead/blk_queue_update_readahead.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_update_readahead\" test, check that @@ -102018,44 +106046,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_UPDATE_READAHEAD 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_UPDATE_READAHEAD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether disk_update_readahead() exists" >&5 -printf %s "checking whether disk_update_readahead() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether disk_update_readahead() exists" >&5 +$as_echo_n "checking whether disk_update_readahead() exists... " >&6; } cachevar="zfs_cv_kernel_disk_update_readahead_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/disk_update_readahead -then : + if test -d build/disk_update_readahead; then : - if test -f build/disk_update_readahead/disk_update_readahead.ko -then : + if test -f build/disk_update_readahead/disk_update_readahead.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"disk_update_readahead\" test, check that @@ -102067,19 +106091,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DISK_UPDATE_READAHEAD 1" >>confdefs.h +$as_echo "#define HAVE_DISK_UPDATE_READAHEAD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -102088,30 +106111,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_discard_sectors() is available" >&5 -printf %s "checking whether bdev_max_discard_sectors() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_discard_sectors() is available" >&5 +$as_echo_n "checking whether bdev_max_discard_sectors() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_max_discard_sectors_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_max_discard_sectors -then : + if test -d build/bdev_max_discard_sectors; then : - if test -f build/bdev_max_discard_sectors/bdev_max_discard_sectors.ko -then : + if test -f build/bdev_max_discard_sectors/bdev_max_discard_sectors.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_max_discard_sectors\" test, check that @@ -102123,44 +106143,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_MAX_DISCARD_SECTORS 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_MAX_DISCARD_SECTORS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_discard() is available" >&5 -printf %s "checking whether blk_queue_discard() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_discard() is available" >&5 +$as_echo_n "checking whether blk_queue_discard() is available... " >&6; } cachevar="zfs_cv_kernel_blk_queue_discard_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_discard -then : + if test -d build/blk_queue_discard; then : - if test -f build/blk_queue_discard/blk_queue_discard.ko -then : + if test -f build/blk_queue_discard/blk_queue_discard.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_discard\" test, check that @@ -102172,16 +106188,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_DISCARD 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_DISCARD 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -102191,7 +106206,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -102202,30 +106217,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_secure_erase_sectors() is available" >&5 -printf %s "checking whether bdev_max_secure_erase_sectors() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_max_secure_erase_sectors() is available" >&5 +$as_echo_n "checking whether bdev_max_secure_erase_sectors() is available... " >&6; } cachevar="zfs_cv_kernel_bdev_max_secure_erase_sectors_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_max_secure_erase_sectors -then : + if test -d build/bdev_max_secure_erase_sectors; then : - if test -f build/bdev_max_secure_erase_sectors/bdev_max_secure_erase_sectors.ko -then : + if test -f build/bdev_max_secure_erase_sectors/bdev_max_secure_erase_sectors.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_max_secure_erase_sectors\" test, check that @@ -102237,44 +106249,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_MAX_SECURE_ERASE_SECTORS 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_MAX_SECURE_ERASE_SECTORS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_secure_erase() is available" >&5 -printf %s "checking whether blk_queue_secure_erase() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_secure_erase() is available" >&5 +$as_echo_n "checking whether blk_queue_secure_erase() is available... " >&6; } cachevar="zfs_cv_kernel_blk_queue_secure_erase_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_secure_erase -then : + if test -d build/blk_queue_secure_erase; then : - if test -f build/blk_queue_secure_erase/blk_queue_secure_erase.ko -then : + if test -f build/blk_queue_secure_erase/blk_queue_secure_erase.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_secure_erase\" test, check that @@ -102286,16 +106294,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_QUEUE_SECURE_ERASE 1" >>confdefs.h +$as_echo "#define HAVE_BLK_QUEUE_SECURE_ERASE 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -102305,7 +106312,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -102316,30 +106323,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_hw_sectors() is available" >&5 -printf %s "checking whether blk_queue_max_hw_sectors() is available... " >&6; } + { $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; } cachevar="zfs_cv_kernel_blk_queue_max_hw_sectors_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_max_hw_sectors -then : + if test -d build/blk_queue_max_hw_sectors; then : - if test -f build/blk_queue_max_hw_sectors/blk_queue_max_hw_sectors.ko -then : + if test -f build/blk_queue_max_hw_sectors/blk_queue_max_hw_sectors.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_max_hw_sectors\" test, check that @@ -102351,45 +106355,41 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_segments() is available" >&5 -printf %s "checking whether blk_queue_max_segments() is available... " >&6; } + { $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; } cachevar="zfs_cv_kernel_blk_queue_max_segments_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_queue_max_segments -then : + if test -d build/blk_queue_max_segments; then : - if test -f build/blk_queue_max_segments/blk_queue_max_segments.ko -then : + if test -f build/blk_queue_max_segments/blk_queue_max_segments.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_queue_max_segments\" test, check that @@ -102401,45 +106401,90 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_rot() is available" >&5 +$as_echo_n "checking whether blk_queue_rot() is available... " >&6; } + + cachevar="zfs_cv_kernel_blk_queue_rot_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/blk_queue_rot; then : + + if test -f build/blk_queue_rot/blk_queue_rot.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"blk_queue_rot\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_BLK_QUEUE_ROT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether block multiqueue hardware context is cached in struct request" >&5 -printf %s "checking whether block multiqueue hardware context is cached in struct request... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether block multiqueue hardware context is cached in struct request" >&5 +$as_echo_n "checking whether block multiqueue hardware context is cached in struct request... " >&6; } cachevar="zfs_cv_kernel_blk_mq_rq_hctx_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_mq_rq_hctx -then : + if test -d build/blk_mq_rq_hctx; then : - if test -f build/blk_mq_rq_hctx/blk_mq_rq_hctx.ko -then : + if test -f build/blk_mq_rq_hctx/blk_mq_rq_hctx.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_mq_rq_hctx\" test, check that @@ -102451,19 +106496,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_MQ_RQ_HCTX 1" >>confdefs.h +$as_echo "#define HAVE_BLK_MQ_RQ_HCTX 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -102471,30 +106515,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_EXT_DEVT flag is available" >&5 -printf %s "checking whether GENHD_FL_EXT_DEVT flag is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_EXT_DEVT flag is available" >&5 +$as_echo_n "checking whether GENHD_FL_EXT_DEVT flag is available... " >&6; } cachevar="zfs_cv_kernel_genhd_fl_ext_devt_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/genhd_fl_ext_devt -then : + if test -d build/genhd_fl_ext_devt; then : - if test -f build/genhd_fl_ext_devt/genhd_fl_ext_devt.ko -then : + if test -f build/genhd_fl_ext_devt/genhd_fl_ext_devt.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"genhd_fl_ext_devt\" test, check that @@ -102506,47 +106547,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENHD_FL_EXT_DEVT 1" >>confdefs.h +$as_echo "#define HAVE_GENHD_FL_EXT_DEVT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_NO_PART flag is available" >&5 -printf %s "checking whether GENHD_FL_NO_PART flag is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GENHD_FL_NO_PART flag is available" >&5 +$as_echo_n "checking whether GENHD_FL_NO_PART flag is available... " >&6; } cachevar="zfs_cv_kernel_genhd_fl_no_part_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/genhd_fl_no_part -then : + if test -d build/genhd_fl_no_part; then : - if test -f build/genhd_fl_no_part/genhd_fl_no_part.ko -then : + if test -f build/genhd_fl_no_part/genhd_fl_no_part.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"genhd_fl_no_part\" test, check that @@ -102558,43 +106595,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENHD_FL_NO_PART 1" >>confdefs.h +$as_echo "#define HAVE_GENHD_FL_NO_PART 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk_size() is available" >&5 -printf %s "checking whether revalidate_disk_size() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk_size() is available" >&5 +$as_echo_n "checking whether revalidate_disk_size() is available... " >&6; } cachevar="zfs_cv_kernel_revalidate_disk_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/revalidate_disk_size/revalidate_disk_size.ko -then : + if ! test -f build/revalidate_disk_size/revalidate_disk_size.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]revalidate_disk_size[[:space:]]' \ @@ -102627,7 +106660,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -102638,38 +106671,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REVALIDATE_DISK_SIZE 1" >>confdefs.h +$as_echo "#define HAVE_REVALIDATE_DISK_SIZE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk() is available" >&5 -printf %s "checking whether revalidate_disk() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether revalidate_disk() is available" >&5 +$as_echo_n "checking whether revalidate_disk() is available... " >&6; } cachevar="zfs_cv_kernel_revalidate_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/revalidate_disk/revalidate_disk.ko -then : + if ! test -f build/revalidate_disk/revalidate_disk.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]revalidate_disk[[:space:]]' \ @@ -102702,7 +106731,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -102713,19 +106742,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REVALIDATE_DISK 1" >>confdefs.h +$as_echo "#define HAVE_REVALIDATE_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -102734,30 +106762,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether get_disk_ro() is available" >&5 -printf %s "checking whether get_disk_ro() is available... " >&6; } + { $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; } cachevar="zfs_cv_kernel_get_disk_ro_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/get_disk_ro -then : + if test -d build/get_disk_ro; then : - if test -f build/get_disk_ro/get_disk_ro.ko -then : + if test -f build/get_disk_ro/get_disk_ro.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"get_disk_ro\" test, check that @@ -102769,13 +106794,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -102785,7 +106809,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -102793,30 +106817,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5 -printf %s "checking whether ql->discard_granularity is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5 +$as_echo_n "checking whether ql->discard_granularity is available... " >&6; } cachevar="zfs_cv_kernel_discard_granularity_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/discard_granularity -then : + if test -d build/discard_granularity; then : - if test -f build/discard_granularity/discard_granularity.ko -then : + if test -f build/discard_granularity/discard_granularity.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"discard_granularity\" test, check that @@ -102828,13 +106849,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -102844,7 +106864,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -102852,30 +106872,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() exists" >&5 -printf %s "checking whether inode_owner_or_capable() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() exists" >&5 +$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; } cachevar="zfs_cv_kernel_inode_owner_or_capable_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_owner_or_capable -then : + if test -d build/inode_owner_or_capable; then : - if test -f build/inode_owner_or_capable/inode_owner_or_capable.ko -then : + if test -f build/inode_owner_or_capable/inode_owner_or_capable.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_owner_or_capable\" test, check that @@ -102887,44 +106904,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_OWNER_OR_CAPABLE 1" >>confdefs.h +$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes user_ns" >&5 -printf %s "checking whether inode_owner_or_capable() takes user_ns... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes user_ns" >&5 +$as_echo_n "checking whether inode_owner_or_capable() takes user_ns... " >&6; } cachevar="zfs_cv_kernel_inode_owner_or_capable_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_owner_or_capable_userns -then : + if test -d build/inode_owner_or_capable_userns; then : - if test -f build/inode_owner_or_capable_userns/inode_owner_or_capable_userns.ko -then : + if test -f build/inode_owner_or_capable_userns/inode_owner_or_capable_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_owner_or_capable_userns\" test, check that @@ -102936,43 +106949,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_OWNER_OR_CAPABLE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes mnt_idmap" >&5 -printf %s "checking whether inode_owner_or_capable() takes mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() takes mnt_idmap" >&5 +$as_echo_n "checking whether inode_owner_or_capable() takes mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_inode_owner_or_capable_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_owner_or_capable_mnt_idmap -then : + if test -d build/inode_owner_or_capable_mnt_idmap; then : - if test -f build/inode_owner_or_capable_mnt_idmap/inode_owner_or_capable_mnt_idmap.ko -then : + if test -f build/inode_owner_or_capable_mnt_idmap/inode_owner_or_capable_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_owner_or_capable_mnt_idmap\" test, check that @@ -102984,16 +106993,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_INODE_OWNER_OR_CAPABLE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE_IDMAP 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -103003,7 +107011,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -103018,30 +107026,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_handler" >&5 -printf %s "checking whether super_block uses const struct xattr_handler... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_handler" >&5 +$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; } cachevar="zfs_cv_kernel_const_xattr_handler_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/const_xattr_handler -then : + if test -d build/const_xattr_handler; then : - if test -f build/const_xattr_handler/const_xattr_handler.ko -then : + if test -f build/const_xattr_handler/const_xattr_handler.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"const_xattr_handler\" test, check that @@ -103053,13 +107058,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -103069,7 +107073,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -103077,30 +107081,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry and inode and flags" >&5 -printf %s "checking whether xattr_handler->get() wants dentry and inode and flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry and inode and flags" >&5 +$as_echo_n "checking whether xattr_handler->get() wants dentry and inode and flags... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_get_dentry_inode_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_get_dentry_inode_flags -then : + if test -d build/xattr_handler_get_dentry_inode_flags; then : - if test -f build/xattr_handler_get_dentry_inode_flags/xattr_handler_get_dentry_inode_flags.ko -then : + if test -f build/xattr_handler_get_dentry_inode_flags/xattr_handler_get_dentry_inode_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_get_dentry_inode_flags\" test, check that @@ -103112,48 +107113,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_GET_DENTRY_INODE_FLAGS 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_GET_DENTRY_INODE_FLAGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap" >&5 -printf %s "checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_set_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_set_mnt_idmap -then : + if test -d build/xattr_handler_set_mnt_idmap; then : - if test -f build/xattr_handler_set_mnt_idmap/xattr_handler_set_mnt_idmap.ko -then : + if test -f build/xattr_handler_set_mnt_idmap/xattr_handler_set_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_set_mnt_idmap\" test, check that @@ -103165,43 +107162,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_SET_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_SET_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry, inode, and user_namespace" >&5 -printf %s "checking whether xattr_handler->set() wants dentry, inode, and user_namespace... " >&6; } + { $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, inode, and user_namespace" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry, inode, and user_namespace... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_set_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_set_userns -then : + if test -d build/xattr_handler_set_userns; then : - if test -f build/xattr_handler_set_userns/xattr_handler_set_userns.ko -then : + if test -f build/xattr_handler_set_userns/xattr_handler_set_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_set_userns\" test, check that @@ -103213,43 +107206,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_SET_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_SET_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry and inode" >&5 -printf %s "checking whether xattr_handler->set() wants dentry and inode... " >&6; } + { $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 and inode" >&5 +$as_echo_n "checking whether xattr_handler->set() wants dentry and inode... " >&6; } cachevar="zfs_cv_kernel_xattr_handler_set_dentry_inode_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/xattr_handler_set_dentry_inode -then : + if test -d build/xattr_handler_set_dentry_inode; then : - if test -f build/xattr_handler_set_dentry_inode/xattr_handler_set_dentry_inode.ko -then : + if test -f build/xattr_handler_set_dentry_inode/xattr_handler_set_dentry_inode.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"xattr_handler_set_dentry_inode\" test, check that @@ -103261,16 +107250,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_XATTR_SET_DENTRY_INODE 1" >>confdefs.h +$as_echo "#define HAVE_XATTR_SET_DENTRY_INODE 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -103280,7 +107268,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -103296,30 +107284,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5 -printf %s "checking whether posix_acl_equiv_mode() wants umode_t... " >&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; } cachevar="zfs_cv_kernel_posix_acl_equiv_mode_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/posix_acl_equiv_mode -then : + if test -d build/posix_acl_equiv_mode; then : - if test -f build/posix_acl_equiv_mode/posix_acl_equiv_mode.ko -then : + if test -f build/posix_acl_equiv_mode/posix_acl_equiv_mode.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"posix_acl_equiv_mode\" test, check that @@ -103331,13 +107316,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -103347,7 +107331,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -103355,30 +107339,76 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->get_acl() exists" >&5 -printf %s "checking whether iops->get_acl() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_to_xattr() allocates its result" >&5 +$as_echo_n "checking whether posix_acl_to_xattr() allocates its result... " >&6; }; + + cachevar="zfs_cv_kernel_posix_acl_to_xattr_alloc_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/posix_acl_to_xattr_alloc; then : + + if test -f build/posix_acl_to_xattr_alloc/posix_acl_to_xattr_alloc.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"posix_acl_to_xattr_alloc\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_POSIX_ACL_TO_XATTR_ALLOC 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_acl() exists" >&5 +$as_echo_n "checking whether iops->get_acl() exists... " >&6; } cachevar="zfs_cv_kernel_inode_operations_get_acl_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_get_acl -then : + if test -d build/inode_operations_get_acl; then : - if test -f build/inode_operations_get_acl/inode_operations_get_acl.ko -then : + if test -f build/inode_operations_get_acl/inode_operations_get_acl.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_get_acl\" test, check that @@ -103390,39 +107420,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GET_ACL 1" >>confdefs.h +$as_echo "#define HAVE_GET_ACL 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_get_acl_rcu_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_get_acl_rcu -then : + if test -d build/inode_operations_get_acl_rcu; then : - if test -f build/inode_operations_get_acl_rcu/inode_operations_get_acl_rcu.ko -then : + if test -f build/inode_operations_get_acl_rcu/inode_operations_get_acl_rcu.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_get_acl_rcu\" test, check that @@ -103434,39 +107460,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GET_ACL_RCU 1" >>confdefs.h +$as_echo "#define HAVE_GET_ACL_RCU 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_get_inode_acl_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_get_inode_acl -then : + if test -d build/inode_operations_get_inode_acl; then : - if test -f build/inode_operations_get_inode_acl/inode_operations_get_inode_acl.ko -then : + if test -f build/inode_operations_get_inode_acl/inode_operations_get_inode_acl.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_get_inode_acl\" test, check that @@ -103478,16 +107500,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GET_INODE_ACL 1" >>confdefs.h +$as_echo "#define HAVE_GET_INODE_ACL 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -103497,7 +107518,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -103511,30 +107532,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->set_acl() with 4 args exists" >&5 -printf %s "checking whether iops->set_acl() with 4 args exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->set_acl() with 4 args exists" >&5 +$as_echo_n "checking whether iops->set_acl() with 4 args exists... " >&6; } cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_set_acl_userns -then : + if test -d build/inode_operations_set_acl_userns; then : - if test -f build/inode_operations_set_acl_userns/inode_operations_set_acl_userns.ko -then : + if test -f build/inode_operations_set_acl_userns/inode_operations_set_acl_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_set_acl_userns\" test, check that @@ -103546,39 +107564,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SET_ACL_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_SET_ACL_USERNS 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_set_acl_mnt_idmap_dentry_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_set_acl_mnt_idmap_dentry -then : + if test -d build/inode_operations_set_acl_mnt_idmap_dentry; then : - if test -f build/inode_operations_set_acl_mnt_idmap_dentry/inode_operations_set_acl_mnt_idmap_dentry.ko -then : + if test -f build/inode_operations_set_acl_mnt_idmap_dentry/inode_operations_set_acl_mnt_idmap_dentry.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_set_acl_mnt_idmap_dentry\" test, check that @@ -103590,39 +107604,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SET_ACL_IDMAP_DENTRY 1" >>confdefs.h +$as_echo "#define HAVE_SET_ACL_IDMAP_DENTRY 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_set_acl_userns_dentry_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_set_acl_userns_dentry -then : + if test -d build/inode_operations_set_acl_userns_dentry; then : - if test -f build/inode_operations_set_acl_userns_dentry/inode_operations_set_acl_userns_dentry.ko -then : + if test -f build/inode_operations_set_acl_userns_dentry/inode_operations_set_acl_userns_dentry.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_set_acl_userns_dentry\" test, check that @@ -103634,19 +107644,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SET_ACL_USERNS_DENTRY_ARG2 1" >>confdefs.h +$as_echo "#define HAVE_SET_ACL_USERNS_DENTRY_ARG2 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -103659,30 +107668,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes mnt_idmap" >&5 -printf %s "checking whether iops->setattr() takes mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes mnt_idmap" >&5 +$as_echo_n "checking whether iops->setattr() takes mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_inode_operations_setattr_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_setattr_mnt_idmap -then : + if test -d build/inode_operations_setattr_mnt_idmap; then : - if test -f build/inode_operations_setattr_mnt_idmap/inode_operations_setattr_mnt_idmap.ko -then : + if test -f build/inode_operations_setattr_mnt_idmap/inode_operations_setattr_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_setattr_mnt_idmap\" test, check that @@ -103694,43 +107700,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_IOPS_SETATTR 1" >>confdefs.h +$as_echo "#define HAVE_IDMAP_IOPS_SETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes user_namespace" >&5 -printf %s "checking whether iops->setattr() takes user_namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->setattr() takes user_namespace" >&5 +$as_echo_n "checking whether iops->setattr() takes user_namespace... " >&6; } cachevar="zfs_cv_kernel_inode_operations_setattr_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_setattr_userns -then : + if test -d build/inode_operations_setattr_userns; then : - if test -f build/inode_operations_setattr_userns/inode_operations_setattr_userns.ko -then : + if test -f build/inode_operations_setattr_userns/inode_operations_setattr_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_setattr_userns\" test, check that @@ -103742,19 +107744,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_USERNS_IOPS_SETATTR 1" >>confdefs.h +$as_echo "#define HAVE_USERNS_IOPS_SETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -103763,30 +107764,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes mnt_idmap" >&5 -printf %s "checking whether iops->getattr() takes mnt_idmap... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes mnt_idmap" >&5 +$as_echo_n "checking whether iops->getattr() takes mnt_idmap... " >&6; } cachevar="zfs_cv_kernel_inode_operations_getattr_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_getattr_mnt_idmap -then : + if test -d build/inode_operations_getattr_mnt_idmap; then : - if test -f build/inode_operations_getattr_mnt_idmap/inode_operations_getattr_mnt_idmap.ko -then : + if test -f build/inode_operations_getattr_mnt_idmap/inode_operations_getattr_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_getattr_mnt_idmap\" test, check that @@ -103798,43 +107796,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_IOPS_GETATTR 1" >>confdefs.h +$as_echo "#define HAVE_IDMAP_IOPS_GETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes user_namespace" >&5 -printf %s "checking whether iops->getattr() takes user_namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes user_namespace" >&5 +$as_echo_n "checking whether iops->getattr() takes user_namespace... " >&6; } cachevar="zfs_cv_kernel_inode_operations_getattr_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_getattr_userns -then : + if test -d build/inode_operations_getattr_userns; then : - if test -f build/inode_operations_getattr_userns/inode_operations_getattr_userns.ko -then : + if test -f build/inode_operations_getattr_userns/inode_operations_getattr_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_getattr_userns\" test, check that @@ -103846,44 +107840,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_USERNS_IOPS_GETATTR 1" >>confdefs.h +$as_echo "#define HAVE_USERNS_IOPS_GETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes a path" >&5 -printf %s "checking whether iops->getattr() takes a path... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->getattr() takes a path" >&5 +$as_echo_n "checking whether iops->getattr() takes a path... " >&6; } cachevar="zfs_cv_kernel_inode_operations_getattr_path_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_getattr_path -then : + if test -d build/inode_operations_getattr_path; then : - if test -f build/inode_operations_getattr_path/inode_operations_getattr_path.ko -then : + if test -f build/inode_operations_getattr_path/inode_operations_getattr_path.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_getattr_path\" test, check that @@ -103895,19 +107885,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PATH_IOPS_GETATTR 1" >>confdefs.h +$as_echo "#define HAVE_PATH_IOPS_GETATTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -103919,30 +107908,76 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sops->show_options() wants dentry" >&5 -printf %s "checking whether sops->show_options() wants dentry... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_state_read_once() exists" >&5 +$as_echo_n "checking whether inode_state_read_once() exists... " >&6; } + + cachevar="zfs_cv_kernel_inode_state_read_once_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/inode_state_read_once; then : + + if test -f build/inode_state_read_once/inode_state_read_once.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"inode_state_read_once\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_INODE_STATE_READ_ONCE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->show_options() wants dentry" >&5 +$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; } cachevar="zfs_cv_kernel_super_operations_show_options_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/super_operations_show_options -then : + if test -d build/super_operations_show_options; then : - if test -f build/super_operations_show_options/super_operations_show_options.ko -then : + if test -f build/super_operations_show_options/super_operations_show_options.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"super_operations_show_options\" test, check that @@ -103954,13 +107989,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -103970,7 +108004,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -103979,30 +108013,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5 -printf %s "checking whether super_block has s_shrink... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5 +$as_echo_n "checking whether super_block has s_shrink... " >&6; } cachevar="zfs_cv_kernel_super_block_s_shrink_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/super_block_s_shrink -then : + if test -d build/super_block_s_shrink; then : - if test -f build/super_block_s_shrink/super_block_s_shrink.ko -then : + if test -f build/super_block_s_shrink/super_block_s_shrink.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"super_block_s_shrink\" test, check that @@ -104014,43 +108045,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SUPER_BLOCK_S_SHRINK 1" >>confdefs.h +$as_echo "#define HAVE_SUPER_BLOCK_S_SHRINK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink pointer" >&5 -printf %s "checking whether super_block has s_shrink pointer... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink pointer" >&5 +$as_echo_n "checking whether super_block has s_shrink pointer... " >&6; } cachevar="zfs_cv_kernel_super_block_s_shrink_ptr_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/super_block_s_shrink_ptr -then : + if test -d build/super_block_s_shrink_ptr; then : - if test -f build/super_block_s_shrink_ptr/super_block_s_shrink_ptr.ko -then : + if test -f build/super_block_s_shrink_ptr/super_block_s_shrink_ptr.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"super_block_s_shrink_ptr\" test, check that @@ -104062,19 +108089,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SUPER_BLOCK_S_SHRINK_PTR 1" >>confdefs.h +$as_echo "#define HAVE_SUPER_BLOCK_S_SHRINK_PTR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? " *** None of the expected \"sb->s_shrink()\" interfaces were detected. @@ -104083,7 +108109,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -104094,30 +108120,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether new var-arg register_shrinker() exists" >&5 -printf %s "checking whether new var-arg register_shrinker() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether new var-arg register_shrinker() exists" >&5 +$as_echo_n "checking whether new var-arg register_shrinker() exists... " >&6; } cachevar="zfs_cv_kernel_register_shrinker_vararg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/register_shrinker_vararg -then : + if test -d build/register_shrinker_vararg; then : - if test -f build/register_shrinker_vararg/register_shrinker_vararg.ko -then : + if test -f build/register_shrinker_vararg/register_shrinker_vararg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"register_shrinker_vararg\" test, check that @@ -104129,48 +108152,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REGISTER_SHRINKER_VARARG 1" >>confdefs.h +$as_echo "#define HAVE_REGISTER_SHRINKER_VARARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether shrinker_register() exists" >&5 -printf %s "checking whether shrinker_register() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shrinker_register() exists" >&5 +$as_echo_n "checking whether shrinker_register() exists... " >&6; } cachevar="zfs_cv_kernel_shrinker_register_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/shrinker_register -then : + if test -d build/shrinker_register; then : - if test -f build/shrinker_register/shrinker_register.ko -then : + if test -f build/shrinker_register/shrinker_register.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"shrinker_register\" test, check that @@ -104182,49 +108201,87 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SHRINKER_REGISTER 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() returns struct dentry*" >&5 +$as_echo_n "checking whether iops->mkdir() returns struct dentry*... " >&6; } + + cachevar="zfs_cv_kernel_mkdir_return_dentry_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/mkdir_return_dentry; then : + + if test -f build/mkdir_return_dentry/mkdir_return_dentry.ko; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + eval "$cachevar=yes" -printf "%s\n" "#define HAVE_SHRINKER_REGISTER 1" >>confdefs.h +else + eval "$cachevar=no" + +fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + as_fn_error $? " + *** No matching source for the \"mkdir_return_dentry\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 fi +fi + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_IOPS_MKDIR_DENTRY 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->mkdir() takes struct mnt_idmap*... " >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->mkdir() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_mkdir_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mkdir_mnt_idmap -then : + if test -d build/mkdir_mnt_idmap; then : - if test -f build/mkdir_mnt_idmap/mkdir_mnt_idmap.ko -then : + if test -f build/mkdir_mnt_idmap/mkdir_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mkdir_mnt_idmap\" test, check that @@ -104236,44 +108293,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKDIR_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_MKDIR_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct user_namespace*" >&5 -printf %s "checking whether iops->mkdir() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mkdir() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->mkdir() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_mkdir_user_namespace_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mkdir_user_namespace -then : + if test -d build/mkdir_user_namespace; then : - if test -f build/mkdir_user_namespace/mkdir_user_namespace.ko -then : + if test -f build/mkdir_user_namespace/mkdir_user_namespace.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mkdir_user_namespace\" test, check that @@ -104285,19 +108338,21 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_IOPS_MKDIR_USERNS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKDIR_USERNS 1" >>confdefs.h +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } fi @@ -104306,30 +108361,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->lookup() passes flags" >&5 -printf %s "checking whether iops->lookup() passes flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->lookup() passes flags" >&5 +$as_echo_n "checking whether iops->lookup() passes flags... " >&6; } cachevar="zfs_cv_kernel_lookup_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/lookup_flags -then : + if test -d build/lookup_flags; then : - if test -f build/lookup_flags/lookup_flags.ko -then : + if test -f build/lookup_flags/lookup_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"lookup_flags\" test, check that @@ -104341,13 +108393,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -104357,7 +108408,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -104365,30 +108416,170 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->create() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for id mapping mechanism" >&5 +$as_echo_n "checking for id mapping mechanism... " >&6; } + + cachevar="zfs_cv_kernel_generic_permission_idmap_mntidmap_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/generic_permission_idmap_mntidmap; then : + + if test -f build/generic_permission_idmap_mntidmap/generic_permission_idmap_mntidmap.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"generic_permission_idmap_mntidmap\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: mnt_idmap" >&5 +$as_echo "mnt_idmap" >&6; } + +$as_echo "#define HAVE_IDMAP_MNTIDMAP 1" >>confdefs.h + + +else + + + cachevar="zfs_cv_kernel_generic_permission_idmap_userns_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/generic_permission_idmap_userns; then : + + if test -f build/generic_permission_idmap_userns/generic_permission_idmap_userns.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"generic_permission_idmap_userns\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: user_namespace" >&5 +$as_echo "user_namespace" >&6; } + +$as_echo "#define HAVE_IDMAP_USERNS 1" >>confdefs.h + + +else + + + cachevar="zfs_cv_kernel_generic_permission_idmap_none_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/generic_permission_idmap_none; then : + + if test -f build/generic_permission_idmap_none/generic_permission_idmap_none.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"generic_permission_idmap_none\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 +$as_echo "unknown" >&6; } + + as_fn_error $? " + *** None of the expected \"generic_permission\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + +fi + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->create() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_create_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/create_mnt_idmap -then : + if test -d build/create_mnt_idmap; then : - if test -f build/create_mnt_idmap/create_mnt_idmap.ko -then : + if test -f build/create_mnt_idmap/create_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"create_mnt_idmap\" test, check that @@ -104400,44 +108591,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_CREATE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_CREATE_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct user_namespace*" >&5 -printf %s "checking whether iops->create() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->create() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_create_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/create_userns -then : + if test -d build/create_userns; then : - if test -f build/create_userns/create_userns.ko -then : + if test -f build/create_userns/create_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"create_userns\" test, check that @@ -104449,44 +108636,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_CREATE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_CREATE_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->create() passes flags" >&5 -printf %s "checking whether iops->create() passes flags... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() passes flags" >&5 +$as_echo_n "checking whether iops->create() passes flags... " >&6; } cachevar="zfs_cv_kernel_create_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/create_flags -then : + if test -d build/create_flags; then : - if test -f build/create_flags/create_flags.ko -then : + if test -f build/create_flags/create_flags.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"create_flags\" test, check that @@ -104498,13 +108681,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -104514,7 +108696,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -104528,30 +108710,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->permission() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->permission() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_permission_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/permission_mnt_idmap -then : + if test -d build/permission_mnt_idmap; then : - if test -f build/permission_mnt_idmap/permission_mnt_idmap.ko -then : + if test -f build/permission_mnt_idmap/permission_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"permission_mnt_idmap\" test, check that @@ -104563,44 +108742,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_PERMISSION_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_PERMISSION_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct user_namespace*" >&5 -printf %s "checking whether iops->permission() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->permission() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_permission_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/permission_userns -then : + if test -d build/permission_userns; then : - if test -f build/permission_userns/permission_userns.ko -then : + if test -f build/permission_userns/permission_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"permission_userns\" test, check that @@ -104612,19 +108787,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_PERMISSION_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_PERMISSION_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -104633,30 +108807,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether i_op->tmpfile() exists" >&5 -printf %s "checking whether i_op->tmpfile() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether i_op->tmpfile() exists" >&5 +$as_echo_n "checking whether i_op->tmpfile() exists... " >&6; } cachevar="zfs_cv_kernel_inode_operations_tmpfile_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile_mnt_idmap -then : + if test -d build/inode_operations_tmpfile_mnt_idmap; then : - if test -f build/inode_operations_tmpfile_mnt_idmap/inode_operations_tmpfile_mnt_idmap.ko -then : + if test -f build/inode_operations_tmpfile_mnt_idmap/inode_operations_tmpfile_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile_mnt_idmap\" test, check that @@ -104668,39 +108839,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_IDMAP 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_tmpfile_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile -then : + if test -d build/inode_operations_tmpfile; then : - if test -f build/inode_operations_tmpfile/inode_operations_tmpfile.ko -then : + if test -f build/inode_operations_tmpfile/inode_operations_tmpfile.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile\" test, check that @@ -104712,39 +108879,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile_dentry_userns -then : + if test -d build/inode_operations_tmpfile_dentry_userns; then : - if test -f build/inode_operations_tmpfile_dentry_userns/inode_operations_tmpfile_dentry_userns.ko -then : + if test -f build/inode_operations_tmpfile_dentry_userns/inode_operations_tmpfile_dentry_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile_dentry_userns\" test, check that @@ -104756,42 +108919,38 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_USERNS 1" >>confdefs.h -printf "%s\n" "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_inode_operations_tmpfile_dentry_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_tmpfile_dentry -then : + if test -d build/inode_operations_tmpfile_dentry; then : - if test -f build/inode_operations_tmpfile_dentry/inode_operations_tmpfile_dentry.ko -then : + if test -f build/inode_operations_tmpfile_dentry/inode_operations_tmpfile_dentry.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_tmpfile_dentry\" test, check that @@ -104803,16 +108962,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h +$as_echo "#define HAVE_TMPFILE_DENTRY 1" >>confdefs.h -else $as_nop +else @@ -104831,7 +108989,7 @@ *** APIs. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 ;; #( 0) : @@ -104845,13 +109003,13 @@ *** APIs. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 ;; #( 2) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; #( *) : ;; @@ -104873,30 +109031,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5 -printf %s "checking whether dops->d_automount() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5 +$as_echo_n "checking whether dops->d_automount() exists... " >&6; } cachevar="zfs_cv_kernel_dentry_operations_d_automount_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/dentry_operations_d_automount -then : + if test -d build/dentry_operations_d_automount; then : - if test -f build/dentry_operations_d_automount/dentry_operations_d_automount.ko -then : + if test -f build/dentry_operations_d_automount/dentry_operations_d_automount.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"dentry_operations_d_automount\" test, check that @@ -104908,13 +109063,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -104924,7 +109078,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -104932,30 +109086,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes 4 args" >&5 -printf %s "checking whether dops->d_revalidate() takes 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes 4 args" >&5 +$as_echo_n "checking whether dops->d_revalidate() takes 4 args... " >&6; } cachevar="zfs_cv_kernel_dentry_operations_d_revalidate_4args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/dentry_operations_d_revalidate_4args -then : + if test -d build/dentry_operations_d_revalidate_4args; then : - if test -f build/dentry_operations_d_revalidate_4args/dentry_operations_d_revalidate_4args.ko -then : + if test -f build/dentry_operations_d_revalidate_4args/dentry_operations_d_revalidate_4args.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"dentry_operations_d_revalidate_4args\" test, check that @@ -104967,49 +109118,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_D_REVALIDATE_4ARGS 1" >>confdefs.h +$as_echo "#define HAVE_D_REVALIDATE_4ARGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5 -printf %s "checking whether eops->commit_metadata() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5 +$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; } cachevar="zfs_cv_kernel_export_operations_commit_metadata_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/export_operations_commit_metadata -then : + if test -d build/export_operations_commit_metadata; then : - if test -f build/export_operations_commit_metadata/export_operations_commit_metadata.ko -then : + if test -f build/export_operations_commit_metadata/export_operations_commit_metadata.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"export_operations_commit_metadata\" test, check that @@ -105021,13 +109168,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -105037,7 +109183,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -105045,24 +109191,21 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct mnt_idmap*" >&5 -printf %s "checking whether setattr_prepare() is available and accepts struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct mnt_idmap*" >&5 +$as_echo_n "checking whether setattr_prepare() is available and accepts struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_setattr_prepare_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/setattr_prepare_mnt_idmap/setattr_prepare_mnt_idmap.ko -then : + if ! test -f build/setattr_prepare_mnt_idmap/setattr_prepare_mnt_idmap.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \ @@ -105095,7 +109238,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -105106,38 +109249,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SETATTR_PREPARE_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_SETATTR_PREPARE_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct user_namespace*" >&5 -printf %s "checking whether setattr_prepare() is available and accepts struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available and accepts struct user_namespace*" >&5 +$as_echo_n "checking whether setattr_prepare() is available and accepts struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_setattr_prepare_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/setattr_prepare_userns/setattr_prepare_userns.ko -then : + if ! test -f build/setattr_prepare_userns/setattr_prepare_userns.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \ @@ -105170,7 +109309,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -105181,38 +109320,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SETATTR_PREPARE_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_SETATTR_PREPARE_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available, doesn't accept user_namespace" >&5 -printf %s "checking whether setattr_prepare() is available, doesn't accept user_namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setattr_prepare() is available, doesn't accept user_namespace" >&5 +$as_echo_n "checking whether setattr_prepare() is available, doesn't accept user_namespace... " >&6; } cachevar="zfs_cv_kernel_setattr_prepare_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/setattr_prepare/setattr_prepare.ko -then : + if ! test -f build/setattr_prepare/setattr_prepare.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \ @@ -105245,7 +109380,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -105256,19 +109391,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SETATTR_PREPARE_NO_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_SETATTR_PREPARE_NO_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -105280,24 +109414,21 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5 -printf %s "checking whether insert_inode_locked() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5 +$as_echo_n "checking whether insert_inode_locked() is available... " >&6; } cachevar="zfs_cv_kernel_insert_inode_locked_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/insert_inode_locked/insert_inode_locked.ko -then : + if ! test -f build/insert_inode_locked/insert_inode_locked.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \ @@ -105330,7 +109461,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -105341,13 +109472,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -105357,7 +109487,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -105365,24 +109495,251 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5 -printf %s "checking whether truncate_setsize() is available... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_obtain_alias() is available" >&5 +$as_echo_n "checking whether d_obtain_alias() is available... " >&6; } + + cachevar="zfs_cv_kernel_d_obtain_alias_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if ! test -f build/d_obtain_alias/d_obtain_alias.ko; then : + + eval "$cachevar=no" + +else + + if test "x$enable_linux_builtin" != "xyes"; then : + + + grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/dcache.c; do + grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + + eval "$cachevar=no" + + else : + + eval "$cachevar=yes" + + fi + else : + + eval "$cachevar=yes" + + fi + + +else + + eval "$cachevar=yes" + +fi + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + + as_fn_error $? " + *** None of the expected \"d_obtain_alias()\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_set_d_op() is available" >&5 +$as_echo_n "checking whether d_set_d_op() is available... " >&6; } + + cachevar="zfs_cv_kernel_d_set_d_op_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/d_set_d_op; then : + + if test -f build/d_set_d_op/d_set_d_op.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"d_set_d_op\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_default_d_op() is available" >&5 +$as_echo_n "checking whether set_default_d_op() is available... " >&6; } + + cachevar="zfs_cv_kernel_set_default_d_op_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/set_default_d_op; then : + + if test -f build/set_default_d_op/set_default_d_op.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"set_default_d_op\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SET_DEFAULT_D_OP 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dentry aliases are in d_u member" >&5 +$as_echo_n "checking whether dentry aliases are in d_u member... " >&6; } + + cachevar="zfs_cv_kernel_dentry_alias_d_u_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/dentry_alias_d_u; then : + + if test -f build/dentry_alias_d_u/dentry_alias_d_u.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"dentry_alias_d_u\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_DENTRY_D_U_ALIASES 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5 +$as_echo_n "checking whether truncate_setsize() is available... " >&6; } cachevar="zfs_cv_kernel_truncate_setsize_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/truncate_setsize/truncate_setsize.ko -then : + if ! test -f build/truncate_setsize/truncate_setsize.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \ @@ -105415,7 +109772,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -105426,13 +109783,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -105442,7 +109798,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -105451,30 +109807,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5 -printf %s "checking whether security_inode_init_security wants callback... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5 +$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; } cachevar="zfs_cv_kernel_security_inode_init_security_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/security_inode_init_security -then : + if test -d build/security_inode_init_security; then : - if test -f build/security_inode_init_security/security_inode_init_security.ko -then : + if test -f build/security_inode_init_security/security_inode_init_security.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"security_inode_init_security\" test, check that @@ -105486,13 +109839,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -105502,7 +109854,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -105511,33 +109863,30 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fst->mount() exists" >&5 -printf %s "checking whether fst->mount() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fs_context exists" >&5 +$as_echo_n "checking whether fs_context exists... " >&6; } - cachevar="zfs_cv_kernel_file_system_type_mount_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_fs_context_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/file_system_type_mount -then : + if test -d build/fs_context; then : - if test -f build/file_system_type_mount/file_system_type_mount.ko -then : + if test -f build/fs_context/fs_context.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"file_system_type_mount\" test, check that + *** No matching source for the \"fs_context\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -105546,57 +109895,50 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_FS_CONTEXT 1" >>confdefs.h - as_fn_error $? " - *** None of the expected \"fst->mount()\" interfaces were detected. - *** This may be because your kernel version is newer than what is - *** supported, or you are using a patched custom kernel with - *** incompatible modifications. - *** - *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX - " "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? " + *** This kernel does not have \`struct fs_context\`. OpenZFS cannot be compiled. + " "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether SB_DYING is defined" >&5 -printf %s "checking whether SB_DYING is defined... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fs_parse() takes fs_parameter_spec directly" >&5 +$as_echo_n "checking whether fs_parse() takes fs_parameter_spec directly... " >&6; } - cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_fs_parse_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sb_dying -then : + if test -d build/fs_parse; then : - if test -f build/sb_dying/sb_dying.ko -then : + if test -f build/fs_parse/fs_parse.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"sb_dying\" test, check that + *** No matching source for the \"fs_parse\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -105605,48 +109947,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_FS_PARSE_TAKES_SPEC 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5 -printf %s "checking whether set_nlink() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfs_parse_fs_string() takes 3 args" >&5 +$as_echo_n "checking whether vfs_parse_fs_string() takes 3 args... " >&6; } - cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_vfs_parse_fs_string_3args_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/set_nlink -then : + if test -d build/vfs_parse_fs_string_3args; then : - if test -f build/set_nlink/set_nlink.ko -then : + if test -f build/vfs_parse_fs_string_3args/vfs_parse_fs_string_3args.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"set_nlink\" test, check that + *** No matching source for the \"vfs_parse_fs_string_3args\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -105655,57 +109996,93 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_VFS_PARSE_FS_STRING_3ARGS 1" >>confdefs.h - as_fn_error $? " - *** None of the expected \"set_nlink()\" interfaces were detected. - *** This may be because your kernel version is newer than what is - *** supported, or you are using a patched custom kernel with - *** incompatible modifications. - *** - *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX - " "$LINENO" 5 +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SB_DYING is defined" >&5 +$as_echo_n "checking whether SB_DYING is defined... " >&6; } + + cachevar="zfs_cv_kernel_sb_dying_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/sb_dying; then : + + if test -f build/sb_dying/sb_dying.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"sb_dying\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sget() wants 5 args" >&5 -printf %s "checking whether sget() wants 5 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5 +$as_echo_n "checking whether set_nlink() is available... " >&6; } - cachevar="zfs_cv_kernel_sget_5args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_set_nlink_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sget_5args -then : + if test -d build/set_nlink; then : - if test -f build/sget_5args/sget_5args.ko -then : + if test -f build/set_nlink/set_nlink.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"sget_5args\" test, check that + *** No matching source for the \"set_nlink\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -105714,23 +110091,22 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " - *** None of the expected \"sget()\" interfaces were detected. + *** None of the expected \"set_nlink()\" interfaces were detected. *** This may be because your kernel version is newer than what is *** supported, or you are using a patched custom kernel with *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -105738,30 +110114,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether filemap_dirty_folio exists" >&5 -printf %s "checking whether filemap_dirty_folio exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether filemap_dirty_folio exists" >&5 +$as_echo_n "checking whether filemap_dirty_folio exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_filemap_dirty_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_filemap_dirty_folio -then : + if test -d build/vfs_has_filemap_dirty_folio; then : - if test -f build/vfs_has_filemap_dirty_folio/vfs_has_filemap_dirty_folio.ko -then : + if test -f build/vfs_has_filemap_dirty_folio/vfs_has_filemap_dirty_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_filemap_dirty_folio\" test, check that @@ -105773,48 +110146,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_FILEMAP_DIRTY_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_VFS_FILEMAP_DIRTY_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether read_folio exists" >&5 -printf %s "checking whether read_folio exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read_folio exists" >&5 +$as_echo_n "checking whether read_folio exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_read_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_read_folio -then : + if test -d build/vfs_has_read_folio; then : - if test -f build/vfs_has_read_folio/vfs_has_read_folio.ko -then : + if test -f build/vfs_has_read_folio/vfs_has_read_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_read_folio\" test, check that @@ -105826,48 +110195,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_READ_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_VFS_READ_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether migrate_folio exists" >&5 -printf %s "checking whether migrate_folio exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether migrate_folio exists" >&5 +$as_echo_n "checking whether migrate_folio exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_migrate_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_migrate_folio -then : + if test -d build/vfs_has_migrate_folio; then : - if test -f build/vfs_has_migrate_folio/vfs_has_migrate_folio.ko -then : + if test -f build/vfs_has_migrate_folio/vfs_has_migrate_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_migrate_folio\" test, check that @@ -105879,48 +110244,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_MIGRATE_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_VFS_MIGRATE_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether migratepage exists" >&5 -printf %s "checking whether migratepage exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether migratepage exists" >&5 +$as_echo_n "checking whether migratepage exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_migratepage_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_migratepage -then : + if test -d build/vfs_has_migratepage; then : - if test -f build/vfs_has_migratepage/vfs_has_migratepage.ko -then : + if test -f build/vfs_has_migratepage/vfs_has_migratepage.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_migratepage\" test, check that @@ -105932,48 +110293,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_MIGRATEPAGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_MIGRATEPAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vfs_fsync() wants 2 args" >&5 -printf %s "checking whether vfs_fsync() wants 2 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfs_fsync() wants 2 args" >&5 +$as_echo_n "checking whether vfs_fsync() wants 2 args... " >&6; } cachevar="zfs_cv_kernel_vfs_fsync_2args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_fsync_2args -then : + if test -d build/vfs_fsync_2args; then : - if test -f build/vfs_fsync_2args/vfs_fsync_2args.ko -then : + if test -f build/vfs_fsync_2args/vfs_fsync_2args.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_fsync_2args\" test, check that @@ -105985,13 +110342,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -106001,7 +110357,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -106009,30 +110365,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether aops->readpages exists" >&5 -printf %s "checking whether aops->readpages exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether aops->readpages exists" >&5 +$as_echo_n "checking whether aops->readpages exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_readpages_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_readpages -then : + if test -d build/vfs_has_readpages; then : - if test -f build/vfs_has_readpages/vfs_has_readpages.ko -then : + if test -f build/vfs_has_readpages/vfs_has_readpages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_readpages\" test, check that @@ -106044,48 +110397,93 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VFS_READPAGES 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether aops->writepage exists" >&5 +$as_echo_n "checking whether aops->writepage exists... " >&6; } + + cachevar="zfs_cv_kernel_vfs_has_writepage_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/vfs_has_writepage; then : + + if test -f build/vfs_has_writepage/vfs_has_writepage.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"vfs_has_writepage\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_READPAGES 1" >>confdefs.h +$as_echo "#define HAVE_VFS_WRITEPAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __set_page_dirty_nobuffers exists" >&5 -printf %s "checking whether __set_page_dirty_nobuffers exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __set_page_dirty_nobuffers exists" >&5 +$as_echo_n "checking whether __set_page_dirty_nobuffers exists... " >&6; } cachevar="zfs_cv_kernel_vfs_has_set_page_dirty_nobuffers_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_has_set_page_dirty_nobuffers -then : + if test -d build/vfs_has_set_page_dirty_nobuffers; then : - if test -f build/vfs_has_set_page_dirty_nobuffers/vfs_has_set_page_dirty_nobuffers.ko -then : + if test -f build/vfs_has_set_page_dirty_nobuffers/vfs_has_set_page_dirty_nobuffers.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_has_set_page_dirty_nobuffers\" test, check that @@ -106097,49 +110495,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS 1" >>confdefs.h +$as_echo "#define HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fault_in_iov_iter_readable() is available" >&5 -printf %s "checking whether fault_in_iov_iter_readable() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fault_in_iov_iter_readable() is available" >&5 +$as_echo_n "checking whether fault_in_iov_iter_readable() is available... " >&6; } cachevar="zfs_cv_kernel_fault_in_iov_iter_readable_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/fault_in_iov_iter_readable -then : + if test -d build/fault_in_iov_iter_readable; then : - if test -f build/fault_in_iov_iter_readable/fault_in_iov_iter_readable.ko -then : + if test -f build/fault_in_iov_iter_readable/fault_in_iov_iter_readable.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"fault_in_iov_iter_readable\" test, check that @@ -106151,47 +110545,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FAULT_IN_IOV_ITER_READABLE 1" >>confdefs.h +$as_echo "#define HAVE_FAULT_IN_IOV_ITER_READABLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_type() is available" >&5 -printf %s "checking whether iov_iter_type() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_type() is available" >&5 +$as_echo_n "checking whether iov_iter_type() is available... " >&6; } cachevar="zfs_cv_kernel_iov_iter_type_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iov_iter_type -then : + if test -d build/iov_iter_type; then : - if test -f build/iov_iter_type/iov_iter_type.ko -then : + if test -f build/iov_iter_type/iov_iter_type.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iov_iter_type\" test, check that @@ -106203,48 +110593,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOV_ITER_TYPE 1" >>confdefs.h +$as_echo "#define HAVE_IOV_ITER_TYPE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_get_pages2() is available" >&5 -printf %s "checking whether iov_iter_get_pages2() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iov_iter_get_pages2() is available" >&5 +$as_echo_n "checking whether iov_iter_get_pages2() is available... " >&6; } cachevar="zfs_cv_kernel_iov_iter_get_pages2_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iov_iter_get_pages2 -then : + if test -d build/iov_iter_get_pages2; then : - if test -f build/iov_iter_get_pages2/iov_iter_get_pages2.ko -then : + if test -f build/iov_iter_get_pages2/iov_iter_get_pages2.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iov_iter_get_pages2\" test, check that @@ -106256,47 +110642,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOV_ITER_GET_PAGES2 1" >>confdefs.h +$as_echo "#define HAVE_IOV_ITER_GET_PAGES2 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iter_is_ubuf() is available" >&5 -printf %s "checking whether iter_is_ubuf() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iter_is_ubuf() is available" >&5 +$as_echo_n "checking whether iter_is_ubuf() is available... " >&6; } cachevar="zfs_cv_kernel_iter_is_ubuf_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iter_is_ubuf -then : + if test -d build/iter_is_ubuf; then : - if test -f build/iter_is_ubuf/iter_is_ubuf.ko -then : + if test -f build/iter_is_ubuf/iter_is_ubuf.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iter_is_ubuf\" test, check that @@ -106308,47 +110690,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ITER_IS_UBUF 1" >>confdefs.h +$as_echo "#define HAVE_ITER_IS_UBUF 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iter_iov() is available" >&5 -printf %s "checking whether iter_iov() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iter_iov() is available" >&5 +$as_echo_n "checking whether iter_iov() is available... " >&6; } cachevar="zfs_cv_kernel_iter_iov_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/iter_iov -then : + if test -d build/iter_iov; then : - if test -f build/iter_iov/iter_iov.ko -then : + if test -f build/iter_iov/iter_iov.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"iter_iov\" test, check that @@ -106360,42 +110738,38 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ITER_IOV 1" >>confdefs.h +$as_echo "#define HAVE_ITER_IOV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_copy_file_range() is available" >&5 -printf %s "checking whether generic_copy_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_copy_file_range() is available" >&5 +$as_echo_n "checking whether generic_copy_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_generic_copy_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/generic_copy_file_range/generic_copy_file_range.ko -then : + if ! test -f build/generic_copy_file_range/generic_copy_file_range.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]generic_copy_file_range[[:space:]]' \ @@ -106428,7 +110802,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -106439,48 +110813,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_GENERIC_COPY_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_GENERIC_COPY_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether splice_copy_file_range() is available" >&5 -printf %s "checking whether splice_copy_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether splice_copy_file_range() is available" >&5 +$as_echo_n "checking whether splice_copy_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_splice_copy_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/splice_copy_file_range -then : + if test -d build/splice_copy_file_range; then : - if test -f build/splice_copy_file_range/splice_copy_file_range.ko -then : + if test -f build/splice_copy_file_range/splice_copy_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"splice_copy_file_range\" test, check that @@ -106492,48 +110862,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_SPLICE_COPY_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_SPLICE_COPY_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fops->remap_file_range() is available" >&5 -printf %s "checking whether fops->remap_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->remap_file_range() is available" >&5 +$as_echo_n "checking whether fops->remap_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_vfs_remap_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_remap_file_range -then : + if test -d build/vfs_remap_file_range; then : - if test -f build/vfs_remap_file_range/vfs_remap_file_range.ko -then : + if test -f build/vfs_remap_file_range/vfs_remap_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_remap_file_range\" test, check that @@ -106545,48 +110911,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_REMAP_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_REMAP_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fops->clone_file_range() is available" >&5 -printf %s "checking whether fops->clone_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->clone_file_range() is available" >&5 +$as_echo_n "checking whether fops->clone_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_vfs_clone_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_clone_file_range -then : + if test -d build/vfs_clone_file_range; then : - if test -f build/vfs_clone_file_range/vfs_clone_file_range.ko -then : + if test -f build/vfs_clone_file_range/vfs_clone_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_clone_file_range\" test, check that @@ -106598,48 +110960,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_CLONE_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_CLONE_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fops->dedupe_file_range() is available" >&5 -printf %s "checking whether fops->dedupe_file_range() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->dedupe_file_range() is available" >&5 +$as_echo_n "checking whether fops->dedupe_file_range() is available... " >&6; } cachevar="zfs_cv_kernel_vfs_dedupe_file_range_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/vfs_dedupe_file_range -then : + if test -d build/vfs_dedupe_file_range; then : - if test -f build/vfs_dedupe_file_range/vfs_dedupe_file_range.ko -then : + if test -f build/vfs_dedupe_file_range/vfs_dedupe_file_range.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"vfs_dedupe_file_range\" test, check that @@ -106651,48 +111009,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_VFS_DEDUPE_FILE_RANGE 1" >>confdefs.h +$as_echo "#define HAVE_VFS_DEDUPE_FILE_RANGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kmap_atomic wants 1 args" >&5 -printf %s "checking whether kmap_atomic wants 1 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kmap_atomic wants 1 args" >&5 +$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; } cachevar="zfs_cv_kernel_kmap_atomic_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kmap_atomic -then : + if test -d build/kmap_atomic; then : - if test -f build/kmap_atomic/kmap_atomic.ko -then : + if test -f build/kmap_atomic/kmap_atomic.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kmap_atomic\" test, check that @@ -106704,13 +111058,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -106720,7 +111073,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -106728,30 +111081,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kmap_local_page exists" >&5 -printf %s "checking whether kmap_local_page exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kmap_local_page exists" >&5 +$as_echo_n "checking whether kmap_local_page exists... " >&6; } cachevar="zfs_cv_kernel_kmap_local_page_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kmap_local_page -then : + if test -d build/kmap_local_page; then : - if test -f build/kmap_local_page/kmap_local_page.ko -then : + if test -f build/kmap_local_page/kmap_local_page.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kmap_local_page\" test, check that @@ -106763,48 +111113,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_KMAP_LOCAL_PAGE 1" >>confdefs.h +$as_echo "#define HAVE_KMAP_LOCAL_PAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether follow_down_one() is available" >&5 -printf %s "checking whether follow_down_one() is available... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether follow_down_one() is available" >&5 +$as_echo_n "checking whether follow_down_one() is available... " >&6; } cachevar="zfs_cv_kernel_follow_down_one_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/follow_down_one -then : + if test -d build/follow_down_one; then : - if test -f build/follow_down_one/follow_down_one.ko -then : + if test -f build/follow_down_one/follow_down_one.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"follow_down_one\" test, check that @@ -106816,13 +111163,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -106832,7 +111178,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -106840,30 +111186,129 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether submit_bio is member of struct block_device_operations" >&5 -printf %s "checking whether submit_bio is member of struct block_device_operations... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether follow_down() takes a flags parameter" >&5 +$as_echo_n "checking whether follow_down() takes a flags parameter... " >&6; } + + cachevar="zfs_cv_kernel_follow_down_flags_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/follow_down_flags; then : + + if test -f build/follow_down_flags/follow_down_flags.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"follow_down_flags\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + +$as_echo "#define HAVE_FOLLOW_DOWN_FLAGS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vfs_path_lookup() is exported" >&5 +$as_echo_n "checking whether vfs_path_lookup() is exported... " >&6; } + + grep -q -E '[[:space:]]vfs_path_lookup[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/namei.c; do + grep -q -E "EXPORT_SYMBOL.*(vfs_path_lookup)" \ + "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + as_fn_error $? " + *** None of the expected \"follow_down()\" interfaces were detected. + *** This may be because your kernel version is newer than what is + *** supported, or you are using a patched custom kernel with + *** incompatible modifications. + *** + *** ZFS Version: $ZFS_META_ALIAS + *** Highest compatible kernel version: $ZFS_META_KVER_MAX + " "$LINENO" 5 + + + else : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VFS_PATH_LOOKUP_EXPORTED 1" >>confdefs.h + + + fi + else : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_VFS_PATH_LOOKUP_EXPORTED 1" >>confdefs.h + + + fi + + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether submit_bio is member of struct block_device_operations" >&5 +$as_echo_n "checking whether submit_bio is member of struct block_device_operations... " >&6; } cachevar="zfs_cv_kernel_block_device_operations_submit_bio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/block_device_operations_submit_bio -then : + if test -d build/block_device_operations_submit_bio; then : - if test -f build/block_device_operations_submit_bio/block_device_operations_submit_bio.ko -then : + if test -f build/block_device_operations_submit_bio/block_device_operations_submit_bio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"block_device_operations_submit_bio\" test, check that @@ -106875,40 +111320,36 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS 1" >>confdefs.h +$as_echo "#define HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists" >&5 -printf %s "checking whether blk_alloc_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists" >&5 +$as_echo_n "checking whether blk_alloc_disk() exists... " >&6; } cachevar="zfs_cv_kernel_blk_alloc_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_disk -then : + if test -d build/blk_alloc_disk; then : - if test -f build/blk_alloc_disk/blk_alloc_disk.ko -then : + if test -f build/blk_alloc_disk/blk_alloc_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_disk\" test, check that @@ -106920,39 +111361,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_DISK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 -printf %s "checking whether blk_cleanup_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 +$as_echo_n "checking whether blk_cleanup_disk() exists... " >&6; } cachevar="zfs_cv_kernel_blk_cleanup_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_cleanup_disk -then : + if test -d build/blk_cleanup_disk; then : - if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko -then : + if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_cleanup_disk\" test, check that @@ -106964,55 +111401,51 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists and takes 2 args" >&5 -printf %s "checking whether blk_alloc_disk() exists and takes 2 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_disk() exists and takes 2 args" >&5 +$as_echo_n "checking whether blk_alloc_disk() exists and takes 2 args... " >&6; } cachevar="zfs_cv_kernel_blk_alloc_disk_2arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_disk_2arg -then : + if test -d build/blk_alloc_disk_2arg; then : - if test -f build/blk_alloc_disk_2arg/blk_alloc_disk_2arg.ko -then : + if test -f build/blk_alloc_disk_2arg/blk_alloc_disk_2arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_disk_2arg\" test, check that @@ -107024,39 +111457,35 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_DISK_2ARG 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_DISK_2ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct queue_limits has a features field" >&5 -printf %s "checking whether struct queue_limits has a features field... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct queue_limits has a features field" >&5 +$as_echo_n "checking whether struct queue_limits has a features field... " >&6; } cachevar="zfs_cv_kernel_blkdev_queue_limits_features_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blkdev_queue_limits_features -then : + if test -d build/blkdev_queue_limits_features; then : - if test -f build/blkdev_queue_limits_features/blkdev_queue_limits_features.ko -then : + if test -f build/blkdev_queue_limits_features/blkdev_queue_limits_features.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blkdev_queue_limits_features\" test, check that @@ -107068,47 +111497,43 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLKDEV_QUEUE_LIMITS_FEATURES 1" >>confdefs.h +$as_echo "#define HAVE_BLKDEV_QUEUE_LIMITS_FEATURES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 -printf %s "checking whether blk_cleanup_disk() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_cleanup_disk() exists" >&5 +$as_echo_n "checking whether blk_cleanup_disk() exists... " >&6; } cachevar="zfs_cv_kernel_blk_cleanup_disk_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_cleanup_disk -then : + if test -d build/blk_cleanup_disk; then : - if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko -then : + if test -f build/blk_cleanup_disk/blk_cleanup_disk.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_cleanup_disk\" test, check that @@ -107120,60 +111545,56 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h +$as_echo "#define HAVE_BLK_CLEANUP_DISK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_queue() expects request function" >&5 -printf %s "checking whether blk_alloc_queue() expects request function... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_alloc_queue() expects request function" >&5 +$as_echo_n "checking whether blk_alloc_queue() expects request function... " >&6; } cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_queue_request_fn -then : + if test -d build/blk_alloc_queue_request_fn; then : - if test -f build/blk_alloc_queue_request_fn/blk_alloc_queue_request_fn.ko -then : + if test -f build/blk_alloc_queue_request_fn/blk_alloc_queue_request_fn.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_queue_request_fn\" test, check that @@ -107185,51 +111606,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 -printf %s "checking whether make_request_fn() returns blk_qc_t... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 +$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN 1" >>confdefs.h -printf "%s\n" "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h +$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h -printf "%s\n" "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h +$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_blk_alloc_queue_request_fn_rh_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/blk_alloc_queue_request_fn_rh -then : + if test -d build/blk_alloc_queue_request_fn_rh; then : - if test -f build/blk_alloc_queue_request_fn_rh/blk_alloc_queue_request_fn_rh.ko -then : + if test -f build/blk_alloc_queue_request_fn_rh/blk_alloc_queue_request_fn_rh.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"blk_alloc_queue_request_fn_rh\" test, check that @@ -107241,56 +111658,52 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn_rh() returns blk_qc_t" >&5 -printf %s "checking whether make_request_fn_rh() returns blk_qc_t... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn_rh() returns blk_qc_t" >&5 +$as_echo_n "checking whether make_request_fn_rh() returns blk_qc_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH 1" >>confdefs.h +$as_echo "#define HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH 1" >>confdefs.h -printf "%s\n" "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h +$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h -printf "%s\n" "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h +$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 -printf %s "checking whether make_request_fn() returns blk_qc_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5 +$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; } cachevar="zfs_cv_kernel_make_request_fn_blk_qc_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/make_request_fn_blk_qc_t -then : + if test -d build/make_request_fn_blk_qc_t; then : - if test -f build/make_request_fn_blk_qc_t/make_request_fn_blk_qc_t.ko -then : + if test -f build/make_request_fn_blk_qc_t/make_request_fn_blk_qc_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"make_request_fn_blk_qc_t\" test, check that @@ -107302,19 +111715,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h +$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h -printf "%s\n" "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h +$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -107324,7 +111736,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -107341,30 +111753,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether 6.3+ bdev_*_io_acct() are available" >&5 -printf %s "checking whether 6.3+ bdev_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 6.3+ bdev_*_io_acct() are available" >&5 +$as_echo_n "checking whether 6.3+ bdev_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_bdev_io_acct_63_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_io_acct_63 -then : + if test -d build/bdev_io_acct_63; then : - if test -f build/bdev_io_acct_63/bdev_io_acct_63.ko -then : + if test -f build/bdev_io_acct_63/bdev_io_acct_63.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_io_acct_63\" test, check that @@ -107376,44 +111785,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_IO_ACCT_63 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_IO_ACCT_63 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pre-6.3 bdev_*_io_acct() are available" >&5 -printf %s "checking whether pre-6.3 bdev_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pre-6.3 bdev_*_io_acct() are available" >&5 +$as_echo_n "checking whether pre-6.3 bdev_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_bdev_io_acct_old_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bdev_io_acct_old -then : + if test -d build/bdev_io_acct_old; then : - if test -f build/bdev_io_acct_old/bdev_io_acct_old.ko -then : + if test -f build/bdev_io_acct_old/bdev_io_acct_old.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bdev_io_acct_old\" test, check that @@ -107425,43 +111830,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BDEV_IO_ACCT_OLD 1" >>confdefs.h +$as_echo "#define HAVE_BDEV_IO_ACCT_OLD 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic disk_*_io_acct() are available" >&5 -printf %s "checking whether generic disk_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic disk_*_io_acct() are available" >&5 +$as_echo_n "checking whether generic disk_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_disk_io_acct_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/disk_io_acct -then : + if test -d build/disk_io_acct; then : - if test -f build/disk_io_acct/disk_io_acct.ko -then : + if test -f build/disk_io_acct/disk_io_acct.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"disk_io_acct\" test, check that @@ -107473,44 +111874,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DISK_IO_ACCT 1" >>confdefs.h +$as_echo "#define HAVE_DISK_IO_ACCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic bio_*_io_acct() are available" >&5 -printf %s "checking whether generic bio_*_io_acct() are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic bio_*_io_acct() are available" >&5 +$as_echo_n "checking whether generic bio_*_io_acct() are available... " >&6; } cachevar="zfs_cv_kernel_bio_io_acct_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_io_acct -then : + if test -d build/bio_io_acct; then : - if test -f build/bio_io_acct/bio_io_acct.ko -then : + if test -f build/bio_io_acct/bio_io_acct.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_io_acct\" test, check that @@ -107522,38 +111919,34 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_IO_ACCT 1" >>confdefs.h +$as_echo "#define HAVE_BIO_IO_ACCT 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_*_io_acct wants 4 args" >&5 -printf %s "checking whether generic_*_io_acct wants 4 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_*_io_acct wants 4 args" >&5 +$as_echo_n "checking whether generic_*_io_acct wants 4 args... " >&6; } cachevar="zfs_cv_kernel_generic_acct_4args_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/generic_acct_4args/generic_acct_4args.ko -then : + if ! test -f build/generic_acct_4args/generic_acct_4args.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \ @@ -107586,7 +111979,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -107597,19 +111990,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_IO_ACCT_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_IO_ACCT_4ARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -107627,30 +112019,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel fpu is available" >&5 -printf %s "checking whether kernel fpu is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel fpu is available" >&5 +$as_echo_n "checking whether kernel fpu is available... " >&6; } cachevar="zfs_cv_kernel_kernel_fpu_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kernel_fpu_license -then : + if test -d build/kernel_fpu_license; then : - if test -f build/kernel_fpu_license/kernel_fpu_license.ko -then : + if test -f build/kernel_fpu_license/kernel_fpu_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kernel_fpu_license\" test, check that @@ -107662,36 +112051,32 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: kernel_fpu_*" >&5 -printf "%s\n" "kernel_fpu_*" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: kernel_fpu_*" >&5 +$as_echo "kernel_fpu_*" >&6; } -printf "%s\n" "#define HAVE_KERNEL_FPU 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU 1" >>confdefs.h -printf "%s\n" "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h +$as_echo "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel___kernel_fpu_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if ! test -f build/__kernel_fpu_license/__kernel_fpu_license.ko -then : + if ! test -f build/__kernel_fpu_license/__kernel_fpu_license.ko; then : eval "$cachevar=no" -else $as_nop +else - if test "x$enable_linux_builtin" != "xyes" -then : + if test "x$enable_linux_builtin" != "xyes"; then : grep -q -E '[[:space:]]__kernel_fpu_begin[[:space:]]' \ @@ -107724,7 +112109,7 @@ fi -else $as_nop +else eval "$cachevar=yes" @@ -107735,42 +112120,38 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: __kernel_fpu_*" >&5 -printf "%s\n" "__kernel_fpu_*" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: __kernel_fpu_*" >&5 +$as_echo "__kernel_fpu_*" >&6; } -printf "%s\n" "#define HAVE_UNDERSCORE_KERNEL_FPU 1" >>confdefs.h +$as_echo "#define HAVE_UNDERSCORE_KERNEL_FPU 1" >>confdefs.h -printf "%s\n" "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h +$as_echo "#define KERNEL_EXPORTS_X86_FPU 1" >>confdefs.h -else $as_nop +else cachevar="zfs_cv_kernel_kernel_neon_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kernel_neon_license -then : + if test -d build/kernel_neon_license; then : - if test -f build/kernel_neon_license/kernel_neon_license.ko -then : + if test -f build/kernel_neon_license/kernel_neon_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kernel_neon_license\" test, check that @@ -107782,22 +112163,21 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: kernel_neon_*" >&5 -printf "%s\n" "kernel_neon_*" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: kernel_neon_*" >&5 +$as_echo "kernel_neon_*" >&6; } -printf "%s\n" "#define HAVE_KERNEL_NEON 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_NEON 1" >>confdefs.h -else $as_nop +else # catch-all - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: internal" >&5 -printf "%s\n" "internal" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } -printf "%s\n" "#define HAVE_KERNEL_FPU_INTERNAL 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_FPU_INTERNAL 1" >>confdefs.h fi @@ -107810,30 +112190,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel defines fmode_t" >&5 -printf %s "checking whether kernel defines fmode_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines fmode_t" >&5 +$as_echo_n "checking whether kernel defines fmode_t... " >&6; } cachevar="zfs_cv_kernel_type_fmode_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/type_fmode_t -then : + if test -d build/type_fmode_t; then : - if test -f build/type_fmode_t/type_fmode_t.ko -then : + if test -f build/type_fmode_t/type_fmode_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"type_fmode_t\" test, check that @@ -107845,13 +112222,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -107861,7 +112237,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -107869,30 +112245,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kuid_t/kgid_t is available" >&5 -printf %s "checking whether kuid_t/kgid_t is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kuid_t/kgid_t is available" >&5 +$as_echo_n "checking whether kuid_t/kgid_t is available... " >&6; } cachevar="zfs_cv_kernel_kuidgid_t_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kuidgid_t -then : + if test -d build/kuidgid_t; then : - if test -f build/kuidgid_t/kuidgid_t.ko -then : + if test -f build/kuidgid_t/kuidgid_t.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kuidgid_t\" test, check that @@ -107904,13 +112277,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -107920,7 +112292,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -107928,30 +112300,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether i_(uid|gid)_(read|write) exist" >&5 -printf %s "checking whether i_(uid|gid)_(read|write) exist... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether i_(uid|gid)_(read|write) exist" >&5 +$as_echo_n "checking whether i_(uid|gid)_(read|write) exist... " >&6; } cachevar="zfs_cv_kernel_i_uid_read_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/i_uid_read -then : + if test -d build/i_uid_read; then : - if test -f build/i_uid_read/i_uid_read.ko -then : + if test -f build/i_uid_read/i_uid_read.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"i_uid_read\" test, check that @@ -107963,13 +112332,12 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else as_fn_error $? " @@ -107979,7 +112347,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -107987,30 +112355,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->rename() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->rename() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_inode_operations_rename_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_rename_mnt_idmap -then : + if test -d build/inode_operations_rename_mnt_idmap; then : - if test -f build/inode_operations_rename_mnt_idmap/inode_operations_rename_mnt_idmap.ko -then : + if test -f build/inode_operations_rename_mnt_idmap/inode_operations_rename_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_rename_mnt_idmap\" test, check that @@ -108022,44 +112387,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_RENAME_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_RENAME_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct user_namespace*" >&5 -printf %s "checking whether iops->rename() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->rename() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_inode_operations_rename_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/inode_operations_rename_userns -then : + if test -d build/inode_operations_rename_userns; then : - if test -f build/inode_operations_rename_userns/inode_operations_rename_userns.ko -then : + if test -f build/inode_operations_rename_userns/inode_operations_rename_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"inode_operations_rename_userns\" test, check that @@ -108071,71 +112432,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -printf "%s\n" "#define HAVE_IOPS_RENAME_USERNS 1" >>confdefs.h - - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->rename() wants flags" >&5 -printf %s "checking whether iops->rename() wants flags... " >&6; } - - cachevar="zfs_cv_kernel_inode_operations_rename_flags_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - if test -d build/inode_operations_rename_flags -then : - - if test -f build/inode_operations_rename_flags/inode_operations_rename_flags.ko -then : - - eval "$cachevar=yes" - -else $as_nop - - eval "$cachevar=no" - -fi - -else $as_nop - - as_fn_error $? " - *** No matching source for the \"inode_operations_rename_flags\" test, check that - *** both the test source and result macros refer to the same name. - " "$LINENO" 5 - -fi - -fi - - eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test "x$cacheval" = "xyes"; then : -printf "%s\n" "#define HAVE_RENAME_WANTS_FLAGS 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +$as_echo "#define HAVE_IOPS_RENAME_USERNS 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -108144,30 +112452,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether totalram_pages() exists" >&5 -printf %s "checking whether totalram_pages() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether totalram_pages() exists" >&5 +$as_echo_n "checking whether totalram_pages() exists... " >&6; } cachevar="zfs_cv_kernel_totalram_pages_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/totalram_pages -then : + if test -d build/totalram_pages; then : - if test -f build/totalram_pages/totalram_pages.ko -then : + if test -f build/totalram_pages/totalram_pages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"totalram_pages\" test, check that @@ -108179,48 +112484,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TOTALRAM_PAGES_FUNC 1" >>confdefs.h +$as_echo "#define HAVE_TOTALRAM_PAGES_FUNC 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether totalhigh_pages() exists" >&5 -printf %s "checking whether totalhigh_pages() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether totalhigh_pages() exists" >&5 +$as_echo_n "checking whether totalhigh_pages() exists... " >&6; } cachevar="zfs_cv_kernel_totalhigh_pages_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/totalhigh_pages -then : + if test -d build/totalhigh_pages; then : - if test -f build/totalhigh_pages/totalhigh_pages.ko -then : + if test -f build/totalhigh_pages/totalhigh_pages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"totalhigh_pages\" test, check that @@ -108232,49 +112533,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_TOTALHIGH_PAGES 1" >>confdefs.h +$as_echo "#define HAVE_TOTALHIGH_PAGES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether is inside percpu_ref.data" >&5 -printf %s "checking whether is inside percpu_ref.data... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is inside percpu_ref.data" >&5 +$as_echo_n "checking whether is inside percpu_ref.data... " >&6; } cachevar="zfs_cv_kernel_percpu_ref_count_in_data_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/percpu_ref_count_in_data -then : + if test -d build/percpu_ref_count_in_data; then : - if test -f build/percpu_ref_count_in_data/percpu_ref_count_in_data.ko -then : + if test -f build/percpu_ref_count_in_data/percpu_ref_count_in_data.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"percpu_ref_count_in_data\" test, check that @@ -108286,49 +112583,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define ZFS_PERCPU_REF_COUNT_IN_DATA 1" >>confdefs.h +$as_echo "#define ZFS_PERCPU_REF_COUNT_IN_DATA 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap* and request_mask" >&5 -printf %s "checking whether generic_fillattr requires struct mnt_idmap* and request_mask... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap* and request_mask" >&5 +$as_echo_n "checking whether generic_fillattr requires struct mnt_idmap* and request_mask... " >&6; } cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_reqmask_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/generic_fillattr_mnt_idmap_reqmask -then : + if test -d build/generic_fillattr_mnt_idmap_reqmask; then : - if test -f build/generic_fillattr_mnt_idmap_reqmask/generic_fillattr_mnt_idmap_reqmask.ko -then : + if test -f build/generic_fillattr_mnt_idmap_reqmask/generic_fillattr_mnt_idmap_reqmask.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"generic_fillattr_mnt_idmap_reqmask\" test, check that @@ -108340,44 +112633,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FILLATTR_IDMAP_REQMASK 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FILLATTR_IDMAP_REQMASK 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap*" >&5 -printf %s "checking whether generic_fillattr requires struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct mnt_idmap*" >&5 +$as_echo_n "checking whether generic_fillattr requires struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_generic_fillattr_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/generic_fillattr_mnt_idmap -then : + if test -d build/generic_fillattr_mnt_idmap; then : - if test -f build/generic_fillattr_mnt_idmap/generic_fillattr_mnt_idmap.ko -then : + if test -f build/generic_fillattr_mnt_idmap/generic_fillattr_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"generic_fillattr_mnt_idmap\" test, check that @@ -108389,44 +112678,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FILLATTR_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FILLATTR_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct user_namespace*" >&5 -printf %s "checking whether generic_fillattr requires struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic_fillattr requires struct user_namespace*" >&5 +$as_echo_n "checking whether generic_fillattr requires struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_generic_fillattr_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/generic_fillattr_userns -then : + if test -d build/generic_fillattr_userns; then : - if test -f build/generic_fillattr_userns/generic_fillattr_userns.ko -then : + if test -f build/generic_fillattr_userns/generic_fillattr_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"generic_fillattr_userns\" test, check that @@ -108438,19 +112723,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_GENERIC_FILLATTR_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_GENERIC_FILLATTR_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -108462,30 +112746,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->mknod() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->mknod() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_mknod_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mknod_mnt_idmap -then : + if test -d build/mknod_mnt_idmap; then : - if test -f build/mknod_mnt_idmap/mknod_mnt_idmap.ko -then : + if test -f build/mknod_mnt_idmap/mknod_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mknod_mnt_idmap\" test, check that @@ -108497,43 +112778,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKNOD_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_MKNOD_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct user_namespace*" >&5 -printf %s "checking whether iops->mknod() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->mknod() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->mknod() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_mknod_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mknod_userns -then : + if test -d build/mknod_userns; then : - if test -f build/mknod_userns/mknod_userns.ko -then : + if test -f build/mknod_userns/mknod_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mknod_userns\" test, check that @@ -108545,19 +112822,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_MKNOD_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_MKNOD_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -108566,30 +112842,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct mnt_idmap*" >&5 -printf %s "checking whether iops->symlink() takes struct mnt_idmap*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct mnt_idmap*" >&5 +$as_echo_n "checking whether iops->symlink() takes struct mnt_idmap*... " >&6; } cachevar="zfs_cv_kernel_symlink_mnt_idmap_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/symlink_mnt_idmap -then : + if test -d build/symlink_mnt_idmap; then : - if test -f build/symlink_mnt_idmap/symlink_mnt_idmap.ko -then : + if test -f build/symlink_mnt_idmap/symlink_mnt_idmap.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"symlink_mnt_idmap\" test, check that @@ -108601,44 +112874,40 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_SYMLINK_IDMAP 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_SYMLINK_IDMAP 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct user_namespace*" >&5 -printf %s "checking whether iops->symlink() takes struct user_namespace*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->symlink() takes struct user_namespace*" >&5 +$as_echo_n "checking whether iops->symlink() takes struct user_namespace*... " >&6; } cachevar="zfs_cv_kernel_symlink_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/symlink_userns -then : + if test -d build/symlink_userns; then : - if test -f build/symlink_userns/symlink_userns.ko -then : + if test -f build/symlink_userns/symlink_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"symlink_userns\" test, check that @@ -108650,19 +112919,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IOPS_SYMLINK_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IOPS_SYMLINK_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -108671,30 +112939,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bio_max_segs() exists" >&5 -printf %s "checking whether bio_max_segs() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_max_segs() exists" >&5 +$as_echo_n "checking whether bio_max_segs() exists... " >&6; } cachevar="zfs_cv_kernel_bio_max_segs_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/bio_max_segs -then : + if test -d build/bio_max_segs; then : - if test -f build/bio_max_segs/bio_max_segs.ko -then : + if test -f build/bio_max_segs/bio_max_segs.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"bio_max_segs\" test, check that @@ -108706,49 +112971,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_BIO_MAX_SEGS 1" >>confdefs.h +$as_echo "#define HAVE_BIO_MAX_SEGS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel_siginfo_t tyepedef exists" >&5 -printf %s "checking whether kernel_siginfo_t tyepedef exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel_siginfo_t tyepedef exists" >&5 +$as_echo_n "checking whether kernel_siginfo_t tyepedef exists... " >&6; } cachevar="zfs_cv_kernel_siginfo_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/siginfo -then : + if test -d build/siginfo; then : - if test -f build/siginfo/siginfo.ko -then : + if test -f build/siginfo/siginfo.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"siginfo\" test, check that @@ -108760,49 +113021,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SIGINFO 1" >>confdefs.h +$as_echo "#define HAVE_SIGINFO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct kobj_type.default_groups exists" >&5 -printf %s "checking whether struct kobj_type.default_groups exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct kobj_type.default_groups exists" >&5 +$as_echo_n "checking whether struct kobj_type.default_groups exists... " >&6; } cachevar="zfs_cv_kernel_sysfs_default_groups_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sysfs_default_groups -then : + if test -d build/sysfs_default_groups; then : - if test -f build/sysfs_default_groups/sysfs_default_groups.ko -then : + if test -f build/sysfs_default_groups/sysfs_default_groups.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"sysfs_default_groups\" test, check that @@ -108814,49 +113071,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SYSFS_DEFAULT_GROUPS 1" >>confdefs.h +$as_echo "#define HAVE_SYSFS_DEFAULT_GROUPS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether standalone exists" >&5 -printf %s "checking whether standalone exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether standalone exists" >&5 +$as_echo_n "checking whether standalone exists... " >&6; } cachevar="zfs_cv_kernel_has_standalone_linux_stdarg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_standalone_linux_stdarg -then : + if test -d build/has_standalone_linux_stdarg; then : - if test -f build/has_standalone_linux_stdarg/has_standalone_linux_stdarg.ko -then : + if test -f build/has_standalone_linux_stdarg/has_standalone_linux_stdarg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_standalone_linux_stdarg\" test, check that @@ -108868,48 +113121,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_STANDALONE_LINUX_STDARG 1" >>confdefs.h +$as_echo "#define HAVE_STANDALONE_LINUX_STDARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strlcpy() exists" >&5 -printf %s "checking whether strlcpy() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strlcpy() exists" >&5 +$as_echo_n "checking whether strlcpy() exists... " >&6; } cachevar="zfs_cv_kernel_kernel_has_strlcpy_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kernel_has_strlcpy -then : + if test -d build/kernel_has_strlcpy; then : - if test -f build/kernel_has_strlcpy/kernel_has_strlcpy.ko -then : + if test -f build/kernel_has_strlcpy/kernel_has_strlcpy.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kernel_has_strlcpy\" test, check that @@ -108921,48 +113170,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_KERNEL_STRLCPY 1" >>confdefs.h +$as_echo "#define HAVE_KERNEL_STRLCPY 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether folio_wait_bit() exists" >&5 -printf %s "checking whether folio_wait_bit() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether folio_wait_bit() exists" >&5 +$as_echo_n "checking whether folio_wait_bit() exists... " >&6; } cachevar="zfs_cv_kernel_pagemap_has_folio_wait_bit_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/pagemap_has_folio_wait_bit -then : + if test -d build/pagemap_has_folio_wait_bit; then : - if test -f build/pagemap_has_folio_wait_bit/pagemap_has_folio_wait_bit.ko -then : + if test -f build/pagemap_has_folio_wait_bit/pagemap_has_folio_wait_bit.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"pagemap_has_folio_wait_bit\" test, check that @@ -108974,48 +113219,93 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_PAGEMAP_FOLIO_WAIT_BIT 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readahead_page() exists" >&5 +$as_echo_n "checking whether readahead_page() exists... " >&6; } + + cachevar="zfs_cv_kernel_pagemap_has_readahead_page_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/pagemap_has_readahead_page; then : + + if test -f build/pagemap_has_readahead_page/pagemap_has_readahead_page.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"pagemap_has_readahead_page\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PAGEMAP_FOLIO_WAIT_BIT 1" >>confdefs.h +$as_echo "#define HAVE_PAGEMAP_READAHEAD_PAGE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether add_disk() returns int" >&5 -printf %s "checking whether add_disk() returns int... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether add_disk() returns int" >&5 +$as_echo_n "checking whether add_disk() returns int... " >&6; } cachevar="zfs_cv_kernel_add_disk_ret_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/add_disk_ret -then : + if test -d build/add_disk_ret; then : - if test -f build/add_disk_ret/add_disk_ret.ko -then : + if test -f build/add_disk_ret/add_disk_ret.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"add_disk_ret\" test, check that @@ -109027,49 +113317,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ADD_DISK_RET 1" >>confdefs.h +$as_echo "#define HAVE_ADD_DISK_RET 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kthread_complete_and_exit() is available" >&5 -printf %s "checking whether kthread_complete_and_exit() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kthread_complete_and_exit() is available" >&5 +$as_echo_n "checking whether kthread_complete_and_exit() is available... " >&6; } cachevar="zfs_cv_kernel_kthread_complete_and_exit_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kthread_complete_and_exit -then : + if test -d build/kthread_complete_and_exit; then : - if test -f build/kthread_complete_and_exit/kthread_complete_and_exit.ko -then : + if test -f build/kthread_complete_and_exit/kthread_complete_and_exit.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kthread_complete_and_exit\" test, check that @@ -109081,51 +113367,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define SPL_KTHREAD_COMPLETE_AND_EXIT kthread_complete_and_exit" >>confdefs.h +$as_echo "#define SPL_KTHREAD_COMPLETE_AND_EXIT kthread_complete_and_exit" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -printf "%s\n" "#define SPL_KTHREAD_COMPLETE_AND_EXIT complete_and_exit" >>confdefs.h +$as_echo "#define SPL_KTHREAD_COMPLETE_AND_EXIT complete_and_exit" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dequeue_signal() takes 4 arguments" >&5 -printf %s "checking whether dequeue_signal() takes 4 arguments... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dequeue_signal() takes 4 arguments" >&5 +$as_echo_n "checking whether dequeue_signal() takes 4 arguments... " >&6; } cachevar="zfs_cv_kernel_kthread_dequeue_signal_4arg_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kthread_dequeue_signal_4arg -then : + if test -d build/kthread_dequeue_signal_4arg; then : - if test -f build/kthread_dequeue_signal_4arg/kthread_dequeue_signal_4arg.ko -then : + if test -f build/kthread_dequeue_signal_4arg/kthread_dequeue_signal_4arg.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kthread_dequeue_signal_4arg\" test, check that @@ -109137,43 +113419,39 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DEQUEUE_SIGNAL_4ARG 1" >>confdefs.h +$as_echo "#define HAVE_DEQUEUE_SIGNAL_4ARG 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether 3-arg dequeue_signal() takes a type argument" >&5 -printf %s "checking whether 3-arg dequeue_signal() takes a type argument... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 3-arg dequeue_signal() takes a type argument" >&5 +$as_echo_n "checking whether 3-arg dequeue_signal() takes a type argument... " >&6; } cachevar="zfs_cv_kernel_kthread_dequeue_signal_3arg_type_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/kthread_dequeue_signal_3arg_type -then : + if test -d build/kthread_dequeue_signal_3arg_type; then : - if test -f build/kthread_dequeue_signal_3arg_type/kthread_dequeue_signal_3arg_type.ko -then : + if test -f build/kthread_dequeue_signal_3arg_type/kthread_dequeue_signal_3arg_type.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"kthread_dequeue_signal_3arg_type\" test, check that @@ -109185,19 +113463,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_DEQUEUE_SIGNAL_3ARG_TYPE 1" >>confdefs.h +$as_echo "#define HAVE_DEQUEUE_SIGNAL_3ARG_TYPE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -109207,30 +113484,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ZERO_PAGE() is GPL-only" >&5 -printf %s "checking whether ZERO_PAGE() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ZERO_PAGE() is GPL-only" >&5 +$as_echo_n "checking whether ZERO_PAGE() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_zero_page_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/zero_page_license -then : + if test -d build/zero_page_license; then : - if test -f build/zero_page_license/zero_page_license.ko -then : + if test -f build/zero_page_license/zero_page_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"zero_page_license\" test, check that @@ -109242,51 +113516,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_ZERO_PAGE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_ZERO_PAGE_GPL_ONLY 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __copy_from_user_inatomic is available" >&5 -printf %s "checking whether __copy_from_user_inatomic is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether APIs for idmapped mount are present" >&5 +$as_echo_n "checking whether APIs for idmapped mount are present... " >&6; } - cachevar="zfs_cv_kernel___copy_from_user_inatomic_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_idmap_mnt_api_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/__copy_from_user_inatomic_license -then : + if test -d build/idmap_mnt_api; then : - if test -f build/__copy_from_user_inatomic_license/__copy_from_user_inatomic_license.ko -then : + if test -f build/idmap_mnt_api/idmap_mnt_api.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"__copy_from_user_inatomic_license\" test, check that + *** No matching source for the \"idmap_mnt_api\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -109295,53 +113565,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +$as_echo "#define HAVE_IDMAP_MNT_API 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - as_fn_error $? " - *** The \`__copy_from_user_inatomic()\` Linux kernel function is - *** incompatible with the CDDL license and will prevent the module - *** linking stage from succeeding. OpenZFS cannot be compiled. - " "$LINENO" 5 + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether APIs for idmapped mount are present" >&5 -printf %s "checking whether APIs for idmapped mount are present... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether idmapped mounts have a user namespace" >&5 +$as_echo_n "checking whether idmapped mounts have a user namespace... " >&6; } - cachevar="zfs_cv_kernel_idmap_mnt_api_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_idmap_no_userns_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/idmap_mnt_api -then : + if test -d build/idmap_no_userns; then : - if test -f build/idmap_mnt_api/idmap_mnt_api.ko -then : + if test -f build/idmap_no_userns/idmap_no_userns.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"idmap_mnt_api\" test, check that + *** No matching source for the \"idmap_no_userns\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -109350,51 +113614,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_MNT_API 1" >>confdefs.h +$as_echo "#define HAVE_IDMAP_NO_USERNS 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether idmapped mounts have a user namespace" >&5 -printf %s "checking whether idmapped mounts have a user namespace... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist" >&5 +$as_echo_n "checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist... " >&6; } - cachevar="zfs_cv_kernel_idmap_no_userns_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_iattr_vfsid_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/idmap_no_userns -then : + if test -d build/iattr_vfsid; then : - if test -f build/idmap_no_userns/idmap_no_userns.ko -then : + if test -f build/iattr_vfsid/iattr_vfsid.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"idmap_no_userns\" test, check that + *** No matching source for the \"iattr_vfsid\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -109403,51 +113663,48 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IDMAP_NO_USERNS 1" >>confdefs.h +$as_echo "#define HAVE_IATTR_VFSID 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist" >&5 -printf %s "checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist... " >&6; } - cachevar="zfs_cv_kernel_iattr_vfsid_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether int (*writepage_t)() takes struct folio*" >&5 +$as_echo_n "checking whether int (*writepage_t)() takes struct folio*... " >&6; } - if test -d build/iattr_vfsid -then : + cachevar="zfs_cv_kernel_writepage_t_folio_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -f build/iattr_vfsid/iattr_vfsid.ko -then : + if test -d build/writepage_t_folio; then : + + if test -f build/writepage_t_folio/writepage_t_folio.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"iattr_vfsid\" test, check that + *** No matching source for the \"writepage_t_folio\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -109456,51 +113713,47 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_IATTR_VFSID 1" >>confdefs.h +$as_echo "#define HAVE_WRITEPAGE_T_FOLIO 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether int (*writepage_t)() takes struct folio*" >&5 -printf %s "checking whether int (*writepage_t)() takes struct folio*... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether write_cache_pages() is available" >&5 +$as_echo_n "checking whether write_cache_pages() is available... " >&6; } - cachevar="zfs_cv_kernel_writepage_t_folio_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + cachevar="zfs_cv_kernel_write_cache_pages_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/writepage_t_folio -then : + if test -d build/write_cache_pages; then : - if test -f build/writepage_t_folio/writepage_t_folio.ko -then : + if test -f build/write_cache_pages/write_cache_pages.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " - *** No matching source for the \"writepage_t_folio\" test, check that + *** No matching source for the \"write_cache_pages\" test, check that *** both the test source and result macros refer to the same name. " "$LINENO" 5 @@ -109509,48 +113762,45 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_WRITEPAGE_T_FOLIO 1" >>confdefs.h +$as_echo "#define HAVE_WRITE_CACHE_PAGES 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct reclaim_state has reclaimed field" >&5 -printf %s "checking whether struct reclaim_state has reclaimed field... " >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct reclaim_state has reclaimed field" >&5 +$as_echo_n "checking whether struct reclaim_state has reclaimed field... " >&6; } cachevar="zfs_cv_kernel_reclaim_state_reclaimed_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/reclaim_state_reclaimed -then : + if test -d build/reclaim_state_reclaimed; then : - if test -f build/reclaim_state_reclaimed/reclaim_state_reclaimed.ko -then : + if test -f build/reclaim_state_reclaimed/reclaim_state_reclaimed.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"reclaim_state_reclaimed\" test, check that @@ -109562,48 +113812,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_RECLAIM_STATE_RECLAIMED 1" >>confdefs.h +$as_echo "#define HAVE_RECLAIM_STATE_RECLAIMED 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_table exists" >&5 -printf %s "checking whether register_sysctl_table exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_table exists" >&5 +$as_echo_n "checking whether register_sysctl_table exists... " >&6; } cachevar="zfs_cv_kernel_has_register_sysctl_table_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_register_sysctl_table -then : + if test -d build/has_register_sysctl_table; then : - if test -f build/has_register_sysctl_table/has_register_sysctl_table.ko -then : + if test -f build/has_register_sysctl_table/has_register_sysctl_table.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_register_sysctl_table\" test, check that @@ -109615,48 +113861,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REGISTER_SYSCTL_TABLE 1" >>confdefs.h +$as_echo "#define HAVE_REGISTER_SYSCTL_TABLE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_sz exists" >&5 -printf %s "checking whether register_sysctl_sz exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether register_sysctl_sz exists" >&5 +$as_echo_n "checking whether register_sysctl_sz exists... " >&6; } cachevar="zfs_cv_kernel_has_register_sysctl_sz_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_register_sysctl_sz -then : + if test -d build/has_register_sysctl_sz; then : - if test -f build/has_register_sysctl_sz/has_register_sysctl_sz.ko -then : + if test -f build/has_register_sysctl_sz/has_register_sysctl_sz.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_register_sysctl_sz\" test, check that @@ -109668,48 +113910,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_REGISTER_SYSCTL_SZ 1" >>confdefs.h +$as_echo "#define HAVE_REGISTER_SYSCTL_SZ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether proc_handler ctl_table arg is const" >&5 -printf %s "checking whether proc_handler ctl_table arg is const... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether proc_handler ctl_table arg is const" >&5 +$as_echo_n "checking whether proc_handler ctl_table arg is const... " >&6; } cachevar="zfs_cv_kernel_has_proc_handler_ctl_table_const_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_proc_handler_ctl_table_const -then : + if test -d build/has_proc_handler_ctl_table_const; then : - if test -f build/has_proc_handler_ctl_table_const/has_proc_handler_ctl_table_const.ko -then : + if test -f build/has_proc_handler_ctl_table_const/has_proc_handler_ctl_table_const.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_proc_handler_ctl_table_const\" test, check that @@ -109721,48 +113959,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PROC_HANDLER_CTL_TABLE_CONST 1" >>confdefs.h +$as_echo "#define HAVE_PROC_HANDLER_CTL_TABLE_CONST 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copy_splice_read() exists" >&5 -printf %s "checking whether copy_splice_read() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copy_splice_read() exists" >&5 +$as_echo_n "checking whether copy_splice_read() exists... " >&6; } cachevar="zfs_cv_kernel_has_copy_splice_read_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/has_copy_splice_read -then : + if test -d build/has_copy_splice_read; then : - if test -f build/has_copy_splice_read/has_copy_splice_read.ko -then : + if test -f build/has_copy_splice_read/has_copy_splice_read.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"has_copy_splice_read\" test, check that @@ -109774,48 +114008,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_COPY_SPLICE_READ 1" >>confdefs.h +$as_echo "#define HAVE_COPY_SPLICE_READ 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fsync_bdev() exists" >&5 -printf %s "checking whether fsync_bdev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fsync_bdev() exists" >&5 +$as_echo_n "checking whether fsync_bdev() exists... " >&6; } cachevar="zfs_cv_kernel_fsync_bdev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/fsync_bdev -then : + if test -d build/fsync_bdev; then : - if test -f build/fsync_bdev/fsync_bdev.ko -then : + if test -f build/fsync_bdev/fsync_bdev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"fsync_bdev\" test, check that @@ -109827,41 +114057,37 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FSYNC_BDEV 1" >>confdefs.h +$as_echo "#define HAVE_FSYNC_BDEV 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sync_blockdev() exists" >&5 -printf %s "checking whether sync_blockdev() exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sync_blockdev() exists" >&5 +$as_echo_n "checking whether sync_blockdev() exists... " >&6; } cachevar="zfs_cv_kernel_sync_blockdev_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/sync_blockdev -then : + if test -d build/sync_blockdev; then : - if test -f build/sync_blockdev/sync_blockdev.ko -then : + if test -f build/sync_blockdev/sync_blockdev.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"sync_blockdev\" test, check that @@ -109873,16 +114099,15 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SYNC_BLOCKDEV 1" >>confdefs.h +$as_echo "#define HAVE_SYNC_BLOCKDEV 1" >>confdefs.h -else $as_nop +else as_fn_error $? " @@ -109892,7 +114117,7 @@ *** incompatible modifications. *** *** ZFS Version: $ZFS_META_ALIAS - *** Compatible Kernels: $ZFS_META_KVER_MIN - $ZFS_META_KVER_MAX + *** Highest compatible kernel version: $ZFS_META_KVER_MAX " "$LINENO" 5 @@ -109904,30 +114129,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether PG_error flag is available" >&5 -printf %s "checking whether PG_error flag is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PG_error flag is available" >&5 +$as_echo_n "checking whether PG_error flag is available... " >&6; } cachevar="zfs_cv_kernel_mm_page_flag_error_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/mm_page_flag_error -then : + if test -d build/mm_page_flag_error; then : - if test -f build/mm_page_flag_error/mm_page_flag_error.ko -then : + if test -f build/mm_page_flag_error/mm_page_flag_error.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"mm_page_flag_error\" test, check that @@ -109939,49 +114161,94 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_MM_PAGE_FLAG_ERROR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'flags' in 'struct page' is a struct" >&5 +$as_echo_n "checking whether 'flags' in 'struct page' is a struct... " >&6; } + + cachevar="zfs_cv_kernel_mm_page_flags_struct_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/mm_page_flags_struct; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test -f build/mm_page_flags_struct/mm_page_flags_struct.ko; then : -printf "%s\n" "#define HAVE_MM_PAGE_FLAG_ERROR 1" >>confdefs.h + eval "$cachevar=yes" + +else + + eval "$cachevar=no" +fi -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + as_fn_error $? " + *** No matching source for the \"mm_page_flags_struct\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 fi +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_MM_PAGE_FLAGS_STRUCT 1" >>confdefs.h +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether page_size() is available" >&5 -printf %s "checking whether page_size() is available... " >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether page_size() is available" >&5 +$as_echo_n "checking whether page_size() is available... " >&6; } cachevar="zfs_cv_kernel_page_size_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/page_size -then : + if test -d build/page_size; then : - if test -f build/page_size/page_size.ko -then : + if test -f build/page_size/page_size.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"page_size\" test, check that @@ -109993,48 +114260,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MM_PAGE_SIZE 1" >>confdefs.h +$as_echo "#define HAVE_MM_PAGE_SIZE 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether page_mapping() is available" >&5 -printf %s "checking whether page_mapping() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether page_mapping() is available" >&5 +$as_echo_n "checking whether page_mapping() is available... " >&6; } cachevar="zfs_cv_kernel_page_mapping_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/page_mapping -then : + if test -d build/page_mapping; then : - if test -f build/page_mapping/page_mapping.ko -then : + if test -f build/page_mapping/page_mapping.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"page_mapping\" test, check that @@ -110046,29 +114309,27 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_MM_PAGE_MAPPING 1" >>confdefs.h +$as_echo "#define HAVE_MM_PAGE_MAPPING 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __assign_str() has one arg" >&5 -printf %s "checking whether __assign_str() has one arg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __assign_str() has one arg" >&5 +$as_echo_n "checking whether __assign_str() has one arg... " >&6; } - if test "x$enable_linux_builtin" = "xyes" -then : + if test "x$enable_linux_builtin" = "xyes"; then : @@ -110167,8 +114428,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -110189,32 +114449,31 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.o' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h +$as_echo "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop +else @@ -110313,8 +114572,7 @@ echo "obj-m := conftest.o" >>$file - if test "xno" = "xyes" -then : + if test "xno" = "xyes"; then : echo "obj-m += conftest/" >>build/Makefile fi @@ -110335,26 +114593,25 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } if { ac_try='test -f build/conftest/conftest.ko' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h +$as_echo "#define HAVE_1ARG_ASSIGN_STR 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -110365,30 +114622,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether file->f_version exists" >&5 -printf %s "checking whether file->f_version exists... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether file->f_version exists" >&5 +$as_echo_n "checking whether file->f_version exists... " >&6; } cachevar="zfs_cv_kernel_file_f_version_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/file_f_version -then : + if test -d build/file_f_version; then : - if test -f build/file_f_version/file_f_version.ko -then : + if test -f build/file_f_version/file_f_version.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"file_f_version\" test, check that @@ -110400,19 +114654,18 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FILE_F_VERSION 1" >>confdefs.h +$as_echo "#define HAVE_FILE_F_VERSION 1" >>confdefs.h -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -110420,30 +114673,27 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pin_user_pages_unlocked() is available" >&5 -printf %s "checking whether pin_user_pages_unlocked() is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pin_user_pages_unlocked() is available" >&5 +$as_echo_n "checking whether pin_user_pages_unlocked() is available... " >&6; } cachevar="zfs_cv_kernel_pin_user_pages_unlocked_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/pin_user_pages_unlocked -then : + if test -d build/pin_user_pages_unlocked; then : - if test -f build/pin_user_pages_unlocked/pin_user_pages_unlocked.ko -then : + if test -f build/pin_user_pages_unlocked/pin_user_pages_unlocked.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"pin_user_pages_unlocked\" test, check that @@ -110455,50 +114705,533 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_PIN_USER_PAGES_UNLOCKED 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether timer_delete_sync() is available" >&5 +$as_echo_n "checking whether timer_delete_sync() is available... " >&6; } + + cachevar="zfs_cv_kernel_timer_delete_sync_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/timer_delete_sync; then : + + if test -f build/timer_delete_sync/timer_delete_sync.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"timer_delete_sync\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_TIMER_DELETE_SYNC 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_wb_err" >&5 +$as_echo_n "checking whether super_block has s_wb_err... " >&6; } + + cachevar="zfs_cv_kernel_super_block_s_wb_err_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/super_block_s_wb_err; then : + + if test -f build/super_block_s_wb_err/super_block_s_wb_err.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"super_block_s_wb_err\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SUPER_BLOCK_S_WB_ERR 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->free_inode() exists" >&5 +$as_echo_n "checking whether sops->free_inode() exists... " >&6; } + + cachevar="zfs_cv_kernel_super_operations_free_inode_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/super_operations_free_inode; then : + + if test -f build/super_operations_free_inode/super_operations_free_inode.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"super_operations_free_inode\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +$as_echo "#define HAVE_SOPS_FREE_INODE 1" >>confdefs.h -printf "%s\n" "#define HAVE_PIN_USER_PAGES_UNLOCKED 1" >>confdefs.h +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ns_type is accessible through ns_common" >&5 +$as_echo_n "checking whether ns_type is accessible through ns_common... " >&6; } + + cachevar="zfs_cv_kernel_ns_common_type_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else -else $as_nop + if test -d build/ns_common_type; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + if test -f build/ns_common_type/ns_common_type.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" fi +else + + as_fn_error $? " + *** No matching source for the \"ns_common_type\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_NS_COMMON_TYPE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_generic_drop() exists" >&5 +$as_echo_n "checking whether inode_generic_drop() exists... " >&6; } + + cachevar="zfs_cv_kernel_inode_generic_drop_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/inode_generic_drop; then : + + if test -f build/inode_generic_drop/inode_generic_drop.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"inode_generic_drop\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_INODE_GENERIC_DROP 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kasan_enabled() is GPL-only" >&5 +$as_echo_n "checking whether kasan_enabled() is GPL-only... " >&6; } + + cachevar="zfs_cv_kernel_kasan_enabled_license_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/kasan_enabled_license; then : + + if test -f build/kasan_enabled_license/kasan_enabled_license.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"kasan_enabled_license\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_KASAN_ENABLED_GPL_ONLY 1" >>confdefs.h + + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standalone filelock header" >&5 +$as_echo_n "checking for standalone filelock header... " >&6; } + + cachevar="zfs_cv_kernel_filelock_header_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/filelock_header; then : + + if test -f build/filelock_header/filelock_header.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"filelock_header\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_FILELOCK_HEADER 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to flush delay workqueue" >&5 +$as_echo_n "checking how to flush delay workqueue... " >&6; } + + cachevar="zfs_cv_kernel_flush_workqueue_internal_percpu_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/flush_workqueue_internal_percpu; then : + + if test -f build/flush_workqueue_internal_percpu/flush_workqueue_internal_percpu.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"flush_workqueue_internal_percpu\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + + cachevar="zfs_cv_kernel_flush_workqueue_percpu_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/flush_workqueue_percpu; then : + + if test -f build/flush_workqueue_percpu/flush_workqueue_percpu.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"flush_workqueue_percpu\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal+system" >&5 +$as_echo "internal+system" >&6; } + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal+percpu" >&5 +$as_echo "internal+percpu" >&6; } + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL 1" >>confdefs.h + + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_PERCPU 1" >>confdefs.h + + +fi + + +else + + + cachevar="zfs_cv_kernel_flush_workqueue_internal_system_$_zfs_linux_cache_checksum" + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -d build/flush_workqueue_internal_system; then : + + if test -f build/flush_workqueue_internal_system/flush_workqueue_internal_system.ko; then : + + eval "$cachevar=yes" + +else + + eval "$cachevar=no" + +fi + +else + + as_fn_error $? " + *** No matching source for the \"flush_workqueue_internal_system\" test, check that + *** both the test source and result macros refer to the same name. + " "$LINENO" 5 + +fi + +fi + + eval "cacheval=\$$cachevar" + if test "x$cacheval" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal+system" >&5 +$as_echo "internal+system" >&6; } + +$as_echo "#define HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } + +fi + + +fi + + case "$host_cpu" in powerpc*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cpu_has_feature() is GPL-only" >&5 -printf %s "checking whether cpu_has_feature() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpu_has_feature() is GPL-only" >&5 +$as_echo_n "checking whether cpu_has_feature() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_cpu_has_feature_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/cpu_has_feature_license -then : + if test -d build/cpu_has_feature_license; then : - if test -f build/cpu_has_feature_license/cpu_has_feature_license.ko -then : + if test -f build/cpu_has_feature_license/cpu_has_feature_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"cpu_has_feature_license\" test, check that @@ -110510,48 +115243,44 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_CPU_HAS_FEATURE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_CPU_HAS_FEATURE_GPL_ONLY 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 -printf %s "checking whether flush_dcache_page() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 +$as_echo_n "checking whether flush_dcache_page() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_flush_dcache_page_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/flush_dcache_page_license -then : + if test -d build/flush_dcache_page_license; then : - if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko -then : + if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"flush_dcache_page_license\" test, check that @@ -110563,18 +115292,17 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h fi @@ -110583,30 +115311,27 @@ ;; riscv*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 -printf %s "checking whether flush_dcache_page() is GPL-only... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flush_dcache_page() is GPL-only" >&5 +$as_echo_n "checking whether flush_dcache_page() is GPL-only... " >&6; } cachevar="zfs_cv_kernel_flush_dcache_page_license_$_zfs_linux_cache_checksum" - if eval test \${$cachevar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else - if test -d build/flush_dcache_page_license -then : + if test -d build/flush_dcache_page_license; then : - if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko -then : + if test -f build/flush_dcache_page_license/flush_dcache_page_license.ko; then : eval "$cachevar=yes" -else $as_nop +else eval "$cachevar=no" fi -else $as_nop +else as_fn_error $? " *** No matching source for the \"flush_dcache_page_license\" test, check that @@ -110618,18 +115343,17 @@ fi eval "cacheval=\$$cachevar" - if test "x$cacheval" = "xyes" -then : + if test "x$cacheval" = "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h +$as_echo "#define HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY 1" >>confdefs.h fi @@ -110639,8 +115363,7 @@ esac - if test "$LINUX_OBJ" != "$LINUX" -then : + if test "$LINUX_OBJ" != "$LINUX"; then : KERNEL_MAKE="$KERNEL_MAKE O=$LINUX_OBJ" @@ -110653,8 +115376,8 @@ dist) ;; srpm) ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Error!" >&5 -printf "%s\n" "Error!" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Error!" >&5 +$as_echo "Error!" >&6; } as_fn_error $? "Bad value \"$ZFS_CONFIG\" for --with-config, user kernel|user|all|srpm" "$LINENO" 5 ;; esac @@ -110737,19 +115460,17 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking os distribution" >&5 -printf %s "checking os distribution... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking os distribution" >&5 +$as_echo_n "checking os distribution... " >&6; } # Check whether --with-vendor was given. -if test ${with_vendor+y} -then : +if test "${with_vendor+set}" = set; then : withval=$with_vendor; with_vendor=$withval -else $as_nop +else with_vendor=check fi - if test "x$with_vendor" = "xcheck" -then : + if test "x$with_vendor" = "xcheck"; then : if test -f /etc/alpine-release ; then VENDOR=alpine ; @@ -110783,20 +115504,19 @@ else VENDOR= ; fi -elif test "x${with_vendor}" != x -then : +elif test "x${with_vendor}" != x; then : VENDOR="$with_vendor" -else $as_nop +else VENDOR= ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VENDOR" >&5 -printf "%s\n" "$VENDOR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VENDOR" >&5 +$as_echo "$VENDOR" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default package type" >&5 -printf %s "checking default package type... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default package type" >&5 +$as_echo_n "checking default package type... " >&6; } case "$VENDOR" in alpine|arch|artix|gentoo|lunar|slackware) DEFAULT_PACKAGE=tgz ;; @@ -110808,22 +115528,22 @@ # fedora|openeuler|redhat|sles|toss DEFAULT_PACKAGE=rpm ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_PACKAGE" >&5 -printf "%s\n" "$DEFAULT_PACKAGE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_PACKAGE" >&5 +$as_echo "$DEFAULT_PACKAGE" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default init directory" >&5 -printf %s "checking default init directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default init directory" >&5 +$as_echo_n "checking default init directory... " >&6; } case "$VENDOR" in freebsd) initdir=$sysconfdir/rc.d ;; *) initdir=$sysconfdir/init.d;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $initdir" >&5 -printf "%s\n" "$initdir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $initdir" >&5 +$as_echo "$initdir" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default shell" >&5 -printf %s "checking default shell... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default shell" >&5 +$as_echo_n "checking default shell... " >&6; } case "$VENDOR" in alpine|gentoo) DEFAULT_INIT_SHELL=/sbin/openrc-run IS_SYSV_RC=false ;; @@ -110833,26 +115553,25 @@ IS_SYSV_RC=true ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_INIT_SHELL" >&5 -printf "%s\n" "$DEFAULT_INIT_SHELL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_INIT_SHELL" >&5 +$as_echo "$DEFAULT_INIT_SHELL" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default nfs server init script" >&5 -printf %s "checking default nfs server init script... " >&6; } - if test "$VENDOR" = "debian" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default nfs server init script" >&5 +$as_echo_n "checking default nfs server init script... " >&6; } + if test "$VENDOR" = "debian"; then : DEFAULT_INIT_NFS_SERVER="nfs-kernel-server" -else $as_nop +else DEFAULT_INIT_NFS_SERVER="nfs" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_INIT_NFS_SERVER" >&5 -printf "%s\n" "$DEFAULT_INIT_NFS_SERVER" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_INIT_NFS_SERVER" >&5 +$as_echo "$DEFAULT_INIT_NFS_SERVER" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default init config directory" >&5 -printf %s "checking default init config directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default init config directory" >&5 +$as_echo_n "checking default init config directory... " >&6; } case "$VENDOR" in alpine|artix|gentoo) initconfdir=/etc/conf.d @@ -110868,25 +115587,25 @@ initconfdir=/etc/default ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $initconfdir" >&5 -printf "%s\n" "$initconfdir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $initconfdir" >&5 +$as_echo "$initconfdir" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether initramfs-tools is available" >&5 -printf %s "checking whether initramfs-tools is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether initramfs-tools is available" >&5 +$as_echo_n "checking whether initramfs-tools is available... " >&6; } if test -d /usr/share/initramfs-tools ; then RPM_DEFINE_INITRAMFS='--define "_initramfs 1"' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else RPM_DEFINE_INITRAMFS='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking default bash completion directory" >&5 -printf %s "checking default bash completion directory... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default bash completion directory" >&5 +$as_echo_n "checking default bash completion directory... " >&6; } case "$VENDOR" in alpine|arch|artix|debian|gentoo|ubuntu) bashcompletiondir=/usr/share/bash-completion/completions @@ -110898,51 +115617,48 @@ bashcompletiondir=/etc/bash_completion.d ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bashcompletiondir" >&5 -printf "%s\n" "$bashcompletiondir" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bashcompletiondir" >&5 +$as_echo "$bashcompletiondir" >&6; } - if test x$VENDOR != xfreebsd -then : + if test x$VENDOR != xfreebsd; then : RPM=rpm RPMBUILD=rpmbuild - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $RPM is available" >&5 -printf %s "checking whether $RPM is available... " >&6; } - if tmp=$($RPM --version 2>/dev/null) -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $RPM is available" >&5 +$as_echo_n "checking whether $RPM is available... " >&6; } + if tmp=$($RPM --version 2>/dev/null); then : RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }') HAVE_RPM=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPM ($RPM_VERSION)" >&5 -printf "%s\n" "$HAVE_RPM ($RPM_VERSION)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPM ($RPM_VERSION)" >&5 +$as_echo "$HAVE_RPM ($RPM_VERSION)" >&6; } -else $as_nop +else HAVE_RPM=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPM" >&5 -printf "%s\n" "$HAVE_RPM" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPM" >&5 +$as_echo "$HAVE_RPM" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $RPMBUILD is available" >&5 -printf %s "checking whether $RPMBUILD is available... " >&6; } - if tmp=$($RPMBUILD --version 2>/dev/null) -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $RPMBUILD is available" >&5 +$as_echo_n "checking whether $RPMBUILD is available... " >&6; } + if tmp=$($RPMBUILD --version 2>/dev/null); then : RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }') HAVE_RPMBUILD=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&5 -printf "%s\n" "$HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&5 +$as_echo "$HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&6; } -else $as_nop +else HAVE_RPMBUILD=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPMBUILD" >&5 -printf "%s\n" "$HAVE_RPMBUILD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_RPMBUILD" >&5 +$as_echo "$HAVE_RPMBUILD" >&6; } fi @@ -110953,8 +115669,7 @@ RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(ASAN_ZFS) 1"' RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(UBSAN_ZFS) 1"' - if test "x$enable_debuginfo" = xyes -then : + if test "x$enable_debuginfo" = xyes; then : RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "__strip /bin/true"' @@ -110962,26 +115677,22 @@ RPM_DEFINE_UTIL=' --define "_initconfdir $(initconfdir)"' - if test -n "$dracutdir" -then : + if test -n "$dracutdir" ; then : RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_dracutdir $(dracutdir)"' fi - if test -n "$udevdir" -then : + if test -n "$udevdir" ; then : RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevdir $(udevdir)"' fi - if test -n "$udevruledir" -then : + if test -n "$udevruledir" ; then : RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_udevruledir $(udevruledir)"' fi - if test -n "$bashcompletiondir" -then : + if test -n "$bashcompletiondir" ; then : RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_bashcompletiondir $(bashcompletiondir)"' @@ -110992,8 +115703,7 @@ RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYTHON_VERSION)' RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' $(DEFINE_PYTHON_PKG_VERSION)' - if test "$DEFAULT_PACKAGE" = "deb" -then : + if test "$DEFAULT_PACKAGE" = "deb"; then : MULTIARCH_LIBDIR="lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" RPM_DEFINE_UTIL=${RPM_DEFINE_UTIL}' --define "_lib $(MULTIARCH_LIBDIR)"' @@ -111025,16 +115735,15 @@ RPM_SPEC_DIR="rpm/generic" # Check whether --with-spec was given. -if test ${with_spec+y} -then : +if test "${with_spec+set}" = set; then : withval=$with_spec; RPM_SPEC_DIR="rpm/$withval" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether spec files are available" >&5 -printf %s "checking whether spec files are available... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($RPM_SPEC_DIR/*.spec.in)" >&5 -printf "%s\n" "yes ($RPM_SPEC_DIR/*.spec.in)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether spec files are available" >&5 +$as_echo_n "checking whether spec files are available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($RPM_SPEC_DIR/*.spec.in)" >&5 +$as_echo "yes ($RPM_SPEC_DIR/*.spec.in)" >&6; } @@ -111058,40 +115767,38 @@ DPKG=dpkg DPKGBUILD=dpkg-buildpackage - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DPKG is available" >&5 -printf %s "checking whether $DPKG is available... " >&6; } - if tmp=$($DPKG --version 2>/dev/null) -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $DPKG is available" >&5 +$as_echo_n "checking whether $DPKG is available... " >&6; } + if tmp=$($DPKG --version 2>/dev/null); then : DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $7 }') HAVE_DPKG=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKG ($DPKG_VERSION)" >&5 -printf "%s\n" "$HAVE_DPKG ($DPKG_VERSION)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKG ($DPKG_VERSION)" >&5 +$as_echo "$HAVE_DPKG ($DPKG_VERSION)" >&6; } -else $as_nop +else HAVE_DPKG=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKG" >&5 -printf "%s\n" "$HAVE_DPKG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKG" >&5 +$as_echo "$HAVE_DPKG" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DPKGBUILD is available" >&5 -printf %s "checking whether $DPKGBUILD is available... " >&6; } - if tmp=$($DPKGBUILD --version 2>/dev/null) -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $DPKGBUILD is available" >&5 +$as_echo_n "checking whether $DPKGBUILD is available... " >&6; } + if tmp=$($DPKGBUILD --version 2>/dev/null); then : DPKGBUILD_VERSION=$(echo $tmp | \ $AWK '/Debian/ { print $4 }' | cut -f-4 -d'.') HAVE_DPKGBUILD=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&5 -printf "%s\n" "$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&5 +$as_echo "$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&6; } -else $as_nop +else HAVE_DPKGBUILD=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKGBUILD" >&5 -printf "%s\n" "$HAVE_DPKGBUILD" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKGBUILD" >&5 +$as_echo "$HAVE_DPKGBUILD" >&6; } fi @@ -111108,24 +115815,23 @@ ALIEN=alien - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $ALIEN is available" >&5 -printf %s "checking whether $ALIEN is available... " >&6; } - if tmp=$($ALIEN --version 2>/dev/null) -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ALIEN is available" >&5 +$as_echo_n "checking whether $ALIEN is available... " >&6; } + if tmp=$($ALIEN --version 2>/dev/null); then : ALIEN_VERSION=$(echo $tmp | $AWK '{ print $3 }') ALIEN_MAJOR=$(echo ${ALIEN_VERSION} | $AWK -F'.' '{ print $1 }') ALIEN_MINOR=$(echo ${ALIEN_VERSION} | $AWK -F'.' '{ print $2 }') ALIEN_POINT=$(echo ${ALIEN_VERSION} | $AWK -F'.' '{ print $3 }') HAVE_ALIEN=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ALIEN ($ALIEN_VERSION)" >&5 -printf "%s\n" "$HAVE_ALIEN ($ALIEN_VERSION)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ALIEN ($ALIEN_VERSION)" >&5 +$as_echo "$HAVE_ALIEN ($ALIEN_VERSION)" >&6; } -else $as_nop +else HAVE_ALIEN=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ALIEN" >&5 -printf "%s\n" "$HAVE_ALIEN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ALIEN" >&5 +$as_echo "$HAVE_ALIEN" >&6; } fi @@ -111140,13 +115846,12 @@ fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether assertion support will be enabled" >&5 -printf %s "checking whether assertion support will be enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assertion support will be enabled" >&5 +$as_echo_n "checking whether assertion support will be enabled... " >&6; } # Check whether --enable-debug was given. -if test ${enable_debug+y} -then : +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; -else $as_nop +else enable_debug=no fi @@ -111160,7 +115865,7 @@ DEBUG_ZFS="_with_debug" WITH_DEBUG="true" -printf "%s\n" "#define ZFS_DEBUG 1" >>confdefs.h +$as_echo "#define ZFS_DEBUG 1" >>confdefs.h KERNEL_DEBUG_CFLAGS="-Werror" @@ -111190,10 +115895,9 @@ if test -z "$BUILD_FREEBSD_TRUE"; then : - if sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS' -then : + if sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'; then : enable_invariants="yes" -else $as_nop +else enable_invariants="no" fi @@ -111212,7 +115916,7 @@ DEBUG_ZFS="_with_debug" WITH_DEBUG="true" -printf "%s\n" "#define ZFS_DEBUG 1" >>confdefs.h +$as_echo "#define ZFS_DEBUG 1" >>confdefs.h KERNEL_DEBUG_CFLAGS="-Werror" @@ -111233,17 +115937,16 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5 -printf "%s\n" "$enable_debug" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5 +$as_echo "$enable_debug" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether debuginfo support will be forced" >&5 -printf %s "checking whether debuginfo support will be forced... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether debuginfo support will be forced" >&5 +$as_echo_n "checking whether debuginfo support will be forced... " >&6; } # Check whether --enable-debuginfo was given. -if test ${enable_debuginfo+y} -then : +if test "${enable_debuginfo+set}" = set; then : enableval=$enable_debuginfo; -else $as_nop +else enable_debuginfo=no fi @@ -111272,28 +115975,26 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_debuginfo" >&5 -printf "%s\n" "$enable_debuginfo" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debuginfo" >&5 +$as_echo "$enable_debuginfo" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether basic kmem accounting is enabled" >&5 -printf %s "checking whether basic kmem accounting is enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether basic kmem accounting is enabled" >&5 +$as_echo_n "checking whether basic kmem accounting is enabled... " >&6; } # Check whether --enable-debug-kmem was given. -if test ${enable_debug_kmem+y} -then : +if test "${enable_debug_kmem+set}" = set; then : enableval=$enable_debug_kmem; -else $as_nop +else enable_debug_kmem=no fi - if test "x$enable_debug_kmem" = xyes -then : + if test "x$enable_debug_kmem" = xyes; then : KERNEL_DEBUG_CPPFLAGS="${KERNEL_DEBUG_CPPFLAGS} -DDEBUG_KMEM" DEBUG_KMEM_ZFS="_with_debug_kmem" -else $as_nop +else DEBUG_KMEM_ZFS="_without_debug_kmem" @@ -111302,28 +116003,26 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_debug_kmem" >&5 -printf "%s\n" "$enable_debug_kmem" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug_kmem" >&5 +$as_echo "$enable_debug_kmem" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether detailed kmem tracking is enabled" >&5 -printf %s "checking whether detailed kmem tracking is enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether detailed kmem tracking is enabled" >&5 +$as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } # Check whether --enable-debug-kmem-tracking was given. -if test ${enable_debug_kmem_tracking+y} -then : +if test "${enable_debug_kmem_tracking+set}" = set; then : enableval=$enable_debug_kmem_tracking; -else $as_nop +else enable_debug_kmem_tracking=no fi - if test "x$enable_debug_kmem_tracking" = xyes -then : + if test "x$enable_debug_kmem_tracking" = xyes; then : KERNEL_DEBUG_CPPFLAGS="${KERNEL_DEBUG_CPPFLAGS} -DDEBUG_KMEM_TRACKING" DEBUG_KMEM_TRACKING_ZFS="_with_debug_kmem_tracking" -else $as_nop +else DEBUG_KMEM_TRACKING_ZFS="_without_debug_kmem_tracking" @@ -111332,24 +116031,22 @@ - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_debug_kmem_tracking" >&5 -printf "%s\n" "$enable_debug_kmem_tracking" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug_kmem_tracking" >&5 +$as_echo "$enable_debug_kmem_tracking" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD kernel INVARIANTS checks are enabled" >&5 -printf %s "checking whether FreeBSD kernel INVARIANTS checks are enabled... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD kernel INVARIANTS checks are enabled" >&5 +$as_echo_n "checking whether FreeBSD kernel INVARIANTS checks are enabled... " >&6; } # Check whether --enable-invariants was given. -if test ${enable_invariants+y} -then : +if test "${enable_invariants+set}" = set; then : enableval=$enable_invariants; -else $as_nop +else if test -z "$BUILD_FREEBSD_TRUE"; then : - if sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS' -then : + if sysctl -n kern.conftxt | grep -Fqx $'options\tINVARIANTS'; then : enable_invariants="yes" -else $as_nop +else enable_invariants="no" fi @@ -111360,21 +116057,74 @@ fi - if test "x$enable_invariants" = xyes -then : + if test "x$enable_invariants" = xyes; then : WITH_INVARIANTS="true" -else $as_nop +else WITH_INVARIANTS="" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_invariants" >&5 -printf "%s\n" "$enable_invariants" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_invariants" >&5 +$as_echo "$enable_invariants" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether objtool error on warning behavior is enabled" >&5 +$as_echo_n "checking whether objtool error on warning behavior is enabled... " >&6; } + # Check whether --enable-objtool-werror was given. +if test "${enable_objtool_werror+set}" = set; then : + enableval=$enable_objtool_werror; enable_objtool_werror=$enableval +else + enable_objtool_werror=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_objtool_werror" >&5 +$as_echo "$enable_objtool_werror" >&6; } + + if test x$CONFIG_OBJTOOL_WERROR_DEFINED = xyes; then : + + if test x$enable_objtool_werror = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: enable-objtool-werror defined, keeping -Werror " >&5 +$as_echo "$as_me: enable-objtool-werror defined, keeping -Werror " >&6;} + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: enable-objtool-werror undefined, disabling -Werror " >&5 +$as_echo "$as_me: enable-objtool-werror undefined, disabling -Werror " >&6;} + OBJTOOL_DISABLE_WERROR=y + abs_objtool_binary=$kernelbuild/tools/objtool/objtool + if test -x $abs_objtool_binary; then : + +else + + as_fn_error $? "*** objtool binary $abs_objtool_binary not found" "$LINENO" 5 + +fi + +fi + +else + + if test x$enable_objtool_werror = xyes; then : + + as_fn_error $? " + *** Cannot enable objtool-werror, + *** a kernel built with CONFIG_OBJTOOL_WERROR=y is required. + " "$LINENO" 5 + +fi + +fi + + + ac_config_files="$ac_config_files contrib/debian/rules contrib/debian/changelog Makefile include/Makefile lib/libzfs/libzfs.pc lib/libzfs_core/libzfs_core.pc lib/libzfsbootenv/libzfsbootenv.pc module/Kbuild module/Makefile rpm/generic/zfs-dkms.spec rpm/generic/zfs-kmod.spec rpm/generic/zfs.spec rpm/redhat/zfs-dkms.spec rpm/redhat/zfs-kmod.spec rpm/redhat/zfs.spec tests/zfs-tests/tests/Makefile zfs.release" +ac_config_files="$ac_config_files scripts/objtool-wrapper" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -111403,8 +116153,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -111434,15 +116184,15 @@ /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -111456,8 +116206,8 @@ fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -111474,7 +116224,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -111489,14 +116239,14 @@ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -printf %s "checking that generated files are newer than configure... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -111622,8 +116372,8 @@ ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -111646,16 +116396,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -111665,46 +116413,46 @@ fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -111713,6 +116461,13 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -111721,12 +116476,8 @@ for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -111738,10 +116489,30 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -111754,14 +116525,13 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -111788,20 +116558,18 @@ { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -111813,13 +116581,12 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -111850,7 +116617,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -111872,10 +116639,6 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -111889,12 +116652,6 @@ ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -111936,7 +116693,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -111945,7 +116702,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -112007,8 +116764,8 @@ # 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 2.3.2, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by zfs $as_me 2.3.9, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -112070,16 +116827,14 @@ Report bugs to the package provider." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -zfs config.status 2.3.2 -configured by $0, generated by GNU Autoconf 2.71, +zfs config.status 2.3.9 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -112119,15 +116874,15 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -112135,7 +116890,7 @@ --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -112144,7 +116899,7 @@ as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -112172,7 +116927,7 @@ if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -112186,7 +116941,7 @@ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -112238,7 +116993,6 @@ lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' @@ -112247,7 +117001,6 @@ DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -112368,7 +117121,6 @@ lt_SP2NL \ lt_NL2SP \ reload_flag \ -FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ @@ -112377,6 +117129,7 @@ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ +AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -112516,6 +117269,7 @@ "rpm/redhat/zfs.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs.spec" ;; "tests/zfs-tests/tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/zfs-tests/tests/Makefile" ;; "zfs.release") CONFIG_FILES="$CONFIG_FILES zfs.release" ;; + "scripts/objtool-wrapper") CONFIG_FILES="$CONFIG_FILES scripts/objtool-wrapper" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -112527,9 +117281,9 @@ # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -112865,7 +117619,7 @@ esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -112873,17 +117627,17 @@ # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -112900,7 +117654,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -112924,9 +117678,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -112988,8 +117742,8 @@ case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -113033,9 +117787,9 @@ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -113051,20 +117805,20 @@ # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -113084,7 +117838,7 @@ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -113104,8 +117858,8 @@ s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -113133,7 +117887,7 @@ for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -113145,7 +117899,7 @@ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -113167,7 +117921,7 @@ $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | +$as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -113192,8 +117946,8 @@ (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is @@ -113344,9 +118098,6 @@ # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd -# A file(cmd) program that detects file types. -FILECMD=$lt_FILECMD - # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -113371,11 +118122,8 @@ # The archiver. AR=$lt_AR -# Flags to create an archive (by configure). -lt_ar_flags=$lt_ar_flags - # Flags to create an archive. -AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} +AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -113743,7 +118491,6 @@ esac - ltmain=$ac_aux_dir/ltmain.sh @@ -113751,7 +118498,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -113870,6 +118617,7 @@ ;; esac done ;; + "scripts/objtool-wrapper":F) chmod +x scripts/objtool-wrapper ;; esac done # for ac_tag @@ -113904,17 +118652,16 @@ $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test "x$enable_linux_experimental" = "xyes" && \ - test "x$kern_max_version_ok" != "xyes" -then : + test "x$kern_max_version_ok" != "xyes"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are building OpenZFS against Linux version $kernsrcver. @@ -113932,7 +118679,7 @@ Your feedback will help us prepare a new OpenZFS release that supports this version of Linux. " >&5 -printf "%s\n" "$as_me: WARNING: +$as_echo "$as_me: WARNING: You are building OpenZFS against Linux version $kernsrcver. @@ -113953,4 +118700,3 @@ fi - diff -Nru zfs-linux-2.3.2/configure.ac zfs-linux-2.3.9/configure.ac --- zfs-linux-2.3.2/configure.ac 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/configure.ac 2026-08-21 20:57:12.296005923 +0000 @@ -41,7 +41,7 @@ AC_CANONICAL_TARGET AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AM_INIT_AUTOMAKE([subdir-objects foreign]) +AM_INIT_AUTOMAKE([subdir-objects foreign tar-pax]) # Remove default macros from config.h: # PACKAGE, PACKAGE_{BUGREPORT,NAME,STRING,TARNAME,VERSION}, STDC_HEADERS, VERSION AC_CONFIG_HEADERS([zfs_config.h], [ @@ -65,6 +65,7 @@ ZFS_AC_DEBUG_KMEM ZFS_AC_DEBUG_KMEM_TRACKING ZFS_AC_DEBUG_INVARIANTS +ZFS_AC_OBJTOOL_WERROR AC_CONFIG_FILES([ contrib/debian/rules @@ -86,6 +87,7 @@ zfs.release ]) +AC_CONFIG_FILES([scripts/objtool-wrapper], [chmod +x scripts/objtool-wrapper]) AC_OUTPUT diff -Nru zfs-linux-2.3.2/contrib/Makefile.am zfs-linux-2.3.9/contrib/Makefile.am --- zfs-linux-2.3.2/contrib/Makefile.am 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/contrib/Makefile.am 2026-08-21 20:57:12.296005923 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 include $(srcdir)/%D%/bash_completion.d/Makefile.am include $(srcdir)/%D%/debian/Makefile.am include $(srcdir)/%D%/pyzfs/Makefile.am diff -Nru zfs-linux-2.3.2/contrib/bash_completion.d/Makefile.am zfs-linux-2.3.9/contrib/bash_completion.d/Makefile.am --- zfs-linux-2.3.2/contrib/bash_completion.d/Makefile.am 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/contrib/bash_completion.d/Makefile.am 2026-08-21 20:57:12.297338945 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 nodist_bashcompletion_DATA = %D%/zfs %D%/zpool COMPLETION_FILES = %D%/zfs SUBSTFILES += $(COMPLETION_FILES) diff -Nru zfs-linux-2.3.2/contrib/bpftrace/Makefile.am zfs-linux-2.3.9/contrib/bpftrace/Makefile.am --- zfs-linux-2.3.2/contrib/bpftrace/Makefile.am 2025-05-01 18:23:23.728214669 +0000 +++ zfs-linux-2.3.9/contrib/bpftrace/Makefile.am 2026-08-21 20:57:12.297338945 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 dist_noinst_DATA += %D%/taskqlatency.bt %D%/zfs-trace.sh SHELLCHECKSCRIPTS += %D%/zfs-trace.sh diff -Nru zfs-linux-2.3.2/contrib/debian/Makefile.am zfs-linux-2.3.9/contrib/debian/Makefile.am --- zfs-linux-2.3.2/contrib/debian/Makefile.am 2025-05-01 18:23:23.729214683 +0000 +++ zfs-linux-2.3.9/contrib/debian/Makefile.am 2026-08-21 20:57:12.297598136 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 dist_noinst_DATA += %D%/changelog.in dist_noinst_DATA += %D%/clean dist_noinst_DATA += %D%/control diff -Nru zfs-linux-2.3.2/contrib/debian/control zfs-linux-2.3.9/contrib/debian/control --- zfs-linux-2.3.2/contrib/debian/control 2025-05-01 18:23:23.729214683 +0000 +++ zfs-linux-2.3.9/contrib/debian/control 2026-08-21 20:57:12.297598136 +0000 @@ -100,8 +100,8 @@ # The libcurl4 is loaded through dlopen("libcurl.so.4"). # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988521 Recommends: libcurl4 -Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux -Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux +Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux, openzfs-libzfs4 +Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux, openzfs-libzfs4 Conflicts: libzfs6linux Description: OpenZFS filesystem library for Linux - general support OpenZFS is a storage platform that encompasses the functionality of @@ -128,8 +128,8 @@ Section: contrib/libs Architecture: linux-any Depends: ${misc:Depends}, ${shlibs:Depends} -Breaks: libzpool2, libzpool5, libzpool5linux, libzpool6linux -Replaces: libzpool2, libzpool5, libzpool5linux, libzpool6linux +Breaks: libzpool2, libzpool5, libzpool6linux +Replaces: libzpool2, libzpool5, libzpool6linux Conflicts: libzpool6linux Description: OpenZFS pool library for Linux OpenZFS is a storage platform that encompasses the functionality of diff -Nru zfs-linux-2.3.2/contrib/debian/not-installed zfs-linux-2.3.9/contrib/debian/not-installed --- zfs-linux-2.3.2/contrib/debian/not-installed 2025-05-01 18:23:23.729214683 +0000 +++ zfs-linux-2.3.9/contrib/debian/not-installed 2026-08-21 20:57:12.297598136 +0000 @@ -2,7 +2,6 @@ usr/share/zfs/zfs-helpers.sh etc/default/zfs etc/init.d -etc/sudoers.d etc/zfs/vdev_id.conf.alias.example etc/zfs/vdev_id.conf.multipath.example etc/zfs/vdev_id.conf.sas_direct.example diff -Nru zfs-linux-2.3.2/contrib/debian/openzfs-zfsutils.install zfs-linux-2.3.9/contrib/debian/openzfs-zfsutils.install --- zfs-linux-2.3.2/contrib/debian/openzfs-zfsutils.install 2025-05-01 18:23:23.730214697 +0000 +++ zfs-linux-2.3.9/contrib/debian/openzfs-zfsutils.install 2026-08-21 20:57:12.297598136 +0000 @@ -8,6 +8,7 @@ lib/systemd/system/zfs-import.target lib/systemd/system/zfs-load-key.service lib/systemd/system/zfs-mount.service +lib/systemd/system/zfs-mount@.service lib/systemd/system/zfs-scrub-monthly@.timer lib/systemd/system/zfs-scrub-weekly@.timer lib/systemd/system/zfs-scrub@.service @@ -73,6 +74,7 @@ usr/share/man/man8/zfs-redact.8 usr/share/man/man8/zfs-release.8 usr/share/man/man8/zfs-rename.8 +usr/share/man/man8/zfs-rewrite.8 usr/share/man/man8/zfs-rollback.8 usr/share/man/man8/zfs-send.8 usr/share/man/man8/zfs-set.8 diff -Nru zfs-linux-2.3.2/contrib/debian/rules.in zfs-linux-2.3.9/contrib/debian/rules.in --- zfs-linux-2.3.2/contrib/debian/rules.in 2025-05-01 18:23:23.730214697 +0000 +++ zfs-linux-2.3.9/contrib/debian/rules.in 2026-08-21 20:57:12.297598136 +0000 @@ -93,7 +93,7 @@ @# Install the DKMS source. @# We only want the files needed to build the modules install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \ - '$(CURDIR)/scripts/dkms.postbuild' + '$(CURDIR)/scripts/dkms.postbuild' '$(CURDIR)/scripts/objtool-wrapper.in' $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;) @# Only ever build Linux modules @@ -108,8 +108,8 @@ @# - zfs.release$ @# * Takes care of spaces and tabs @# * Remove reference to ZFS_AC_PACKAGE - awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ {\ - if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/(Makefile|sys|os\/(Makefile|linux))|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/) \ + awk '/^AC_CONFIG_FILES\(\[/,/\]\)/ {\ + if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/(Makefile|sys|os\/(Makefile|linux))|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))|scripts\/objtool-wrapper.*\]\)$$/) \ {next} } {print}' \ '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' | sed '/ZFS_AC_PACKAGE/d' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs. diff -Nru zfs-linux-2.3.2/contrib/dracut/Makefile.am zfs-linux-2.3.9/contrib/dracut/Makefile.am --- zfs-linux-2.3.2/contrib/dracut/Makefile.am 2025-05-01 18:23:23.731214711 +0000 +++ zfs-linux-2.3.9/contrib/dracut/Makefile.am 2026-08-21 20:57:12.298684934 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 pkgdracut_02dir = $(dracutdir)/modules.d/02zfsexpandknowledge pkgdracut_02_SCRIPTS = \ %D%/02zfsexpandknowledge/module-setup.sh diff -Nru zfs-linux-2.3.2/contrib/initramfs/Makefile.am zfs-linux-2.3.9/contrib/initramfs/Makefile.am --- zfs-linux-2.3.2/contrib/initramfs/Makefile.am 2025-05-01 18:23:23.731214711 +0000 +++ zfs-linux-2.3.9/contrib/initramfs/Makefile.am 2026-08-21 20:57:12.298684934 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 i_tdir = /usr/share/initramfs-tools dist_i_t_SCRIPTS = \ %D%/zfsunlock diff -Nru zfs-linux-2.3.2/contrib/initramfs/hooks/zfs.in zfs-linux-2.3.9/contrib/initramfs/hooks/zfs.in --- zfs-linux-2.3.2/contrib/initramfs/hooks/zfs.in 2025-05-01 18:23:23.732214725 +0000 +++ zfs-linux-2.3.9/contrib/initramfs/hooks/zfs.in 2026-08-21 20:57:12.299169827 +0000 @@ -31,7 +31,7 @@ # shellcheck disable=SC2050 if [ @LIBFETCH_DYNAMIC@ -gt 0 ]; then - find /lib/ -name "@LIBFETCH_SONAME@" | while read -r libfetch; do + find /lib/ -type f -name "@LIBFETCH_SONAME@" | while read -r libfetch; do copy_exec "$libfetch" done fi diff -Nru zfs-linux-2.3.2/contrib/initramfs/scripts/zfs zfs-linux-2.3.9/contrib/initramfs/scripts/zfs --- zfs-linux-2.3.2/contrib/initramfs/scripts/zfs 2025-05-01 18:23:23.732214725 +0000 +++ zfs-linux-2.3.9/contrib/initramfs/scripts/zfs 2026-08-21 20:57:12.299240666 +0000 @@ -979,7 +979,8 @@ touch /run/zfs_unlock_complete if [ -e /run/zfs_unlock_complete_notify ]; then - read -r < /run/zfs_unlock_complete_notify + # shellcheck disable=SC2034 + read -r zfs_unlock_complete_notify < /run/zfs_unlock_complete_notify fi # ------------ diff -Nru zfs-linux-2.3.2/contrib/pam_zfs_key/Makefile.am zfs-linux-2.3.9/contrib/pam_zfs_key/Makefile.am --- zfs-linux-2.3.2/contrib/pam_zfs_key/Makefile.am 2025-05-01 18:23:23.732214725 +0000 +++ zfs-linux-2.3.9/contrib/pam_zfs_key/Makefile.am 2026-08-21 20:57:12.299508552 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 %C%_pam_zfs_key_la_CFLAGS = $(AM_CFLAGS) %C%_pam_zfs_key_la_CFLAGS += $(LIBCRYPTO_CFLAGS) diff -Nru zfs-linux-2.3.2/contrib/pam_zfs_key/pam_zfs_key.c zfs-linux-2.3.9/contrib/pam_zfs_key/pam_zfs_key.c --- zfs-linux-2.3.2/contrib/pam_zfs_key/pam_zfs_key.c 2025-05-01 18:23:23.732214725 +0000 +++ zfs-linux-2.3.9/contrib/pam_zfs_key/pam_zfs_key.c 2026-08-21 20:57:12.299630357 +0000 @@ -760,27 +760,41 @@ errno); return (-1); } - if (chown(runtime_path, 0, 0) != 0) { + const int runtime_fd = open(runtime_path, + O_RDONLY | O_CLOEXEC | O_NOFOLLOW | O_DIRECTORY); + if (runtime_fd < 0) { + pam_syslog(pamh, LOG_ERR, "Can't open runtime path: %d", errno); + return (-1); + } + if (fchown(runtime_fd, 0, 0) != 0) { pam_syslog(pamh, LOG_ERR, "Can't chown runtime path: %d", errno); + close(runtime_fd); return (-1); } - if (chmod(runtime_path, S_IRWXU) != 0) { + if (fchmod(runtime_fd, S_IRWXU) != 0) { pam_syslog(pamh, LOG_ERR, "Can't chmod runtime path: %d", errno); + close(runtime_fd); return (-1); } char *counter_path; - if (asprintf(&counter_path, "%s/%u", runtime_path, config->uid) == -1) + if (asprintf(&counter_path, "%u", config->uid) == -1) { + close(runtime_fd); return (-1); + } - const int fd = open(counter_path, + const int fd = openat(runtime_fd, counter_path, O_RDWR | O_CLOEXEC | O_CREAT | O_NOFOLLOW, S_IRUSR | S_IWUSR); + int ret = errno; + free(counter_path); + close(runtime_fd); + if (fd < 0) { - pam_syslog(pamh, LOG_ERR, "Can't open counter file: %d", errno); + pam_syslog(pamh, LOG_ERR, "Can't open counter file: %d", ret); return (-1); } if (flock(fd, LOCK_EX) != 0) { @@ -791,7 +805,6 @@ char counter[20]; char *pos = counter; int remaining = sizeof (counter) - 1; - int ret; counter[sizeof (counter) - 1] = 0; while (remaining > 0 && (ret = read(fd, pos, remaining)) > 0) { remaining -= ret; diff -Nru zfs-linux-2.3.2/contrib/pyzfs/Makefile.am zfs-linux-2.3.9/contrib/pyzfs/Makefile.am --- zfs-linux-2.3.2/contrib/pyzfs/Makefile.am 2025-05-01 18:23:23.733214739 +0000 +++ zfs-linux-2.3.9/contrib/pyzfs/Makefile.am 2026-08-21 20:57:12.299798743 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 dist_noinst_DATA += %D%/libzfs_core %D%/README %D%/LICENSE %D%/docs SUBSTFILES += %D%/setup.py diff -Nru zfs-linux-2.3.2/contrib/pyzfs/libzfs_core/exceptions.py zfs-linux-2.3.9/contrib/pyzfs/libzfs_core/exceptions.py --- zfs-linux-2.3.2/contrib/pyzfs/libzfs_core/exceptions.py 2025-05-01 18:23:23.734214753 +0000 +++ zfs-linux-2.3.9/contrib/pyzfs/libzfs_core/exceptions.py 2026-08-21 20:57:12.300650094 +0000 @@ -604,5 +604,4 @@ errno = ZFS_ERR_RAIDZ_EXPAND_IN_PROGRESS message = "A raidz device is currently expanding" - # vim: softtabstop=4 tabstop=4 expandtab shiftwidth=4 diff -Nru zfs-linux-2.3.2/contrib/pyzfs/libzfs_core/test/test_libzfs_core.py zfs-linux-2.3.9/contrib/pyzfs/libzfs_core/test/test_libzfs_core.py --- zfs-linux-2.3.2/contrib/pyzfs/libzfs_core/test/test_libzfs_core.py 2025-05-01 18:23:23.734214753 +0000 +++ zfs-linux-2.3.9/contrib/pyzfs/libzfs_core/test/test_libzfs_core.py 2026-08-21 20:57:12.300842660 +0000 @@ -4223,7 +4223,7 @@ self.getRoot().reset() return - # On the Buildbot builders this may fail with "pool is busy" + # On the CI builders this may fail with "pool is busy" # Retry 5 times before raising an error retry = 0 while True: diff -Nru zfs-linux-2.3.2/contrib/zcp/Makefile.am zfs-linux-2.3.9/contrib/zcp/Makefile.am --- zfs-linux-2.3.2/contrib/zcp/Makefile.am 2025-05-01 18:23:23.734214753 +0000 +++ zfs-linux-2.3.9/contrib/zcp/Makefile.am 2026-08-21 20:57:12.300842660 +0000 @@ -1 +1,2 @@ +# SPDX-License-Identifier: CDDL-1.0 dist_noinst_DATA += %D%/autosnap.lua diff -Nru zfs-linux-2.3.2/copy-builtin zfs-linux-2.3.9/copy-builtin --- zfs-linux-2.3.2/copy-builtin 2025-05-01 18:23:23.734214753 +0000 +++ zfs-linux-2.3.9/copy-builtin 2026-08-21 20:57:12.301341822 +0000 @@ -8,7 +8,9 @@ exit 1 } -[ "$#" -eq 1 ] || usage +if ! [ -d "$1" ] ; then + usage +fi KERNEL_DIR="$1" if ! [ -e 'zfs_config.h' ] @@ -31,6 +33,7 @@ config ZFS tristate "ZFS filesystem support" depends on EFI_PARTITION + depends on BLOCK select ZLIB_INFLATE select ZLIB_DEFLATE help diff -Nru zfs-linux-2.3.2/debian/changelog zfs-linux-2.3.9/debian/changelog --- zfs-linux-2.3.2/debian/changelog 2025-06-29 13:54:37.000000000 +0000 +++ zfs-linux-2.3.9/debian/changelog 2026-08-22 18:39:30.000000000 +0000 @@ -1,9 +1,14 @@ -zfs-linux (2.3.2-2) unstable; urgency=medium +zfs-linux (2.3.9-0+deb13u1) trixie-security; urgency=medium - * d/patches: backport some fixes from 2.3.3 upstream release - (closes: #1106035). + * New upstream stable point release 2.3.9, fix open zpool + manipulation and escapes via unprivileged userns. + * d/patches: drop patches that are now included, refresh remaining. + * d/zfsutils-linux.install: add zfs-mount@.service and zfs-rewrite.8 + * d/*.symbols: update. + * d/rules: fix dkms build by retaining more fields in configure.ac. + * d/rules: install scripts/objtool-wrapper.in into dkms tree. - -- Shengqi Chen Sun, 29 Jun 2025 21:54:37 +0800 + -- Aron Xu Sun, 23 Aug 2026 02:39:30 +0800 zfs-linux (2.3.2-1) unstable; urgency=medium diff -Nru zfs-linux-2.3.2/debian/libzfs6linux.symbols zfs-linux-2.3.9/debian/libzfs6linux.symbols --- zfs-linux-2.3.2/debian/libzfs6linux.symbols 2025-06-27 14:23:34.000000000 +0000 +++ zfs-linux-2.3.9/debian/libzfs6linux.symbols 2026-08-22 05:41:31.000000000 +0000 @@ -347,6 +347,7 @@ zfs_hold@Base 0.8.2 zfs_hold_nvl@Base 0.8.2 zfs_ioctl@Base 0.8.2 + zfs_is_encrypted@Base 2.3.9 zfs_is_mounted@Base 0.8.2 zfs_is_shared@Base 0.8.2 zfs_isnumber@Base 2.2 diff -Nru zfs-linux-2.3.2/debian/libzpool6linux.symbols zfs-linux-2.3.9/debian/libzpool6linux.symbols --- zfs-linux-2.3.2/debian/libzpool6linux.symbols 2025-06-27 14:23:34.000000000 +0000 +++ zfs-linux-2.3.9/debian/libzpool6linux.symbols 2026-08-22 05:41:20.000000000 +0000 @@ -169,6 +169,7 @@ arc_alloc_buf@Base 0.8.2 arc_alloc_compressed_buf@Base 0.8.2 arc_alloc_raw_buf@Base 0.8.2 + arc_async_flush_guid_inuse@Base 2.3.9 arc_available_memory@Base 2.0 arc_bcopy_func@Base 0.8.2 arc_buf_access@Base 0.8.2 @@ -184,6 +185,7 @@ arc_default_max@Base 2.0 arc_fini@Base 0.8.2 arc_flush@Base 0.8.2 + arc_flush_async@Base 2.3.9 arc_free_memory@Base 2.0 arc_freed@Base 0.8.2 arc_get_complevel@Base 2.0 @@ -486,6 +488,7 @@ dataset_nestcheck@Base 0.8.2 dbuf_add_ref@Base 0.8.2 dbuf_assign_arcbuf@Base 0.8.2 + dbuf_cache_reduce_target_size@Base 2.3.9 dbuf_caches@Base 0.8.2 dbuf_create_bonus@Base 0.8.2 dbuf_destroy@Base 0.8.2 @@ -824,6 +827,7 @@ dnode_add_ref@Base 0.8.2 dnode_allocate@Base 0.8.2 dnode_block_freed@Base 0.8.2 + dnode_block_freed_after@Base 2.3.9 dnode_buf_byteswap@Base 0.8.2 dnode_byteswap@Base 0.8.2 dnode_diduse_space@Base 0.8.2 @@ -1560,6 +1564,7 @@ metaslab_class_expandable_space@Base 0.8.2 metaslab_class_fragmentation@Base 0.8.2 metaslab_class_get_alloc@Base 0.8.2 + metaslab_class_get_dalloc@Base 2.3.9 metaslab_class_get_deferred@Base 0.8.2 metaslab_class_get_dspace@Base 0.8.2 metaslab_class_get_space@Base 0.8.2 @@ -1597,6 +1602,7 @@ metaslab_ndf_clump_shift@Base 2.3 metaslab_preload_limit@Base 0.8.2 metaslab_recalculate_weight_and_sort@Base 0.8.2 + metaslab_rt_name@Base 2.3.9 metaslab_set_selected_txg@Base 2.0 metaslab_set_unflushed_dirty@Base 2.1.6 metaslab_set_unflushed_txg@Base 2.0 @@ -1616,6 +1622,8 @@ metaslab_unflushed_txg@Base 2.0 metaslab_unload@Base 0.8.2 mkdirp@Base 2.2.0 + mmp_claim_relaxed@Base 2.3.9 + mmp_claim_uberblock@Base 2.3.9 mmp_fini@Base 0.8.2 mmp_init@Base 0.8.2 mmp_signal_all_threads@Base 0.8.2 @@ -1691,6 +1699,7 @@ zfs_range_tree_clear@Base 0.8.2 zfs_range_tree_contains@Base 0.8.2 zfs_range_tree_create@Base 0.8.2 + zfs_range_tree_create_flags@Base 2.3.9 zfs_range_tree_create_gap@Base 2.1.6 zfs_range_tree_destroy@Base 0.8.2 zfs_range_tree_find@Base 0.8.2 @@ -1777,7 +1786,7 @@ scan_fini@Base 0.8.2 scan_init@Base 0.8.2 secpolicy_zfs@Base 0.8.2 - secpolicy_zfs_proc@Base 2.0 +#MISSING: 2.3.9# secpolicy_zfs_proc@Base 2.0 seq_printf@Base 0.8.2 set_global_var@Base 0.8.2 (arch=armel armhf arm64)sha256_armv7_impl@Base 2.2.0 @@ -1900,6 +1909,7 @@ spa_freeze@Base 0.8.2 spa_freeze_txg@Base 0.8.2 spa_generate_guid@Base 0.8.2 + spa_generate_load_guid@Base 2.3.9 spa_generate_syncing_log_sm@Base 2.0 spa_get_allocator@Base 2.3 spa_get_autotrim@Base 0.8.2 @@ -1915,6 +1925,7 @@ spa_get_last_removal_txg@Base 0.8.2 spa_get_last_scrubbed_txg@Base 2.3 spa_get_log_state@Base 0.8.2 + spa_get_min_alloc_range@Base 2.3.9 spa_get_rootblkptr@Base 0.8.2 spa_get_slop_space@Base 0.8.2 spa_get_stats@Base 0.8.2 @@ -1978,6 +1989,7 @@ spa_load_failed@Base 0.8.2 spa_load_guid@Base 0.8.2 spa_load_l2cache@Base 0.8.2 + spa_load_name@Base 2.3.9 spa_load_note@Base 0.8.2 spa_load_spares@Base 0.8.2 spa_load_state@Base 0.8.2 @@ -2020,6 +2032,7 @@ spa_open@Base 0.8.2 spa_open_ref@Base 0.8.2 spa_open_rewind@Base 0.8.2 + spa_open_txg@Base 2.3.9 spa_preferred_class@Base 0.8.2 spa_prev_software_version@Base 0.8.2 spa_prop_clear_bootfs@Base 0.8.2 @@ -2208,9 +2221,11 @@ txg_sync_waiting@Base 0.8.2 txg_verify@Base 2.0 txg_wait_callbacks@Base 0.8.2 + txg_wait_kick@Base 2.3.9 txg_wait_open@Base 0.8.2 txg_wait_synced@Base 0.8.2 - txg_wait_synced_sig@Base 0.8.3 + txg_wait_synced_flags@Base 2.3.9 +#MISSING: 2.3.9# txg_wait_synced_sig@Base 0.8.3 u8_strcmp@Base 0.8.2 u8_textprep_str@Base 0.8.2 u8_validate@Base 0.8.2 @@ -2410,6 +2425,7 @@ vdev_queue_io_done@Base 0.8.2 vdev_queue_last_offset@Base 0.8.2 vdev_queue_length@Base 0.8.2 + vdev_queue_pool_busy@Base 2.3.9 (arch=arm64)vdev_raidz_aarch64_neon_impl@Base 0.8.2 (arch=arm64)vdev_raidz_aarch64_neonx2_impl@Base 0.8.2 vdev_raidz_attach_check@Base 2.3 @@ -2452,6 +2468,7 @@ vdev_rebuild_restart@Base 2.0 vdev_rebuild_stop_all@Base 2.0 vdev_rebuild_stop_wait@Base 2.0 + vdev_rebuild_txgs@Base 2.3.9 vdev_rele@Base 0.8.2 vdev_removal_max_span@Base 0.8.2 vdev_remove_child@Base 0.8.2 @@ -2462,6 +2479,7 @@ vdev_replacing_ops@Base 0.8.2 vdev_resilver_needed@Base 0.8.2 vdev_root_ops@Base 0.8.2 + vdev_rt_name@Base 2.3.9 vdev_scan_stat_init@Base 0.8.2 vdev_set_min_asize@Base 0.8.2 vdev_set_state@Base 0.8.2 @@ -2481,6 +2499,7 @@ vdev_trim_stop@Base 0.8.2 vdev_trim_stop_all@Base 0.8.2 vdev_trim_stop_wait@Base 0.8.2 + vdev_uberblock_compare@Base 2.3.9 vdev_uberblock_load@Base 0.8.2 vdev_uberblock_sync_list@Base 2.3 vdev_uninitialize@Base 2.1.12 @@ -2998,10 +3017,14 @@ zfs_deadman_failmode@Base 0.8.2 zfs_deadman_synctime_ms@Base 0.8.2 zfs_deadman_ziotime_ms@Base 0.8.2 + zfs_dedup_log_cap@Base 2.3.9 + zfs_dedup_log_flush_entries_max@Base 2.3.9 zfs_dedup_log_flush_entries_min@Base 2.3 zfs_dedup_log_flush_flow_rate_txgs@Base 2.3 zfs_dedup_log_flush_min_time_ms@Base 2.3 - zfs_dedup_log_flush_passes_max@Base 2.3 +#MISSING: 2.3.9# zfs_dedup_log_flush_passes_max@Base 2.3 + zfs_dedup_log_flush_txgs@Base 2.3.9 + zfs_dedup_log_hard_cap@Base 2.3.9 zfs_dedup_log_mem_max@Base 2.3 zfs_dedup_log_mem_max_percent@Base 2.3 zfs_dedup_log_txg_max@Base 2.3 diff -Nru zfs-linux-2.3.2/debian/patches/1000-dont-symlink-zed-scripts.patch zfs-linux-2.3.9/debian/patches/1000-dont-symlink-zed-scripts.patch --- zfs-linux-2.3.2/debian/patches/1000-dont-symlink-zed-scripts.patch 2024-12-25 07:47:46.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/1000-dont-symlink-zed-scripts.patch 2026-08-22 05:15:58.000000000 +0000 @@ -2,7 +2,7 @@ Forwarded: not-needed --- a/cmd/zed/zed.d/Makefile.am +++ b/cmd/zed/zed.d/Makefile.am -@@ -50,7 +50,7 @@ +@@ -51,7 +51,7 @@ zed-install-data-hook: set -x; for f in $(zedconfdefaults); do \ [ -f "$(DESTDIR)$(zedconfdir)/$${f}" ] ||\ [ -L "$(DESTDIR)$(zedconfdir)/$${f}" ] || \ diff -Nru zfs-linux-2.3.2/debian/patches/1001-Prevent-manual-builds-in-the-DKMS-source.patch zfs-linux-2.3.9/debian/patches/1001-Prevent-manual-builds-in-the-DKMS-source.patch --- zfs-linux-2.3.2/debian/patches/1001-Prevent-manual-builds-in-the-DKMS-source.patch 2024-12-25 07:47:46.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/1001-Prevent-manual-builds-in-the-DKMS-source.patch 2026-08-22 05:15:58.000000000 +0000 @@ -26,7 +26,7 @@ +]) --- a/config/user.m4 +++ b/config/user.m4 -@@ -2,6 +2,7 @@ +@@ -3,6 +3,7 @@ dnl # dnl # Default ZFS user configuration dnl # AC_DEFUN([ZFS_AC_CONFIG_USER], [ diff -Nru zfs-linux-2.3.2/debian/patches/1002-Check-for-META-and-DCH-consistency-in-autoconf.patch zfs-linux-2.3.9/debian/patches/1002-Check-for-META-and-DCH-consistency-in-autoconf.patch --- zfs-linux-2.3.2/debian/patches/1002-Check-for-META-and-DCH-consistency-in-autoconf.patch 2025-03-18 12:24:04.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/1002-Check-for-META-and-DCH-consistency-in-autoconf.patch 2026-08-22 09:04:14.000000000 +0000 @@ -2,22 +2,7 @@ Forwarded: not-needed --- a/config/zfs-meta.m4 +++ b/config/zfs-meta.m4 -@@ -1,9 +1,10 @@ - dnl # - dnl # DESCRIPTION: --dnl # Read meta data from the META file. When building from a git repository --dnl # the ZFS_META_RELEASE field will be overwritten if there is an annotated --dnl # tag matching the form ZFS_META_NAME-ZFS_META_VERSION-*. This allows --dnl # for working builds to be uniquely identified using the git commit hash. -+dnl # Read meta data from the META file or the debian/changelog file if it -+dnl # exists. When building from a git repository the ZFS_META_RELEASE field -+dnl # will be overwritten if there is an annotated tag matching the form -+dnl # ZFS_META_NAME-ZFS_META_VERSION-*. This allows for working builds to be -+dnl # uniquely identified using the git commit hash. - dnl # - dnl # The META file format is as follows: - dnl # ^[ ]*KEY:[ \t]+VALUE$ -@@ -49,6 +50,7 @@ +@@ -50,6 +50,7 @@ AC_DEFUN([ZFS_AC_META], [ _zfs_ac_meta_type="none" if test -f "$META"; then _zfs_ac_meta_type="META file" @@ -25,7 +10,7 @@ ZFS_META_NAME=_ZFS_AC_META_GETVAL([(Name|Project|Package)]); if test -n "$ZFS_META_NAME"; then -@@ -69,8 +71,30 @@ +@@ -70,8 +71,30 @@ AC_DEFUN([ZFS_AC_META], [ AC_SUBST([ZFS_META_VERSION]) fi @@ -43,7 +28,7 @@ + fi + ZFS_META_RELEASE=_ZFS_AC_META_GETVAL([Release]); -- if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then +- if test ! -f "$srcdir/.nogitrelease" && git -C "$srcdir" rev-parse --git-dir > /dev/null 2>&1; then + + if test -n "${_dpkg_parsechangelog}"; then + _dpkg_full_version=$(echo "${_dpkg_parsechangelog}" \ @@ -53,7 +38,7 @@ + ZFS_META_RELEASE=${_dpkg_release} + _zfs_ac_meta_type="dpkg-parsechangelog" + fi -+ elif test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then ++ elif test ! -f "$srcdir/.nogitrelease" && git -C "$srcdir" rev-parse --git-dir > /dev/null 2>&1; then _match="${ZFS_META_NAME}-${ZFS_META_VERSION}" - _alias=$(git describe --match=${_match} 2>/dev/null) + _alias=$(git -C "$srcdir" describe --match=${_match} 2>/dev/null) _release=$(echo ${_alias}|sed "s/${ZFS_META_NAME}//"|cut -f3- -d'-'|tr - _) diff -Nru zfs-linux-2.3.2/debian/patches/2100-zfs-load-module.patch zfs-linux-2.3.9/debian/patches/2100-zfs-load-module.patch --- zfs-linux-2.3.2/debian/patches/2100-zfs-load-module.patch 2025-03-18 12:24:04.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/2100-zfs-load-module.patch 2026-08-22 05:15:17.000000000 +0000 @@ -3,28 +3,28 @@ Forwarded: not needed --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in -@@ -3,7 +3,9 @@ +@@ -3,7 +3,9 @@ Description=Import ZFS pools by cache fi Documentation=man:zpool(8) DefaultDependencies=no - Requires=systemd-udev-settle.service + Wants=systemd-udev-settle.service +Requires=zfs-load-module.service After=systemd-udev-settle.service +After=zfs-load-module.service + After=systemd-udev-trigger.service + After=systemd-modules-load.service After=cryptsetup.target - After=multipathd.service - After=systemd-remount-fs.service --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in -@@ -3,7 +3,9 @@ +@@ -3,7 +3,9 @@ Description=Import ZFS pools by device s Documentation=man:zpool(8) DefaultDependencies=no - Requires=systemd-udev-settle.service + Wants=systemd-udev-settle.service +Requires=zfs-load-module.service After=systemd-udev-settle.service +After=zfs-load-module.service + After=systemd-udev-trigger.service + After=systemd-modules-load.service After=cryptsetup.target - After=multipathd.service - Before=zfs-import.target --- /dev/null +++ b/etc/systemd/system/zfs-load-module.service.in @@ -0,0 +1,17 @@ @@ -47,7 +47,7 @@ +WantedBy=zfs.target --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in -@@ -95,7 +95,8 @@ +@@ -95,7 +95,8 @@ install() { for _service in \ "zfs-import-scan.service" \ @@ -59,7 +59,7 @@ --- a/etc/Makefile.am +++ b/etc/Makefile.am -@@ -52,6 +52,7 @@ +@@ -47,6 +47,7 @@ dist_systemdpreset_DATA = \ %D%/systemd/system/50-zfs.preset systemdunit_DATA = \ @@ -69,7 +69,7 @@ %D%/systemd/system/zfs-import.target \ --- a/etc/systemd/system/50-zfs.preset +++ b/etc/systemd/system/50-zfs.preset -@@ -7,3 +7,4 @@ +@@ -7,3 +7,4 @@ enable zfs-share.service enable zfs-zed.service enable zfs-volume-wait.service enable zfs.target diff -Nru zfs-linux-2.3.2/debian/patches/3100-remove-libzfs-module-timeout.patch zfs-linux-2.3.9/debian/patches/3100-remove-libzfs-module-timeout.patch --- zfs-linux-2.3.2/debian/patches/3100-remove-libzfs-module-timeout.patch 2025-06-27 14:23:34.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/3100-remove-libzfs-module-timeout.patch 2026-08-22 05:15:57.000000000 +0000 @@ -7,7 +7,7 @@ Bug: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1760173 --- a/lib/libzfs/os/linux/libzfs_util_os.c +++ b/lib/libzfs/os/linux/libzfs_util_os.c -@@ -110,6 +110,16 @@ +@@ -104,6 +104,16 @@ libzfs_load_module(void) const char *timeout_str = getenv("ZFS_MODULE_TIMEOUT"); int seconds = 10; diff -Nru zfs-linux-2.3.2/debian/patches/force-verbose-rules.patch zfs-linux-2.3.9/debian/patches/force-verbose-rules.patch --- zfs-linux-2.3.2/debian/patches/force-verbose-rules.patch 2025-06-27 14:23:34.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/force-verbose-rules.patch 2026-08-22 05:15:52.000000000 +0000 @@ -3,9 +3,9 @@ Forwarded: not-needed --- a/config/Rules.am +++ b/config/Rules.am -@@ -13,7 +13,7 @@ - -I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@ \ - -I$(top_srcdir)/lib/libzpool/include +@@ -13,7 +13,7 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/lib/libspl/include \ + -I$(top_srcdir)/lib/libspl/include/os/@ac_system_l@ -AM_LIBTOOLFLAGS = --silent +AM_LIBTOOLFLAGS = diff -Nru zfs-linux-2.3.2/debian/patches/move-arcstat-1-to-8.patch zfs-linux-2.3.9/debian/patches/move-arcstat-1-to-8.patch --- zfs-linux-2.3.2/debian/patches/move-arcstat-1-to-8.patch 2024-12-25 07:47:46.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/move-arcstat-1-to-8.patch 2026-08-22 05:15:52.000000000 +0000 @@ -271,7 +271,7 @@ +.El --- a/man/Makefile.am +++ b/man/Makefile.am -@@ -2,7 +2,6 @@ +@@ -3,7 +3,6 @@ dist_noinst_man_MANS = \ %D%/man1/cstyle.1 dist_man_MANS = \ @@ -279,7 +279,7 @@ %D%/man1/raidz_test.1 \ %D%/man1/test-runner.1 \ %D%/man1/zhack.1 \ -@@ -22,6 +21,7 @@ +@@ -23,6 +22,7 @@ dist_man_MANS = \ %D%/man7/zpoolconcepts.7 \ %D%/man7/zpoolprops.7 \ \ diff -Nru zfs-linux-2.3.2/debian/patches/series zfs-linux-2.3.9/debian/patches/series --- zfs-linux-2.3.2/debian/patches/series 2025-06-29 13:53:50.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/series 2026-08-22 05:13:58.000000000 +0000 @@ -21,9 +21,3 @@ fix-pyzfs-version.patch BUILD_EXCLUSIVE_KERNEL_MIN.patch #bump-Linux-Minimum.patch -upstream/0001-Fix-2-bugs-in-non-raw-send-with-encryption.patch -upstream/0002-ARC-Avoid-overflows-in-arc_evict_adj.patch -upstream/0003-Sort-the-blocking-snapshots-list.patch -upstream/0004-Prefer-embedded-blocks-to-dedup.patch -upstream/0005-Add-more-descriptive-destroy-error-message.patch -upstream/0006-Export-correct-symbols-for-Lustre-Direct-IO.patch diff -Nru zfs-linux-2.3.2/debian/patches/ubuntu/zfs-mount-container-start.patch zfs-linux-2.3.9/debian/patches/ubuntu/zfs-mount-container-start.patch --- zfs-linux-2.3.2/debian/patches/ubuntu/zfs-mount-container-start.patch 2024-12-25 07:47:46.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/ubuntu/zfs-mount-container-start.patch 2026-08-22 05:15:51.000000000 +0000 @@ -6,8 +6,8 @@ --- a/etc/systemd/system/zfs-mount.service.in +++ b/etc/systemd/system/zfs-mount.service.in -@@ -5,6 +5,7 @@ - After=systemd-udev-settle.service +@@ -4,6 +4,7 @@ Documentation=man:zfs(8) + DefaultDependencies=no After=zfs-import.target After=systemd-remount-fs.service +After=zfs-load-module.service diff -Nru zfs-linux-2.3.2/debian/patches/upstream/0001-Fix-2-bugs-in-non-raw-send-with-encryption.patch zfs-linux-2.3.9/debian/patches/upstream/0001-Fix-2-bugs-in-non-raw-send-with-encryption.patch --- zfs-linux-2.3.2/debian/patches/upstream/0001-Fix-2-bugs-in-non-raw-send-with-encryption.patch 2025-06-29 13:47:39.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/upstream/0001-Fix-2-bugs-in-non-raw-send-with-encryption.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -From f28c685a84e6e51865354656fb639c92c0fdafd9 Mon Sep 17 00:00:00 2001 -From: George Amanakis -Date: Mon, 19 May 2025 18:55:00 +0200 -Subject: [PATCH] Fix 2 bugs in non-raw send with encryption - -Bisecting identified the redacted send/receive as the source of the bug -for issue #12014. Specifically the call to -dsl_dataset_hold_obj(&fromds) has been replaced by -dsl_dataset_hold_obj_flags() which passes a DECRYPT flag and creates -a key mapping. A subsequent dsl_dataset_rele_flag(&fromds) is missing -and the key mapping is not cleared. This may be inadvertedly used, which -results in arc_untransform failing with ECKSUM in: - arc_untransform+0x96/0xb0 [zfs] - dbuf_read_verify_dnode_crypt+0x196/0x350 [zfs] - dbuf_read+0x56/0x770 [zfs] - dmu_buf_hold_by_dnode+0x4a/0x80 [zfs] - zap_lockdir+0x87/0xf0 [zfs] - zap_lookup_norm+0x5c/0xd0 [zfs] - zap_lookup+0x16/0x20 [zfs] - zfs_get_zplprop+0x8d/0x1d0 [zfs] - setup_featureflags+0x267/0x2e0 [zfs] - dmu_send_impl+0xe7/0xcb0 [zfs] - dmu_send_obj+0x265/0x360 [zfs] - zfs_ioc_send+0x10c/0x280 [zfs] - -Fix this by restoring the call to dsl_dataset_hold_obj(). - -The same applies for to_ds: here replace dsl_dataset_rele(&to_ds) with -dsl_dataset_rele_flags(). - -Both leaked key mappings will cause a panic when exporting the -sending pool or unloading the zfs module after a non-raw send from -an encrypted filesystem. - -Contributions-by: Hank Barta -Contributions-by: Paul Dagnelie -Reviewed-by: Alexander Motin -Reviewed-by: Richard Yao -Reviewed-by: Rob Norris -Reviewed-by: Brian Behlendorf -Signed-off-by: George Amanakis -Closes #12014 -Closes #17340 -(cherry picked from commit ea74cdedda8b9575d7e94198d38f12943ac41343) ---- - module/zfs/dmu_send.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c -index e21af11d20d1..4f27f3df0e55 100644 ---- a/module/zfs/dmu_send.c -+++ b/module/zfs/dmu_send.c -@@ -2687,8 +2687,8 @@ dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap, - } - - if (fromsnap != 0) { -- err = dsl_dataset_hold_obj_flags(dspp.dp, fromsnap, dsflags, -- FTAG, &fromds); -+ err = dsl_dataset_hold_obj(dspp.dp, fromsnap, FTAG, &fromds); -+ - if (err != 0) { - dsl_dataset_rele_flags(dspp.to_ds, dsflags, FTAG); - dsl_pool_rele(dspp.dp, FTAG); -@@ -2740,7 +2740,7 @@ dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap, - kmem_free(dspp.fromredactsnaps, - dspp.numfromredactsnaps * sizeof (uint64_t)); - -- dsl_dataset_rele(dspp.to_ds, FTAG); -+ dsl_dataset_rele_flags(dspp.to_ds, dsflags, FTAG); - return (err); - } - diff -Nru zfs-linux-2.3.2/debian/patches/upstream/0002-ARC-Avoid-overflows-in-arc_evict_adj.patch zfs-linux-2.3.9/debian/patches/upstream/0002-ARC-Avoid-overflows-in-arc_evict_adj.patch --- zfs-linux-2.3.2/debian/patches/upstream/0002-ARC-Avoid-overflows-in-arc_evict_adj.patch 2025-06-29 13:47:48.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/upstream/0002-ARC-Avoid-overflows-in-arc_evict_adj.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -From 9b446fbb605e8ab938b45cda6c07fe0bbc865fc4 Mon Sep 17 00:00:00 2001 -From: Alexander Motin -Date: Tue, 6 May 2025 12:31:38 -0400 -Subject: [PATCH] ARC: Avoid overflows in arc_evict_adj() (#17255) - -With certain combinations of target ARC states balance and ghost -hit rates it was possible to get the fractions outside of allowed -range. This patch limits maximum balance adjustment speed, which -should make it impossible, and also asserts it. - -Fixes #17210 -Signed-off-by: Alexander Motin -Sponsored by: iXsystems, Inc. -Reviewed-by: Rob Norris -Reviewed-by: Tony Hutter -(cherry picked from commit b1ccab17213b38aa269e85c6b371d69eb25b6ca9) ---- - module/zfs/arc.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/module/zfs/arc.c b/module/zfs/arc.c -index 13590410acec..0e8b3b321bc7 100644 ---- a/module/zfs/arc.c -+++ b/module/zfs/arc.c -@@ -4200,15 +4200,17 @@ static uint64_t - arc_evict_adj(uint64_t frac, uint64_t total, uint64_t up, uint64_t down, - uint_t balance) - { -- if (total < 8 || up + down == 0) -+ if (total < 32 || up + down == 0) - return (frac); - - /* -- * We should not have more ghost hits than ghost size, but they -- * may get close. Restrict maximum adjustment in that case. -+ * We should not have more ghost hits than ghost size, but they may -+ * get close. To avoid overflows below up/down should not be bigger -+ * than 1/5 of total. But to limit maximum adjustment speed restrict -+ * it some more. - */ -- if (up + down >= total / 4) { -- uint64_t scale = (up + down) / (total / 8); -+ if (up + down >= total / 16) { -+ uint64_t scale = (up + down) / (total / 32); - up /= scale; - down /= scale; - } -@@ -4217,6 +4219,7 @@ arc_evict_adj(uint64_t frac, uint64_t total, uint64_t up, uint64_t down, - int s = highbit64(total); - s = MIN(64 - s, 32); - -+ ASSERT3U(frac, <=, 1ULL << 32); - uint64_t ofrac = (1ULL << 32) - frac; - - if (frac >= 4 * ofrac) -@@ -4227,6 +4230,8 @@ arc_evict_adj(uint64_t frac, uint64_t total, uint64_t up, uint64_t down, - down = (down << s) / (total >> (32 - s)); - down = down * 100 / balance; - -+ ASSERT3U(up, <=, (1ULL << 32) - frac); -+ ASSERT3U(down, <=, frac); - return (frac + up - down); - } - diff -Nru zfs-linux-2.3.2/debian/patches/upstream/0003-Sort-the-blocking-snapshots-list.patch zfs-linux-2.3.9/debian/patches/upstream/0003-Sort-the-blocking-snapshots-list.patch --- zfs-linux-2.3.2/debian/patches/upstream/0003-Sort-the-blocking-snapshots-list.patch 2025-06-29 13:47:53.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/upstream/0003-Sort-the-blocking-snapshots-list.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -From ad63ab2d90c5072944b71b0ccd11531e8665c843 Mon Sep 17 00:00:00 2001 -From: Artem -Date: Fri, 2 May 2025 03:40:23 +0300 -Subject: [PATCH] Sort the blocking snapshots list #12751 (#17264) - -When multiple snapshots prevent the destruction/rollback of the -respective dataset/snapshot/volume via zfs destroy or zfs rollback, -the error message does not list the blocking snapshots sorted -according to their order of creation. This causes inconvenience and can -lead to confusion, and also creates a contrast with a returned message -from zfs list -t snap function. - -Closes: #12751 - -Signed-off-by: Artem-OSSRevival -Reviewed-by: Alexander Motin -Reviewed-by: Tony Hutter -(cherry picked from commit 27f3d94940490d891c70e0c148f80d0c0ce09ed4) ---- - cmd/zfs/zfs_main.c | 2 +- - lib/libzfs/libzfs_iter.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c -index 2349373402ad..c9ebae575aeb 100644 ---- a/cmd/zfs/zfs_main.c -+++ b/cmd/zfs/zfs_main.c -@@ -4440,7 +4440,7 @@ zfs_do_rollback(int argc, char **argv) - if (cb.cb_create > 0) - min_txg = cb.cb_create; - -- if ((ret = zfs_iter_snapshots_v2(zhp, 0, rollback_check, &cb, -+ if ((ret = zfs_iter_snapshots_sorted_v2(zhp, 0, rollback_check, &cb, - min_txg, 0)) != 0) - goto out; - if ((ret = zfs_iter_bookmarks_v2(zhp, 0, rollback_check, &cb)) != 0) -diff --git a/lib/libzfs/libzfs_iter.c b/lib/libzfs/libzfs_iter.c -index 1ce833c87ec6..1844ce1624b3 100644 ---- a/lib/libzfs/libzfs_iter.c -+++ b/lib/libzfs/libzfs_iter.c -@@ -570,7 +570,7 @@ iter_dependents_cb(zfs_handle_t *zhp, void *arg) - err = zfs_iter_filesystems_v2(zhp, ida->flags, - iter_dependents_cb, ida); - if (err == 0) -- err = zfs_iter_snapshots_v2(zhp, ida->flags, -+ err = zfs_iter_snapshots_sorted_v2(zhp, ida->flags, - iter_dependents_cb, ida, 0, 0); - ida->stack = isf.next; - } diff -Nru zfs-linux-2.3.2/debian/patches/upstream/0004-Prefer-embedded-blocks-to-dedup.patch zfs-linux-2.3.9/debian/patches/upstream/0004-Prefer-embedded-blocks-to-dedup.patch --- zfs-linux-2.3.2/debian/patches/upstream/0004-Prefer-embedded-blocks-to-dedup.patch 2025-06-29 13:47:58.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/upstream/0004-Prefer-embedded-blocks-to-dedup.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -From 602fecc316ae00febe2ba1af7d2ef5b9e2a82437 Mon Sep 17 00:00:00 2001 -From: Alexander Motin -Date: Thu, 13 Mar 2025 13:27:15 -0400 -Subject: [PATCH] Prefer embedded blocks to dedup - -Since embedded blocks introduction 11 years ago, their writing was -blocked if dedup is enabled. After searching through the modern -code I see no reason for this restriction to exist. Same time -embedded blocks are dramatically cheaper. Even regular write of -so small blocks would likely be cheaper than deduplication, even -if the last is successful, not mentioning otherwise. - -Reviewed-by: Allan Jude -Reviewed-by: Tony Hutter -Signed-off-by: Alexander Motin -Sponsored by: iXsystems, Inc. -Closes #17113 -(cherry picked from commit 09f4dd06c3e3275e1aa0b8d12a894cf140d19c3f) ---- - module/zfs/zio.c | 3 +-- - .../cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh | 2 +- - tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh | 2 +- - 3 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/module/zfs/zio.c b/module/zfs/zio.c -index f0328e84e1a6..132f6c677e58 100644 ---- a/module/zfs/zio.c -+++ b/module/zfs/zio.c -@@ -2006,8 +2006,7 @@ zio_write_compress(zio_t *zio) - compress = ZIO_COMPRESS_OFF; - if (cabd != NULL) - abd_free(cabd); -- } else if (!zp->zp_dedup && !zp->zp_encrypt && -- psize <= BPE_PAYLOAD_SIZE && -+ } else if (psize <= BPE_PAYLOAD_SIZE && !zp->zp_encrypt && - zp->zp_level == 0 && !DMU_OT_HAS_FILL(zp->zp_type) && - spa_feature_is_enabled(spa, SPA_FEATURE_EMBEDDED_DATA)) { - void *cbuf = abd_borrow_buf_copy(cabd, lsize); -diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh -index 0f8b0dfd6c97..8ef3a66ad0d9 100755 ---- a/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh -+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh -@@ -76,7 +76,7 @@ log_must zpool prefetch -t ddt $TESTPOOL - # to generate a reasonable size DDT for testing purposes. - - DATASET=$TESTPOOL/ddt --log_must zfs create -o dedup=on $DATASET -+log_must zfs create -o compression=off -o dedup=on $DATASET - MNTPOINT=$(get_prop mountpoint $TESTPOOL/ddt) - - log_note "Generating dataset ..." -diff --git a/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh b/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh -index 141286ba7c07..bcb8a89dbb4d 100755 ---- a/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh -+++ b/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh -@@ -80,7 +80,7 @@ function do_setup - log_must truncate -s 5G $VDEV_GENERAL - # Use 'xattr=sa' to prevent selinux xattrs influencing our accounting - log_must zpool create -o ashift=12 -f -O xattr=sa -m $MOUNTDIR $POOL $VDEV_GENERAL -- log_must zfs set dedup=on $POOL -+ log_must zfs set compression=off dedup=on $POOL - log_must set_tunable32 TXG_TIMEOUT 600 - } - diff -Nru zfs-linux-2.3.2/debian/patches/upstream/0005-Add-more-descriptive-destroy-error-message.patch zfs-linux-2.3.9/debian/patches/upstream/0005-Add-more-descriptive-destroy-error-message.patch --- zfs-linux-2.3.2/debian/patches/upstream/0005-Add-more-descriptive-destroy-error-message.patch 2025-06-29 13:48:01.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/upstream/0005-Add-more-descriptive-destroy-error-message.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -From 0956fd736cd4ea054a446541a1596d1ac441ca0b Mon Sep 17 00:00:00 2001 -From: Artem-OSSRevival -Date: Thu, 24 Apr 2025 04:17:52 +0300 -Subject: [PATCH] Add more descriptive destroy error message -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Reviewed-by: Tony Hutter -Reviewed-by: Alexander Motin -Reviewed-by: Tino Reichardt -Reviewed by: Attila Fülöp -Signed-off-by: Artem-OSSRevival -Fixes: #14538 -Closes: #17234 -(cherry picked from commit 37a3e26552158cb30a0bac0719c8dca40e22f245) ---- - lib/libzfs/libzfs_dataset.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c -index 8d9639221c22..576493338613 100644 ---- a/lib/libzfs/libzfs_dataset.c -+++ b/lib/libzfs/libzfs_dataset.c -@@ -4022,6 +4022,26 @@ zfs_destroy_snaps_nvl(libzfs_handle_t *hdl, nvlist_t *snaps, boolean_t defer) - dgettext(TEXT_DOMAIN, "snapshot is cloned")); - ret = zfs_error(hdl, EZFS_EXISTS, errbuf); - break; -+ case EBUSY: { -+ nvlist_t *existing_holds; -+ int err = lzc_get_holds(nvpair_name(pair), -+ &existing_holds); -+ -+ /* check the presence of holders */ -+ if (err == 0 && !nvlist_empty(existing_holds)) { -+ zfs_error_aux(hdl, -+ dgettext(TEXT_DOMAIN, "it's being held. " -+ "Run 'zfs holds -r %s' to see holders."), -+ nvpair_name(pair)); -+ ret = zfs_error(hdl, EBUSY, errbuf); -+ } else { -+ ret = zfs_standard_error(hdl, errno, errbuf); -+ } -+ -+ if (err == 0) -+ nvlist_free(existing_holds); -+ break; -+ } - default: - ret = zfs_standard_error(hdl, errno, errbuf); - break; diff -Nru zfs-linux-2.3.2/debian/patches/upstream/0006-Export-correct-symbols-for-Lustre-Direct-IO.patch zfs-linux-2.3.9/debian/patches/upstream/0006-Export-correct-symbols-for-Lustre-Direct-IO.patch --- zfs-linux-2.3.2/debian/patches/upstream/0006-Export-correct-symbols-for-Lustre-Direct-IO.patch 2025-06-29 13:48:04.000000000 +0000 +++ zfs-linux-2.3.9/debian/patches/upstream/0006-Export-correct-symbols-for-Lustre-Direct-IO.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -From a77d641f01b38726acba487219e553915403df87 Mon Sep 17 00:00:00 2001 -From: Brian Atkinson -Date: Thu, 24 Apr 2025 13:55:21 -0400 -Subject: [PATCH] Export correct symbols for Lustre Direct I/O - -Originally the Lustre ZFS OSD code was going to use zfs_uio_t structs -for supporting Direct I/O with ZFS. However, this has changed to using -abd_t structs instead. This exports the proper symbols that will be used -by the Lustre ZFS OSD code. - -Reviewed-by: Tony Hutter -Reviewed-by: Alexander Motin -Signed-off-by: Brian Atkinson -Closes #17256 -(cherry picked from commit 7031a48c7077822bf6e3c53b3e753155ee7fbc1c) ---- - module/os/linux/zfs/abd_os.c | 2 ++ - module/zfs/abd.c | 2 ++ - module/zfs/dmu_direct.c | 4 ++-- - 3 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c -index 8e4d271976ea..e1140b31a97a 100644 ---- a/module/os/linux/zfs/abd_os.c -+++ b/module/os/linux/zfs/abd_os.c -@@ -1340,6 +1340,8 @@ abd_bio_map_off(struct bio *bio, abd_t *abd, - return (io_size); - } - -+EXPORT_SYMBOL(abd_alloc_from_pages); -+ - /* Tunable Parameters */ - module_param(zfs_abd_scatter_enabled, int, 0644); - MODULE_PARM_DESC(zfs_abd_scatter_enabled, -diff --git a/module/zfs/abd.c b/module/zfs/abd.c -index c2784b9af035..826928e67350 100644 ---- a/module/zfs/abd.c -+++ b/module/zfs/abd.c -@@ -1210,3 +1210,5 @@ abd_raidz_rec_iterate(abd_t **cabds, abd_t **tabds, - } - abd_exit_critical(flags); - } -+ -+EXPORT_SYMBOL(abd_free); -diff --git a/module/zfs/dmu_direct.c b/module/zfs/dmu_direct.c -index 319aaf30be5a..2d5253a5d060 100644 ---- a/module/zfs/dmu_direct.c -+++ b/module/zfs/dmu_direct.c -@@ -393,5 +393,5 @@ dmu_write_uio_direct(dnode_t *dn, zfs_uio_t *uio, uint64_t size, dmu_tx_t *tx) - } - #endif /* _KERNEL */ - --EXPORT_SYMBOL(dmu_read_uio_direct); --EXPORT_SYMBOL(dmu_write_uio_direct); -+EXPORT_SYMBOL(dmu_read_abd); -+EXPORT_SYMBOL(dmu_write_abd); diff -Nru zfs-linux-2.3.2/debian/rules zfs-linux-2.3.9/debian/rules --- zfs-linux-2.3.2/debian/rules 2025-03-18 12:39:01.000000000 +0000 +++ zfs-linux-2.3.9/debian/rules 2026-08-22 18:39:24.000000000 +0000 @@ -95,6 +95,8 @@ @# We only want the files needed to build the modules install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \ '$(CURDIR)/scripts/dkms.postbuild' + install -D -t '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts' \ + '$(CURDIR)/scripts/objtool-wrapper.in' $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;) @# Do not include FreeBSD kernel sources in the Linux DKMS package @@ -111,8 +113,8 @@ @# - zfs.release$ @# * Takes care of spaces and tabs @# * Remove reference to ZFS_AC_PACKAGE - awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ {\ - if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/(Makefile|sys|os\/(Makefile|linux))|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/) \ + awk '/^AC_CONFIG_FILES\(\[/,/\]\)/ {\ + if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/(Makefile|sys|os\/(Makefile|linux))|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))|scripts\/objtool-wrapper.*\]\)$$/) \ {next} } {print}' \ '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' | sed '/ZFS_AC_PACKAGE/d' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs. diff -Nru zfs-linux-2.3.2/debian/zfsutils-linux.install zfs-linux-2.3.9/debian/zfsutils-linux.install --- zfs-linux-2.3.2/debian/zfsutils-linux.install 2025-03-18 12:38:51.000000000 +0000 +++ zfs-linux-2.3.9/debian/zfsutils-linux.install 2026-08-22 05:27:18.000000000 +0000 @@ -10,6 +10,7 @@ usr/lib/systemd/system/zfs-load-key.service usr/lib/systemd/system/zfs-load-module.service usr/lib/systemd/system/zfs-mount.service +usr/lib/systemd/system/zfs-mount@.service usr/lib/systemd/system/zfs-scrub-monthly@.timer usr/lib/systemd/system/zfs-scrub-weekly@.timer usr/lib/systemd/system/zfs-scrub@.service @@ -74,6 +75,7 @@ usr/share/man/man8/zfs-redact.8 usr/share/man/man8/zfs-release.8 usr/share/man/man8/zfs-rename.8 +usr/share/man/man8/zfs-rewrite.8 usr/share/man/man8/zfs-rollback.8 usr/share/man/man8/zfs-send.8 usr/share/man/man8/zfs-set.8 diff -Nru zfs-linux-2.3.2/etc/Makefile.am zfs-linux-2.3.9/etc/Makefile.am --- zfs-linux-2.3.2/etc/Makefile.am 2025-05-01 18:23:23.734214753 +0000 +++ zfs-linux-2.3.9/etc/Makefile.am 2026-08-21 20:57:12.301341822 +0000 @@ -1,9 +1,4 @@ -sudoersddir = $(sysconfdir)/sudoers.d -sudoersd_DATA = \ - %D%/sudoers.d/zfs - -dist_noinst_DATA += $(sudoersd_DATA) - +# SPDX-License-Identifier: CDDL-1.0 sysconf_zfsdir = $(sysconfdir)/zfs @@ -56,6 +51,7 @@ %D%/systemd/system/zfs-import-scan.service \ %D%/systemd/system/zfs-import.target \ %D%/systemd/system/zfs-mount.service \ + %D%/systemd/system/zfs-mount@.service \ %D%/systemd/system/zfs-scrub-monthly@.timer \ %D%/systemd/system/zfs-scrub-weekly@.timer \ %D%/systemd/system/zfs-scrub@.service \ diff -Nru zfs-linux-2.3.2/etc/init.d/README.md zfs-linux-2.3.9/etc/init.d/README.md --- zfs-linux-2.3.2/etc/init.d/README.md 2025-05-01 18:23:23.735214767 +0000 +++ zfs-linux-2.3.9/etc/init.d/README.md 2026-08-21 20:57:12.301533746 +0000 @@ -1,5 +1,5 @@ DESCRIPTION - These script were written with the primary intention of being portable and + These scripts were written with the primary intention of being portable and usable on as many systems as possible. This is, in practice, usually not possible. But the intention is there. diff -Nru zfs-linux-2.3.2/etc/sudoers.d/zfs zfs-linux-2.3.9/etc/sudoers.d/zfs --- zfs-linux-2.3.2/etc/sudoers.d/zfs 2025-05-01 18:23:23.735214767 +0000 +++ zfs-linux-2.3.9/etc/sudoers.d/zfs 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -## -## Allow any user to run `zpool iostat/status -c smart` in order -## to read basic SMART health statistics for a pool. -## -## CAUTION: Any syntax error introduced here will break sudo. -## Editing with 'visudo' is recommended: visudo -f /etc/sudoers.d/zfs -## - -# ALL ALL = (root) NOPASSWD: /usr/sbin/smartctl -a /dev/[hsv]d[a-z0-9]* diff -Nru zfs-linux-2.3.2/etc/systemd/system/zfs-import-cache.service.in zfs-linux-2.3.9/etc/systemd/system/zfs-import-cache.service.in --- zfs-linux-2.3.2/etc/systemd/system/zfs-import-cache.service.in 2025-05-01 18:23:23.735214767 +0000 +++ zfs-linux-2.3.9/etc/systemd/system/zfs-import-cache.service.in 2026-08-21 20:57:12.301974401 +0000 @@ -2,8 +2,10 @@ Description=Import ZFS pools by cache file Documentation=man:zpool(8) DefaultDependencies=no -Requires=systemd-udev-settle.service +Wants=systemd-udev-settle.service After=systemd-udev-settle.service +After=systemd-udev-trigger.service +After=systemd-modules-load.service After=cryptsetup.target After=multipathd.service After=systemd-remount-fs.service diff -Nru zfs-linux-2.3.2/etc/systemd/system/zfs-import-scan.service.in zfs-linux-2.3.9/etc/systemd/system/zfs-import-scan.service.in --- zfs-linux-2.3.2/etc/systemd/system/zfs-import-scan.service.in 2025-05-01 18:23:23.735214767 +0000 +++ zfs-linux-2.3.9/etc/systemd/system/zfs-import-scan.service.in 2026-08-21 20:57:12.301974401 +0000 @@ -2,8 +2,10 @@ Description=Import ZFS pools by device scanning Documentation=man:zpool(8) DefaultDependencies=no -Requires=systemd-udev-settle.service +Wants=systemd-udev-settle.service After=systemd-udev-settle.service +After=systemd-udev-trigger.service +After=systemd-modules-load.service After=cryptsetup.target After=multipathd.service Before=zfs-import.target diff -Nru zfs-linux-2.3.2/etc/systemd/system/zfs-mount.service.in zfs-linux-2.3.9/etc/systemd/system/zfs-mount.service.in --- zfs-linux-2.3.2/etc/systemd/system/zfs-mount.service.in 2025-05-01 18:23:23.735214767 +0000 +++ zfs-linux-2.3.9/etc/systemd/system/zfs-mount.service.in 2026-08-21 20:57:12.301974401 +0000 @@ -2,7 +2,6 @@ Description=Mount ZFS filesystems Documentation=man:zfs(8) DefaultDependencies=no -After=systemd-udev-settle.service After=zfs-import.target After=systemd-remount-fs.service Before=local-fs.target diff -Nru zfs-linux-2.3.2/etc/systemd/system/zfs-mount@.service.in zfs-linux-2.3.9/etc/systemd/system/zfs-mount@.service.in --- zfs-linux-2.3.2/etc/systemd/system/zfs-mount@.service.in 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/etc/systemd/system/zfs-mount@.service.in 2026-08-21 20:57:12.301974401 +0000 @@ -0,0 +1,25 @@ +[Unit] +Description=Mount ZFS filesystem %I +Documentation=man:zfs(8) +DefaultDependencies=no +After=zfs-import.target +After=zfs-mount.service +After=systemd-remount-fs.service +Before=local-fs.target +ConditionPathIsDirectory=/sys/module/zfs + +# This merely tells the service manager +# that unmounting everything undoes the +# effect of this service. No extra logic +# is ran as a result of these settings. +Conflicts=umount.target +Before=umount.target + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=-@initconfdir@/zfs +ExecStart=@sbindir@/zfs mount -R %I + +[Install] +WantedBy=zfs.target diff -Nru zfs-linux-2.3.2/etc/systemd/system/zfs-volume-wait.service.in zfs-linux-2.3.9/etc/systemd/system/zfs-volume-wait.service.in --- zfs-linux-2.3.2/etc/systemd/system/zfs-volume-wait.service.in 2025-05-01 18:23:23.736214781 +0000 +++ zfs-linux-2.3.9/etc/systemd/system/zfs-volume-wait.service.in 2026-08-21 20:57:12.301974401 +0000 @@ -1,7 +1,6 @@ [Unit] Description=Wait for ZFS Volume (zvol) links in /dev DefaultDependencies=no -After=systemd-udev-settle.service After=zfs-import.target ConditionPathIsDirectory=/sys/module/zfs diff -Nru zfs-linux-2.3.2/etc/systemd/system-generators/zfs-mount-generator.c zfs-linux-2.3.9/etc/systemd/system-generators/zfs-mount-generator.c --- zfs-linux-2.3.2/etc/systemd/system-generators/zfs-mount-generator.c 2025-05-01 18:23:23.735214767 +0000 +++ zfs-linux-2.3.9/etc/systemd/system-generators/zfs-mount-generator.c 2026-08-21 20:57:12.301816707 +0000 @@ -202,6 +202,7 @@ void **tofree = tofree_all; char *toktmp; + const char *toktmp2; /* BEGIN CSTYLED */ const char *dataset = strtok_r(line, "\t", &toktmp); char *p_mountpoint = strtok_r(NULL, "\t", &toktmp); @@ -226,8 +227,8 @@ /* END CSTYLED */ size_t pool_len = strlen(dataset); - if ((toktmp = strchr(dataset, '/')) != NULL) - pool_len = toktmp - dataset; + if ((toktmp2 = strchr(dataset, '/')) != NULL) + pool_len = toktmp2 - dataset; const char *pool = *(tofree++) = strndup(dataset, pool_len); if (p_nbmand == NULL) { diff -Nru zfs-linux-2.3.2/include/Makefile.am zfs-linux-2.3.9/include/Makefile.am --- zfs-linux-2.3.2/include/Makefile.am 2025-05-01 18:23:23.736214781 +0000 +++ zfs-linux-2.3.9/include/Makefile.am 2026-08-21 20:57:12.302424507 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 if BUILD_LINUX include $(srcdir)/%D%/os/linux/Makefile.am endif diff -Nru zfs-linux-2.3.2/include/Makefile.in zfs-linux-2.3.9/include/Makefile.in --- zfs-linux-2.3.2/include/Makefile.in 2025-05-01 18:45:11.075847285 +0000 +++ zfs-linux-2.3.9/include/Makefile.in 2026-08-21 21:15:40.054626626 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -122,17 +122,22 @@ $(top_srcdir)/config/kernel-block-device-operations.m4 \ $(top_srcdir)/config/kernel-commit-metadata.m4 \ $(top_srcdir)/config/kernel-config-defined.m4 \ - $(top_srcdir)/config/kernel-copy-from-user-inatomic.m4 \ $(top_srcdir)/config/kernel-cpu_has_feature.m4 \ $(top_srcdir)/config/kernel-declare-event-class.m4 \ + $(top_srcdir)/config/kernel-dentry-alias.m4 \ + $(top_srcdir)/config/kernel-dentry-operations.m4 \ $(top_srcdir)/config/kernel-discard-granularity.m4 \ + $(top_srcdir)/config/kernel-drop-inode.m4 \ $(top_srcdir)/config/kernel-file.m4 \ + $(top_srcdir)/config/kernel-filelock.m4 \ $(top_srcdir)/config/kernel-filemap-splice-read.m4 \ $(top_srcdir)/config/kernel-flush_dcache_page.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ - $(top_srcdir)/config/kernel-follow-down-one.m4 \ + $(top_srcdir)/config/kernel-follow-down.m4 \ $(top_srcdir)/config/kernel-fpu.m4 \ - $(top_srcdir)/config/kernel-fst-mount.m4 \ + $(top_srcdir)/config/kernel-free-inode.m4 \ + $(top_srcdir)/config/kernel-fs-context.m4 \ + $(top_srcdir)/config/kernel-fs-parse.m4 \ $(top_srcdir)/config/kernel-fsync-bdev.m4 \ $(top_srcdir)/config/kernel-generic_fadvise.m4 \ $(top_srcdir)/config/kernel-generic_fillattr.m4 \ @@ -140,15 +145,18 @@ $(top_srcdir)/config/kernel-genhd-flags.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-iattr-vfsid.m4 \ + $(top_srcdir)/config/kernel-idmap.m4 \ $(top_srcdir)/config/kernel-idmap_mnt_api.m4 \ $(top_srcdir)/config/kernel-inode-create.m4 \ $(top_srcdir)/config/kernel-inode-getattr.m4 \ $(top_srcdir)/config/kernel-inode-lookup.m4 \ $(top_srcdir)/config/kernel-inode-permission.m4 \ $(top_srcdir)/config/kernel-inode-setattr.m4 \ + $(top_srcdir)/config/kernel-inode-state.m4 \ $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \ $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \ + $(top_srcdir)/config/kernel-kasan-enabled.m4 \ $(top_srcdir)/config/kernel-kmap-atomic-args.m4 \ $(top_srcdir)/config/kernel-kmap-local-page.m4 \ $(top_srcdir)/config/kernel-kmem.m4 \ @@ -161,23 +169,24 @@ $(top_srcdir)/config/kernel-mknod.m4 \ $(top_srcdir)/config/kernel-mm-page-flags.m4 \ $(top_srcdir)/config/kernel-mm-pagemap.m4 \ + $(top_srcdir)/config/kernel-namespace.m4 \ $(top_srcdir)/config/kernel-objtool.m4 \ $(top_srcdir)/config/kernel-pagemap-folio_wait_bit.m4 \ + $(top_srcdir)/config/kernel-pagemap-readahead-page.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ $(top_srcdir)/config/kernel-percpu.m4 \ $(top_srcdir)/config/kernel-pin-user-pages.m4 \ $(top_srcdir)/config/kernel-proc-operations.m4 \ - $(top_srcdir)/config/kernel-readpages.m4 \ $(top_srcdir)/config/kernel-reclaim_state.m4 \ $(top_srcdir)/config/kernel-register_sysctl_table.m4 \ $(top_srcdir)/config/kernel-rename.m4 \ $(top_srcdir)/config/kernel-revalidate-disk-size.m4 \ $(top_srcdir)/config/kernel-sb-dying.m4 \ + $(top_srcdir)/config/kernel-sb-wb-err.m4 \ $(top_srcdir)/config/kernel-sched.m4 \ $(top_srcdir)/config/kernel-security-inode-init.m4 \ $(top_srcdir)/config/kernel-set-nlink.m4 \ $(top_srcdir)/config/kernel-setattr-prepare.m4 \ - $(top_srcdir)/config/kernel-sget-args.m4 \ $(top_srcdir)/config/kernel-show-options.m4 \ $(top_srcdir)/config/kernel-shrink.m4 \ $(top_srcdir)/config/kernel-siginfo.m4 \ @@ -185,6 +194,7 @@ $(top_srcdir)/config/kernel-strlcpy.m4 \ $(top_srcdir)/config/kernel-symlink.m4 \ $(top_srcdir)/config/kernel-sysfs.m4 \ + $(top_srcdir)/config/kernel-timer.m4 \ $(top_srcdir)/config/kernel-tmpfile.m4 \ $(top_srcdir)/config/kernel-totalhigh_pages.m4 \ $(top_srcdir)/config/kernel-totalram-pages-func.m4 \ @@ -198,8 +208,11 @@ $(top_srcdir)/config/kernel-vfs-migrate_folio.m4 \ $(top_srcdir)/config/kernel-vfs-migratepage.m4 \ $(top_srcdir)/config/kernel-vfs-read_folio.m4 \ + $(top_srcdir)/config/kernel-vfs-readpages.m4 \ $(top_srcdir)/config/kernel-vfs-set_page_dirty.m4 \ - $(top_srcdir)/config/kernel-writepage_t.m4 \ + $(top_srcdir)/config/kernel-vfs-writepage.m4 \ + $(top_srcdir)/config/kernel-workqueue.m4 \ + $(top_srcdir)/config/kernel-writeback.m4 \ $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel-zero_page.m4 \ $(top_srcdir)/config/kernel.m4 $(top_srcdir)/config/lib-ld.m4 \ @@ -213,6 +226,7 @@ $(top_srcdir)/config/mount-helper.m4 \ $(top_srcdir)/config/nls.m4 $(top_srcdir)/config/pkg.m4 \ $(top_srcdir)/config/po.m4 $(top_srcdir)/config/progtest.m4 \ + $(top_srcdir)/config/toolchain-cfi.m4 \ $(top_srcdir)/config/toolchain-simd.m4 \ $(top_srcdir)/config/user-aio.h.m4 \ $(top_srcdir)/config/user-backtrace.m4 \ @@ -230,8 +244,10 @@ $(top_srcdir)/config/user-libunwind.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-makedev.m4 \ + $(top_srcdir)/config/user-mount-setattr.m4 \ $(top_srcdir)/config/user-pam.m4 \ $(top_srcdir)/config/user-runstatedir.m4 \ + $(top_srcdir)/config/user-statx.m4 \ $(top_srcdir)/config/user-systemd.m4 \ $(top_srcdir)/config/user-sysvinit.m4 \ $(top_srcdir)/config/user-udev.m4 \ @@ -278,6 +294,7 @@ os/linux/kernel/linux/mm_compat.h \ os/linux/kernel/linux/mod_compat.h \ os/linux/kernel/linux/page_compat.h \ + os/linux/kernel/linux/pagemap_compat.h \ os/linux/kernel/linux/simd.h \ os/linux/kernel/linux/simd_aarch64.h \ os/linux/kernel/linux/simd_arm.h \ @@ -285,6 +302,7 @@ os/linux/kernel/linux/simd_x86.h \ os/linux/kernel/linux/utsname_compat.h \ os/linux/kernel/linux/vfs_compat.h \ + os/linux/kernel/linux/workqueue_compat.h \ os/linux/kernel/linux/xattr_compat.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -533,6 +551,8 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/os/freebsd/Makefile.am \ $(srcdir)/os/linux/Makefile.am @@ -572,11 +592,10 @@ CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ +CPP = @CPP@ CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPU_COUNT = @CPU_COUNT@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEBUGINFO_ZFS = @DEBUGINFO_ZFS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ @@ -606,10 +625,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ FORMAT_OVERFLOW = @FORMAT_OVERFLOW@ FRAME_LARGER_THAN = @FRAME_LARGER_THAN@ GCOV = @GCOV@ @@ -631,6 +648,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ IS_SYSV_RC = @IS_SYSV_RC@ KERNEL_ARCH = @KERNEL_ARCH@ KERNEL_CC = @KERNEL_CC@ @@ -703,6 +721,7 @@ NO_OMIT_FRAME_POINTER = @NO_OMIT_FRAME_POINTER@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OBJTOOL_DISABLE_WERROR = @OBJTOOL_DISABLE_WERROR@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -786,6 +805,7 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_PC = @ZLIB_PC@ abs_builddir = @abs_builddir@ +abs_objtool_binary = @abs_objtool_binary@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ @@ -865,6 +885,8 @@ udevdir = @udevdir@ udevruledir = @udevruledir@ zfsexecdir = @zfsexecdir@ + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@kernel_linuxdir = $(kerneldir)/linux @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@kernel_linux_HEADERS = \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/blkdev_compat.h \ @@ -874,6 +896,7 @@ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/mm_compat.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/mod_compat.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/page_compat.h \ +@BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/pagemap_compat.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/simd.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/simd_aarch64.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/simd_arm.h \ @@ -881,6 +904,7 @@ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/simd_x86.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/utsname_compat.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/vfs_compat.h \ +@BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/workqueue_compat.h \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/kernel/linux/xattr_compat.h @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@kernel_sysdir = $(kerneldir)/sys @@ -982,6 +1006,8 @@ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@kernel_spl_ia32_HEADERS = \ @BUILD_LINUX_TRUE@@CONFIG_KERNEL_TRUE@ os/linux/spl/sys/ia32/asm_linkage.h + +# SPDX-License-Identifier: CDDL-1.0 @BUILD_FREEBSD_TRUE@noinst_HEADERS = \ @BUILD_FREEBSD_TRUE@ os/freebsd/linux/compiler.h \ @BUILD_FREEBSD_TRUE@ os/freebsd/linux/types.h \ @@ -1077,6 +1103,8 @@ @BUILD_FREEBSD_TRUE@ os/freebsd/zfs/sys/zfs_znode_impl.h \ @BUILD_FREEBSD_TRUE@ os/freebsd/zfs/sys/zpl.h + +# SPDX-License-Identifier: CDDL-1.0 COMMON_H = \ cityhash.h \ zfeature_common.h \ @@ -1511,6 +1539,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru zfs-linux-2.3.2/include/libzfs.h zfs-linux-2.3.9/include/libzfs.h --- zfs-linux-2.3.2/include/libzfs.h 2025-05-01 18:23:23.737214795 +0000 +++ zfs-linux-2.3.9/include/libzfs.h 2026-08-21 20:57:12.302424507 +0000 @@ -591,6 +591,7 @@ _LIBZFS_H int zfs_crypto_load_key(zfs_handle_t *, boolean_t, const char *); _LIBZFS_H int zfs_crypto_unload_key(zfs_handle_t *); _LIBZFS_H int zfs_crypto_rewrap(zfs_handle_t *, nvlist_t *, boolean_t); +_LIBZFS_H boolean_t zfs_is_encrypted(zfs_handle_t *); typedef struct zprop_list { int pl_prop; diff -Nru zfs-linux-2.3.2/include/os/freebsd/Makefile.am zfs-linux-2.3.9/include/os/freebsd/Makefile.am --- zfs-linux-2.3.2/include/os/freebsd/Makefile.am 2025-05-01 18:23:23.737214795 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/Makefile.am 2026-08-21 20:57:12.303018510 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 noinst_HEADERS = \ %D%/linux/compiler.h \ %D%/linux/types.h \ diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/ccompile.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/ccompile.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/ccompile.h 2025-05-01 18:23:23.737214795 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/ccompile.h 2026-08-21 20:57:12.303233414 +0000 @@ -43,10 +43,7 @@ #endif #define EXPORT_SYMBOL(x) -#define module_param(a, b, c) -#define module_param_call(a, b, c, d, e) -#define module_param_named(a, b, c, d) -#define MODULE_PARM_DESC(a, b) + #define asm __asm #ifdef ZFS_DEBUG #undef NDEBUG diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/cmn_err.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/cmn_err.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/cmn_err.h 2025-05-01 18:23:23.737214795 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/cmn_err.h 2026-08-21 20:57:12.303233414 +0000 @@ -52,28 +52,28 @@ #ifndef _ASM extern void cmn_err(int, const char *, ...) - __attribute__((format(printf, 2, 3))); + __attribute__((format(__printf__, 2, 3))); extern void vzcmn_err(zoneid_t, int, const char *, __va_list) - __attribute__((format(printf, 3, 0))); + __attribute__((format(__printf__, 3, 0))); extern void vcmn_err(int, const char *, __va_list) - __attribute__((format(printf, 2, 0))); + __attribute__((format(__printf__, 2, 0))); extern void zcmn_err(zoneid_t, int, const char *, ...) - __attribute__((format(printf, 3, 4))); + __attribute__((format(__printf__, 3, 4))); extern void vzprintf(zoneid_t, const char *, __va_list) - __attribute__((format(printf, 2, 0))); + __attribute__((format(__printf__, 2, 0))); extern void zprintf(zoneid_t, const char *, ...) - __attribute__((format(printf, 2, 3))); + __attribute__((format(__printf__, 2, 3))); extern void vuprintf(const char *, __va_list) - __attribute__((format(printf, 1, 0))); + __attribute__((format(__printf__, 1, 0))); extern void panic(const char *, ...) - __attribute__((format(printf, 1, 2), __noreturn__)); + __attribute__((format(__printf__, 1, 2), __noreturn__)); #define cmn_err_once(ce, ...) \ do { \ diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/debug.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/debug.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/debug.h 2025-05-01 18:23:23.738214809 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/debug.h 2026-08-21 20:57:12.303233414 +0000 @@ -112,14 +112,13 @@ } while (0) #define VERIFY3B(LEFT, OP, RIGHT) do { \ - const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT); \ + const boolean_t _verify3_left = (boolean_t)!!(LEFT); \ + const boolean_t _verify3_right = (boolean_t)!!(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3B(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%d " #OP " %d)\n", \ - (boolean_t)_verify3_left, \ - (boolean_t)_verify3_right); \ + _verify3_left, _verify3_right); \ } while (0) #define VERIFY3S(LEFT, OP, RIGHT) do { \ @@ -127,7 +126,7 @@ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3S(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%lld " #OP " %lld)\n", \ (long long)_verify3_left, \ (long long)_verify3_right); \ @@ -138,7 +137,7 @@ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3U(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%llu " #OP " %llu)\n", \ (unsigned long long)_verify3_left, \ (unsigned long long)_verify3_right); \ @@ -149,8 +148,8 @@ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (%px " #OP " %px)\n", \ + "VERIFY3P(" #LEFT ", " #OP ", " #RIGHT ") " \ + "failed (%p " #OP " %p)\n", \ (void *)_verify3_left, \ (void *)_verify3_right); \ } while (0) @@ -159,8 +158,7 @@ const int64_t _verify0_right = (int64_t)(RIGHT); \ if (unlikely(!(0 == _verify0_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0(" #RIGHT ") " \ - "failed (0 == %lld)\n", \ + "VERIFY0(" #RIGHT ") failed (%lld)\n", \ (long long)_verify0_right); \ } while (0) @@ -168,8 +166,7 @@ const uintptr_t _verify0_right = (uintptr_t)(RIGHT); \ if (unlikely(!(0 == _verify0_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0P(" #RIGHT ") " \ - "failed (NULL == %px)\n", \ + "VERIFY0P(" #RIGHT ") failed (%p)\n", \ (void *)_verify0_right); \ } while (0) @@ -182,14 +179,13 @@ */ #define VERIFY3BF(LEFT, OP, RIGHT, STR, ...) do { \ - const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT); \ + const boolean_t _verify3_left = (boolean_t)!!(LEFT); \ + const boolean_t _verify3_right = (boolean_t)!!(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3B(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%d " #OP " %d) " STR "\n", \ - (boolean_t)(_verify3_left), \ - (boolean_t)(_verify3_right), \ + _verify3_left, _verify3_right, \ __VA_ARGS__); \ } while (0) @@ -198,10 +194,9 @@ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3S(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%lld " #OP " %lld) " STR "\n", \ - (long long)(_verify3_left), \ - (long long)(_verify3_right), \ + (long long)_verify3_left, (long long)_verify3_right,\ __VA_ARGS__); \ } while (0) @@ -210,10 +205,10 @@ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3U(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%llu " #OP " %llu) " STR "\n", \ - (unsigned long long)(_verify3_left), \ - (unsigned long long)(_verify3_right), \ + (unsigned long long)_verify3_left, \ + (unsigned long long)_verify3_right, \ __VA_ARGS__); \ } while (0) @@ -222,32 +217,27 @@ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ - "failed (%px " #OP " %px) " STR "\n", \ - (void *) (_verify3_left), \ - (void *) (_verify3_right), \ + "VERIFY3P(" #LEFT ", " #OP ", " #RIGHT ") " \ + "failed (%p " #OP " %p) " STR "\n", \ + (void *)_verify3_left, (void *)_verify3_right, \ __VA_ARGS__); \ } while (0) #define VERIFY0PF(RIGHT, STR, ...) do { \ - const uintptr_t _verify3_left = (uintptr_t)(0); \ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ - if (unlikely(!(_verify3_left == _verify3_right))) \ + if (unlikely(!(0 == _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0(0 == " #RIGHT ") " \ - "failed (0 == %px) " STR "\n", \ - (long long) (_verify3_right), \ + "VERIFY0P(" #RIGHT ") failed (%p) " STR "\n", \ + (void *)_verify3_right, \ __VA_ARGS__); \ } while (0) #define VERIFY0F(RIGHT, STR, ...) do { \ - const int64_t _verify3_left = (int64_t)(0); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ - if (unlikely(!(_verify3_left == _verify3_right))) \ + if (unlikely(!(0 == _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0(0 == " #RIGHT ") " \ - "failed (0 == %lld) " STR "\n", \ - (long long) (_verify3_right), \ + "VERIFY0(" #RIGHT ") failed (%lld) " STR "\n", \ + (long long)_verify3_right, \ __VA_ARGS__); \ } while (0) @@ -256,10 +246,7 @@ spl_assert("(" #A ") implies (" #B ")", \ __FILE__, __FUNCTION__, __LINE__))) -#define VERIFY_EQUIV(A, B) \ - ((void)(likely(!!(A) == !!(B)) || \ - spl_assert("(" #A ") is equivalent to (" #B ")", \ - __FILE__, __FUNCTION__, __LINE__))) +#define VERIFY_EQUIV(A, B) VERIFY3B(A, ==, B) /* * Debugging disabled (--disable-debug) diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/kmem.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/kmem.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/kmem.h 2025-05-01 18:23:23.738214809 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/kmem.h 2026-08-21 20:57:12.303233414 +0000 @@ -55,9 +55,9 @@ typedef struct vmem vmem_t; extern char *kmem_asprintf(const char *, ...) - __attribute__((format(printf, 1, 2))); + __attribute__((format(__printf__, 1, 2))); extern char *kmem_vasprintf(const char *fmt, va_list ap) - __attribute__((format(printf, 1, 0))); + __attribute__((format(__printf__, 1, 0))); extern int kmem_scnprintf(char *restrict str, size_t size, const char *restrict fmt, ...); diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/misc.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/misc.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/misc.h 2025-05-01 18:23:23.738214809 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/misc.h 2026-08-21 20:57:12.303233414 +0000 @@ -56,4 +56,9 @@ #define task_io_account_read(n) #define task_io_account_write(n) +/* + * Check if the current thread is a memory reclaim thread. + */ +extern int current_is_reclaim_thread(void); + #endif /* _OPENSOLARIS_SYS_MISC_H_ */ diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/mod_os.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/mod_os.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/mod_os.h 2025-05-01 18:23:23.738214809 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/mod_os.h 2026-08-21 20:57:12.303233414 +0000 @@ -104,6 +104,9 @@ #define spa_taskq_write_param_set_args(var) \ CTLTYPE_STRING, NULL, 0, spa_taskq_write_param, "A" +#define spa_taskq_free_param_set_args(var) \ + CTLTYPE_STRING, NULL, 0, spa_taskq_free_param, "A" + #define fletcher_4_param_set_args(var) \ CTLTYPE_STRING, NULL, 0, fletcher_4_param, "A" diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/policy.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/policy.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/policy.h 2025-05-01 18:23:23.739214823 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/policy.h 2026-08-21 20:57:12.303233414 +0000 @@ -37,9 +37,7 @@ struct vattr; struct znode; -int secpolicy_nfs(cred_t *cr); int secpolicy_zfs(cred_t *crd); -int secpolicy_zfs_proc(cred_t *cr, proc_t *proc); int secpolicy_sys_config(cred_t *cr, int checkonly); int secpolicy_zinject(cred_t *cr); int secpolicy_fs_unmount(cred_t *cr, struct mount *vfsp); diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/proc.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/proc.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/proc.h 2025-05-01 18:23:23.739214823 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/proc.h 2026-08-21 20:57:12.303233414 +0000 @@ -45,7 +45,9 @@ #ifdef _KERNEL #define CPU curcpu #define minclsyspri PRIBIO -#define defclsyspri minclsyspri +#define defclsyspri minclsyspri +/* Write issue taskq priority. */ +#define wtqclsyspri ((PVM + PRIBIO) / 2) #define maxclsyspri PVM #define max_ncpus (mp_maxid + 1) #define boot_max_ncpus (mp_maxid + 1) diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/sysmacros.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/sysmacros.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/sysmacros.h 2025-05-01 18:23:23.739214823 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/sysmacros.h 2026-08-21 20:57:12.304005811 +0000 @@ -290,80 +290,11 @@ #define offsetof(type, field) __offsetof(type, field) #endif -/* - * Find highest one bit set. - * Returns bit number + 1 of highest bit that is set, otherwise returns 0. - * High order bit is 31 (or 63 in _LP64 kernel). - */ -static __inline int -highbit(ulong_t i) -{ -#if defined(HAVE_INLINE_FLSL) - return (flsl(i)); -#else - int h = 1; +#define highbit(x) flsl(x) +#define lowbit(x) ffsl(x) - if (i == 0) - return (0); -#ifdef _LP64 - if (i & 0xffffffff00000000ul) { - h += 32; i >>= 32; - } -#endif - if (i & 0xffff0000) { - h += 16; i >>= 16; - } - if (i & 0xff00) { - h += 8; i >>= 8; - } - if (i & 0xf0) { - h += 4; i >>= 4; - } - if (i & 0xc) { - h += 2; i >>= 2; - } - if (i & 0x2) { - h += 1; - } - return (h); -#endif -} - -/* - * Find highest one bit set. - * Returns bit number + 1 of highest bit that is set, otherwise returns 0. - */ -static __inline int -highbit64(uint64_t i) -{ -#if defined(HAVE_INLINE_FLSLL) - return (flsll(i)); -#else - int h = 1; - - if (i == 0) - return (0); - if (i & 0xffffffff00000000ULL) { - h += 32; i >>= 32; - } - if (i & 0xffff0000) { - h += 16; i >>= 16; - } - if (i & 0xff00) { - h += 8; i >>= 8; - } - if (i & 0xf0) { - h += 4; i >>= 4; - } - if (i & 0xc) { - h += 2; i >>= 2; - } - if (i & 0x2) { - h += 1; - } - return (h); -#endif -} +#define highbit64(x) flsll(x) +#define lowbit64(x) ffsll(x) #ifdef __cplusplus } diff -Nru zfs-linux-2.3.2/include/os/freebsd/spl/sys/vm.h zfs-linux-2.3.9/include/os/freebsd/spl/sys/vm.h --- zfs-linux-2.3.2/include/os/freebsd/spl/sys/vm.h 2025-05-01 18:23:23.740214837 +0000 +++ zfs-linux-2.3.9/include/os/freebsd/spl/sys/vm.h 2026-08-21 20:57:12.304005811 +0000 @@ -35,6 +35,7 @@ extern const int zfs_vm_pagerret_bad; extern const int zfs_vm_pagerret_error; extern const int zfs_vm_pagerret_ok; +extern const int zfs_vm_pagerret_pend; extern const int zfs_vm_pagerput_sync; extern const int zfs_vm_pagerput_inval; diff -Nru zfs-linux-2.3.2/include/os/linux/Makefile.am zfs-linux-2.3.9/include/os/linux/Makefile.am --- zfs-linux-2.3.2/include/os/linux/Makefile.am 2025-05-01 18:23:23.741214851 +0000 +++ zfs-linux-2.3.9/include/os/linux/Makefile.am 2026-08-21 20:57:12.305537894 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 if CONFIG_KERNEL kernel_linuxdir = $(kerneldir)/linux kernel_linux_HEADERS = \ @@ -8,6 +9,7 @@ %D%/kernel/linux/mm_compat.h \ %D%/kernel/linux/mod_compat.h \ %D%/kernel/linux/page_compat.h \ + %D%/kernel/linux/pagemap_compat.h \ %D%/kernel/linux/simd.h \ %D%/kernel/linux/simd_aarch64.h \ %D%/kernel/linux/simd_arm.h \ @@ -15,6 +17,7 @@ %D%/kernel/linux/simd_x86.h \ %D%/kernel/linux/utsname_compat.h \ %D%/kernel/linux/vfs_compat.h \ + %D%/kernel/linux/workqueue_compat.h \ %D%/kernel/linux/xattr_compat.h kernel_sysdir = $(kerneldir)/sys diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/blkdev_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/blkdev_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/blkdev_compat.h 2025-05-01 18:23:23.741214851 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/blkdev_compat.h 2026-08-21 20:57:12.306015236 +0000 @@ -542,24 +542,6 @@ } #endif /* !HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ -/* - * All the io_*() helper functions below can operate on a bio, or a rq, but - * not both. The older submit_bio() codepath will pass a bio, and the - * newer blk-mq codepath will pass a rq. - */ -static inline int -io_data_dir(struct bio *bio, struct request *rq) -{ - if (rq != NULL) { - if (op_is_write(req_op(rq))) { - return (WRITE); - } else { - return (READ); - } - } - return (bio_data_dir(bio)); -} - static inline int io_is_flush(struct bio *bio, struct request *rq) { diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/dcache_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/dcache_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/dcache_compat.h 2025-05-01 18:23:23.741214851 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/dcache_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -32,7 +32,20 @@ #define dname(dentry) ((char *)((dentry)->d_name.name)) #define dlen(dentry) ((int)((dentry)->d_name.len)) +#ifdef HAVE_DENTRY_D_U_ALIASES #define d_alias d_u.d_alias +#endif + +#ifdef HAVE_MM_PAGE_FLAGS_STRUCT +/* + * Starting from Linux 6.18, the 'flags' field in 'struct page' is defined + * to a struct ('memdesc_flags_t' typedef) instead of an unsigned long for + * improved typesafety. + */ +#define page_flags flags.f +#else +#define page_flags flags +#endif /* * Starting from Linux 5.13, flush_dcache_page() becomes an inline function @@ -44,8 +57,8 @@ #include #define flush_dcache_page(page) do { \ if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE) && \ - test_bit(PG_dcache_clean, &(page)->flags)) \ - clear_bit(PG_dcache_clean, &(page)->flags); \ + test_bit(PG_dcache_clean, &(page)->page_flags)) \ + clear_bit(PG_dcache_clean, &(page)->page_flags);\ } while (0) #endif /* @@ -55,38 +68,12 @@ */ #if defined __riscv && defined HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY #define flush_dcache_page(page) do { \ - if (test_bit(PG_dcache_clean, &(page)->flags)) \ - clear_bit(PG_dcache_clean, &(page)->flags); \ + if (test_bit(PG_dcache_clean, &(page)->page_flags)) \ + clear_bit(PG_dcache_clean, &(page)->page_flags);\ } while (0) #endif /* - * 2.6.30 API change, - * The const keyword was added to the 'struct dentry_operations' in - * the dentry structure. To handle this we define an appropriate - * dentry_operations_t typedef which can be used. - */ -typedef const struct dentry_operations dentry_operations_t; - -/* - * 2.6.38 API addition, - * Added d_clear_d_op() helper function which clears some flags and the - * registered dentry->d_op table. This is required because d_set_d_op() - * issues a warning when the dentry operations table is already set. - * For the .zfs control directory to work properly we must be able to - * override the default operations table and register custom .d_automount - * and .d_revalidate callbacks. - */ -static inline void -d_clear_d_op(struct dentry *dentry) -{ - dentry->d_op = NULL; - dentry->d_flags &= ~( - DCACHE_OP_HASH | DCACHE_OP_COMPARE | - DCACHE_OP_REVALIDATE | DCACHE_OP_DELETE); -} - -/* * Walk and invalidate all dentry aliases of an inode * unless it's a mountpoint */ diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/mod_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/mod_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/mod_compat.h 2025-05-01 18:23:23.741214851 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/mod_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -31,15 +31,6 @@ #include #include -/* - * Despite constifying struct kernel_param_ops, some older kernels define a - * `__check_old_set_param()` function in their headers that checks for a - * non-constified `->set()`. This has long been fixed in Linux mainline, but - * since we support older kernels, we workaround it by using a preprocessor - * definition to disable it. - */ -#define __check_old_set_param(_) (0) - typedef const struct kernel_param zfs_kernel_param_t; #define ZMOD_RW 0644 @@ -79,48 +70,23 @@ }; /* - * While we define our own s64/u64 types, there is no reason to reimplement the - * existing Linux kernel types, so we use the preprocessor to remap our - * "custom" implementations to the kernel ones. This is done because the CPP - * does not allow us to write conditional definitions. The fourth definition - * exists because the CPP will not allow us to replace things like INT with int - * before string concatenation. + * Our uint64 params are called U64 in part because we had them before Linux + * provided ULLONG param ops. Now it does, and we use them, but we retain the + * U64 name to keep many existing tunables working without issue. */ +#define spl_param_set_u64 param_set_ullong +#define spl_param_get_u64 param_get_ullong +#define spl_param_ops_U64 param_ops_ullong -#define spl_param_set_int param_set_int -#define spl_param_get_int param_get_int -#define spl_param_ops_int param_ops_int -#define spl_param_ops_INT param_ops_int - -#define spl_param_set_long param_set_long -#define spl_param_get_long param_get_long -#define spl_param_ops_long param_ops_long -#define spl_param_ops_LONG param_ops_long - -#define spl_param_set_uint param_set_uint -#define spl_param_get_uint param_get_uint -#define spl_param_ops_uint param_ops_uint -#define spl_param_ops_UINT param_ops_uint - -#define spl_param_set_ulong param_set_ulong -#define spl_param_get_ulong param_get_ulong -#define spl_param_ops_ulong param_ops_ulong -#define spl_param_ops_ULONG param_ops_ulong - -#define spl_param_set_charp param_set_charp -#define spl_param_get_charp param_get_charp -#define spl_param_ops_charp param_ops_charp -#define spl_param_ops_STRING param_ops_charp - -int spl_param_set_s64(const char *val, zfs_kernel_param_t *kp); -extern int spl_param_get_s64(char *buffer, zfs_kernel_param_t *kp); -extern const struct kernel_param_ops spl_param_ops_s64; -#define spl_param_ops_S64 spl_param_ops_s64 - -extern int spl_param_set_u64(const char *val, zfs_kernel_param_t *kp); -extern int spl_param_get_u64(char *buffer, zfs_kernel_param_t *kp); -extern const struct kernel_param_ops spl_param_ops_u64; -#define spl_param_ops_U64 spl_param_ops_u64 +/* + * We keep our own names for param ops to make expanding them in + * ZFS_MODULE_PARAM easy. + */ +#define spl_param_ops_INT param_ops_int +#define spl_param_ops_LONG param_ops_long +#define spl_param_ops_UINT param_ops_uint +#define spl_param_ops_ULONG param_ops_ulong +#define spl_param_ops_STRING param_ops_charp /* * Declare a module parameter / sysctl node diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/page_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/page_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/page_compat.h 2025-05-01 18:23:23.741214851 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/page_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -4,8 +4,8 @@ /* * Create our own accessor functions to follow the Linux API changes */ -#define nr_file_pages() global_node_page_state(NR_FILE_PAGES) -#define nr_inactive_anon_pages() global_node_page_state(NR_INACTIVE_ANON) +#define nr_file_pages() (global_node_page_state(NR_ACTIVE_FILE) + \ + global_node_page_state(NR_INACTIVE_FILE)) #define nr_inactive_file_pages() global_node_page_state(NR_INACTIVE_FILE) #endif /* _ZFS_PAGE_COMPAT_H */ diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/pagemap_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/pagemap_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/pagemap_compat.h 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/pagemap_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2025, Rob Norris + */ + +#ifndef _ZFS_PAGEMAP_COMPAT_H +#define _ZFS_PAGEMAP_COMPAT_H + +#include + +#ifndef HAVE_PAGEMAP_READAHEAD_PAGE +#define readahead_page(ractl) (&(__readahead_folio(ractl)->page)) +#endif + +#endif diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/simd_x86.h zfs-linux-2.3.9/include/os/linux/kernel/linux/simd_x86.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/simd_x86.h 2025-05-01 18:23:23.742214865 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/simd_x86.h 2026-08-21 20:57:12.306130118 +0000 @@ -139,15 +139,6 @@ */ #if defined(HAVE_KERNEL_FPU_INTERNAL) -/* - * For kernels not exporting *kfpu_{begin,end} we have to use inline assembly - * with the XSAVE{,OPT,S} instructions, so we need the toolchain to support at - * least XSAVE. - */ -#if !defined(HAVE_XSAVE) -#error "Toolchain needs to support the XSAVE assembler instruction" -#endif - #ifndef XFEATURE_MASK_XTILE /* * For kernels where this doesn't exist yet, we still don't want to break @@ -335,9 +326,13 @@ return; } #endif +#if defined(HAVE_XSAVE) if (static_cpu_has(X86_FEATURE_XSAVE)) { kfpu_do_xsave("xsave", state, ~XFEATURE_MASK_XTILE); - } else if (static_cpu_has(X86_FEATURE_FXSR)) { + return; + } +#endif + if (static_cpu_has(X86_FEATURE_FXSR)) { kfpu_save_fxsr(state); } else { kfpu_save_fsave(state); @@ -390,9 +385,13 @@ goto out; } #endif +#if defined(HAVE_XSAVE) if (static_cpu_has(X86_FEATURE_XSAVE)) { kfpu_do_xrstor("xrstor", state, ~XFEATURE_MASK_XTILE); - } else if (static_cpu_has(X86_FEATURE_FXSR)) { + goto out; + } +#endif + if (static_cpu_has(X86_FEATURE_FXSR)) { kfpu_restore_fxsr(state); } else { kfpu_restore_fsave(state); diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/vfs_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/vfs_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/vfs_compat.h 2025-05-01 18:23:23.742214865 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/vfs_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -23,6 +23,8 @@ /* * Copyright (C) 2011 Lawrence Livermore National Security, LLC. * Copyright (C) 2015 Jörg Thalheim. + * Copyright (c) 2025, Rob Norris + * Copyright (c) 2026, TrueNAS. */ #ifndef _ZFS_VFS_H @@ -262,4 +264,63 @@ #define zpl_generic_fillattr(user_ns, ip, sp) generic_fillattr(ip, sp) #endif +#ifdef HAVE_INODE_GENERIC_DROP +/* 6.18 API change. These were renamed, alias the old names to the new. */ +#define generic_delete_inode(ip) inode_just_drop(ip) +#define generic_drop_inode(ip) inode_generic_drop(ip) +#endif + +#ifndef HAVE_INODE_STATE_READ_ONCE +/* + * 6.19 API change. We should no longer access i_state directly. If the new + * helper function doesn't exist, define our own. + */ +#define inode_state_read_once(ip) READ_ONCE(ip->i_state) +#endif + +/* 6.18 compat: 4th arg removed; function will do strlen() internally. */ +#ifdef HAVE_VFS_PARSE_FS_STRING_3ARGS +#define zpl_vfs_parse_fs_string(fc, key, val) \ + vfs_parse_fs_string((fc), (key), (val)) +#else +#define zpl_vfs_parse_fs_string(fc, key, val) \ + vfs_parse_fs_string((fc), (key), (val), (val != NULL) ? strlen(val) : 0) +#endif + +#if defined(HAVE_FOLLOW_DOWN_FLAGS) +static inline int +zpl_follow_down(struct path *path, unsigned int flags) +{ + return (follow_down(path, flags)); +} +#elif defined(HAVE_VFS_PATH_LOOKUP_EXPORTED) +/* + * vfs_path_lookup() has always been exported, but not always published. + */ +extern int vfs_path_lookup(struct dentry *, struct vfsmount *, + const char *, unsigned int, struct path *); +static inline int +zpl_follow_down(struct path *path, unsigned int flags) +{ + /* + * Simulate follow_down() by asking for a name lookup for "/" under the + * given path. + */ + struct path opath; + int err = vfs_path_lookup(path->dentry, path->mnt, "/", + LOOKUP_DOWN|flags, &opath); + if (err == 0) { + /* Trade the original path for the new one. */ + path_put(path); + path->dentry = opath.dentry; + path->mnt = opath.mnt; + path_get(path); + path_put(&opath); + } + return (err); +} +#else +#error "Unsupported kernel: no fallback implementation for follow_down()" +#endif + #endif /* _ZFS_VFS_H */ diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/workqueue_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/workqueue_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/workqueue_compat.h 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/workqueue_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright (c) 2026, TrueNAS. + */ + +#ifndef _ZFS_WORKQUEUE_COMPAT_H +#define _ZFS_WORKQUEUE_COMPAT_H + +/* + * Forcibly flush the kernel's "delayed work" workqueue. + */ +#ifdef HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL +/* + * Linux 5.19: flush_workqueue() on system workqueues is a compile error, use + * __flush_workqueue() instead. + */ +#ifdef HAVE_FLUSH_DELAY_WORKQUEUE_PERCPU +/* + * Linux 6.17: system_percpu_wq introduced as direct replacement for system_wq, + * and takes over as the delay workqueue. + */ +#define zpl_flush_delay_workqueue() __flush_workqueue(system_percpu_wq) +#else +#define zpl_flush_delay_workqueue() __flush_workqueue(system_wq) +#endif +#else +#define zpl_flush_delay_workqueue() flush_workqueue(system_wq) +#endif + +#endif diff -Nru zfs-linux-2.3.2/include/os/linux/kernel/linux/xattr_compat.h zfs-linux-2.3.9/include/os/linux/kernel/linux/xattr_compat.h --- zfs-linux-2.3.2/include/os/linux/kernel/linux/xattr_compat.h 2025-05-01 18:23:23.742214865 +0000 +++ zfs-linux-2.3.9/include/os/linux/kernel/linux/xattr_compat.h 2026-08-21 20:57:12.306130118 +0000 @@ -130,10 +130,27 @@ return (posix_acl_from_xattr(kcred->user_ns, value, size)); } +/* + * Linux 7.0 API change. posix_acl_to_xattr() changed from filling the + * caller-provided buffer to allocating a buffer with enough space and + * returning it. We wrap this up by copying the result into the provided + * buffer and freeing the allocated buffer. + */ static inline int zpl_acl_to_xattr(struct posix_acl *acl, void *value, int size) { +#ifdef HAVE_POSIX_ACL_TO_XATTR_ALLOC + size_t s = 0; + void *v = posix_acl_to_xattr(kcred->user_ns, acl, &s, + kmem_flags_convert(KM_SLEEP)); + if (v == NULL) + return (-ENOMEM); + memcpy(value, v, MIN(size, s)); + kfree(v); + return (0); +#else return (posix_acl_to_xattr(kcred->user_ns, acl, value, size)); +#endif } #endif /* _ZFS_XATTR_H */ diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/debug.h zfs-linux-2.3.9/include/os/linux/spl/sys/debug.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/debug.h 2025-05-01 18:23:23.742214865 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/debug.h 2026-08-21 20:57:12.306861755 +0000 @@ -116,14 +116,13 @@ } while (0) #define VERIFY3B(LEFT, OP, RIGHT) do { \ - const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT); \ + const boolean_t _verify3_left = (boolean_t)!!(LEFT); \ + const boolean_t _verify3_right = (boolean_t)!!(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3B(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%d " #OP " %d)\n", \ - (boolean_t)_verify3_left, \ - (boolean_t)_verify3_right); \ + _verify3_left, _verify3_right); \ } while (0) #define VERIFY3S(LEFT, OP, RIGHT) do { \ @@ -131,7 +130,7 @@ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3S(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%lld " #OP " %lld)\n", \ (long long)_verify3_left, \ (long long)_verify3_right); \ @@ -142,7 +141,7 @@ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3U(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%llu " #OP " %llu)\n", \ (unsigned long long)_verify3_left, \ (unsigned long long)_verify3_right); \ @@ -153,7 +152,7 @@ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3P(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%px " #OP " %px)\n", \ (void *)_verify3_left, \ (void *)_verify3_right); \ @@ -163,8 +162,7 @@ const int64_t _verify0_right = (int64_t)(RIGHT); \ if (unlikely(!(0 == _verify0_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0(" #RIGHT ") " \ - "failed (0 == %lld)\n", \ + "VERIFY0(" #RIGHT ") failed (%lld)\n", \ (long long)_verify0_right); \ } while (0) @@ -172,8 +170,7 @@ const uintptr_t _verify0_right = (uintptr_t)(RIGHT); \ if (unlikely(!(0 == _verify0_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0P(" #RIGHT ") " \ - "failed (NULL == %px)\n", \ + "VERIFY0P(" #RIGHT ") failed (%px)\n", \ (void *)_verify0_right); \ } while (0) @@ -186,14 +183,13 @@ */ #define VERIFY3BF(LEFT, OP, RIGHT, STR, ...) do { \ - const boolean_t _verify3_left = (boolean_t)(LEFT); \ - const boolean_t _verify3_right = (boolean_t)(RIGHT); \ + const boolean_t _verify3_left = (boolean_t)!!(LEFT); \ + const boolean_t _verify3_right = (boolean_t)!!(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3B(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%d " #OP " %d) " STR "\n", \ - (boolean_t)(_verify3_left), \ - (boolean_t)(_verify3_right), \ + _verify3_left, _verify3_right, \ __VA_ARGS__); \ } while (0) @@ -202,10 +198,9 @@ const int64_t _verify3_right = (int64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3S(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%lld " #OP " %lld) " STR "\n", \ - (long long)(_verify3_left), \ - (long long)(_verify3_right), \ + (long long)_verify3_left, (long long)_verify3_right,\ __VA_ARGS__); \ } while (0) @@ -214,10 +209,10 @@ const uint64_t _verify3_right = (uint64_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3U(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%llu " #OP " %llu) " STR "\n", \ - (unsigned long long)(_verify3_left), \ - (unsigned long long)(_verify3_right), \ + (unsigned long long)_verify3_left, \ + (unsigned long long)_verify3_right, \ __VA_ARGS__); \ } while (0) @@ -226,32 +221,27 @@ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ if (unlikely(!(_verify3_left OP _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "VERIFY3P(" #LEFT ", " #OP ", " #RIGHT ") " \ "failed (%px " #OP " %px) " STR "\n", \ - (void *) (_verify3_left), \ - (void *) (_verify3_right), \ + (void *)_verify3_left, (void *)_verify3_right, \ __VA_ARGS__); \ } while (0) #define VERIFY0PF(RIGHT, STR, ...) do { \ - const uintptr_t _verify3_left = (uintptr_t)(0); \ const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \ - if (unlikely(!(_verify3_left == _verify3_right))) \ + if (unlikely(!(0 == _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0(0 == " #RIGHT ") " \ - "failed (0 == %px) " STR "\n", \ - (long long) (_verify3_right), \ + "VERIFY0P(" #RIGHT ") failed (%px) " STR "\n", \ + (void *)_verify3_right, \ __VA_ARGS__); \ } while (0) #define VERIFY0F(RIGHT, STR, ...) do { \ - const int64_t _verify3_left = (int64_t)(0); \ const int64_t _verify3_right = (int64_t)(RIGHT); \ - if (unlikely(!(_verify3_left == _verify3_right))) \ + if (unlikely(!(0 == _verify3_right))) \ spl_panic(__FILE__, __FUNCTION__, __LINE__, \ - "VERIFY0(0 == " #RIGHT ") " \ - "failed (0 == %lld) " STR "\n", \ - (long long) (_verify3_right), \ + "VERIFY0(" #RIGHT ") failed (%lld) " STR "\n", \ + (long long)_verify3_right, \ __VA_ARGS__); \ } while (0) @@ -260,10 +250,7 @@ spl_assert("(" #A ") implies (" #B ")", \ __FILE__, __FUNCTION__, __LINE__))) -#define VERIFY_EQUIV(A, B) \ - ((void)(likely(!!(A) == !!(B)) || \ - spl_assert("(" #A ") is equivalent to (" #B ")", \ - __FILE__, __FUNCTION__, __LINE__))) +#define VERIFY_EQUIV(A, B) VERIFY3B(A, ==, B) /* * Debugging disabled (--disable-debug) diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/kmem.h zfs-linux-2.3.9/include/os/linux/spl/sys/kmem.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/kmem.h 2025-05-01 18:23:23.743214879 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/kmem.h 2026-08-21 20:57:12.306861755 +0000 @@ -66,7 +66,10 @@ static inline gfp_t kmem_flags_convert(int flags) { - gfp_t lflags = __GFP_NOWARN | __GFP_COMP; + gfp_t lflags = __GFP_NOWARN; + + if (!(flags & KM_VMEM)) + lflags |= __GFP_COMP; if (flags & KM_NOSLEEP) { lflags |= GFP_ATOMIC | __GFP_NORETRY; diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/misc.h zfs-linux-2.3.9/include/os/linux/spl/sys/misc.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/misc.h 2025-05-01 18:23:23.743214879 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/misc.h 2026-08-21 20:57:12.307005769 +0000 @@ -24,7 +24,13 @@ #define _OS_LINUX_SPL_MISC_H #include +#include extern void spl_signal_kobj_evt(struct block_device *bdev); +/* + * Check if the current thread is a memory reclaim thread. + */ +extern int current_is_reclaim_thread(void); + #endif diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/rwlock.h zfs-linux-2.3.9/include/os/linux/spl/sys/rwlock.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/rwlock.h 2025-05-01 18:23:23.743214879 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/rwlock.h 2026-08-21 20:57:12.307005769 +0000 @@ -30,7 +30,6 @@ #include typedef enum { - RW_DRIVER = 2, RW_DEFAULT = 4, RW_NOLOCKDEP = 5 } krw_type_t; @@ -75,20 +74,35 @@ { rwp->rw_type = type; } + +static inline void +spl_rw_lockdep_off(void) +{ + lockdep_off(); +} + +static inline void +spl_rw_lockdep_on(void) +{ + lockdep_on(); +} + static inline void spl_rw_lockdep_off_maybe(krwlock_t *rwp) \ { \ if (rwp && rwp->rw_type == RW_NOLOCKDEP) \ - lockdep_off(); \ + spl_rw_lockdep_off(); \ } static inline void spl_rw_lockdep_on_maybe(krwlock_t *rwp) \ { \ if (rwp && rwp->rw_type == RW_NOLOCKDEP) \ - lockdep_on(); \ + spl_rw_lockdep_on(); \ } #else /* CONFIG_LOCKDEP */ #define spl_rw_set_type(rwp, type) +#define spl_rw_lockdep_off() +#define spl_rw_lockdep_on() #define spl_rw_lockdep_off_maybe(rwp) #define spl_rw_lockdep_on_maybe(rwp) #endif /* CONFIG_LOCKDEP */ @@ -117,32 +131,10 @@ * will be correctly located in the users code which is important * for the built in kernel lock analysis tools */ -#define rw_init(rwp, name, type, arg) /* CSTYLED */ \ -({ \ - static struct lock_class_key __key; \ - ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \ - \ - __init_rwsem(SEM(rwp), #rwp, &__key); \ - spl_rw_clear_owner(rwp); \ - spl_rw_set_type(rwp, type); \ -}) - -/* - * The Linux rwsem implementation does not require a matching destroy. - */ -#define rw_destroy(rwp) ((void) 0) - -/* - * Upgrading a rwsem from a reader to a writer is not supported by the - * Linux kernel. The lock must be dropped and reacquired as a writer. - */ -#define rw_tryupgrade(rwp) RW_WRITE_HELD(rwp) - -#define rw_tryenter(rwp, rw) /* CSTYLED */ \ +#define spl_rw_tryenter_impl(rwp, rw) /* CSTYLED */ \ ({ \ int _rc_ = 0; \ \ - spl_rw_lockdep_off_maybe(rwp); \ switch (rw) { \ case RW_READER: \ _rc_ = down_read_trylock(SEM(rwp)); \ @@ -154,13 +146,11 @@ default: \ VERIFY(0); \ } \ - spl_rw_lockdep_on_maybe(rwp); \ _rc_; \ }) -#define rw_enter(rwp, rw) /* CSTYLED */ \ +#define spl_rw_enter_impl(rwp, rw) /* CSTYLED */ \ ({ \ - spl_rw_lockdep_off_maybe(rwp); \ switch (rw) { \ case RW_READER: \ down_read(SEM(rwp)); \ @@ -172,12 +162,10 @@ default: \ VERIFY(0); \ } \ - spl_rw_lockdep_on_maybe(rwp); \ }) -#define rw_exit(rwp) /* CSTYLED */ \ +#define spl_rw_exit_impl(rwp) /* CSTYLED */ \ ({ \ - spl_rw_lockdep_off_maybe(rwp); \ if (RW_WRITE_HELD(rwp)) { \ spl_rw_clear_owner(rwp); \ up_write(SEM(rwp)); \ @@ -185,15 +173,91 @@ ASSERT(RW_READ_HELD(rwp)); \ up_read(SEM(rwp)); \ } \ +}) + +#define spl_rw_downgrade_impl(rwp) /* CSTYLED */ \ +({ \ + spl_rw_clear_owner(rwp); \ + downgrade_write(SEM(rwp)); \ +}) + +#define rw_init(rwp, name, type, arg) /* CSTYLED */ \ +({ \ + static struct lock_class_key __key; \ + ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \ + \ + __init_rwsem(SEM(rwp), #rwp, &__key); \ + spl_rw_clear_owner(rwp); \ + spl_rw_set_type(rwp, type); \ +}) + +/* + * The Linux rwsem implementation does not require a matching destroy. + */ +#define rw_destroy(rwp) ((void) 0) + +/* + * Upgrading a rwsem from a reader to a writer is not supported by the + * Linux kernel. The lock must be dropped and reacquired as a writer. + */ +#define rw_tryupgrade(rwp) RW_WRITE_HELD(rwp) + +#define rw_tryenter(rwp, rw) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off_maybe(rwp); \ + int _rc_ = spl_rw_tryenter_impl(rwp, rw); \ + spl_rw_lockdep_on_maybe(rwp); \ + _rc_; \ +}) + +#define rw_tryenter_nolockdep(rwp, rw) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off(); \ + int _rc_ = spl_rw_tryenter_impl(rwp, rw); \ + spl_rw_lockdep_on(); \ + _rc_; \ +}) + +#define rw_enter(rwp, rw) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off_maybe(rwp); \ + spl_rw_enter_impl(rwp, rw); \ + spl_rw_lockdep_on_maybe(rwp); \ +}) + +#define rw_enter_nolockdep(rwp, rw) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off(); \ + spl_rw_enter_impl(rwp, rw); \ + spl_rw_lockdep_on(); \ +}) + +#define rw_exit(rwp) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off_maybe(rwp); \ + spl_rw_exit_impl(rwp); \ spl_rw_lockdep_on_maybe(rwp); \ }) +#define rw_exit_nolockdep(rwp) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off(); \ + spl_rw_exit_impl(rwp); \ + spl_rw_lockdep_on(); \ +}) + #define rw_downgrade(rwp) /* CSTYLED */ \ ({ \ spl_rw_lockdep_off_maybe(rwp); \ - spl_rw_clear_owner(rwp); \ - downgrade_write(SEM(rwp)); \ + spl_rw_downgrade_impl(rwp); \ spl_rw_lockdep_on_maybe(rwp); \ }) +#define rw_downgrade_nolockdep(rwp) /* CSTYLED */ \ +({ \ + spl_rw_lockdep_off(); \ + spl_rw_downgrade_impl(rwp); \ + spl_rw_lockdep_on(); \ +}) + #endif /* _SPL_RWLOCK_H */ diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/stat.h zfs-linux-2.3.9/include/os/linux/spl/sys/stat.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/stat.h 2025-05-01 18:23:23.743214879 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/stat.h 2026-08-21 20:57:12.307005769 +0000 @@ -25,6 +25,6 @@ #ifndef _SPL_STAT_H #define _SPL_STAT_H -#include +#include #endif /* SPL_STAT_H */ diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/sysmacros.h zfs-linux-2.3.9/include/os/linux/spl/sys/sysmacros.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/sysmacros.h 2025-05-01 18:23:23.744214893 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/sysmacros.h 2026-08-21 20:57:12.307005769 +0000 @@ -92,8 +92,10 @@ * Treat shim tasks as SCHED_NORMAL tasks */ #define minclsyspri (MAX_PRIO-1) -#define maxclsyspri (MAX_RT_PRIO) #define defclsyspri (DEFAULT_PRIO) +/* Write issue taskq priority. */ +#define wtqclsyspri (MAX_RT_PRIO + 1) +#define maxclsyspri (MAX_RT_PRIO) #ifndef NICE_TO_PRIO #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) diff -Nru zfs-linux-2.3.2/include/os/linux/spl/sys/uio.h zfs-linux-2.3.9/include/os/linux/spl/sys/uio.h --- zfs-linux-2.3.2/include/os/linux/spl/sys/uio.h 2025-05-01 18:23:23.744214893 +0000 +++ zfs-linux-2.3.9/include/os/linux/spl/sys/uio.h 2026-08-21 20:57:12.307005769 +0000 @@ -174,7 +174,7 @@ static inline void zfs_uio_iov_iter_init(zfs_uio_t *uio, struct iov_iter *iter, offset_t offset, - ssize_t resid, size_t skip) + ssize_t resid) { uio->uio_iter = iter; uio->uio_iovcnt = iter->nr_segs; @@ -184,7 +184,7 @@ uio->uio_fmode = 0; uio->uio_extflg = 0; uio->uio_resid = resid; - uio->uio_skip = skip; + uio->uio_skip = 0; uio->uio_soffset = uio->uio_loffset; memset(&uio->uio_dio, 0, sizeof (zfs_uio_dio_t)); } diff -Nru zfs-linux-2.3.2/include/os/linux/zfs/sys/policy.h zfs-linux-2.3.9/include/os/linux/zfs/sys/policy.h --- zfs-linux-2.3.2/include/os/linux/zfs/sys/policy.h 2025-05-01 18:23:23.745214907 +0000 +++ zfs-linux-2.3.9/include/os/linux/zfs/sys/policy.h 2026-08-21 20:57:12.308668718 +0000 @@ -38,7 +38,6 @@ struct znode; -int secpolicy_nfs(const cred_t *); int secpolicy_sys_config(const cred_t *, boolean_t); int secpolicy_vnode_access2(const cred_t *, struct inode *, uid_t, mode_t, mode_t); @@ -52,7 +51,6 @@ struct user_namespace *); int secpolicy_zinject(const cred_t *); int secpolicy_zfs(const cred_t *); -int secpolicy_zfs_proc(const cred_t *, proc_t *); void secpolicy_setid_clear(vattr_t *, cred_t *); int secpolicy_setid_setsticky_clear(struct inode *, vattr_t *, const vattr_t *, cred_t *, zidmap_t *, struct user_namespace *); diff -Nru zfs-linux-2.3.2/include/os/linux/zfs/sys/trace_acl.h zfs-linux-2.3.9/include/os/linux/zfs/sys/trace_acl.h --- zfs-linux-2.3.2/include/os/linux/zfs/sys/trace_acl.h 2025-05-01 18:23:23.745214907 +0000 +++ zfs-linux-2.3.9/include/os/linux/zfs/sys/trace_acl.h 2026-08-21 20:57:12.308668718 +0000 @@ -59,8 +59,6 @@ __field(uint64_t, z_size) __field(uint64_t, z_pflags) __field(uint32_t, z_sync_cnt) - __field(uint32_t, z_sync_writes_cnt) - __field(uint32_t, z_async_writes_cnt) __field(mode_t, z_mode) __field(boolean_t, z_is_sa) __field(boolean_t, z_is_ctldir) @@ -92,8 +90,6 @@ __entry->z_size = zn->z_size; __entry->z_pflags = zn->z_pflags; __entry->z_sync_cnt = zn->z_sync_cnt; - __entry->z_sync_writes_cnt = zn->z_sync_writes_cnt; - __entry->z_async_writes_cnt = zn->z_async_writes_cnt; __entry->z_mode = zn->z_mode; __entry->z_is_sa = zn->z_is_sa; __entry->z_is_ctldir = zn->z_is_ctldir; @@ -117,7 +113,7 @@ TP_printk("zn { id %llu unlinked %u atime_dirty %u " "zn_prefetch %u blksz %u seq %u " "mapcnt %llu size %llu pflags %llu " - "sync_cnt %u sync_writes_cnt %u async_writes_cnt %u " + "sync_cnt %u " "mode 0x%x is_sa %d is_ctldir %d " "inode { uid %u gid %u ino %lu nlink %u size %lli " "blkbits %u bytes %u mode 0x%x generation %x } } " @@ -126,7 +122,6 @@ __entry->z_zn_prefetch, __entry->z_blksz, __entry->z_seq, __entry->z_mapcnt, __entry->z_size, __entry->z_pflags, __entry->z_sync_cnt, - __entry->z_sync_writes_cnt, __entry->z_async_writes_cnt, __entry->z_mode, __entry->z_is_sa, __entry->z_is_ctldir, __entry->i_uid, __entry->i_gid, __entry->i_ino, __entry->i_nlink, __entry->i_size, __entry->i_blkbits, diff -Nru zfs-linux-2.3.2/include/os/linux/zfs/sys/zfs_vfsops_os.h zfs-linux-2.3.9/include/os/linux/zfs/sys/zfs_vfsops_os.h --- zfs-linux-2.3.2/include/os/linux/zfs/sys/zfs_vfsops_os.h 2025-05-01 18:23:23.745214907 +0000 +++ zfs-linux-2.3.9/include/os/linux/zfs/sys/zfs_vfsops_os.h 2026-08-21 20:57:12.308668718 +0000 @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2018 by Delphix. All rights reserved. + * Copyright (c) 2026, TrueNAS. */ #ifndef _SYS_FS_ZFS_VFSOPS_H @@ -73,11 +74,6 @@ kmutex_t vfs_mntpt_lock; } vfs_t; -typedef struct zfs_mnt { - const char *mnt_osname; /* Objset name */ - char *mnt_data; /* Raw mount options */ -} zfs_mnt_t; - struct zfsvfs { vfs_t *z_vfs; /* generic fs struct */ struct super_block *z_sb; /* generic super_block */ @@ -239,11 +235,15 @@ extern void zfsvfs_free(zfsvfs_t *zfsvfs); extern int zfs_check_global_label(const char *dsname, const char *hexsl); +extern vfs_t *zfsvfs_vfs_alloc(void); +extern void zfsvfs_vfs_free(vfs_t *vfsp); + extern boolean_t zfs_is_readonly(zfsvfs_t *zfsvfs); -extern int zfs_domount(struct super_block *sb, zfs_mnt_t *zm, int silent); +extern int zfs_domount(struct super_block *sb, const char *osname, + vfs_t *mntopts, int silent); extern void zfs_preumount(struct super_block *sb); extern int zfs_umount(struct super_block *sb); -extern int zfs_remount(struct super_block *sb, int *flags, zfs_mnt_t *zm); +extern int zfs_remount(struct super_block *sb, vfs_t *mntopts, int flags); extern int zfs_statvfs(struct inode *ip, struct kstatfs *statp); extern int zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp); extern int zfs_prune(struct super_block *sb, unsigned long nr_to_scan, diff -Nru zfs-linux-2.3.2/include/os/linux/zfs/sys/zfs_znode_impl.h zfs-linux-2.3.9/include/os/linux/zfs/sys/zfs_znode_impl.h --- zfs-linux-2.3.2/include/os/linux/zfs/sys/zfs_znode_impl.h 2025-05-01 18:23:23.746214921 +0000 +++ zfs-linux-2.3.9/include/os/linux/zfs/sys/zfs_znode_impl.h 2026-08-21 20:57:12.308668718 +0000 @@ -157,6 +157,7 @@ extern int zfs_sync(struct super_block *, int, cred_t *); extern int zfs_inode_alloc(struct super_block *, struct inode **ip); +extern void zfs_inode_free(struct inode *); extern void zfs_inode_destroy(struct inode *); extern void zfs_mark_inode_dirty(struct inode *); extern boolean_t zfs_relatime_need_update(const struct inode *); diff -Nru zfs-linux-2.3.2/include/os/linux/zfs/sys/zpl.h zfs-linux-2.3.9/include/os/linux/zfs/sys/zpl.h --- zfs-linux-2.3.2/include/os/linux/zfs/sys/zpl.h 2025-05-01 18:23:23.746214921 +0000 +++ zfs-linux-2.3.9/include/os/linux/zfs/sys/zpl.h 2026-08-21 20:57:12.308668718 +0000 @@ -55,6 +55,7 @@ extern void zpl_prune_sb(uint64_t nr_to_scan, void *arg); extern const struct super_operations zpl_super_operations; +extern const struct dentry_operations zpl_dentry_operations; extern const struct export_operations zpl_export_operations; extern struct file_system_type zpl_fs_type; @@ -123,41 +124,6 @@ extern int zpl_dedupe_file_range(struct file *src_file, loff_t src_off, struct file *dst_file, loff_t dst_off, uint64_t len); -/* compat for FICLONE/FICLONERANGE/FIDEDUPERANGE ioctls */ -typedef struct { - int64_t fcr_src_fd; - uint64_t fcr_src_offset; - uint64_t fcr_src_length; - uint64_t fcr_dest_offset; -} zfs_ioc_compat_file_clone_range_t; - -typedef struct { - int64_t fdri_dest_fd; - uint64_t fdri_dest_offset; - uint64_t fdri_bytes_deduped; - int32_t fdri_status; - uint32_t fdri_reserved; -} zfs_ioc_compat_dedupe_range_info_t; - -typedef struct { - uint64_t fdr_src_offset; - uint64_t fdr_src_length; - uint16_t fdr_dest_count; - uint16_t fdr_reserved1; - uint32_t fdr_reserved2; - zfs_ioc_compat_dedupe_range_info_t fdr_info[]; -} zfs_ioc_compat_dedupe_range_t; - -#define ZFS_IOC_COMPAT_FICLONE _IOW(0x94, 9, int) -#define ZFS_IOC_COMPAT_FICLONERANGE \ - _IOW(0x94, 13, zfs_ioc_compat_file_clone_range_t) -#define ZFS_IOC_COMPAT_FIDEDUPERANGE \ - _IOWR(0x94, 54, zfs_ioc_compat_dedupe_range_t) - -extern long zpl_ioctl_ficlone(struct file *filp, void *arg); -extern long zpl_ioctl_ficlonerange(struct file *filp, void *arg); -extern long zpl_ioctl_fideduperange(struct file *filp, void *arg); - #if defined(HAVE_INODE_TIMESTAMP_TRUNCATE) #define zpl_inode_timestamp_truncate(ts, ip) timestamp_truncate(ts, ip) diff -Nru zfs-linux-2.3.2/include/sys/arc.h zfs-linux-2.3.9/include/sys/arc.h --- zfs-linux-2.3.2/include/sys/arc.h 2025-05-01 18:23:23.746214921 +0000 +++ zfs-linux-2.3.9/include/sys/arc.h 2026-08-21 20:57:12.309529190 +0000 @@ -64,8 +64,15 @@ (hdr)->b_psize = ((x) >> SPA_MINBLOCKSHIFT); \ } while (0) +/* The l2size in the header is only used by L2 cache */ +#define HDR_SET_L2SIZE(hdr, x) do { \ + ASSERT(IS_P2ALIGNED((x), 1U << SPA_MINBLOCKSHIFT)); \ + (hdr)->b_l2size = ((x) >> SPA_MINBLOCKSHIFT); \ +} while (0) + #define HDR_GET_LSIZE(hdr) ((hdr)->b_lsize << SPA_MINBLOCKSHIFT) #define HDR_GET_PSIZE(hdr) ((hdr)->b_psize << SPA_MINBLOCKSHIFT) +#define HDR_GET_L2SIZE(hdr) ((hdr)->b_l2size << SPA_MINBLOCKSHIFT) typedef struct arc_buf_hdr arc_buf_hdr_t; typedef struct arc_buf arc_buf_t; @@ -323,8 +330,10 @@ int arc_cached(spa_t *spa, const blkptr_t *bp); void arc_flush(spa_t *spa, boolean_t retry); +void arc_flush_async(spa_t *spa); void arc_tempreserve_clear(uint64_t reserve); int arc_tempreserve_space(spa_t *spa, uint64_t reserve, uint64_t txg); +boolean_t arc_async_flush_guid_inuse(uint64_t load_guid); uint64_t arc_all_memory(void); uint64_t arc_default_max(uint64_t min, uint64_t allmem); diff -Nru zfs-linux-2.3.2/include/sys/arc_impl.h zfs-linux-2.3.9/include/sys/arc_impl.h --- zfs-linux-2.3.2/include/sys/arc_impl.h 2025-05-01 18:23:23.746214921 +0000 +++ zfs-linux-2.3.9/include/sys/arc_impl.h 2026-08-21 20:57:12.309529190 +0000 @@ -379,8 +379,8 @@ * L2ARC Internals */ typedef struct l2arc_dev { - vdev_t *l2ad_vdev; /* vdev */ - spa_t *l2ad_spa; /* spa */ + vdev_t *l2ad_vdev; /* can be NULL during remove */ + spa_t *l2ad_spa; /* can be NULL during remove */ uint64_t l2ad_hand; /* next write location */ uint64_t l2ad_start; /* first addr on device */ uint64_t l2ad_end; /* last addr on device */ @@ -476,8 +476,8 @@ arc_buf_contents_t b_type; uint8_t b_complevel; - uint8_t b_reserved1; /* used for 4 byte alignment */ - uint16_t b_reserved2; /* used for 4 byte alignment */ + uint8_t b_reserved1; /* used for 4 byte alignment */ + uint16_t b_l2size; /* alignment or L2-only size */ arc_buf_hdr_t *b_hash_next; arc_flags_t b_flags; @@ -778,6 +778,8 @@ * due to ARC_FLAG_UNCACHED being set. */ kstat_named_t arcstat_uncached_evictable_metadata; + /* Number of L2ARC devices currently attached across all pools. */ + kstat_named_t arcstat_l2_ndev; kstat_named_t arcstat_l2_hits; kstat_named_t arcstat_l2_misses; /* @@ -954,7 +956,7 @@ wmsum_t arcstat_data_size; wmsum_t arcstat_metadata_size; wmsum_t arcstat_dbuf_size; - wmsum_t arcstat_dnode_size; + aggsum_t arcstat_dnode_size; wmsum_t arcstat_bonus_size; wmsum_t arcstat_l2_hits; wmsum_t arcstat_l2_misses; diff -Nru zfs-linux-2.3.2/include/sys/brt_impl.h zfs-linux-2.3.9/include/sys/brt_impl.h --- zfs-linux-2.3.2/include/sys/brt_impl.h 2025-05-01 18:23:23.747214935 +0000 +++ zfs-linux-2.3.9/include/sys/brt_impl.h 2026-08-21 20:57:12.309529190 +0000 @@ -65,7 +65,7 @@ */ #define BRT_BLOCKSIZE (32 * 1024) #define BRT_RANGESIZE_TO_NBLOCKS(size) \ - (((size) - 1) / BRT_BLOCKSIZE / sizeof (uint16_t) + 1) + (((size) - 1) / (BRT_BLOCKSIZE / sizeof (uint16_t)) + 1) #define BRT_LITTLE_ENDIAN 0 #define BRT_BIG_ENDIAN 1 diff -Nru zfs-linux-2.3.2/include/sys/dbuf.h zfs-linux-2.3.9/include/sys/dbuf.h --- zfs-linux-2.3.2/include/sys/dbuf.h 2025-05-01 18:23:23.747214935 +0000 +++ zfs-linux-2.3.9/include/sys/dbuf.h 2026-08-21 20:57:12.310005727 +0000 @@ -174,6 +174,7 @@ arc_buf_t *dr_data; override_states_t dr_override_state; uint8_t dr_copies; + uint8_t dr_gang_copies; boolean_t dr_nopwrite; boolean_t dr_brtwrite; boolean_t dr_diowrite; @@ -446,6 +447,7 @@ void dbuf_init(void); void dbuf_fini(void); +void dbuf_cache_reduce_target_size(void); boolean_t dbuf_is_metadata(dmu_buf_impl_t *db); diff -Nru zfs-linux-2.3.2/include/sys/ddt.h zfs-linux-2.3.9/include/sys/ddt.h --- zfs-linux-2.3.2/include/sys/ddt.h 2025-05-01 18:23:23.747214935 +0000 +++ zfs-linux-2.3.9/include/sys/ddt.h 2026-08-21 20:57:12.310005727 +0000 @@ -286,14 +286,11 @@ ddt_log_t *ddt_log_active; /* pointers into ddt_log */ ddt_log_t *ddt_log_flushing; /* swapped when flush starts */ - hrtime_t ddt_flush_start; /* log flush start this txg */ - uint32_t ddt_flush_pass; /* log flush pass this txg */ - - int32_t ddt_flush_count; /* entries flushed this txg */ - int32_t ddt_flush_min; /* min rem entries to flush */ int32_t ddt_log_ingest_rate; /* rolling log ingest rate */ int32_t ddt_log_flush_rate; /* rolling log flush rate */ int32_t ddt_log_flush_time_rate; /* avg time spent flushing */ + uint32_t ddt_log_flush_pressure; /* pressure to apply for cap */ + uint32_t ddt_log_flush_prev_backlog; /* prev backlog size */ uint64_t ddt_flush_force_txg; /* flush hard before this txg */ diff -Nru zfs-linux-2.3.2/include/sys/dmu.h zfs-linux-2.3.9/include/sys/dmu.h --- zfs-linux-2.3.2/include/sys/dmu.h 2025-05-01 18:23:23.748214949 +0000 +++ zfs-linux-2.3.9/include/sys/dmu.h 2026-08-21 20:57:12.310005727 +0000 @@ -144,9 +144,9 @@ #define DMU_OT_IS_DDT(ot) \ ((ot) == DMU_OT_DDT_ZAP) -#define DMU_OT_IS_CRITICAL(ot) \ +#define DMU_OT_IS_CRITICAL(ot, level) \ (DMU_OT_IS_METADATA(ot) && \ - (ot) != DMU_OT_DNODE && \ + ((ot) != DMU_OT_DNODE || (level) > 0) && \ (ot) != DMU_OT_DIRECTORY_CONTENTS && \ (ot) != DMU_OT_SA) @@ -281,9 +281,30 @@ * the transaction is full. See the comment above dmu_tx_assign() for more * details on the meaning of these flags. */ -#define DMU_TX_NOWAIT (0ULL) -#define DMU_TX_WAIT (1ULL<<0) -#define DMU_TX_NOTHROTTLE (1ULL<<1) +typedef enum { + /* + * If the tx cannot be assigned to a transaction for any reason, do + * not block but return immediately. + */ + DMU_TX_NOWAIT = 0, + + /* + * Assign the tx to the open transaction. If the open transaction is + * full, or the write throttle is active, block until the next + * transaction and try again. If the pool suspends while waiting + * and failmode=continue, return an error. + */ + DMU_TX_WAIT = (1 << 0), + + /* If the write throttle would prevent the assignment, ignore it. */ + DMU_TX_NOTHROTTLE = (1 << 1), + + /* + * With DMU_TX_WAIT, always block if the pool suspends during + * assignment, regardless of the value of the failmode= property. + */ + DMU_TX_SUSPEND = (1 << 2), +} dmu_tx_flag_t; void byteswap_uint64_array(void *buf, size_t size); void byteswap_uint32_array(void *buf, size_t size); @@ -814,7 +835,7 @@ void dmu_tx_hold_append_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, int len); void dmu_tx_hold_clone_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, - int len); + uint64_t len, uint_t blksz); void dmu_tx_hold_free(dmu_tx_t *tx, uint64_t object, uint64_t off, uint64_t len); void dmu_tx_hold_free_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, @@ -828,7 +849,7 @@ void dmu_tx_hold_sa(dmu_tx_t *tx, struct sa_handle *hdl, boolean_t may_grow); void dmu_tx_hold_sa_create(dmu_tx_t *tx, int total_size); void dmu_tx_abort(dmu_tx_t *tx); -int dmu_tx_assign(dmu_tx_t *tx, uint64_t flags); +int dmu_tx_assign(dmu_tx_t *tx, dmu_tx_flag_t flags); void dmu_tx_wait(dmu_tx_t *tx); void dmu_tx_commit(dmu_tx_t *tx); void dmu_tx_mark_netfree(dmu_tx_t *tx); @@ -980,6 +1001,11 @@ void dmu_object_dnsize_from_db(dmu_buf_t *db, int *dnsize); +typedef enum { + DDS_FLAG_ENCRYPTED = (1<<0), + DDS_FLAG_HAS_ENCRYPTED = (1<<7), +} dmu_objset_flag_t; + typedef struct dmu_objset_stats { uint64_t dds_num_clones; /* number of clones of this */ uint64_t dds_creation_txg; @@ -989,6 +1015,7 @@ uint8_t dds_inconsistent; uint8_t dds_redacted; char dds_origin[ZFS_MAX_DATASET_NAME_LEN]; + uint8_t dds_flags; /* dmu_objset_flag_t */ } dmu_objset_stats_t; /* diff -Nru zfs-linux-2.3.2/include/sys/dmu_recv.h zfs-linux-2.3.9/include/sys/dmu_recv.h --- zfs-linux-2.3.2/include/sys/dmu_recv.h 2025-05-01 18:23:23.748214949 +0000 +++ zfs-linux-2.3.9/include/sys/dmu_recv.h 2026-08-21 20:57:12.310005727 +0000 @@ -60,7 +60,6 @@ uint64_t drc_ivset_guid; void *drc_owner; cred_t *drc_cred; - proc_t *drc_proc; nvlist_t *drc_begin_nvl; objset_t *drc_os; diff -Nru zfs-linux-2.3.2/include/sys/dmu_tx.h zfs-linux-2.3.9/include/sys/dmu_tx.h --- zfs-linux-2.3.2/include/sys/dmu_tx.h 2025-05-01 18:23:23.748214949 +0000 +++ zfs-linux-2.3.9/include/sys/dmu_tx.h 2026-08-21 20:57:12.310005727 +0000 @@ -25,6 +25,7 @@ */ /* * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2025, Klara, Inc. */ #ifndef _SYS_DMU_TX_H @@ -80,6 +81,9 @@ /* has this transaction already been delayed? */ boolean_t tx_dirty_delayed; + /* whether dmu_tx_wait() should return on suspend */ + boolean_t tx_break_on_suspend; + int tx_err; }; @@ -143,7 +147,7 @@ * These routines are defined in dmu.h, and are called by the user. */ dmu_tx_t *dmu_tx_create(objset_t *dd); -int dmu_tx_assign(dmu_tx_t *tx, uint64_t txg_how); +int dmu_tx_assign(dmu_tx_t *tx, dmu_tx_flag_t flags); void dmu_tx_commit(dmu_tx_t *tx); void dmu_tx_abort(dmu_tx_t *tx); uint64_t dmu_tx_get_txg(dmu_tx_t *tx); diff -Nru zfs-linux-2.3.2/include/sys/dnode.h zfs-linux-2.3.9/include/sys/dnode.h --- zfs-linux-2.3.2/include/sys/dnode.h 2025-05-01 18:23:23.748214949 +0000 +++ zfs-linux-2.3.9/include/sys/dnode.h 2026-08-21 20:57:12.311005713 +0000 @@ -458,6 +458,8 @@ void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx, boolean_t have_read, boolean_t force); uint64_t dnode_block_freed(dnode_t *dn, uint64_t blkid); +uint64_t dnode_block_freed_after(dnode_t *dn, uint64_t blkid, + uint64_t override_txg); void dnode_init(void); void dnode_fini(void); int dnode_next_offset(dnode_t *dn, int flags, uint64_t *off, @@ -664,6 +666,19 @@ #endif +/* + * Assert that we are not modifying the range tree for the syncing TXG from + * a non-syncing thread. We verify that either the transaction group is + * strictly newer than the one currently syncing (meaning it's being modified + * in open context), OR the current thread is the sync thread itself. If this + * triggers, it indicates a race where dn_free_ranges is being modified while + * dnode_sync() may be iterating over it. + */ +#define FREE_RANGE_VERIFY(tx, dn) \ + ASSERT((tx)->tx_txg > spa_syncing_txg((dn)->dn_objset->os_spa) || \ + dmu_objset_pool((dn)->dn_objset)->dp_tx.tx_sync_thread == \ + curthread) + #ifdef __cplusplus } #endif diff -Nru zfs-linux-2.3.2/include/sys/dsl_dataset.h zfs-linux-2.3.9/include/sys/dsl_dataset.h --- zfs-linux-2.3.2/include/sys/dsl_dataset.h 2025-05-01 18:23:23.748214949 +0000 +++ zfs-linux-2.3.9/include/sys/dsl_dataset.h 2026-08-21 20:57:12.311005713 +0000 @@ -284,7 +284,6 @@ uint64_t used, comp, uncomp, unique, cloneusedsnap, originusedsnap; nvlist_t *err_ds; cred_t *cr; - proc_t *proc; } dsl_dataset_promote_arg_t; typedef struct dsl_dataset_rollback_arg { @@ -299,7 +298,6 @@ nvlist_t *ddsa_props; nvlist_t *ddsa_errors; cred_t *ddsa_cr; - proc_t *ddsa_proc; } dsl_dataset_snapshot_arg_t; typedef struct dsl_dataset_rename_snapshot_arg { @@ -459,7 +457,7 @@ void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr, proc_t *proc); + dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr); void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx); diff -Nru zfs-linux-2.3.2/include/sys/dsl_dir.h zfs-linux-2.3.9/include/sys/dsl_dir.h --- zfs-linux-2.3.2/include/sys/dsl_dir.h 2025-05-01 18:23:23.748214949 +0000 +++ zfs-linux-2.3.9/include/sys/dsl_dir.h 2026-08-21 20:57:12.311005713 +0000 @@ -185,11 +185,11 @@ uint64_t reservation); int dsl_dir_activate_fs_ss_limit(const char *); int dsl_fs_ss_limit_check(dsl_dir_t *, uint64_t, zfs_prop_t, dsl_dir_t *, - cred_t *, proc_t *); + cred_t *); void dsl_fs_ss_count_adjust(dsl_dir_t *, int64_t, const char *, dmu_tx_t *); int dsl_dir_rename(const char *oldname, const char *newname); int dsl_dir_transfer_possible(dsl_dir_t *sdd, dsl_dir_t *tdd, - uint64_t fs_cnt, uint64_t ss_cnt, uint64_t space, cred_t *, proc_t *); + uint64_t fs_cnt, uint64_t ss_cnt, uint64_t space, cred_t *); boolean_t dsl_dir_is_clone(dsl_dir_t *dd); void dsl_dir_new_refreservation(dsl_dir_t *dd, struct dsl_dataset *ds, uint64_t reservation, cred_t *cr, dmu_tx_t *tx); diff -Nru zfs-linux-2.3.2/include/sys/frame.h zfs-linux-2.3.9/include/sys/frame.h --- zfs-linux-2.3.2/include/sys/frame.h 2025-05-01 18:23:23.749214963 +0000 +++ zfs-linux-2.3.9/include/sys/frame.h 2026-08-21 20:57:12.312205684 +0000 @@ -31,8 +31,16 @@ #else #include #endif +#if defined(_ASM) && ! defined(HAVE_STACK_FRAME_NON_STANDARD_ASM) +.macro STACK_FRAME_NON_STANDARD func:req +.endm +#endif #else #define STACK_FRAME_NON_STANDARD(func) +#if defined(_ASM) +.macro STACK_FRAME_NON_STANDARD func:req +.endm +#endif #endif #ifdef __cplusplus diff -Nru zfs-linux-2.3.2/include/sys/fs/zfs.h zfs-linux-2.3.9/include/sys/fs/zfs.h --- zfs-linux-2.3.2/include/sys/fs/zfs.h 2025-05-01 18:23:23.749214963 +0000 +++ zfs-linux-2.3.9/include/sys/fs/zfs.h 2026-08-21 20:57:12.312205684 +0000 @@ -740,6 +740,8 @@ #define ZPOOL_CONFIG_METASLAB_SHIFT "metaslab_shift" #define ZPOOL_CONFIG_ASHIFT "ashift" #define ZPOOL_CONFIG_ASIZE "asize" +#define ZPOOL_CONFIG_MIN_ALLOC "min_alloc" +#define ZPOOL_CONFIG_MAX_ALLOC "max_alloc" #define ZPOOL_CONFIG_DTL "DTL" #define ZPOOL_CONFIG_SCAN_STATS "scan_stats" /* not stored on disk */ #define ZPOOL_CONFIG_REMOVAL_STATS "removal_stats" /* not stored on disk */ @@ -861,6 +863,10 @@ #define ZPOOL_CONFIG_MMP_SEQ "mmp_seq" /* not stored on disk */ #define ZPOOL_CONFIG_MMP_HOSTNAME "mmp_hostname" /* not stored on disk */ #define ZPOOL_CONFIG_MMP_HOSTID "mmp_hostid" /* not stored on disk */ +#define ZPOOL_CONFIG_MMP_RESULT "mmp_result" /* not stored on disk */ +#define ZPOOL_CONFIG_MMP_TRYIMPORT_NS "mmp_tryimport_ns" /* not stored */ +#define ZPOOL_CONFIG_MMP_IMPORT_NS "mmp_import_ns" /* not stored on disk */ +#define ZPOOL_CONFIG_MMP_CLAIM_NS "mmp_claim_ns" /* not stored on disk */ #define ZPOOL_CONFIG_ALLOCATION_BIAS "alloc_bias" /* not stored on disk */ #define ZPOOL_CONFIG_EXPANSION_TIME "expansion_time" /* not stored */ #define ZPOOL_CONFIG_REBUILD_STATS "org.openzfs:rebuild_stats" @@ -1614,6 +1620,15 @@ #endif +typedef struct zfs_rewrite_args { + uint64_t off; + uint64_t len; + uint64_t flags; + uint64_t arg; +} zfs_rewrite_args_t; + +#define ZFS_IOC_REWRITE _IOW(0x83, 3, zfs_rewrite_args_t) + /* * ZFS-specific error codes used for returning descriptive errors * to the userland through zfs ioctls. diff -Nru zfs-linux-2.3.2/include/sys/metaslab.h zfs-linux-2.3.9/include/sys/metaslab.h --- zfs-linux-2.3.2/include/sys/metaslab.h 2025-05-01 18:23:23.750214977 +0000 +++ zfs-linux-2.3.9/include/sys/metaslab.h 2026-08-21 20:57:12.312827624 +0000 @@ -114,12 +114,12 @@ void metaslab_class_throttle_unreserve(metaslab_class_t *, int, int, zio_t *); void metaslab_class_evict_old(metaslab_class_t *, uint64_t); uint64_t metaslab_class_get_alloc(metaslab_class_t *); +uint64_t metaslab_class_get_dalloc(metaslab_class_t *); uint64_t metaslab_class_get_space(metaslab_class_t *); uint64_t metaslab_class_get_dspace(metaslab_class_t *); uint64_t metaslab_class_get_deferred(metaslab_class_t *); -void metaslab_space_update(vdev_t *, metaslab_class_t *, - int64_t, int64_t, int64_t); +void metaslab_space_update(metaslab_group_t *, int64_t, int64_t, int64_t); metaslab_group_t *metaslab_group_create(metaslab_class_t *, vdev_t *, int); void metaslab_group_destroy(metaslab_group_t *); diff -Nru zfs-linux-2.3.2/include/sys/metaslab_impl.h zfs-linux-2.3.9/include/sys/metaslab_impl.h --- zfs-linux-2.3.2/include/sys/metaslab_impl.h 2025-05-01 18:23:23.750214977 +0000 +++ zfs-linux-2.3.9/include/sys/metaslab_impl.h 2026-08-21 20:57:12.312827624 +0000 @@ -197,10 +197,12 @@ uint64_t mc_alloc_groups; /* # of allocatable groups */ - uint64_t mc_alloc; /* total allocated space */ - uint64_t mc_deferred; /* total deferred frees */ + uint64_t mc_alloc; /* allocated space */ + uint64_t mc_dalloc; /* deflated allocated space */ + uint64_t mc_deferred; /* deferred frees */ + uint64_t mc_ddeferred; /* deflated deferred frees */ uint64_t mc_space; /* total space (alloc + free) */ - uint64_t mc_dspace; /* total deflated space */ + uint64_t mc_dspace; /* deflated total space */ uint64_t mc_histogram[ZFS_RANGE_TREE_HISTOGRAM_SIZE]; /* @@ -568,6 +570,8 @@ uint64_t msp_unflushed_txg; } metaslab_unflushed_phys_t; +char *metaslab_rt_name(metaslab_group_t *, metaslab_t *, const char *); + #ifdef __cplusplus } #endif diff -Nru zfs-linux-2.3.2/include/sys/mmp.h zfs-linux-2.3.9/include/sys/mmp.h --- zfs-linux-2.3.2/include/sys/mmp.h 2025-05-01 18:23:23.750214977 +0000 +++ zfs-linux-2.3.9/include/sys/mmp.h 2026-08-21 20:57:12.312827624 +0000 @@ -33,6 +33,7 @@ #define MMP_DEFAULT_IMPORT_INTERVALS 20 #define MMP_DEFAULT_FAIL_INTERVALS 10 #define MMP_MIN_FAIL_INTERVALS 2 /* min if != 0 */ +#define MMP_IMPORT_VERIFY_ITERS 10 #define MMP_IMPORT_SAFETY_FACTOR 200 /* pct */ #define MMP_INTERVAL_OK(interval) MAX(interval, MMP_MIN_INTERVAL) #define MMP_FAIL_INTVS_OK(fails) (fails == 0 ? 0 : MAX(fails, \ @@ -53,6 +54,9 @@ vdev_t *mmp_last_leaf; /* last mmp write sent here */ uint64_t mmp_leaf_last_gen; /* last mmp write sent here */ uint32_t mmp_seq; /* intra-second update counter */ + uint64_t mmp_tryimport_ns; /* tryimport activity check time */ + uint64_t mmp_import_ns; /* import activity check time */ + uint64_t mmp_claim_ns; /* claim activity check time */ } mmp_thread_t; @@ -62,6 +66,7 @@ extern void mmp_thread_stop(struct spa *spa); extern void mmp_update_uberblock(struct spa *spa, struct uberblock *ub); extern void mmp_signal_all_threads(void); +extern int mmp_claim_uberblock(spa_t *spa, vdev_t *vd, uberblock_t *ub); /* Global tuning */ extern int param_set_multihost_interval(ZFS_MODULE_PARAM_ARGS); @@ -69,6 +74,11 @@ extern uint_t zfs_multihost_fail_intervals; extern uint_t zfs_multihost_import_intervals; +#ifndef _KERNEL +/* Manual recovery only, see the comment in mmp.c. Never in the module. */ +extern boolean_t mmp_claim_relaxed; +#endif + #ifdef __cplusplus } #endif diff -Nru zfs-linux-2.3.2/include/sys/range_tree.h zfs-linux-2.3.9/include/sys/range_tree.h --- zfs-linux-2.3.2/include/sys/range_tree.h 2025-05-01 18:23:23.750214977 +0000 +++ zfs-linux-2.3.9/include/sys/range_tree.h 2026-08-21 20:57:12.313005685 +0000 @@ -49,6 +49,9 @@ ZFS_RANGE_SEG_NUM_TYPES, } zfs_range_seg_type_t; +#define ZFS_RT_NAME(rt) (((rt)->rt_name != NULL) ? (rt)->rt_name : "") +#define ZFS_RT_F_DYN_NAME (1ULL << 0) /* if rt_name must be freed */ + /* * Note: the range_tree may not be accessed concurrently; consumers * must provide external locking if required. @@ -68,6 +71,9 @@ void *rt_arg; uint64_t rt_gap; /* allowable inter-segment gap */ + uint64_t rt_flags; + const char *rt_name; /* details for debugging */ + /* * The rt_histogram maintains a histogram of ranges. Each bucket, * rt_histogram[i], contains the number of ranges whose size is: @@ -281,6 +287,9 @@ uint64_t gap); zfs_range_tree_t *zfs_range_tree_create(const zfs_range_tree_ops_t *ops, zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift); +zfs_range_tree_t *zfs_range_tree_create_flags(const zfs_range_tree_ops_t *ops, + zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift, + uint64_t flags, const char *name); void zfs_range_tree_destroy(zfs_range_tree_t *rt); boolean_t zfs_range_tree_contains(zfs_range_tree_t *rt, uint64_t start, uint64_t size); diff -Nru zfs-linux-2.3.2/include/sys/spa.h zfs-linux-2.3.9/include/sys/spa.h --- zfs-linux-2.3.2/include/sys/spa.h 2025-05-01 18:23:23.751214991 +0000 +++ zfs-linux-2.3.9/include/sys/spa.h 2026-08-21 20:57:12.313005685 +0000 @@ -1044,10 +1044,12 @@ extern void spa_altroot(spa_t *, char *, size_t); extern uint32_t spa_sync_pass(spa_t *spa); extern char *spa_name(spa_t *spa); +extern char *spa_load_name(spa_t *spa); extern uint64_t spa_guid(spa_t *spa); extern uint64_t spa_load_guid(spa_t *spa); extern uint64_t spa_last_synced_txg(spa_t *spa); extern uint64_t spa_first_txg(spa_t *spa); +extern uint64_t spa_open_txg(spa_t *spa); extern uint64_t spa_syncing_txg(spa_t *spa); extern uint64_t spa_final_dirty_txg(spa_t *spa); extern uint64_t spa_version(spa_t *spa); @@ -1055,6 +1057,7 @@ extern spa_load_state_t spa_load_state(spa_t *spa); extern uint64_t spa_freeze_txg(spa_t *spa); extern uint64_t spa_get_worst_case_asize(spa_t *spa, uint64_t lsize); +extern void spa_get_min_alloc_range(spa_t *spa, uint64_t *min, uint64_t *max); extern uint64_t spa_get_dspace(spa_t *spa); extern uint64_t spa_get_checkpoint_space(spa_t *spa); extern uint64_t spa_get_slop_space(spa_t *spa); @@ -1092,9 +1095,9 @@ /* Miscellaneous support routines */ extern void spa_load_failed(spa_t *spa, const char *fmt, ...) - __attribute__((format(printf, 2, 3))); + __attribute__((format(__printf__, 2, 3))); extern void spa_load_note(spa_t *spa, const char *fmt, ...) - __attribute__((format(printf, 2, 3))); + __attribute__((format(__printf__, 2, 3))); extern void spa_activate_mos_feature(spa_t *spa, const char *feature, dmu_tx_t *tx); extern void spa_deactivate_mos_feature(spa_t *spa, const char *feature); @@ -1103,6 +1106,7 @@ extern char *spa_strdup(const char *); extern void spa_strfree(char *); extern uint64_t spa_generate_guid(spa_t *spa); +extern uint64_t spa_generate_load_guid(void); extern void snprintf_blkptr(char *buf, size_t buflen, const blkptr_t *bp); extern void spa_freeze(spa_t *spa); extern int spa_change_guid(spa_t *spa, const uint64_t *guidp); diff -Nru zfs-linux-2.3.2/include/sys/spa_impl.h zfs-linux-2.3.9/include/sys/spa_impl.h --- zfs-linux-2.3.2/include/sys/spa_impl.h 2025-05-01 18:23:23.751214991 +0000 +++ zfs-linux-2.3.9/include/sys/spa_impl.h 2026-08-21 20:57:12.313005685 +0000 @@ -224,6 +224,7 @@ * Fields protected by spa_namespace_lock. */ char spa_name[ZFS_MAX_DATASET_NAME_LEN]; /* pool name */ + char *spa_load_name; /* unmodified pool name */ char *spa_comment; /* comment */ avl_node_t spa_avl; /* node in spa_namespace_avl */ nvlist_t *spa_config; /* last synced config */ @@ -267,6 +268,7 @@ uint64_t spa_min_ashift; /* of vdevs in normal class */ uint64_t spa_max_ashift; /* of vdevs in normal class */ uint64_t spa_min_alloc; /* of vdevs in normal class */ + uint64_t spa_max_alloc; /* of vdevs in normal class */ uint64_t spa_gcd_alloc; /* of vdevs in normal class */ uint64_t spa_config_guid; /* config pool guid */ uint64_t spa_load_guid; /* spa_load initialized guid */ @@ -302,6 +304,7 @@ void *spa_cksum_tmpls[ZIO_CHECKSUM_FUNCTIONS]; uberblock_t spa_ubsync; /* last synced uberblock */ uberblock_t spa_uberblock; /* current uberblock */ + boolean_t spa_activity_check; /* activity check required */ boolean_t spa_extreme_rewind; /* rewind past deferred frees */ kmutex_t spa_scrub_lock; /* resilver/scrub lock */ uint64_t spa_scrub_inflight; /* in-flight scrub bytes */ diff -Nru zfs-linux-2.3.2/include/sys/txg.h zfs-linux-2.3.9/include/sys/txg.h --- zfs-linux-2.3.2/include/sys/txg.h 2025-05-01 18:23:23.752215005 +0000 +++ zfs-linux-2.3.9/include/sys/txg.h 2026-08-21 20:57:12.314362728 +0000 @@ -25,6 +25,7 @@ */ /* * Copyright (c) 2012, 2017 by Delphix. All rights reserved. + * Copyright (c) 2025, Klara, Inc. */ #ifndef _SYS_TXG_H @@ -66,6 +67,23 @@ txg_node_t *tl_head[TXG_SIZE]; } txg_list_t; +/* + * Wait flags for txg_wait_synced_flags(). By default (TXG_WAIT_NONE), it will + * wait until the wanted txg is reached, or block forever. Additional flags + * indicate other conditions that the caller is interested in, that will cause + * the wait to break and return an error code describing the condition. + */ +typedef enum { + /* No special flags. Guaranteed to block forever or return 0 */ + TXG_WAIT_NONE = 0, + + /* If a signal arrives while waiting, abort and return EINTR */ + TXG_WAIT_SIGNAL = (1 << 0), + + /* If the pool suspends while waiting, abort and return ESHUTDOWN. */ + TXG_WAIT_SUSPEND = (1 << 1), +} txg_wait_flag_t; + struct dsl_pool; extern void txg_init(struct dsl_pool *dp, uint64_t txg); @@ -86,13 +104,21 @@ * Try to make this happen as soon as possible (eg. kick off any * necessary syncs immediately). If txg==0, wait for the currently open * txg to finish syncing. + * See txg_wait_flag_t above for a description of how the flags affect the wait. + */ +extern int txg_wait_synced_flags(struct dsl_pool *dp, uint64_t txg, + txg_wait_flag_t flags); + +/* + * Traditional form of txg_wait_synced_flags, waits forever. + * Shorthand for VERIFY0(txg_wait_synced_flags(dp, TXG_WAIT_NONE)) */ extern void txg_wait_synced(struct dsl_pool *dp, uint64_t txg); /* - * Wait as above. Returns true if the thread was signaled while waiting. + * Wake all threads waiting in txg_wait_synced_flags() so they can reevaluate. */ -extern boolean_t txg_wait_synced_sig(struct dsl_pool *dp, uint64_t txg); +extern void txg_wait_kick(struct dsl_pool *dp); /* * Wait until the given transaction group, or one after it, is diff -Nru zfs-linux-2.3.2/include/sys/uberblock_impl.h zfs-linux-2.3.9/include/sys/uberblock_impl.h --- zfs-linux-2.3.2/include/sys/uberblock_impl.h 2025-05-01 18:23:23.755215047 +0000 +++ zfs-linux-2.3.9/include/sys/uberblock_impl.h 2026-08-21 20:57:12.317005629 +0000 @@ -51,6 +51,12 @@ #define MMP_SEQ_VALID_BIT 0x02 #define MMP_FAIL_INT_VALID_BIT 0x04 +#define MMP_INTERVAL_MASK 0x00000000FFFFFF00 +#define MMP_SEQ_MASK 0x0000FFFF00000000 +#define MMP_FAIL_INT_MASK 0xFFFF000000000000 + +#define MMP_SEQ_MAX UINT16_MAX + #define MMP_VALID(ubp) ((ubp)->ub_magic == UBERBLOCK_MAGIC && \ (ubp)->ub_mmp_magic == MMP_MAGIC) #define MMP_INTERVAL_VALID(ubp) (MMP_VALID(ubp) && ((ubp)->ub_mmp_config & \ @@ -60,21 +66,25 @@ #define MMP_FAIL_INT_VALID(ubp) (MMP_VALID(ubp) && ((ubp)->ub_mmp_config & \ MMP_FAIL_INT_VALID_BIT)) -#define MMP_INTERVAL(ubp) (((ubp)->ub_mmp_config & 0x00000000FFFFFF00) \ +#define MMP_INTERVAL(ubp) (((ubp)->ub_mmp_config & MMP_INTERVAL_MASK) \ >> 8) -#define MMP_SEQ(ubp) (((ubp)->ub_mmp_config & 0x0000FFFF00000000) \ +#define MMP_SEQ(ubp) (((ubp)->ub_mmp_config & MMP_SEQ_MASK) \ >> 32) -#define MMP_FAIL_INT(ubp) (((ubp)->ub_mmp_config & 0xFFFF000000000000) \ +#define MMP_FAIL_INT(ubp) (((ubp)->ub_mmp_config & MMP_FAIL_INT_MASK) \ >> 48) #define MMP_INTERVAL_SET(write) \ - (((uint64_t)(write & 0xFFFFFF) << 8) | MMP_INTERVAL_VALID_BIT) + (((uint64_t)((write) & 0xFFFFFF) << 8) | MMP_INTERVAL_VALID_BIT) #define MMP_SEQ_SET(seq) \ - (((uint64_t)(seq & 0xFFFF) << 32) | MMP_SEQ_VALID_BIT) + (((uint64_t)((seq) & 0xFFFF) << 32) | MMP_SEQ_VALID_BIT) #define MMP_FAIL_INT_SET(fail) \ - (((uint64_t)(fail & 0xFFFF) << 48) | MMP_FAIL_INT_VALID_BIT) + (((uint64_t)((fail) & 0xFFFF) << 48) | MMP_FAIL_INT_VALID_BIT) + + +#define MMP_SEQ_CLEAR(ubp) \ + ((ubp)->ub_mmp_config &= ~(MMP_SEQ_MASK | MMP_SEQ_VALID_BIT)) /* * RAIDZ expansion reflow information. diff -Nru zfs-linux-2.3.2/include/sys/vdev.h zfs-linux-2.3.9/include/sys/vdev.h --- zfs-linux-2.3.2/include/sys/vdev.h 2025-05-01 18:23:23.755215047 +0000 +++ zfs-linux-2.3.9/include/sys/vdev.h 2026-08-21 20:57:12.317005629 +0000 @@ -25,6 +25,7 @@ * Copyright (c) 2011, 2020 by Delphix. All rights reserved. * Copyright (c) 2017, Intel Corporation. * Copyright (c) 2019, Datto Inc. All rights reserved. + * Copyright (c) 2026, TrueNAS. */ #ifndef _SYS_VDEV_H @@ -54,11 +55,12 @@ typedef boolean_t vdev_open_children_func_t(vdev_t *vd); extern void vdev_dbgmsg(vdev_t *vd, const char *fmt, ...) - __attribute__((format(printf, 2, 3))); + __attribute__((format(__printf__, 2, 3))); extern void vdev_dbgmsg_print_tree(vdev_t *, int); -extern int vdev_open(vdev_t *); -extern void vdev_open_children(vdev_t *); -extern void vdev_open_children_subset(vdev_t *, vdev_open_children_func_t *); +extern int vdev_open(vdev_t *, cred_t *); +extern void vdev_open_children(vdev_t *, cred_t *); +extern void vdev_open_children_subset(vdev_t *, cred_t *, + vdev_open_children_func_t *); extern int vdev_validate(vdev_t *); extern int vdev_copy_path_strict(vdev_t *, vdev_t *); extern void vdev_copy_path_relaxed(vdev_t *, vdev_t *); @@ -173,6 +175,7 @@ extern uint32_t vdev_queue_length(vdev_t *vd); extern uint64_t vdev_queue_last_offset(vdev_t *vd); extern uint64_t vdev_queue_class_length(vdev_t *vq, zio_priority_t p); +extern boolean_t vdev_queue_pool_busy(spa_t *spa); extern void vdev_config_dirty(vdev_t *vd); extern void vdev_config_clean(vdev_t *vd); @@ -211,6 +214,8 @@ extern int vdev_label_read_bootenv(vdev_t *, nvlist_t *); extern int vdev_label_write_bootenv(vdev_t *, nvlist_t *); extern int vdev_uberblock_sync_list(vdev_t **, int, struct uberblock *, int); +extern int vdev_uberblock_compare(const struct uberblock *, + const struct uberblock *); extern int vdev_check_boot_reserve(spa_t *, vdev_t *); typedef enum { diff -Nru zfs-linux-2.3.2/include/sys/vdev_impl.h zfs-linux-2.3.9/include/sys/vdev_impl.h --- zfs-linux-2.3.2/include/sys/vdev_impl.h 2025-05-01 18:23:23.756215061 +0000 +++ zfs-linux-2.3.9/include/sys/vdev_impl.h 2026-08-21 20:57:12.317005629 +0000 @@ -71,7 +71,7 @@ typedef void vdev_kobj_post_evt_func_t(vdev_t *vd); typedef void vdev_fini_func_t(vdev_t *vd); typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *max_size, - uint64_t *ashift, uint64_t *pshift); + uint64_t *ashift, uint64_t *pshift, cred_t *cr); typedef void vdev_close_func_t(vdev_t *vd); typedef uint64_t vdev_asize_func_t(vdev_t *vd, uint64_t psize, uint64_t txg); typedef uint64_t vdev_min_asize_func_t(vdev_t *vd); @@ -651,6 +651,7 @@ int param_get_raidz_impl(char *buf, zfs_kernel_param_t *kp); #endif int param_set_raidz_impl(ZFS_MODULE_PARAM_ARGS); +char *vdev_rt_name(vdev_t *vd, const char *name); /* * Vdev ashift optimization tunables diff -Nru zfs-linux-2.3.2/include/sys/vdev_raidz_impl.h zfs-linux-2.3.9/include/sys/vdev_raidz_impl.h --- zfs-linux-2.3.2/include/sys/vdev_raidz_impl.h 2025-05-01 18:23:23.756215061 +0000 +++ zfs-linux-2.3.9/include/sys/vdev_raidz_impl.h 2026-08-21 20:57:12.317005629 +0000 @@ -119,6 +119,7 @@ uint8_t rc_need_orig_restore:1; /* need to restore from orig_data? */ uint8_t rc_force_repair:1; /* Write good data to this column */ uint8_t rc_allow_repair:1; /* Allow repair I/O to this column */ + uint8_t rc_tgt_is_dspare:1; /* The target is draid spare vdev */ int rc_shadow_devidx; /* for double write during expansion */ int rc_shadow_error; /* for double write during expansion */ uint64_t rc_shadow_offset; /* for double write during expansion */ diff -Nru zfs-linux-2.3.2/include/sys/vdev_rebuild.h zfs-linux-2.3.9/include/sys/vdev_rebuild.h --- zfs-linux-2.3.2/include/sys/vdev_rebuild.h 2025-05-01 18:23:23.756215061 +0000 +++ zfs-linux-2.3.9/include/sys/vdev_rebuild.h 2026-08-21 20:57:12.317005629 +0000 @@ -70,6 +70,7 @@ zfs_range_tree_t *vr_scan_tree; kmutex_t vr_io_lock; /* inflight IO lock */ kcondvar_t vr_io_cv; /* inflight IO cv */ + uint64_t vr_last_txg; /* last used txg */ /* In-core state and progress */ uint64_t vr_scan_offset[TXG_SIZE]; @@ -90,7 +91,8 @@ boolean_t vdev_rebuild_active(vdev_t *); int vdev_rebuild_load(vdev_t *); -void vdev_rebuild(vdev_t *); +void vdev_rebuild(vdev_t *, uint64_t); +void vdev_rebuild_txgs(vdev_t *, uint64_t *, uint64_t *); void vdev_rebuild_stop_wait(vdev_t *); void vdev_rebuild_stop_all(spa_t *); void vdev_rebuild_restart(spa_t *); diff -Nru zfs-linux-2.3.2/include/sys/zap_impl.h zfs-linux-2.3.9/include/sys/zap_impl.h --- zfs-linux-2.3.2/include/sys/zap_impl.h 2025-05-01 18:23:23.756215061 +0000 +++ zfs-linux-2.3.9/include/sys/zap_impl.h 2026-08-21 20:57:12.318005615 +0000 @@ -62,8 +62,9 @@ uint64_t mz_salt; uint64_t mz_normflags; uint64_t mz_pad[5]; - mzap_ent_phys_t mz_chunk[1]; + /* actually variable size depending on block size */ + mzap_ent_phys_t mz_chunk[]; } mzap_phys_t; typedef struct mzap_ent { diff -Nru zfs-linux-2.3.2/include/sys/zcp.h zfs-linux-2.3.9/include/sys/zcp.h --- zfs-linux-2.3.2/include/sys/zcp.h 2025-05-01 18:23:23.756215061 +0000 +++ zfs-linux-2.3.9/include/sys/zcp.h 2026-08-21 20:57:12.318005615 +0000 @@ -76,7 +76,6 @@ * rather than the 'current' thread's. */ cred_t *zri_cred; - proc_t *zri_proc; /* * The tx in which this channel program is running. diff -Nru zfs-linux-2.3.2/include/sys/zfs_context.h zfs-linux-2.3.9/include/sys/zfs_context.h --- zfs-linux-2.3.2/include/sys/zfs_context.h 2025-05-01 18:23:23.757215075 +0000 +++ zfs-linux-2.3.9/include/sys/zfs_context.h 2026-08-21 20:57:12.318005615 +0000 @@ -236,6 +236,11 @@ #define thread_join(t) pthread_join((pthread_t)(t), NULL) #define newproc(f, a, cid, pri, ctp, pid) (ENOSYS) +/* + * Check if the current thread is a memory reclaim thread. + * Always returns false in userspace (no memory reclaim thread). + */ +#define current_is_reclaim_thread() (0) /* in libzpool, p0 exists only to have its address taken */ typedef struct proc { @@ -623,8 +628,10 @@ * Process priorities as defined by setpriority(2) and getpriority(2). */ #define minclsyspri 19 -#define maxclsyspri -20 #define defclsyspri 0 +/* Write issue taskq priority. */ +#define wtqclsyspri -19 +#define maxclsyspri -20 #define CPU_SEQID ((uintptr_t)pthread_self() & (max_ncpus - 1)) #define CPU_SEQID_UNSTABLE CPU_SEQID @@ -632,6 +639,9 @@ #define kcred NULL #define CRED() NULL +#define crhold(cr) ((void)cr) +#define crfree(cr) ((void)cr) + #define ptob(x) ((x) * PAGESIZE) #define NN_DIVISOR_1000 (1U << 0) @@ -744,7 +754,6 @@ cred_t *cr); extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr); extern int secpolicy_zfs(const cred_t *cr); -extern int secpolicy_zfs_proc(const cred_t *cr, proc_t *proc); extern zoneid_t getzoneid(void); /* SID stuff */ diff -Nru zfs-linux-2.3.2/include/sys/zfs_debug.h zfs-linux-2.3.9/include/sys/zfs_debug.h --- zfs-linux-2.3.2/include/sys/zfs_debug.h 2025-05-01 18:23:23.757215075 +0000 +++ zfs-linux-2.3.9/include/sys/zfs_debug.h 2026-08-21 20:57:12.318005615 +0000 @@ -60,11 +60,12 @@ #define ZFS_DEBUG_METASLAB_ALLOC (1 << 13) #define ZFS_DEBUG_BRT (1 << 14) #define ZFS_DEBUG_RAIDZ_RECONSTRUCT (1 << 15) +#define ZFS_DEBUG_DDT (1 << 16) extern void __set_error(const char *file, const char *func, int line, int err); extern void __zfs_dbgmsg(char *buf); extern void __dprintf(boolean_t dprint, const char *file, const char *func, - int line, const char *fmt, ...) __attribute__((format(printf, 5, 6))); + int line, const char *fmt, ...) __attribute__((format(__printf__, 5, 6))); /* * Some general principles for using zfs_dbgmsg(): diff -Nru zfs-linux-2.3.2/include/sys/zfs_file.h zfs-linux-2.3.9/include/sys/zfs_file.h --- zfs-linux-2.3.2/include/sys/zfs_file.h 2025-05-01 18:23:23.757215075 +0000 +++ zfs-linux-2.3.9/include/sys/zfs_file.h 2026-08-21 20:57:12.318005615 +0000 @@ -41,12 +41,13 @@ mode_t zfa_mode; /* file type */ } zfs_file_attr_t; -int zfs_file_open(const char *path, int flags, int mode, zfs_file_t **fp); +int zfs_file_open(const char *path, int flags, int mode, cred_t *cr, + zfs_file_t **fp); void zfs_file_close(zfs_file_t *fp); int zfs_file_write(zfs_file_t *fp, const void *buf, size_t len, ssize_t *resid); int zfs_file_pwrite(zfs_file_t *fp, const void *buf, size_t len, loff_t off, - ssize_t *resid); + uint8_t ashift, ssize_t *resid); int zfs_file_read(zfs_file_t *fp, void *buf, size_t len, ssize_t *resid); int zfs_file_pread(zfs_file_t *fp, void *buf, size_t len, loff_t off, ssize_t *resid); diff -Nru zfs-linux-2.3.2/include/sys/zfs_project.h zfs-linux-2.3.9/include/sys/zfs_project.h --- zfs-linux-2.3.2/include/sys/zfs_project.h 2025-05-01 18:23:23.757215075 +0000 +++ zfs-linux-2.3.9/include/sys/zfs_project.h 2026-08-21 20:57:12.319005600 +0000 @@ -35,18 +35,16 @@ #include -#ifdef FS_PROJINHERIT_FL -#define ZFS_PROJINHERIT_FL FS_PROJINHERIT_FL -#else -#define ZFS_PROJINHERIT_FL 0x20000000 -#endif - #ifdef FS_IOC_FSGETXATTR typedef struct fsxattr zfsxattr_t; #define ZFS_IOC_FSGETXATTR FS_IOC_FSGETXATTR #define ZFS_IOC_FSSETXATTR FS_IOC_FSSETXATTR #else +/* Non-Linux OS */ +#define FS_PROJINHERIT_FL 0x20000000 +#define FS_XFLAG_PROJINHERIT FS_PROJINHERIT_FL + struct zfsxattr { uint32_t fsx_xflags; /* xflags field value (get/set) */ uint32_t fsx_extsize; /* extsize field value (get/set) */ diff -Nru zfs-linux-2.3.2/include/sys/zfs_vnops.h zfs-linux-2.3.9/include/sys/zfs_vnops.h --- zfs-linux-2.3.2/include/sys/zfs_vnops.h 2025-05-01 18:23:23.758215089 +0000 +++ zfs-linux-2.3.9/include/sys/zfs_vnops.h 2026-08-21 20:57:12.319005600 +0000 @@ -40,6 +40,7 @@ uint64_t *, cred_t *); extern int zfs_clone_range_replay(znode_t *, uint64_t, uint64_t, uint64_t, const blkptr_t *, size_t); +extern int zfs_rewrite(znode_t *, uint64_t, uint64_t, uint64_t, uint64_t); extern int zfs_getsecattr(znode_t *, vsecattr_t *, int, cred_t *); extern int zfs_setsecattr(znode_t *, vsecattr_t *, int, cred_t *); diff -Nru zfs-linux-2.3.2/include/sys/zfs_znode.h zfs-linux-2.3.9/include/sys/zfs_znode.h --- zfs-linux-2.3.2/include/sys/zfs_znode.h 2025-05-01 18:23:23.758215089 +0000 +++ zfs-linux-2.3.9/include/sys/zfs_znode.h 2026-08-21 20:57:12.319005600 +0000 @@ -201,8 +201,6 @@ uint64_t z_size; /* file size (cached) */ uint64_t z_pflags; /* pflags (cached) */ uint32_t z_sync_cnt; /* synchronous open count */ - uint32_t z_sync_writes_cnt; /* synchronous write count */ - uint32_t z_async_writes_cnt; /* asynchronous write count */ mode_t z_mode; /* mode (cached) */ kmutex_t z_acl_lock; /* acl data lock */ zfs_acl_t *z_acl_cached; /* cached acl */ diff -Nru zfs-linux-2.3.2/include/sys/zio.h zfs-linux-2.3.9/include/sys/zio.h --- zfs-linux-2.3.2/include/sys/zio.h 2025-05-01 18:23:23.758215089 +0000 +++ zfs-linux-2.3.9/include/sys/zio.h 2026-08-21 20:57:12.319005600 +0000 @@ -350,6 +350,7 @@ uint8_t zp_complevel; uint8_t zp_level; uint8_t zp_copies; + uint8_t zp_gang_copies; dmu_object_type_t zp_type; boolean_t zp_dedup; boolean_t zp_dedup_verify; @@ -575,7 +576,7 @@ zio_priority_t priority, zio_flag_t flags, zbookmark_phys_t *zb); extern void zio_write_override(zio_t *zio, blkptr_t *bp, int copies, - boolean_t nopwrite, boolean_t brtwrite); + int gang_copies, boolean_t nopwrite, boolean_t brtwrite); extern void zio_free(spa_t *spa, uint64_t txg, const blkptr_t *bp); diff -Nru zfs-linux-2.3.2/include/sys/zio_impl.h zfs-linux-2.3.9/include/sys/zio_impl.h --- zfs-linux-2.3.2/include/sys/zio_impl.h 2025-05-01 18:23:23.759215104 +0000 +++ zfs-linux-2.3.9/include/sys/zio_impl.h 2026-08-21 20:57:12.320005587 +0000 @@ -139,12 +139,12 @@ ZIO_STAGE_NOP_WRITE = 1 << 8, /* -W---- */ - ZIO_STAGE_BRT_FREE = 1 << 9, /* --F--- */ + ZIO_STAGE_DDT_READ_START = 1 << 9, /* R----- */ + ZIO_STAGE_DDT_READ_DONE = 1 << 10, /* R----- */ + ZIO_STAGE_DDT_WRITE = 1 << 11, /* -W---- */ + ZIO_STAGE_DDT_FREE = 1 << 12, /* --F--- */ - ZIO_STAGE_DDT_READ_START = 1 << 10, /* R----- */ - ZIO_STAGE_DDT_READ_DONE = 1 << 11, /* R----- */ - ZIO_STAGE_DDT_WRITE = 1 << 12, /* -W---- */ - ZIO_STAGE_DDT_FREE = 1 << 13, /* --F--- */ + ZIO_STAGE_BRT_FREE = 1 << 13, /* --F--- */ ZIO_STAGE_GANG_ASSEMBLE = 1 << 14, /* RWFC-- */ ZIO_STAGE_GANG_ISSUE = 1 << 15, /* RWFC-- */ @@ -259,8 +259,7 @@ ZIO_STAGE_DVA_FREE) #define ZIO_DDT_FREE_PIPELINE \ - (ZIO_INTERLOCK_STAGES | \ - ZIO_STAGE_FREE_BP_INIT | \ + (ZIO_FREE_PIPELINE | \ ZIO_STAGE_ISSUE_ASYNC | \ ZIO_STAGE_DDT_FREE) diff -Nru zfs-linux-2.3.2/include/zfs_gitrev.h zfs-linux-2.3.9/include/zfs_gitrev.h --- zfs-linux-2.3.2/include/zfs_gitrev.h 2025-05-01 18:45:26.222140173 +0000 +++ zfs-linux-2.3.9/include/zfs_gitrev.h 2026-08-21 21:15:51.366492428 +0000 @@ -1 +1 @@ -#define ZFS_META_GITREV "92f430b-dist" +#define ZFS_META_GITREV "zfs-2.3.9-0-g4c0eb72-dist" diff -Nru zfs-linux-2.3.2/lib/Makefile.am zfs-linux-2.3.9/lib/Makefile.am --- zfs-linux-2.3.2/lib/Makefile.am 2025-05-01 18:23:23.759215104 +0000 +++ zfs-linux-2.3.9/lib/Makefile.am 2026-08-21 20:57:12.320005587 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 # # Shown below is a simplified dependency graph of the OpenZFS provided # libraries. Administrative commands (`zfs`, `zpool`, etc) interface with diff -Nru zfs-linux-2.3.2/lib/libavl/Makefile.am zfs-linux-2.3.9/lib/libavl/Makefile.am --- zfs-linux-2.3.2/lib/libavl/Makefile.am 2025-05-01 18:23:23.759215104 +0000 +++ zfs-linux-2.3.9/lib/libavl/Makefile.am 2026-08-21 20:57:12.321090192 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libavl_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS) libavl_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libefi/Makefile.am zfs-linux-2.3.9/lib/libefi/Makefile.am --- zfs-linux-2.3.2/lib/libefi/Makefile.am 2025-05-01 18:23:23.760215117 +0000 +++ zfs-linux-2.3.9/lib/libefi/Makefile.am 2026-08-21 20:57:12.321090192 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libefi_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libefi_la_CFLAGS += $(LIBUUID_CFLAGS) $(ZLIB_CFLAGS) libefi_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libefi/rdwr_efi.c zfs-linux-2.3.9/lib/libefi/rdwr_efi.c --- zfs-linux-2.3.2/lib/libefi/rdwr_efi.c 2025-05-01 18:23:23.760215117 +0000 +++ zfs-linux-2.3.9/lib/libefi/rdwr_efi.c 2026-08-21 20:57:12.321155578 +0000 @@ -410,8 +410,8 @@ /* figure out the number of entries that would fit into 16K */ nparts = EFI_MIN_ARRAY_SIZE / sizeof (efi_gpe_t); - length = (int) sizeof (struct dk_gpt) + - (int) sizeof (struct dk_part) * (nparts - 1); + length = (int)(sizeof (struct dk_gpt)) + + (int)(sizeof (struct dk_part)) * (nparts - 1); vptr = calloc(1, length); if (vptr == NULL) @@ -422,8 +422,8 @@ if ((rval == VT_EINVAL) && vptr->efi_nparts > nparts) { void *tmp; - length = (int) sizeof (struct dk_gpt) + - (int) sizeof (struct dk_part) * (vptr->efi_nparts - 1); + length = (int)(sizeof (struct dk_gpt)) + + (int)(sizeof (struct dk_part)) * (vptr->efi_nparts - 1); if ((tmp = realloc(vptr, length)) == NULL) { /* cppcheck-suppress doubleFree */ free(vptr); @@ -695,7 +695,7 @@ if (NBLOCKS(vtoc->efi_nparts, disk_info.dki_lbsize) < 34) { label_len = EFI_MIN_ARRAY_SIZE + disk_info.dki_lbsize; } else { - label_len = vtoc->efi_nparts * (int) sizeof (efi_gpe_t) + + label_len = vtoc->efi_nparts * (int)(sizeof (efi_gpe_t)) + disk_info.dki_lbsize; if (label_len % disk_info.dki_lbsize) { /* pad to physical sector size */ diff -Nru zfs-linux-2.3.2/lib/libicp/Makefile.am zfs-linux-2.3.9/lib/libicp/Makefile.am --- zfs-linux-2.3.2/lib/libicp/Makefile.am 2025-05-01 18:23:23.760215117 +0000 +++ zfs-linux-2.3.9/lib/libicp/Makefile.am 2026-08-21 20:57:12.321155578 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libicp_la_CCASFLAGS = $(AM_CCASFLAGS) libicp_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS) diff -Nru zfs-linux-2.3.2/lib/libnvpair/Makefile.am zfs-linux-2.3.9/lib/libnvpair/Makefile.am --- zfs-linux-2.3.2/lib/libnvpair/Makefile.am 2025-05-01 18:23:23.760215117 +0000 +++ zfs-linux-2.3.9/lib/libnvpair/Makefile.am 2026-08-21 20:57:12.321155578 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libnvpair_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS) libnvpair_la_CFLAGS += $(LIBTIRPC_CFLAGS) libnvpair_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libshare/libshare.c zfs-linux-2.3.9/lib/libshare/libshare.c --- zfs-linux-2.3.2/lib/libshare/libshare.c 2025-05-01 18:23:23.762215146 +0000 +++ zfs-linux-2.3.9/lib/libshare/libshare.c 2026-08-21 20:57:12.323316616 +0000 @@ -65,6 +65,10 @@ { VALIDATE_PROTOCOL(protocol, SA_INVALID_PROTOCOL); + int error = sa_validate_shareopts(shareopts, protocol); + if (error != SA_OK) + return (error); + const struct sa_share_impl args = init_share(zfsname, mountpoint, shareopts); return (fstypes[protocol]->enable_share(&args)); @@ -112,6 +116,10 @@ { VALIDATE_PROTOCOL(protocol, SA_INVALID_PROTOCOL); + /* error out on invalid characters */ + if (strpbrk(options, "\a\b\f\n\r") != NULL) + return (SA_SYNTAX_ERR); + return (fstypes[protocol]->validate_shareopts(options)); } diff -Nru zfs-linux-2.3.2/lib/libshare/os/linux/smb.c zfs-linux-2.3.9/lib/libshare/os/linux/smb.c --- zfs-linux-2.3.2/lib/libshare/os/linux/smb.c 2025-05-01 18:23:23.762215146 +0000 +++ zfs-linux-2.3.9/lib/libshare/os/linux/smb.c 2026-08-21 20:57:12.323824857 +0000 @@ -132,8 +132,9 @@ continue; /* Trim trailing new-line character(s). */ - while (line[strlen(line) - 1] == '\r' || - line[strlen(line) - 1] == '\n') + while ((line[0] != '\0') && + (line[strlen(line) - 1] == '\r' || + line[strlen(line) - 1] == '\n')) line[strlen(line) - 1] = '\0'; /* Split the line in two, separated by '=' */ diff -Nru zfs-linux-2.3.2/lib/libspl/Makefile.am zfs-linux-2.3.9/lib/libspl/Makefile.am --- zfs-linux-2.3.2/lib/libspl/Makefile.am 2025-05-01 18:23:23.762215146 +0000 +++ zfs-linux-2.3.9/lib/libspl/Makefile.am 2026-08-21 20:57:12.323824857 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 include $(srcdir)/%D%/include/Makefile.am libspl_assert_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) $(LIBUNWIND_CFLAGS) diff -Nru zfs-linux-2.3.2/lib/libspl/backtrace.c zfs-linux-2.3.9/lib/libspl/backtrace.c --- zfs-linux-2.3.2/lib/libspl/backtrace.c 2025-05-01 18:23:23.763215160 +0000 +++ zfs-linux-2.3.9/lib/libspl/backtrace.c 2026-08-21 20:57:12.323924564 +0000 @@ -41,9 +41,26 @@ do { ssize_t r __maybe_unused = write(fd, s, n); } while (0) #define spl_bt_write(fd, s) spl_bt_write_n(fd, s, sizeof (s)-1) -#if defined(HAVE_LIBUNWIND) +#ifdef HAVE_LIBUNWIND +/* + * libunwind-gcc and libunwind-llvm both list registers using an enum, + * unw_regnum_t, however they indicate the highest numbered register for + * a given architecture in different ways. We can check which one is defined + * and mark which libunwind is in use + */ +#ifdef IS_LIBUNWIND_LLVM +#include +#define LAST_REG_INDEX _LIBUNWIND_HIGHEST_DWARF_REGISTER +#else +/* + * Need to define UNW_LOCAL_ONLY before importing libunwind.h + * if using libgcc libunwind. + */ #define UNW_LOCAL_ONLY #include +#define LAST_REG_INDEX UNW_TDEP_LAST_REG +#endif + /* * Convert `v` to ASCII hex characters. The bottom `n` nybbles (4-bits ie one @@ -102,14 +119,13 @@ unw_init_local(&cp, &uc); /* - * libunwind's list of possible registers for this architecture is an - * enum, unw_regnum_t. UNW_TDEP_LAST_REG is the highest-numbered - * register in that list, however, not all register numbers in this - * range are defined by the architecture, and not all defined registers - * will be present on every implementation of that architecture. - * Moreover, libunwind provides nice names for most, but not all - * registers, but these are hardcoded; a name being available does not - * mean that register is available. + * Iterate over all registers for the architecture. We've figured + * out the highest number above, however, not all register numbers in + * this range are defined by the architecture, and not all defined + * registers will be present on every implementation of that + * architecture. Moreover, libunwind provides nice names for most, but + * not all registers, but these are hardcoded; a name being available + * does not mean that register is available. * * So, we have to pull this all together here. We try to get the value * of every possible register. If we get a value for it, then the @@ -120,26 +136,42 @@ * thing. */ uint_t cols = 0; - for (uint_t regnum = 0; regnum <= UNW_TDEP_LAST_REG; regnum++) { + for (uint_t regnum = 0; regnum <= LAST_REG_INDEX; regnum++) { /* * Get the value. Any error probably means the register - * doesn't exist, and we skip it. + * doesn't exist, and we skip it. LLVM libunwind iterates over + * fp registers in the same list, however they have to be + * accessed using unw_get_fpreg instead. Here, we just ignore + * them. */ +#ifdef IS_LIBUNWIND_LLVM + if (unw_is_fpreg(&cp, regnum) || + unw_get_reg(&cp, regnum, &v) < 0) + continue; +#else if (unw_get_reg(&cp, regnum, &v) < 0) continue; +#endif /* - * Register name. If libunwind doesn't have a name for it, + * Register name. If GCC libunwind doesn't have a name for it, * it will return "???". As a shortcut, we just treat '?' - * is an alternate end-of-string character. + * is an alternate end-of-string character. LLVM libunwind will + * return the string 'unknown register', which we detect by + * checking if the register name is longer than 5 characters. */ +#ifdef IS_LIBUNWIND_LLVM + const char *name = unw_regname(&cp, regnum); +#else const char *name = unw_regname(regnum); +#endif for (n = 0; name[n] != '\0' && name[n] != '?'; n++) {} - if (n == 0) { + if (n == 0 || n > 5) { /* - * No valid name, so make one of the form "?xx", where - * "xx" is the two-char hex of libunwind's register - * number. + * No valid name, or likely llvm_libunwind returned + * unknown_register, so make one of the form "?xx", + * where "xx" is the two-char hex of libunwind's + * register number. */ buf[0] = '?'; n = spl_bt_u64_to_hex_str(regnum, 2, diff -Nru zfs-linux-2.3.2/lib/libspl/include/Makefile.am zfs-linux-2.3.9/lib/libspl/include/Makefile.am --- zfs-linux-2.3.2/lib/libspl/include/Makefile.am 2025-05-01 18:23:23.763215160 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/Makefile.am 2026-08-21 20:57:12.323924564 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libspldir = $(includedir)/libspl libspl_HEADERS = \ %D%/assert.h \ @@ -24,6 +25,8 @@ libspl_sysdir = $(libspldir)/sys libspl_sys_HEADERS = \ + %D%/sys/abd_os.h \ + %D%/sys/abd_impl_os.h \ %D%/sys/acl.h \ %D%/sys/acl_impl.h \ %D%/sys/asm_linkage.h \ @@ -74,6 +77,7 @@ %D%/os/linux/sys/param.h \ %D%/os/linux/sys/stat.h \ %D%/os/linux/sys/sysmacros.h \ + %D%/os/linux/sys/vfs.h \ %D%/os/linux/sys/zfs_context_os.h libspl_ia32_HEADERS = \ diff -Nru zfs-linux-2.3.2/lib/libspl/include/assert.h zfs-linux-2.3.9/lib/libspl/include/assert.h --- zfs-linux-2.3.2/lib/libspl/include/assert.h 2025-05-01 18:23:23.763215160 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/assert.h 2026-08-21 20:57:12.324152996 +0000 @@ -86,12 +86,13 @@ #define VERIFY3B(LEFT, OP, RIGHT) \ do { \ - const boolean_t __left = (boolean_t)(LEFT); \ - const boolean_t __right = (boolean_t)(RIGHT); \ + const boolean_t __left = (boolean_t)!!(LEFT); \ + const boolean_t __right = (boolean_t)!!(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ + "VERIFY3B(%s, %s, %s) failed " \ + "(%d %s %d)", #LEFT, #OP, #RIGHT, \ + __left, #OP, __right); \ } while (0) #define VERIFY3S(LEFT, OP, RIGHT) \ @@ -100,8 +101,9 @@ const int64_t __right = (int64_t)(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ + "VERIFY3S(%s, %s, %s) failed " \ + "(%lld %s 0x%lld)", #LEFT, #OP, #RIGHT, \ + (longlong_t)__left, #OP, (longlong_t)__right); \ } while (0) #define VERIFY3U(LEFT, OP, RIGHT) \ @@ -110,7 +112,8 @@ const uint64_t __right = (uint64_t)(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx)", #LEFT, #OP, #RIGHT, \ + "VERIFY3U(%s, %s, %s) failed " \ + "(%llu %s %llu)", #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ } while (0) @@ -120,7 +123,8 @@ const uintptr_t __right = (uintptr_t)(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (%p %s %p)", #LEFT, #OP, #RIGHT, \ + "VERIFY3P(%s, %s, %s) failed " \ + "(%p %s %p)", #LEFT, #OP, #RIGHT, \ (void *)__left, #OP, (void *)__right); \ } while (0) @@ -129,7 +133,7 @@ const uint64_t __left = (uint64_t)(LEFT); \ if (!(__left == 0)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s == 0 (0x%llx == 0)", #LEFT, \ + "VERIFY0(%s) failed (%lld)", #LEFT, \ (u_longlong_t)__left); \ } while (0) @@ -138,7 +142,7 @@ const uintptr_t __left = (uintptr_t)(LEFT); \ if (!(__left == 0)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s == 0 (%p == 0)", #LEFT, \ + "VERIFY0P(%s) failed (%p)", #LEFT, \ (void *)__left); \ } while (0) @@ -150,13 +154,13 @@ /* BEGIN CSTYLED */ #define VERIFY3BF(LEFT, OP, RIGHT, STR, ...) \ do { \ - const boolean_t __left = (boolean_t)(LEFT); \ - const boolean_t __right = (boolean_t)(RIGHT); \ + const boolean_t __left = (boolean_t)!!(LEFT); \ + const boolean_t __right = (boolean_t)!!(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx) " STR, \ - #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ + "VERIFY3B(%s, %s, %s) failed " \ + "(%d %s %d) " STR, #LEFT, #OP, #RIGHT, \ + __left, #OP, __right, \ __VA_ARGS__); \ } while (0) @@ -166,9 +170,9 @@ const int64_t __right = (int64_t)(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx) " STR, \ - #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ + "VERIFY3S(%s, %s, %s) failed " \ + "(%lld %s %lld) " STR, #LEFT, #OP, #RIGHT, \ + (longlong_t)__left, #OP, (longlong_t)__right, \ __VA_ARGS__); \ } while (0) @@ -178,8 +182,8 @@ const uint64_t __right = (uint64_t)(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx) " STR, \ - #LEFT, #OP, #RIGHT, \ + "VERIFY3U(%s, %s, %s) failed " \ + "(%llu %s %llu) " STR, #LEFT, #OP, #RIGHT, \ (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ __VA_ARGS__); \ } while (0) @@ -190,20 +194,20 @@ const uintptr_t __right = (uintptr_t)(RIGHT); \ if (!(__left OP __right)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s %s %s (0x%llx %s 0x%llx) " STR, \ - #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right, \ + "VERIFY3P(%s, %s, %s) failed " \ + "(%p %s %p) " STR, #LEFT, #OP, #RIGHT, \ + (void *)__left, #OP, (void *)__right, \ __VA_ARGS__); \ } while (0) /* END CSTYLED */ #define VERIFY0F(LEFT, STR, ...) \ do { \ - const uint64_t __left = (uint64_t)(LEFT); \ + const int64_t __left = (int64_t)(LEFT); \ if (!(__left == 0)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s == 0 (0x%llx == 0) " STR, #LEFT, \ - (u_longlong_t)__left, __VA_ARGS__); \ + "VERIFY0(%s) failed (%lld) " STR, #LEFT, \ + (longlong_t)__left, __VA_ARGS__); \ } while (0) #define VERIFY0PF(LEFT, STR, ...) \ @@ -211,10 +215,17 @@ const uintptr_t __left = (uintptr_t)(LEFT); \ if (!(__left == 0)) \ libspl_assertf(__FILE__, __FUNCTION__, __LINE__, \ - "%s == 0 (%p == 0) " STR, #LEFT, \ - (u_longlong_t)__left, __VA_ARGS__); \ + "VERIFY0P(%s) failed (%p) " STR, #LEFT, \ + (void *)__left, __VA_ARGS__); \ } while (0) +#define VERIFY_IMPLY(A, B) \ + ((void)(((!(A)) || (B)) || \ + libspl_assert("(" #A ") implies (" #B ")", \ + __FILE__, __FUNCTION__, __LINE__))) + +#define VERIFY_EQUIV(A, B) VERIFY3B(A, ==, B) + #ifdef assert #undef assert #endif @@ -260,14 +271,8 @@ #define ASSERT VERIFY #define ASSERTF VERIFYF #define assert VERIFY -#define IMPLY(A, B) \ - ((void)(((!(A)) || (B)) || \ - libspl_assert("(" #A ") implies (" #B ")", \ - __FILE__, __FUNCTION__, __LINE__))) -#define EQUIV(A, B) \ - ((void)((!!(A) == !!(B)) || \ - libspl_assert("(" #A ") is equivalent to (" #B ")", \ - __FILE__, __FUNCTION__, __LINE__))) +#define IMPLY VERIFY_IMPLY +#define EQUIV VERIFY_EQUIV #endif /* NDEBUG */ diff -Nru zfs-linux-2.3.2/lib/libspl/include/os/freebsd/sys/mount.h zfs-linux-2.3.9/lib/libspl/include/os/freebsd/sys/mount.h --- zfs-linux-2.3.2/lib/libspl/include/os/freebsd/sys/mount.h 2025-05-01 18:23:23.763215160 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/os/freebsd/sys/mount.h 2026-08-21 20:57:12.324386928 +0000 @@ -89,17 +89,12 @@ #endif /* MNT_DETACH */ /* - * Overlay mount is default in Linux, but for solaris/zfs - * compatibility, MS_OVERLAY is defined to explicitly have the user - * provide a flag (-O) to mount over a non empty directory. + * MS_OVERLAY (-O: allow mounting over a non-empty directory) and MS_CRYPT + * (load/unload encryption keys with the (un)mount) are libzfs-internal flags, + * never passed to the kernel. They use high bits that do_unmount() masks + * off before unmount(2); do_mount() builds its iovec from named options. */ -#define MS_OVERLAY 0x00000004 - -/* - * MS_CRYPT indicates that encryption keys should be loaded if they are not - * already available. This is not defined in glibc, but it is never seen by - * the kernel so it will not cause any problems. - */ -#define MS_CRYPT 0x00000008 +#define MS_OVERLAY 0x20000000 +#define MS_CRYPT 0x40000000 #endif /* _LIBSPL_SYS_MOUNT_H */ diff -Nru zfs-linux-2.3.2/lib/libspl/include/os/linux/sys/mount.h zfs-linux-2.3.9/lib/libspl/include/os/linux/sys/mount.h --- zfs-linux-2.3.2/lib/libspl/include/os/linux/sys/mount.h 2025-05-01 18:23:23.764215174 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/os/linux/sys/mount.h 2026-08-21 20:57:12.324668641 +0000 @@ -83,17 +83,13 @@ #endif /* MNT_DETACH */ /* - * Overlay mount is default in Linux, but for solaris/zfs - * compatibility, MS_OVERLAY is defined to explicitly have the user - * provide a flag (-O) to mount over a non empty directory. + * MS_OVERLAY (-O: allow mounting over a non-empty directory) and MS_CRYPT + * (load/unload encryption keys with the (un)mount) are libzfs-internal flags, + * never passed to the kernel. They use high bits because the old 0x4/0x8 + * aliased the umount2(2) flags MNT_EXPIRE/UMOUNT_NOFOLLOW; do_unmount() masks + * them off before the syscall. */ -#define MS_OVERLAY 0x00000004 - -/* - * MS_CRYPT indicates that encryption keys should be loaded if they are not - * already available. This is not defined in glibc, but it is never seen by - * the kernel so it will not cause any problems. - */ -#define MS_CRYPT 0x00000008 +#define MS_OVERLAY 0x20000000 +#define MS_CRYPT 0x40000000 #endif /* _LIBSPL_SYS_MOUNT_H */ diff -Nru zfs-linux-2.3.2/lib/libspl/include/os/linux/sys/stat.h zfs-linux-2.3.9/lib/libspl/include/os/linux/sys/stat.h --- zfs-linux-2.3.2/lib/libspl/include/os/linux/sys/stat.h 2025-05-01 18:23:23.764215174 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/os/linux/sys/stat.h 2026-08-21 20:57:12.324668641 +0000 @@ -31,6 +31,11 @@ #include /* for BLKGETSIZE64 */ +#ifdef HAVE_STATX +#include +#include +#endif + /* * Emulate Solaris' behavior of returning the block device size in fstat64(). */ diff -Nru zfs-linux-2.3.2/lib/libspl/include/os/linux/sys/vfs.h zfs-linux-2.3.9/lib/libspl/include/os/linux/sys/vfs.h --- zfs-linux-2.3.2/lib/libspl/include/os/linux/sys/vfs.h 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/os/linux/sys/vfs.h 2026-08-21 20:57:12.324668641 +0000 @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* Copyright 2025 by Lawrence Livermore National Security, LLC. */ + +/* This is the Linux userspace version of include/os/linux/spl/sys/vfs.h */ + +#ifndef _LIBSPL_SYS_VFS_H +#define _LIBSPL_SYS_VFS_H + +#include +#include + +#endif diff -Nru zfs-linux-2.3.2/lib/libspl/include/sys/abd_impl_os.h zfs-linux-2.3.9/lib/libspl/include/sys/abd_impl_os.h --- zfs-linux-2.3.2/lib/libspl/include/sys/abd_impl_os.h 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/sys/abd_impl_os.h 2026-08-21 20:57:12.324668641 +0000 @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2014 by Chunwei Chen. All rights reserved. + * Copyright (c) 2016, 2019 by Delphix. All rights reserved. + * Copyright (c) 2023, 2024, Klara Inc. + */ + +#ifndef _ABD_IMPL_OS_H +#define _ABD_IMPL_OS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define abd_enter_critical(flags) ((void)0) +#define abd_exit_critical(flags) ((void)0) + +#ifdef __cplusplus +} +#endif + +#endif /* _ABD_IMPL_OS_H */ diff -Nru zfs-linux-2.3.2/lib/libspl/include/sys/abd_os.h zfs-linux-2.3.9/lib/libspl/include/sys/abd_os.h --- zfs-linux-2.3.2/lib/libspl/include/sys/abd_os.h 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/lib/libspl/include/sys/abd_os.h 2026-08-21 20:57:12.324969919 +0000 @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2014 by Chunwei Chen. All rights reserved. + * Copyright (c) 2016, 2019 by Delphix. All rights reserved. + */ + +#ifndef _ABD_OS_H +#define _ABD_OS_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct abd_scatter { + uint_t abd_offset; + uint_t abd_iovcnt; + struct iovec abd_iov[1]; /* actually variable-length */ +}; + +struct abd_linear { + void *abd_buf; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* _ABD_H */ diff -Nru zfs-linux-2.3.2/lib/libspl/os/linux/getmntany.c zfs-linux-2.3.9/lib/libspl/os/linux/getmntany.c --- zfs-linux-2.3.2/lib/libspl/os/linux/getmntany.c 2025-05-01 18:23:23.766215202 +0000 +++ zfs-linux-2.3.9/lib/libspl/os/linux/getmntany.c 2026-08-21 20:57:12.326655910 +0000 @@ -85,13 +85,21 @@ } static int -getextmntent_impl(FILE *fp, struct extmnttab *mp) +getextmntent_impl(FILE *fp, struct extmnttab *mp, uint64_t *mnt_id) { int ret; struct stat64 st; + *mnt_id = 0; ret = _sol_getmntent(fp, (struct mnttab *)mp); if (ret == 0) { +#ifdef HAVE_STATX_MNT_ID + struct statx stx; + if (statx(AT_FDCWD, mp->mnt_mountp, + AT_STATX_SYNC_AS_STAT | AT_SYMLINK_NOFOLLOW, + STATX_MNT_ID, &stx) == 0 && (stx.stx_mask & STATX_MNT_ID)) + *mnt_id = stx.stx_mnt_id; +#endif if (stat64(mp->mnt_mountp, &st) != 0) { mp->mnt_major = 0; mp->mnt_minor = 0; @@ -110,6 +118,12 @@ struct stat64 st; FILE *fp; int match; + boolean_t have_mnt_id = B_FALSE; + uint64_t target_mnt_id = 0; + uint64_t entry_mnt_id; +#ifdef HAVE_STATX_MNT_ID + struct statx stx; +#endif if (strlen(path) >= MAXPATHLEN) { (void) fprintf(stderr, "invalid object; pathname too long\n"); @@ -128,6 +142,20 @@ return (-1); } +#ifdef HAVE_STATX_MNT_ID + /* + * Use AT_STATX_SYNC_AS_STAT without AT_SYMLINK_NOFOLLOW so that + * symlinks are followed, matching the behavior of stat64() above. + * Without this, if path is a symlink crossing a mount boundary, + * statx() returns the mnt_id of the symlink's location rather + * than the symlink target's mount. + */ + if (statx(AT_FDCWD, path, AT_STATX_SYNC_AS_STAT, + STATX_MNT_ID, &stx) == 0 && (stx.stx_mask & STATX_MNT_ID)) { + have_mnt_id = B_TRUE; + target_mnt_id = stx.stx_mnt_id; + } +#endif if ((fp = fopen(MNTTAB, "re")) == NULL) { (void) fprintf(stderr, "cannot open %s\n", MNTTAB); @@ -139,12 +167,15 @@ */ match = 0; - while (getextmntent_impl(fp, entry) == 0) { - if (makedev(entry->mnt_major, entry->mnt_minor) == - statbuf->st_dev) { - match = 1; - break; + while (getextmntent_impl(fp, entry, &entry_mnt_id) == 0) { + if (have_mnt_id) { + match = (entry_mnt_id == target_mnt_id); + } else { + match = makedev(entry->mnt_major, entry->mnt_minor) == + statbuf->st_dev; } + if (match) + break; } (void) fclose(fp); diff -Nru zfs-linux-2.3.2/lib/libuutil/uu_ident.c zfs-linux-2.3.9/lib/libuutil/uu_ident.c --- zfs-linux-2.3.2/lib/libuutil/uu_ident.c 2025-05-01 18:23:23.768215230 +0000 +++ zfs-linux-2.3.9/lib/libuutil/uu_ident.c 2026-08-21 20:57:12.327155677 +0000 @@ -76,7 +76,7 @@ static int is_valid_component(const char *b, const char *e, uint_t flags) { - char *sp; + const char *sp; if (flags & UU_NAME_DOMAIN) { sp = strchr(b, ','); diff -Nru zfs-linux-2.3.2/lib/libzdb/Makefile.am zfs-linux-2.3.9/lib/libzdb/Makefile.am --- zfs-linux-2.3.2/lib/libzdb/Makefile.am 2025-05-01 18:23:23.768215230 +0000 +++ zfs-linux-2.3.9/lib/libzdb/Makefile.am 2026-08-21 20:57:12.327155677 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libzdb_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libzdb_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libzfs/Makefile.am zfs-linux-2.3.9/lib/libzfs/Makefile.am --- zfs-linux-2.3.2/lib/libzfs/Makefile.am 2025-05-01 18:23:23.768215230 +0000 +++ zfs-linux-2.3.9/lib/libzfs/Makefile.am 2026-08-21 20:57:12.328392834 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libzfs_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libzfs_la_CFLAGS += $(LIBCRYPTO_CFLAGS) $(ZLIB_CFLAGS) libzfs_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs.abi zfs-linux-2.3.9/lib/libzfs/libzfs.abi --- zfs-linux-2.3.2/lib/libzfs/libzfs.abi 2025-05-01 18:23:23.769215244 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs.abi 2026-08-21 20:57:12.328392834 +0000 @@ -345,6 +345,7 @@ + @@ -1920,6 +1921,9 @@ + + + @@ -3815,6 +3819,10 @@ + + + + diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_changelist.c zfs-linux-2.3.9/lib/libzfs/libzfs_changelist.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_changelist.c 2025-05-01 18:23:23.769215244 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_changelist.c 2026-08-21 20:57:12.328392834 +0000 @@ -183,6 +183,7 @@ char shareopts[ZFS_MAXPROPLEN]; boolean_t commit_smb_shares = B_FALSE; boolean_t commit_nfs_shares = B_FALSE; + int rc = 0; /* * If CL_GATHER_DONT_UNMOUNT is set, it means we don't want to (un)mount @@ -275,7 +276,7 @@ const enum sa_protocol nfs[] = {SA_PROTOCOL_NFS, SA_NO_PROTOCOL}; if (sharenfs && mounted) { - zfs_share(cn->cn_handle, nfs); + rc = zfs_share(cn->cn_handle, nfs); commit_nfs_shares = B_TRUE; } else if (cn->cn_shared || clp->cl_waslegacy) { zfs_unshare(cn->cn_handle, NULL, nfs); @@ -284,7 +285,7 @@ const enum sa_protocol smb[] = {SA_PROTOCOL_SMB, SA_NO_PROTOCOL}; if (sharesmb && mounted) { - zfs_share(cn->cn_handle, smb); + rc = zfs_share(cn->cn_handle, smb); commit_smb_shares = B_TRUE; } else if (cn->cn_shared || clp->cl_waslegacy) { zfs_unshare(cn->cn_handle, NULL, smb); @@ -301,7 +302,15 @@ zfs_commit_shares(proto); uu_avl_walk_end(walk); - return (0); + /* + * It's possible rc != 0 since we set a mountpoint or option while + * SMB/NFS was not running. This is fine, and we should not return + * an error up the stack. + * + * At this point we only want to report mountpoint/shareops parsing + * errors. + */ + return (rc == SA_SYNTAX_ERR ? rc : 0); } /* diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_crypto.c zfs-linux-2.3.9/lib/libzfs/libzfs_crypto.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_crypto.c 2025-05-01 18:23:23.769215244 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_crypto.c 2026-08-21 20:57:12.328392834 +0000 @@ -1818,3 +1818,14 @@ zfs_error(zhp->zfs_hdl, EZFS_CRYPTOFAILED, errbuf); return (ret); } + +boolean_t +zfs_is_encrypted(zfs_handle_t *zhp) +{ + uint8_t flags = zhp->zfs_dmustats.dds_flags; + + if (flags & DDS_FLAG_HAS_ENCRYPTED) + return ((flags & DDS_FLAG_ENCRYPTED) != 0); + + return (zfs_prop_get_int(zhp, ZFS_PROP_ENCRYPTION) != ZIO_CRYPT_OFF); +} diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_dataset.c zfs-linux-2.3.9/lib/libzfs/libzfs_dataset.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_dataset.c 2025-05-01 18:23:23.770215258 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_dataset.c 2026-08-21 20:57:12.329005460 +0000 @@ -708,7 +708,7 @@ { zfs_handle_t *zhp; char errbuf[ERRBUFLEN]; - char *bookp; + const char *bookp; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot open '%s'"), path); @@ -1728,26 +1728,6 @@ return (1); } -static boolean_t -zfs_is_namespace_prop(zfs_prop_t prop) -{ - switch (prop) { - - case ZFS_PROP_ATIME: - case ZFS_PROP_RELATIME: - case ZFS_PROP_DEVICES: - case ZFS_PROP_EXEC: - case ZFS_PROP_SETUID: - case ZFS_PROP_READONLY: - case ZFS_PROP_XATTR: - case ZFS_PROP_NBMAND: - return (B_TRUE); - - default: - return (B_FALSE); - } -} - /* * Given a property name and value, set the property for the given dataset. */ @@ -1805,7 +1785,7 @@ int nvl_len = 0; int added_resv = 0; zfs_prop_t prop; - boolean_t nsprop = B_FALSE; + uint32_t nspflags = 0; nvpair_t *elem; (void) snprintf(errbuf, sizeof (errbuf), @@ -1852,7 +1832,7 @@ elem = nvlist_next_nvpair(nvl, elem)) { prop = zfs_name_to_prop(nvpair_name(elem)); - nsprop |= zfs_is_namespace_prop(prop); + nspflags |= zfs_namespace_prop_flag(prop); assert(cl_idx < nvl_len); /* @@ -1953,8 +1933,8 @@ * if one of the options handled by the generic * Linux namespace layer has been modified. */ - if (nsprop && zfs_is_mounted(zhp, NULL)) - ret = zfs_mount(zhp, MNTOPT_REMOUNT, 0); + if (nspflags && zfs_is_mounted(zhp, NULL)) + ret = zfs_mount_setattr(zhp, nspflags); } } @@ -2076,7 +2056,8 @@ */ if (zfs_is_namespace_prop(prop) && zfs_is_mounted(zhp, NULL)) - ret = zfs_mount(zhp, MNTOPT_REMOUNT, 0); + ret = zfs_mount_setattr(zhp, + zfs_namespace_prop_flag(prop)); } error: @@ -3169,7 +3150,7 @@ zfs_userquota_prop_t *typep, char *domain, int domainlen, uint64_t *ridp) { zfs_userquota_prop_t type; - char *cp; + const char *cp; boolean_t isuser; boolean_t isgroup; boolean_t isproject; @@ -4022,6 +4003,26 @@ dgettext(TEXT_DOMAIN, "snapshot is cloned")); ret = zfs_error(hdl, EZFS_EXISTS, errbuf); break; + case EBUSY: { + nvlist_t *existing_holds; + int err = lzc_get_holds(nvpair_name(pair), + &existing_holds); + + /* check the presence of holders */ + if (err == 0 && !nvlist_empty(existing_holds)) { + zfs_error_aux(hdl, + dgettext(TEXT_DOMAIN, "it's being held. " + "Run 'zfs holds -r %s' to see holders."), + nvpair_name(pair)); + ret = zfs_error(hdl, EBUSY, errbuf); + } else { + ret = zfs_standard_error(hdl, errno, errbuf); + } + + if (err == 0) + nvlist_free(existing_holds); + break; + } default: ret = zfs_standard_error(hdl, errno, errbuf); break; @@ -4490,12 +4491,13 @@ { int ret = 0; zfs_cmd_t zc = {"\0"}; - char *delim; prop_changelist_t *cl = NULL; char parent[ZFS_MAX_DATASET_NAME_LEN]; char property[ZFS_MAXPROPLEN]; libzfs_handle_t *hdl = zhp->zfs_hdl; char errbuf[ERRBUFLEN]; + const char *delim; + char *delim2; /* if we have the same exact name, just return success */ if (strcmp(zhp->zfs_name, target) == 0) @@ -4520,11 +4522,11 @@ */ (void) strlcpy(parent, zhp->zfs_name, sizeof (parent)); - delim = strchr(parent, '@'); + delim2 = strchr(parent, '@'); if (strchr(target, '@') == NULL) - *(++delim) = '\0'; + *(++delim2) = '\0'; else - *delim = '\0'; + *delim2 = '\0'; (void) strlcat(parent, target, sizeof (parent)); target = parent; } else { @@ -4545,6 +4547,7 @@ if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE)) return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf)); } else { + if (flags.recursive) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "recursive rename must be a snapshot")); @@ -4600,8 +4603,8 @@ } if (flags.recursive) { char *parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name); - delim = strchr(parentname, '@'); - *delim = '\0'; + delim2 = strchr(parentname, '@'); + *delim2 = '\0'; zfs_handle_t *zhrp = zfs_open(zhp->zfs_hdl, parentname, ZFS_TYPE_DATASET); free(parentname); @@ -4885,7 +4888,7 @@ default: return (-1); } - error = ioctl(hdl->libzfs_fd, ZFS_IOC_SMB_ACL, &zc); + error = lzc_ioctl_fd(hdl->libzfs_fd, ZFS_IOC_SMB_ACL, &zc); nvlist_free(nvlist); return (error); } diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_diff.c zfs-linux-2.3.9/lib/libzfs/libzfs_diff.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_diff.c 2025-05-01 18:23:23.770215258 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_diff.c 2026-08-21 20:57:12.329005460 +0000 @@ -550,8 +550,8 @@ const char *tosnap) { libzfs_handle_t *hdl = di->zhp->zfs_hdl; - char *atptrf = NULL; - char *atptrt = NULL; + const char *atptrf = NULL; + const char *atptrt = NULL; int fdslen, fsnlen; int tdslen, tsnlen; diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_impl.h zfs-linux-2.3.9/lib/libzfs/libzfs_impl.h --- zfs-linux-2.3.2/lib/libzfs/libzfs_impl.h 2025-05-01 18:23:23.770215258 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_impl.h 2026-08-21 20:57:12.329005460 +0000 @@ -91,6 +91,19 @@ }; /* + * Internal namespace property flags for selective remount via + * mount_setattr(2). Passed to zfs_mount_setattr(). + */ +#define ZFS_MNT_PROP_ATIME (1U << 0) +#define ZFS_MNT_PROP_RELATIME (1U << 1) +#define ZFS_MNT_PROP_DEVICES (1U << 2) +#define ZFS_MNT_PROP_EXEC (1U << 3) +#define ZFS_MNT_PROP_SETUID (1U << 4) +#define ZFS_MNT_PROP_READONLY (1U << 5) +#define ZFS_MNT_PROP_XATTR (1U << 6) +#define ZFS_MNT_PROP_NBMAND (1U << 7) + +/* * This is different from checking zfs_type, because it will also catch * snapshots of volumes. */ @@ -182,6 +195,10 @@ extern int changelist_unshare(prop_changelist_t *, const enum sa_protocol *); extern int changelist_haszonedchild(prop_changelist_t *); +extern boolean_t zfs_is_namespace_prop(zfs_prop_t); +extern uint32_t zfs_namespace_prop_flag(zfs_prop_t); +extern boolean_t zfs_is_mountable_internal(zfs_handle_t *); +extern int zfs_mount_setattr(zfs_handle_t *, uint32_t); extern void remove_mountpoint(zfs_handle_t *); extern int create_parents(libzfs_handle_t *, char *, int); diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_iter.c zfs-linux-2.3.9/lib/libzfs/libzfs_iter.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_iter.c 2025-05-01 18:23:23.770215258 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_iter.c 2026-08-21 20:57:12.329005460 +0000 @@ -570,7 +570,7 @@ err = zfs_iter_filesystems_v2(zhp, ida->flags, iter_dependents_cb, ida); if (err == 0) - err = zfs_iter_snapshots_v2(zhp, ida->flags, + err = zfs_iter_snapshots_sorted_v2(zhp, ida->flags, iter_dependents_cb, ida, 0, 0); ida->stack = isf.next; } diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_mount.c zfs-linux-2.3.9/lib/libzfs/libzfs_mount.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_mount.c 2025-05-01 18:23:23.770215258 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_mount.c 2026-08-21 20:57:12.329005460 +0000 @@ -101,6 +101,47 @@ +/* + * Returns B_TRUE if the property is a namespace property that requires + * a remount to take effect. + */ +boolean_t +zfs_is_namespace_prop(zfs_prop_t prop) +{ + switch (prop) { + case ZFS_PROP_ATIME: + case ZFS_PROP_RELATIME: + case ZFS_PROP_DEVICES: + case ZFS_PROP_EXEC: + case ZFS_PROP_SETUID: + case ZFS_PROP_READONLY: + case ZFS_PROP_XATTR: + case ZFS_PROP_NBMAND: + return (B_TRUE); + default: + return (B_FALSE); + } +} + +/* + * Returns the ZFS_MNT_PROP_* flag for a namespace property. + */ +uint32_t +zfs_namespace_prop_flag(zfs_prop_t prop) +{ + switch (prop) { + case ZFS_PROP_ATIME: return (ZFS_MNT_PROP_ATIME); + case ZFS_PROP_RELATIME: return (ZFS_MNT_PROP_RELATIME); + case ZFS_PROP_DEVICES: return (ZFS_MNT_PROP_DEVICES); + case ZFS_PROP_EXEC: return (ZFS_MNT_PROP_EXEC); + case ZFS_PROP_SETUID: return (ZFS_MNT_PROP_SETUID); + case ZFS_PROP_READONLY: return (ZFS_MNT_PROP_READONLY); + case ZFS_PROP_XATTR: return (ZFS_MNT_PROP_XATTR); + case ZFS_PROP_NBMAND: return (ZFS_MNT_PROP_NBMAND); + default: return (0); + } +} + static boolean_t dir_is_empty_stat(const char *dirname) { @@ -223,7 +264,7 @@ * that the caller has verified the sanity of mounting the dataset at * its mountpoint to the extent the caller wants. */ -static boolean_t +boolean_t zfs_is_mountable_internal(zfs_handle_t *zhp) { if (zfs_prop_get_int(zhp, ZFS_PROP_ZONED) && diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_pool.c zfs-linux-2.3.9/lib/libzfs/libzfs_pool.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_pool.c 2025-05-01 18:23:23.771215272 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_pool.c 2026-08-21 20:57:12.330005446 +0000 @@ -580,7 +580,7 @@ prop = zpool_name_to_prop(propname); if (prop == ZPOOL_PROP_INVAL && zpool_prop_feature(propname)) { int err; - char *fname = strchr(propname, '@') + 1; + const char *fname = strchr(propname, '@') + 1; err = zfeature_lookup_name(fname, NULL); if (err != 0) { @@ -2238,6 +2238,11 @@ zpool_get_load_policy(config, &policy); + if (getenv("ZFS_LOAD_INFO_DEBUG") && nv != NULL && + nvlist_lookup_nvlist(nv, ZPOOL_CONFIG_LOAD_INFO, &nvinfo) == 0) { + dump_nvlist(nvinfo, 4); + } + if (error) { char desc[1024]; char aux[256]; @@ -2294,10 +2299,21 @@ const char *hostname = ""; uint64_t hostid = 0; mmp_state_t mmp_state; + uint32_t mmp_result = 0; mmp_state = fnvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_MMP_STATE); + /* + * A kernel which does not report a cause + * leaves this zero, which falls through to + * the messages below. + */ + if (nvlist_exists(nvinfo, + ZPOOL_CONFIG_MMP_RESULT)) + mmp_result = fnvlist_lookup_uint32( + nvinfo, ZPOOL_CONFIG_MMP_RESULT); + if (nvlist_exists(nvinfo, ZPOOL_CONFIG_MMP_HOSTNAME)) hostname = fnvlist_lookup_string(nvinfo, @@ -2308,7 +2324,23 @@ hostid = fnvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_MMP_HOSTID); - if (mmp_state == MMP_STATE_ACTIVE) { + if (mmp_result == ENODEV) { + (void) snprintf(aux, sizeof (aux), + dgettext(TEXT_DOMAIN, "the multi" + "host claim could not be written " + "to a device\nthe pool " + "configuration expects to be " + "present.\nIf the device is " + "permanently gone, recover with " + "'zhack mmp reclaim'.")); + } else if (mmp_result == EIO) { + (void) snprintf(aux, sizeof (aux), + dgettext(TEXT_DOMAIN, "I/O errors " + "occurred while writing the multi" + "host claim.\nClear the device " + "errors, then run 'zpool " + "import'.")); + } else if (mmp_state == MMP_STATE_ACTIVE) { (void) snprintf(aux, sizeof (aux), dgettext(TEXT_DOMAIN, "pool is imp" "orted on host '%s' (hostid=%lx).\n" @@ -2761,6 +2793,11 @@ * 1. we resumed a paused scrub. * 2. we resumed a paused error scrub. * 3. Error scrub is not run because of no error log. + * + * Note that we no longer return ECANCELED in case 1 or 2. However, in + * order to prevent problems where we have a newer userland than + * kernel, we keep this check in place. That prevents erroneous + * failures when an older kernel returns ECANCELED in those cases. */ if (err == ECANCELED && (func == POOL_SCAN_SCRUB || func == POOL_SCAN_ERRORSCRUB) && cmd == POOL_SCRUB_NORMAL) @@ -2962,6 +2999,18 @@ *p = '\0'; /* + * draid names are presented like: draid2:4d:6c:0s + * We match them up to the first ':' so we can still + * do the parity check below, but the other params + * are ignored. + */ + if ((p = strchr(type, ':')) != NULL) { + if (strncmp(type, VDEV_TYPE_DRAID, + strlen(VDEV_TYPE_DRAID)) == 0) + *p = '\0'; + } + + /* * If the types don't match then keep looking. */ if (strncmp(val, type, strlen(val)) != 0) { @@ -4432,6 +4481,7 @@ uint64_t value; char buf[PATH_BUF_LEN]; char tmpbuf[PATH_BUF_LEN * 2]; + char rpath[MAXPATHLEN]; /* * vdev_name will be "root"/"root-0" for the root vdev, but it is the @@ -4457,12 +4507,8 @@ path = tpath; if (name_flags & VDEV_NAME_FOLLOW_LINKS) { - char *rp = realpath(path, NULL); - if (rp) { - strlcpy(buf, rp, sizeof (buf)); - path = buf; - free(rp); - } + if (realpath(path, rpath) != NULL) + path = rpath; } /* @@ -5197,9 +5243,10 @@ ZC_MMAP_FLAGS, featfd, 0); (void) close(featfd); - /* map ok, and last character == newline? */ + /* need map ok, and last character == newline */ if (fc == MAP_FAILED || fc[fs.st_size - 1] != '\n') { - (void) munmap((void *) fc, fs.st_size); + if (fc != MAP_FAILED) + (void) munmap((void *) fc, fs.st_size); strlcat(err_badfile, file, ZFS_MAXPROPLEN); strlcat(err_badfile, " ", ZFS_MAXPROPLEN); ret_badfile = B_TRUE; diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_sendrecv.c zfs-linux-2.3.9/lib/libzfs/libzfs_sendrecv.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_sendrecv.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_sendrecv.c 2026-08-21 20:57:12.331005432 +0000 @@ -1975,8 +1975,10 @@ } char errbuf[ERRBUFLEN]; + char sendname[ZFS_MAX_DATASET_NAME_LEN]; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "warning: cannot send '%s'"), zhp->zfs_name); + (void) strlcpy(sendname, zhp->zfs_name, sizeof (sendname)); zfs_close(zhp); @@ -1988,7 +1990,7 @@ "source key must be loaded")); return (zfs_error(hdl, EZFS_CRYPTOFAILED, errbuf)); case ESRCH: - if (lzc_exists(zhp->zfs_name)) { + if (lzc_exists(sendname)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "incremental source could not be found")); } @@ -2683,7 +2685,7 @@ char bookname[ZFS_MAX_DATASET_NAME_LEN]; nvlist_t *redact_snaps; zfs_handle_t *book_zhp; - char *at, *pound; + const char *at, *pound; int dsnamelen; pound = strchr(redactbook, '#'); @@ -4320,7 +4322,7 @@ newname); if (nvlist_lookup_string(attrs, ZPROP_SOURCE, &source) == 0 && - strcmp(source, ZPROP_SOURCE_VAL_RECVD) != 0) + strcmp(source, fsname) == 0) continue; } /* diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_status.c zfs-linux-2.3.9/lib/libzfs/libzfs_status.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_status.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_status.c 2026-08-21 20:57:12.331005432 +0000 @@ -98,57 +98,57 @@ #define NMSGID (sizeof (zfs_msgid_table) / sizeof (zfs_msgid_table[0])) static int -vdev_missing(vdev_stat_t *vs, uint_t vsc) +vdev_missing(vdev_stat_t *vs, uint_t vsc, void *arg) { - (void) vsc; + (void) vsc, (void) arg; return (vs->vs_state == VDEV_STATE_CANT_OPEN && vs->vs_aux == VDEV_AUX_OPEN_FAILED); } static int -vdev_faulted(vdev_stat_t *vs, uint_t vsc) +vdev_faulted(vdev_stat_t *vs, uint_t vsc, void *arg) { - (void) vsc; + (void) vsc, (void) arg; return (vs->vs_state == VDEV_STATE_FAULTED); } static int -vdev_errors(vdev_stat_t *vs, uint_t vsc) +vdev_errors(vdev_stat_t *vs, uint_t vsc, void *arg) { - (void) vsc; + (void) vsc, (void) arg; return (vs->vs_state == VDEV_STATE_DEGRADED || vs->vs_read_errors != 0 || vs->vs_write_errors != 0 || vs->vs_checksum_errors != 0); } static int -vdev_broken(vdev_stat_t *vs, uint_t vsc) +vdev_broken(vdev_stat_t *vs, uint_t vsc, void *arg) { - (void) vsc; + (void) vsc, (void) arg; return (vs->vs_state == VDEV_STATE_CANT_OPEN); } static int -vdev_offlined(vdev_stat_t *vs, uint_t vsc) +vdev_offlined(vdev_stat_t *vs, uint_t vsc, void *arg) { - (void) vsc; + (void) vsc, (void) arg; return (vs->vs_state == VDEV_STATE_OFFLINE); } static int -vdev_removed(vdev_stat_t *vs, uint_t vsc) +vdev_removed(vdev_stat_t *vs, uint_t vsc, void *arg) { - (void) vsc; + (void) vsc, (void) arg; return (vs->vs_state == VDEV_STATE_REMOVED); } static int -vdev_non_native_ashift(vdev_stat_t *vs, uint_t vsc) +vdev_non_native_ashift(vdev_stat_t *vs, uint_t vsc, void *arg) { - if (getenv("ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNORE") != NULL) - return (0); + uint64_t ashift = *(uint64_t *)arg; return (VDEV_STAT_VALID(vs_physical_ashift, vsc) && + (ashift == 0 || vs->vs_configured_ashift < ashift) && vs->vs_configured_ashift < vs->vs_physical_ashift); } @@ -156,8 +156,8 @@ * Detect if any leaf devices that have seen errors or could not be opened. */ static boolean_t -find_vdev_problem(nvlist_t *vdev, int (*func)(vdev_stat_t *, uint_t), - boolean_t ignore_replacing) +find_vdev_problem(nvlist_t *vdev, int (*func)(vdev_stat_t *, uint_t, void *), + void *arg, boolean_t ignore_replacing) { nvlist_t **child; uint_t c, children; @@ -177,14 +177,16 @@ if (nvlist_lookup_nvlist_array(vdev, ZPOOL_CONFIG_CHILDREN, &child, &children) == 0) { - for (c = 0; c < children; c++) - if (find_vdev_problem(child[c], func, ignore_replacing)) + for (c = 0; c < children; c++) { + if (find_vdev_problem(child[c], func, arg, + ignore_replacing)) return (B_TRUE); + } } else { uint_t vsc; vdev_stat_t *vs = (vdev_stat_t *)fnvlist_lookup_uint64_array( vdev, ZPOOL_CONFIG_VDEV_STATS, &vsc); - if (func(vs, vsc) != 0) + if (func(vs, vsc, arg) != 0) return (B_TRUE); } @@ -193,9 +195,11 @@ */ if (nvlist_lookup_nvlist_array(vdev, ZPOOL_CONFIG_L2CACHE, &child, &children) == 0) { - for (c = 0; c < children; c++) - if (find_vdev_problem(child[c], func, ignore_replacing)) + for (c = 0; c < children; c++) { + if (find_vdev_problem(child[c], func, arg, + ignore_replacing)) return (B_TRUE); + } } return (B_FALSE); @@ -220,7 +224,7 @@ */ static zpool_status_t check_status(nvlist_t *config, boolean_t isimport, - zpool_errata_t *erratap, const char *compat) + zpool_errata_t *erratap, const char *compat, uint64_t ashift) { pool_scan_stat_t *ps = NULL; uint_t vsc, psc; @@ -371,15 +375,15 @@ * Bad devices in non-replicated config. */ if (vs->vs_state == VDEV_STATE_CANT_OPEN && - find_vdev_problem(nvroot, vdev_faulted, B_TRUE)) + find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE)) return (ZPOOL_STATUS_FAULTED_DEV_NR); if (vs->vs_state == VDEV_STATE_CANT_OPEN && - find_vdev_problem(nvroot, vdev_missing, B_TRUE)) + find_vdev_problem(nvroot, vdev_missing, NULL, B_TRUE)) return (ZPOOL_STATUS_MISSING_DEV_NR); if (vs->vs_state == VDEV_STATE_CANT_OPEN && - find_vdev_problem(nvroot, vdev_broken, B_TRUE)) + find_vdev_problem(nvroot, vdev_broken, NULL, B_TRUE)) return (ZPOOL_STATUS_CORRUPT_LABEL_NR); /* @@ -402,35 +406,37 @@ /* * Missing devices in a replicated config. */ - if (find_vdev_problem(nvroot, vdev_faulted, B_TRUE)) + if (find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE)) return (ZPOOL_STATUS_FAULTED_DEV_R); - if (find_vdev_problem(nvroot, vdev_missing, B_TRUE)) + if (find_vdev_problem(nvroot, vdev_missing, NULL, B_TRUE)) return (ZPOOL_STATUS_MISSING_DEV_R); - if (find_vdev_problem(nvroot, vdev_broken, B_TRUE)) + if (find_vdev_problem(nvroot, vdev_broken, NULL, B_TRUE)) return (ZPOOL_STATUS_CORRUPT_LABEL_R); /* * Devices with errors */ - if (!isimport && find_vdev_problem(nvroot, vdev_errors, B_TRUE)) + if (!isimport && find_vdev_problem(nvroot, vdev_errors, NULL, B_TRUE)) return (ZPOOL_STATUS_FAILING_DEV); /* * Offlined devices */ - if (find_vdev_problem(nvroot, vdev_offlined, B_TRUE)) + if (find_vdev_problem(nvroot, vdev_offlined, NULL, B_TRUE)) return (ZPOOL_STATUS_OFFLINE_DEV); /* * Removed device */ - if (find_vdev_problem(nvroot, vdev_removed, B_TRUE)) + if (find_vdev_problem(nvroot, vdev_removed, NULL, B_TRUE)) return (ZPOOL_STATUS_REMOVED_DEV); /* * Suboptimal, but usable, ashift configuration. */ - if (find_vdev_problem(nvroot, vdev_non_native_ashift, B_FALSE)) + if (!isimport && + getenv("ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNORE") == NULL && + find_vdev_problem(nvroot, vdev_non_native_ashift, &ashift, B_FALSE)) return (ZPOOL_STATUS_NON_NATIVE_ASHIFT); /* @@ -509,8 +515,10 @@ ZFS_MAXPROPLEN, NULL, B_FALSE) != 0) compatibility[0] = '\0'; + uint64_t ashift = zpool_get_prop_int(zhp, ZPOOL_PROP_ASHIFT, NULL); + zpool_status_t ret = check_status(zhp->zpool_config, B_FALSE, errata, - compatibility); + compatibility, ashift); if (msgid != NULL) { if (ret >= NMSGID) @@ -525,7 +533,7 @@ zpool_import_status(nvlist_t *config, const char **msgid, zpool_errata_t *errata) { - zpool_status_t ret = check_status(config, B_TRUE, errata, NULL); + zpool_status_t ret = check_status(config, B_TRUE, errata, NULL, 0); if (ret >= NMSGID) *msgid = NULL; diff -Nru zfs-linux-2.3.2/lib/libzfs/libzfs_util.c zfs-linux-2.3.9/lib/libzfs/libzfs_util.c --- zfs-linux-2.3.2/lib/libzfs/libzfs_util.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/libzfs_util.c 2026-08-21 20:57:12.331005432 +0000 @@ -785,6 +785,12 @@ return (-1); } +int +zfs_ioctl(libzfs_handle_t *hdl, int request, zfs_cmd_t *zc) +{ + return (lzc_ioctl_fd(hdl->libzfs_fd, request, zc)); +} + /* * Display an out of memory error message and abort the current program. */ @@ -2388,6 +2394,8 @@ &enc_sysfs_path); upath = zfs_get_underlying_path(path); + if (upath == NULL && path != NULL) + upath = strdup(path); pool_name = zhp ? zpool_get_name(zhp) : NULL; env = zpool_vdev_script_alloc_env(pool_name, path, upath, diff -Nru zfs-linux-2.3.2/lib/libzfs/os/freebsd/libzfs_compat.c zfs-linux-2.3.9/lib/libzfs/os/freebsd/libzfs_compat.c --- zfs-linux-2.3.2/lib/libzfs/os/freebsd/libzfs_compat.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/os/freebsd/libzfs_compat.c 2026-08-21 20:57:12.331909572 +0000 @@ -218,12 +218,6 @@ return (errbuf); } -int -zfs_ioctl(libzfs_handle_t *hdl, int request, zfs_cmd_t *zc) -{ - return (lzc_ioctl_fd(hdl->libzfs_fd, request, zc)); -} - /* * Verify the required ZFS_DEV device is available and optionally attempt * to load the ZFS modules. Under normal circumstances the modules diff -Nru zfs-linux-2.3.2/lib/libzfs/os/freebsd/libzfs_zmount.c zfs-linux-2.3.9/lib/libzfs/os/freebsd/libzfs_zmount.c --- zfs-linux-2.3.2/lib/libzfs/os/freebsd/libzfs_zmount.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/os/freebsd/libzfs_zmount.c 2026-08-21 20:57:12.331988447 +0000 @@ -111,11 +111,29 @@ do_unmount(zfs_handle_t *zhp, const char *mntpt, int flags) { (void) zhp; + + /* + * MS_CRYPT and MS_OVERLAY are libzfs-internal flags; keep them out of + * the unmount(2) syscall. MS_FORCE/MS_DETACH are real flags and kept. + */ + flags &= ~(MS_CRYPT | MS_OVERLAY); + if (unmount(mntpt, flags) < 0) return (errno); return (0); } +/* + * FreeBSD does not support mount_setattr(2). Fall back to a full + * remount so that the updated namespace property takes effect. + */ +int +zfs_mount_setattr(zfs_handle_t *zhp, uint32_t nspflags) +{ + (void) nspflags; + return (zfs_mount(zhp, MNTOPT_REMOUNT, 0)); +} + int zfs_mount_delegation_check(void) { diff -Nru zfs-linux-2.3.2/lib/libzfs/os/linux/libzfs_mount_os.c zfs-linux-2.3.9/lib/libzfs/os/linux/libzfs_mount_os.c --- zfs-linux-2.3.2/lib/libzfs/os/linux/libzfs_mount_os.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/os/linux/libzfs_mount_os.c 2026-08-21 20:57:12.331988447 +0000 @@ -386,6 +386,13 @@ { (void) zhp; + /* + * MS_CRYPT and MS_OVERLAY are libzfs-internal flags; strip them so they + * are never passed to umount2(2), which rejects unknown flag bits with + * EINVAL. MS_FORCE/MS_DETACH are real umount2(2) flags and kept. + */ + flags &= ~(MS_CRYPT | MS_OVERLAY); + if (!libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) { int rv = umount2(mntpt, flags); @@ -410,6 +417,149 @@ return (rc ? EINVAL : 0); } +#ifdef HAVE_MOUNT_SETATTR +/* + * Build a struct mount_attr for the changed namespace properties. + * Parallel to zfs_add_options() but produces mount_setattr(2) input + * instead of a mount options string. + */ +static void +zfs_add_options_setattr(zfs_handle_t *zhp, struct mount_attr *attr, + uint32_t nspflags) +{ + const char *source; + + if (nspflags & ZFS_MNT_PROP_READONLY) { + if (getprop_uint64(zhp, ZFS_PROP_READONLY, &source)) + attr->attr_set |= MOUNT_ATTR_RDONLY; + else + attr->attr_clr |= MOUNT_ATTR_RDONLY; + } + if (nspflags & ZFS_MNT_PROP_EXEC) { + if (getprop_uint64(zhp, ZFS_PROP_EXEC, &source)) + attr->attr_clr |= MOUNT_ATTR_NOEXEC; + else + attr->attr_set |= MOUNT_ATTR_NOEXEC; + } + if (nspflags & ZFS_MNT_PROP_SETUID) { + if (getprop_uint64(zhp, ZFS_PROP_SETUID, &source)) + attr->attr_clr |= MOUNT_ATTR_NOSUID; + else + attr->attr_set |= MOUNT_ATTR_NOSUID; + } + if (nspflags & ZFS_MNT_PROP_DEVICES) { + if (getprop_uint64(zhp, ZFS_PROP_DEVICES, &source)) + attr->attr_clr |= MOUNT_ATTR_NODEV; + else + attr->attr_set |= MOUNT_ATTR_NODEV; + } + if (nspflags & (ZFS_MNT_PROP_ATIME | ZFS_MNT_PROP_RELATIME)) { + uint64_t atime = getprop_uint64(zhp, ZFS_PROP_ATIME, &source); + uint64_t relatime = getprop_uint64(zhp, + ZFS_PROP_RELATIME, &source); + + attr->attr_clr |= MOUNT_ATTR__ATIME; + if (!atime) + attr->attr_set |= MOUNT_ATTR_NOATIME; + else if (relatime) + attr->attr_set |= MOUNT_ATTR_RELATIME; + else + attr->attr_set |= MOUNT_ATTR_STRICTATIME; + } +} +#endif /* HAVE_MOUNT_SETATTR */ + +/* + * Selectively update per-mount VFS flags for the changed namespace + * properties using mount_setattr(2). Unlike a full remount via mount(2), + * this only modifies the specified flags without resetting others -- + * avoiding clobbering temporary mount flags set by the administrator. + * + * For non-legacy datasets, the single known mountpoint is used. + * For legacy datasets, /proc/mounts is iterated since legacy datasets + * can be mounted at multiple locations. + * + * Falls back to a full remount via zfs_mount() when mount_setattr(2) + * is not available (ENOSYS), except for legacy mounts where a full + * remount would clobber temporary flags. + */ +int +zfs_mount_setattr(zfs_handle_t *zhp, uint32_t nspflags) +{ +#ifdef HAVE_MOUNT_SETATTR + struct mount_attr attr = { 0 }; + char mntpt_prop[ZFS_MAXPROPLEN]; + boolean_t legacy = B_FALSE; + libzfs_handle_t *hdl = zhp->zfs_hdl; + FILE *mnttab; + struct mnttab entry; + int ret = 0; + + if (!zfs_is_mountable_internal(zhp)) + return (0); + + zfs_add_options_setattr(zhp, &attr, nspflags); + if (attr.attr_set == 0 && attr.attr_clr == 0) + return (0); + + if (zfs_prop_valid_for_type(ZFS_PROP_MOUNTPOINT, zhp->zfs_type, + B_FALSE)) { + verify(zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, mntpt_prop, + sizeof (mntpt_prop), NULL, NULL, 0, B_FALSE) == 0); + legacy = (strcmp(mntpt_prop, ZFS_MOUNTPOINT_LEGACY) == 0); + } + + if (!legacy) { + char *mntpt = NULL; + + if (!zfs_is_mounted(zhp, &mntpt)) + return (0); + + ret = mount_setattr(AT_FDCWD, mntpt, 0, + &attr, sizeof (attr)); + free(mntpt); + if (ret != 0) { + if (errno == ENOSYS) + return (zfs_mount(zhp, MNTOPT_REMOUNT, 0)); + return (zfs_error_fmt(hdl, EZFS_MOUNTFAILED, + dgettext(TEXT_DOMAIN, "cannot set mount " + "attributes for '%s'"), zhp->zfs_name)); + } + return (0); + } + + /* Legacy: iterate /proc/mounts for all mountpoints. */ + if ((mnttab = fopen(MNTTAB, "re")) == NULL) + return (0); + + while (getmntent(mnttab, &entry) == 0) { + if (strcmp(entry.mnt_fstype, MNTTYPE_ZFS) != 0) + continue; + if (strcmp(entry.mnt_special, zhp->zfs_name) != 0) + continue; + + ret = mount_setattr(AT_FDCWD, entry.mnt_mountp, 0, + &attr, sizeof (attr)); + if (ret != 0) { + if (errno == ENOSYS) { + ret = 0; + break; + } + ret = zfs_error_fmt(hdl, EZFS_MOUNTFAILED, + dgettext(TEXT_DOMAIN, "cannot set mount " + "attributes for '%s'"), zhp->zfs_name); + break; + } + } + + (void) fclose(mnttab); + return (ret); +#else + (void) nspflags; + return (zfs_mount(zhp, MNTOPT_REMOUNT, 0)); +#endif +} + int zfs_mount_delegation_check(void) { diff -Nru zfs-linux-2.3.2/lib/libzfs/os/linux/libzfs_util_os.c zfs-linux-2.3.9/lib/libzfs/os/linux/libzfs_util_os.c --- zfs-linux-2.3.2/lib/libzfs/os/linux/libzfs_util_os.c 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs/os/linux/libzfs_util_os.c 2026-08-21 20:57:12.332140472 +0000 @@ -53,12 +53,6 @@ #define ZDIFF_SHARESDIR "/.zfs/shares/" -int -zfs_ioctl(libzfs_handle_t *hdl, int request, zfs_cmd_t *zc) -{ - return (ioctl(hdl->libzfs_fd, request, zc)); -} - const char * libzfs_error_init(int error) { diff -Nru zfs-linux-2.3.2/lib/libzfs_core/Makefile.am zfs-linux-2.3.9/lib/libzfs_core/Makefile.am --- zfs-linux-2.3.2/lib/libzfs_core/Makefile.am 2025-05-01 18:23:23.772215286 +0000 +++ zfs-linux-2.3.9/lib/libzfs_core/Makefile.am 2026-08-21 20:57:12.332296701 +0000 @@ -1,18 +1,22 @@ +# SPDX-License-Identifier: CDDL-1.0 libzfs_core_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libzfs_core_la_CFLAGS += -fvisibility=hidden +libzfs_core_la_CPPFLAGS = $(AM_CPPFLAGS) +libzfs_core_la_CPPFLAGS += -I$(srcdir)/%D% + lib_LTLIBRARIES += libzfs_core.la CPPCHECKTARGETS += libzfs_core.la libzfs_core_la_SOURCES = \ - %D%/libzfs_core.c + %D%/libzfs_core.c \ + %D%/libzfs_core_impl.h if BUILD_LINUX libzfs_core_la_SOURCES += \ %D%/os/linux/libzfs_core_ioctl.c endif -libzfs_core_la_CPPFLAGS = $(AM_CPPFLAGS) if BUILD_FREEBSD libzfs_core_la_CPPFLAGS += -Iinclude/os/freebsd/zfs diff -Nru zfs-linux-2.3.2/lib/libzfs_core/libzfs_core.abi zfs-linux-2.3.9/lib/libzfs_core/libzfs_core.abi --- zfs-linux-2.3.2/lib/libzfs_core/libzfs_core.abi 2025-05-01 18:23:23.773215300 +0000 +++ zfs-linux-2.3.9/lib/libzfs_core/libzfs_core.abi 2026-08-21 20:57:12.332296701 +0000 @@ -1494,6 +1494,9 @@ + + + diff -Nru zfs-linux-2.3.2/lib/libzfs_core/libzfs_core.c zfs-linux-2.3.9/lib/libzfs_core/libzfs_core.c --- zfs-linux-2.3.2/lib/libzfs_core/libzfs_core.c 2025-05-01 18:23:23.773215300 +0000 +++ zfs-linux-2.3.9/lib/libzfs_core/libzfs_core.c 2026-08-21 20:57:12.332296701 +0000 @@ -96,10 +96,14 @@ #define BIG_PIPE_SIZE (64 * 1024) /* From sys/pipe.h */ #endif +#include "libzfs_core_impl.h" + static int g_fd = -1; static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; static int g_refcount; +static int g_ioc_trace = 0; + #ifdef ZFS_DEBUG static zfs_ioc_t fail_ioc_cmd = ZFS_IOC_LAST; static zfs_errno_t fail_ioc_err; @@ -152,6 +156,10 @@ #ifdef ZFS_DEBUG libzfs_core_debug_ioc(); #endif + + if (getenv("ZFS_IOC_TRACE")) + g_ioc_trace = 1; + (void) pthread_mutex_unlock(&g_lock); return (0); } @@ -171,6 +179,42 @@ (void) pthread_mutex_unlock(&g_lock); } +int +lzc_ioctl_fd(int fd, unsigned long ioc, zfs_cmd_t *zc) +{ + if (!g_ioc_trace) + return (lzc_ioctl_fd_os(fd, ioc, zc)); + + nvlist_t *nvl; + + fprintf(stderr, "=== lzc_ioctl: call: ioc=0x%lx name=%s\n", + ioc, zc->zc_name[0] ? zc->zc_name : "[none]"); + if (zc->zc_nvlist_src) { + nvl = fnvlist_unpack( + (void *)(uintptr_t)zc->zc_nvlist_src, + zc->zc_nvlist_src_size); + nvlist_print(stderr, nvl); + fnvlist_free(nvl); + } + + int rc = lzc_ioctl_fd_os(fd, ioc, zc); + int err = errno; + + fprintf(stderr, "=== lzc_ioctl: result: ioc=0x%lx name=%s " + "rc=%d errno=%d\n", ioc, zc->zc_name[0] ? zc->zc_name : "[none]", + rc, (rc < 0 ? err : 0)); + if (rc >= 0 && zc->zc_nvlist_dst) { + nvl = fnvlist_unpack( + (void *)(uintptr_t)zc->zc_nvlist_dst, + zc->zc_nvlist_dst_size); + nvlist_print(stderr, nvl); + fnvlist_free(nvl); + } + + errno = err; + return (rc); +} + static int lzc_ioctl(zfs_ioc_t ioc, const char *name, nvlist_t *source, nvlist_t **resultp) diff -Nru zfs-linux-2.3.2/lib/libzfs_core/libzfs_core_impl.h zfs-linux-2.3.9/lib/libzfs_core/libzfs_core_impl.h --- zfs-linux-2.3.2/lib/libzfs_core/libzfs_core_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/lib/libzfs_core/libzfs_core_impl.h 2026-08-21 20:57:12.332296701 +0000 @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012, 2020 by Delphix. All rights reserved. + * Copyright 2017 RackTop Systems. + * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. + * Copyright (c) 2019 Datto Inc. + */ + +#ifndef _LIBZFS_CORE_IMPL_H +#define _LIBZFS_CORE_IMPL_H + +struct zfs_cmd; +int lzc_ioctl_fd_os(int, unsigned long, struct zfs_cmd *); + +#endif /* _LIBZFS_CORE_IMPL_H */ diff -Nru zfs-linux-2.3.2/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c zfs-linux-2.3.9/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c --- zfs-linux-2.3.2/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c 2025-05-01 18:23:23.773215300 +0000 +++ zfs-linux-2.3.9/lib/libzfs_core/os/freebsd/libzfs_core_ioctl.c 2026-08-21 20:57:12.332812728 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include "libzfs_core_impl.h" int zfs_ioctl_version = ZFS_IOCVER_UNDEF; @@ -101,7 +102,7 @@ * error is returned zc_nvlist_dst_size won't be updated. */ int -lzc_ioctl_fd(int fd, unsigned long request, zfs_cmd_t *zc) +lzc_ioctl_fd_os(int fd, unsigned long request, zfs_cmd_t *zc) { size_t oldsize; int ret, cflag = ZFS_CMD_COMPAT_NONE; diff -Nru zfs-linux-2.3.2/lib/libzfs_core/os/linux/libzfs_core_ioctl.c zfs-linux-2.3.9/lib/libzfs_core/os/linux/libzfs_core_ioctl.c --- zfs-linux-2.3.2/lib/libzfs_core/os/linux/libzfs_core_ioctl.c 2025-05-01 18:23:23.773215300 +0000 +++ zfs-linux-2.3.9/lib/libzfs_core/os/linux/libzfs_core_ioctl.c 2026-08-21 20:57:12.332812728 +0000 @@ -23,9 +23,10 @@ #include #include #include +#include "libzfs_core_impl.h" int -lzc_ioctl_fd(int fd, unsigned long request, zfs_cmd_t *zc) +lzc_ioctl_fd_os(int fd, unsigned long request, zfs_cmd_t *zc) { return (ioctl(fd, request, zc)); } diff -Nru zfs-linux-2.3.2/lib/libzfsbootenv/Makefile.am zfs-linux-2.3.9/lib/libzfsbootenv/Makefile.am --- zfs-linux-2.3.2/lib/libzfsbootenv/Makefile.am 2025-05-01 18:23:23.773215300 +0000 +++ zfs-linux-2.3.9/lib/libzfsbootenv/Makefile.am 2026-08-21 20:57:12.332926601 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libzfsbootenv_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libzfsbootenv_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libzpool/Makefile.am zfs-linux-2.3.9/lib/libzpool/Makefile.am --- zfs-linux-2.3.2/lib/libzpool/Makefile.am 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzpool/Makefile.am 2026-08-21 20:57:12.332926601 +0000 @@ -1,5 +1,4 @@ -include $(srcdir)/%D%/include/Makefile.am - +# SPDX-License-Identifier: CDDL-1.0 libzpool_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS) $(LIBRARY_CFLAGS) libzpool_la_CFLAGS += $(ZLIB_CFLAGS) diff -Nru zfs-linux-2.3.2/lib/libzpool/include/Makefile.am zfs-linux-2.3.9/lib/libzpool/include/Makefile.am --- zfs-linux-2.3.2/lib/libzpool/include/Makefile.am 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzpool/include/Makefile.am 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -libzpooldir = $(includedir)/libzpool -libzpool_HEADERS = \ - %D%/sys/abd_os.h \ - %D%/sys/abd_impl_os.h diff -Nru zfs-linux-2.3.2/lib/libzpool/include/sys/abd_impl_os.h zfs-linux-2.3.9/lib/libzpool/include/sys/abd_impl_os.h --- zfs-linux-2.3.2/lib/libzpool/include/sys/abd_impl_os.h 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzpool/include/sys/abd_impl_os.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: CDDL-1.0 -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 2014 by Chunwei Chen. All rights reserved. - * Copyright (c) 2016, 2019 by Delphix. All rights reserved. - * Copyright (c) 2023, 2024, Klara Inc. - */ - -#ifndef _ABD_IMPL_OS_H -#define _ABD_IMPL_OS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define abd_enter_critical(flags) ((void)0) -#define abd_exit_critical(flags) ((void)0) - -#ifdef __cplusplus -} -#endif - -#endif /* _ABD_IMPL_OS_H */ diff -Nru zfs-linux-2.3.2/lib/libzpool/include/sys/abd_os.h zfs-linux-2.3.9/lib/libzpool/include/sys/abd_os.h --- zfs-linux-2.3.2/lib/libzpool/include/sys/abd_os.h 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzpool/include/sys/abd_os.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: CDDL-1.0 -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or https://opensource.org/licenses/CDDL-1.0. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 2014 by Chunwei Chen. All rights reserved. - * Copyright (c) 2016, 2019 by Delphix. All rights reserved. - */ - -#ifndef _ABD_OS_H -#define _ABD_OS_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct abd_scatter { - uint_t abd_offset; - uint_t abd_iovcnt; - struct iovec abd_iov[1]; /* actually variable-length */ -}; - -struct abd_linear { - void *abd_buf; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _ABD_H */ diff -Nru zfs-linux-2.3.2/lib/libzpool/kernel.c zfs-linux-2.3.9/lib/libzpool/kernel.c --- zfs-linux-2.3.2/lib/libzpool/kernel.c 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzpool/kernel.c 2026-08-21 20:57:12.333235684 +0000 @@ -918,13 +918,6 @@ return (0); } -int -secpolicy_zfs_proc(const cred_t *cr, proc_t *proc) -{ - (void) cr, (void) proc; - return (0); -} - ksiddomain_t * ksid_lookupdomain(const char *dom) { @@ -1078,8 +1071,10 @@ * Returns 0 on success underlying error on failure. */ int -zfs_file_open(const char *path, int flags, int mode, zfs_file_t **fpp) +zfs_file_open(const char *path, int flags, int mode, cred_t *cr, + zfs_file_t **fpp) { + (void) cr; int fd = -1; int dump_fd = -1; int err; @@ -1182,7 +1177,7 @@ */ int zfs_file_pwrite(zfs_file_t *fp, const void *buf, - size_t count, loff_t pos, ssize_t *resid) + size_t count, loff_t pos, uint8_t ashift, ssize_t *resid) { ssize_t rc, split, done; int sectors; @@ -1192,8 +1187,8 @@ * system calls so that the process can be killed in between. * This is used by ztest to simulate realistic failure modes. */ - sectors = count >> SPA_MINBLOCKSHIFT; - split = (sectors > 0 ? rand() % sectors : 0) << SPA_MINBLOCKSHIFT; + sectors = count >> ashift; + split = (sectors > 0 ? rand() % sectors : 0) << ashift; rc = pwrite64(fp->f_fd, buf, split, pos); if (rc != -1) { done = rc; diff -Nru zfs-linux-2.3.2/lib/libzstd/Makefile.am zfs-linux-2.3.9/lib/libzstd/Makefile.am --- zfs-linux-2.3.2/lib/libzstd/Makefile.am 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzstd/Makefile.am 2026-08-21 20:57:12.333235684 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libzstd_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libzstd_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS) diff -Nru zfs-linux-2.3.2/lib/libzutil/Makefile.am zfs-linux-2.3.9/lib/libzutil/Makefile.am --- zfs-linux-2.3.2/lib/libzutil/Makefile.am 2025-05-01 18:23:23.774215314 +0000 +++ zfs-linux-2.3.9/lib/libzutil/Makefile.am 2026-08-21 20:57:12.333235684 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 libzutil_la_CFLAGS = $(AM_CFLAGS) $(LIBRARY_CFLAGS) libzutil_la_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUDEV_CFLAGS) libzutil_la_CFLAGS += -fvisibility=hidden diff -Nru zfs-linux-2.3.2/lib/libzutil/os/linux/zutil_device_path_os.c zfs-linux-2.3.9/lib/libzutil/os/linux/zutil_device_path_os.c --- zfs-linux-2.3.2/lib/libzutil/os/linux/zutil_device_path_os.c 2025-05-01 18:23:23.775215328 +0000 +++ zfs-linux-2.3.9/lib/libzutil/os/linux/zutil_device_path_os.c 2026-08-21 20:57:12.333988287 +0000 @@ -218,7 +218,8 @@ char *address2 = NULL; char *path = NULL; char buf[MAXPATHLEN]; - char *tmp; + const char *tmp; + char *tmp2; /* If they preface 'dev' with a path (like "/dev") then strip it off */ tmp = strrchr(dev_name, '/'); @@ -240,9 +241,9 @@ * be "0000:01:00.0" while /sys/bus/pci/slots/0/address will be * "0000:01:00". Just NULL terminate at the '.' so they match. */ - tmp = strrchr(address1, '.'); - if (tmp != NULL) - *tmp = '\0'; + tmp2 = strrchr(address1, '.'); + if (tmp2 != NULL) + *tmp2 = '\0'; dp = opendir("/sys/bus/pci/slots/"); if (dp == NULL) { @@ -311,6 +312,7 @@ DIR *dp = NULL; struct dirent *ep; char buf[MAXPATHLEN]; + const char *tmp0; char *tmp1 = NULL; char *tmp2 = NULL; char *tmp3 = NULL; @@ -322,9 +324,9 @@ return (NULL); /* If they preface 'dev' with a path (like "/dev") then strip it off */ - tmp1 = strrchr(dev_name, '/'); - if (tmp1 != NULL) - dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */ + tmp0 = strrchr(dev_name, '/'); + if (tmp0 != NULL) + dev_name = tmp0 + 1; /* +1 since we want the chr after '/' */ tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name); if (tmpsize == -1 || tmp1 == NULL) { diff -Nru zfs-linux-2.3.2/lib/libzutil/zutil_device_path.c zfs-linux-2.3.9/lib/libzutil/zutil_device_path.c --- zfs-linux-2.3.2/lib/libzutil/zutil_device_path.c 2025-05-01 18:23:23.775215328 +0000 +++ zfs-linux-2.3.9/lib/libzutil/zutil_device_path.c 2026-08-21 20:57:12.334245392 +0000 @@ -134,7 +134,7 @@ while (dir) { /* Trim trailing directory slashes from ZPOOL_IMPORT_PATH */ if (env) { - while (dir[strlen(dir)-1] == '/') + while ((dir[0] != '\0') && (dir[strlen(dir)-1] == '/')) dir[strlen(dir)-1] = '\0'; } diff -Nru zfs-linux-2.3.2/man/Makefile.am zfs-linux-2.3.9/man/Makefile.am --- zfs-linux-2.3.2/man/Makefile.am 2025-05-01 18:23:23.775215328 +0000 +++ zfs-linux-2.3.9/man/Makefile.am 2026-08-21 20:57:12.334245392 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 dist_noinst_man_MANS = \ %D%/man1/cstyle.1 @@ -50,6 +51,7 @@ %D%/man8/zfs-redact.8 \ %D%/man8/zfs-release.8 \ %D%/man8/zfs-rename.8 \ + %D%/man8/zfs-rewrite.8 \ %D%/man8/zfs-rollback.8 \ %D%/man8/zfs-send.8 \ %D%/man8/zfs-set.8 \ diff -Nru zfs-linux-2.3.2/man/man1/zhack.1 zfs-linux-2.3.9/man/man1/zhack.1 --- zfs-linux-2.3.2/man/man1/zhack.1 2025-05-01 18:23:23.776215342 +0000 +++ zfs-linux-2.3.9/man/man1/zhack.1 2026-08-21 20:57:12.334792370 +0000 @@ -23,7 +23,7 @@ .\" .\" lint-ok: WARNING: sections out of conventional order: Sh SYNOPSIS .\" -.Dd May 26, 2021 +.Dd August 3, 2026 .Dt ZHACK 1 .Os . @@ -122,6 +122,65 @@ .Nm zhack Cm label repair Fl cu Ar device Fix checksums and undetach a device . +.It Xo +.Nm zhack +.Cm mmp reclaim +.Ar pool +.Xc +Import a +.Ar pool +whose uberblock claim cannot reach every mirror leg the configuration still +expects to be present, then mark the unreachable leaves offline so that +ordinary imports succeed, and export it again. +.Pp +This exists for one situation: a host has failed together with the mirror legs +attached to it, so the surviving labels still describe those legs as healthy, +and every later import demands writes to them that nobody can make. +.Pp +.Sy This does not make the operation safe on its own . +A live host whose legs are +.Em all +invisible from here cannot be detected by any write and read scheme, and this +command will take the pool from it. +Fence the failed host, or otherwise prove it is powered off, before running +this. +.Pp +The activity check itself is unchanged: every write the reachable legs allow, +the wait, and the re-read all still happen, so a competing host which shares +any leg with this one is still detected and the import is refused. +Only the number of writes the claim demands is lowered, and only for mirror +legs this host cannot open, each of which is then marked offline. +.Pp +The pool is left exported, and imports degraded with those leaves offline. +Bring each one back with +.Xr zpool-online 8 +once the hardware returns. +A leaf holding the only copy of some data cannot be offlined: it is reported +and left online, and imports from other hosts stay refused. +No leaf is marked offline on a pool which does not have +.Sy multihost +set, since no claim runs for it and an ordinary import already succeeds. +Leaves of log, cache, and spare vdevs are not touched, as the claim does not +write to them. +. +.It Xo +.Nm zhack +.Cm metaslab leak +.Op Fl f +.Ar pool +.Xc +Apply a fragmentation profile generated by +.Sy zdb +to the specified +.Ar pool Ns +\&. +.Pp +The +.Fl f +flag forces the profile to apply even if the vdevs in the +.Ar pool +don't have the same number of metaslabs as the fragmentation profile. +. .El . .Sh GLOBAL OPTIONS @@ -143,6 +202,8 @@ members in .Ar dir . Can be specified more than once. +.It Fl o Ar var Ns = Ns Ar value +Set the given tunable to the provided value. .El . .Sh EXAMPLES @@ -161,8 +222,24 @@ .No # Nm zhack Cm feature enable Fl d No 'Predict future disk failures.' Ar tank com.example:clairvoyance .No # Nm zhack Cm feature ref Ar tank com.example:clairvoyance .Ed +.Pp +Recover a pool whose peer host died together with its mirror legs, after +confirming that host is down: +.Bd -literal +.No # Nm zpool Cm import Fl f Ar tank +cannot import 'tank': the multihost claim could not be written to a device +the pool configuration expects to be present. +If the device is permanently gone, recover with 'zhack mmp reclaim'. +.No # Nm zhack Cm mmp reclaim Ar tank +tank: marked absent leaf 5646371977210937898 offline +.No # Nm zpool Cm import Ar tank +.No # Nm zpool Cm online Ar tank Ar /dev/disk/by-id/... +.Ed . .Sh SEE ALSO .Xr ztest 1 , .Xr zpool-features 7 , -.Xr zfs 8 +.Xr zpoolprops 7 , +.Xr zfs 8 , +.Xr zpool-import 8 , +.Xr zpool-online 8 diff -Nru zfs-linux-2.3.2/man/man4/zfs.4 zfs-linux-2.3.9/man/man4/zfs.4 --- zfs-linux-2.3.2/man/man4/zfs.4 2025-05-01 18:23:23.776215342 +0000 +++ zfs-linux-2.3.9/man/man4/zfs.4 2026-08-21 20:57:12.335124195 +0000 @@ -3,7 +3,7 @@ .\" Copyright (c) 2013 by Turbo Fredriksson . All rights reserved. .\" Copyright (c) 2019, 2021 by Delphix. All rights reserved. .\" Copyright (c) 2019 Datto Inc. -.\" Copyright (c) 2023, 2024 Klara, Inc. +.\" Copyright (c) 2023, 2024, 2025, Klara, Inc. .\" The contents of this file are subject to the terms of the Common Development .\" and Distribution License (the "License"). You may not use this file except .\" in compliance with the License. You can obtain a copy of the license at @@ -17,9 +17,7 @@ .\" own identifying information: .\" Portions Copyright [yyyy] [name of copyright owner] .\" -.\" Copyright (c) 2024, Klara, Inc. -.\" -.Dd November 1, 2024 +.Dd September 15, 2025 .Dt ZFS 4 .Os . @@ -95,10 +93,6 @@ Limit the amount we can prefetch with one call to this amount in bytes. This helps to limit the amount of memory that can be used by prefetching. . -.It Sy ignore_hole_birth Pq int -Alias for -.Sy send_holes_without_birth_time . -. .It Sy l2arc_feed_again Ns = Ns Sy 1 Ns | Ns 0 Pq int Turbo L2ARC warm-up. When the L2ARC is cold the fill interval will be set as fast as possible. @@ -725,6 +719,40 @@ This batch-style operation prevents entire sub-lists from being evicted at once but comes at a cost of additional unlocking and locking. . +.It Sy zfs_arc_evict_threads Ns = Ns Sy 0 Pq int +Sets the number of ARC eviction threads to be used. +.Pp +If set greater than 0, ZFS will dedicate up to that many threads to ARC +eviction. +Each thread will process one sub-list at a time, +until the eviction target is reached or all sub-lists have been processed. +When set to 0, ZFS will compute a reasonable number of eviction threads based +on the number of CPUs. +.TS +box; +lb l l . + CPUs Threads +_ + 1-4 1 + 5-8 2 + 9-15 3 + 16-31 4 + 32-63 6 + 64-95 8 + 96-127 9 + 128-160 11 + 160-191 12 + 192-223 13 + 224-255 14 + 256+ 16 +.TE +.Pp +More threads may improve the responsiveness of ZFS to memory pressure. +This can be important for performance when eviction from the ARC becomes +a bottleneck for reads and writes. +.Pp +This parameter can only be set at module load time. +. .It Sy zfs_arc_grow_retry Ns = Ns Sy 0 Ns s Pq uint If set to a non zero value, it will replace the .Sy arc_grow_retry @@ -862,7 +890,9 @@ .Sy zfs_arc_min if necessary. This value is specified as percent of pagecache size (as measured by -.Sy NR_FILE_PAGES ) , +.Sy NR_ACTIVE_FILE ++ +.Sy NR_INACTIVE_FILE ) , where that percent may exceed .Sy 100 . This @@ -1027,27 +1057,6 @@ .It Sy zfs_dedup_prefetch Ns = Ns Sy 0 Ns | Ns 1 Pq int Enable prefetching dedup-ed blocks which are going to be freed. . -.It Sy zfs_dedup_log_flush_passes_max Ns = Ns Sy 8 Ns Pq uint -Maximum number of dedup log flush passes (iterations) each transaction. -.Pp -At the start of each transaction, OpenZFS will estimate how many entries it -needs to flush out to keep up with the change rate, taking the amount and time -taken to flush on previous txgs into account (see -.Sy zfs_dedup_log_flush_flow_rate_txgs ) . -It will spread this amount into a number of passes. -At each pass, it will use the amount already flushed and the total time taken -by flushing and by other IO to recompute how much it should do for the remainder -of the txg. -.Pp -Reducing the max number of passes will make flushing more aggressive, flushing -out more entries on each pass. -This can be faster, but also more likely to compete with other IO. -Increasing the max number of passes will put fewer entries onto each pass, -keeping the overhead of dedup changes to a minimum but possibly causing a large -number of changes to be dumped on the last pass, which can blow out the txg -sync time beyond -.Sy zfs_txg_timeout . -. .It Sy zfs_dedup_log_flush_min_time_ms Ns = Ns Sy 1000 Ns Pq uint Minimum time to spend on dedup log flush each transaction. .Pp @@ -1057,22 +1066,58 @@ This occurs even if doing so would delay the transaction, that is, other IO completes under this time. . -.It Sy zfs_dedup_log_flush_entries_min Ns = Ns Sy 1000 Ns Pq uint +.It Sy zfs_dedup_log_flush_entries_min Ns = Ns Sy 100 Ns Pq uint Flush at least this many entries each transaction. .Pp -OpenZFS will estimate how many entries it needs to flush each transaction to -keep up with the ingest rate (see -.Sy zfs_dedup_log_flush_flow_rate_txgs ) . -This sets the minimum for that estimate. -Raising it can force OpenZFS to flush more aggressively, keeping the log small -and so reducing pool import times, but can make it less able to back off if -log flushing would compete with other IO too much. -. +OpenZFS will flush a fraction of the log every TXG, to keep the size +proportional to the ingest rate (see +.Sy zfs_dedup_log_flush_txgs ) . +This sets the minimum for that estimate, which prevents the backlog from +completely draining if the ingest rate falls. +Raising it can force OpenZFS to flush more aggressively, reducing the backlog +to zero more quickly, but can make it less able to back off if log +flushing would compete with other IO too much. +. +.It Sy zfs_dedup_log_flush_entries_max Ns = Ns Sy UINT_MAX Ns Pq uint +Flush at most this many entries each transaction. +.Pp +Mostly used for debugging purposes. +.It Sy zfs_dedup_log_flush_txgs Ns = Ns Sy 100 Ns Pq uint +Target number of TXGs to process the whole dedup log. +.Pp +Every TXG, OpenZFS will process the inverse of this number times the size +of the DDT backlog. +This will keep the backlog at a size roughly equal to the ingest rate +times this value. +This offers a balance between a more efficient DDT log, with better +aggregation, and shorter import times, which increase as the size of the +DDT log increases. +Increasing this value will result in a more efficient DDT log, but longer +import times. +.It Sy zfs_dedup_log_cap Ns = Ns Sy UINT_MAX Ns Pq uint +Soft cap for the size of the current dedup log. +.Pp +If the log is larger than this size, we increase the aggressiveness of +the flushing to try to bring it back down to the soft cap. +Setting it will reduce import times, but will reduce the efficiency of +the DDT log, increasing the expected number of IOs required to flush the same +amount of data. +.It Sy zfs_dedup_log_hard_cap Ns = Ns Sy 0 Ns | Ns 1 Pq uint +Whether to treat the log cap as a firm cap or not. +.Pp +When set to 0 (the default), the +.Sy zfs_dedup_log_cap +will increase the maximum number of log entries we flush in a given txg. +This will bring the backlog size down towards the cap, but not at the expense +of making TXG syncs take longer. +If this is set to 1, the cap acts more like a hard cap than a soft cap; it will +also increase the minimum number of log entries we flush per TXG. +Enabling it will reduce worst-case import times, at the cost of increased TXG +sync times. .It Sy zfs_dedup_log_flush_flow_rate_txgs Ns = Ns Sy 10 Ns Pq uint Number of transactions to use to compute the flow rate. .Pp -OpenZFS will estimate how many entries it needs to flush each transaction by -monitoring the number of entries changed (ingest rate), number of entries +OpenZFS will estimate number of entries changed (ingest rate), number of entries flushed (flush rate) and time spent flushing (flush time rate) and combining these into an overall "flow rate". It will use an exponential weighted moving average over some number of recent @@ -1339,14 +1384,15 @@ using functions and system calls that attempt to clone blocks will act as though the feature is disabled. . -.It Sy zfs_bclone_wait_dirty Ns = Ns Sy 0 Ns | Ns 1 Pq int -When set to 1 the FICLONE and FICLONERANGE ioctls wait for dirty data to be -written to disk. -This allows the clone operation to reliably succeed when a file is +.It Sy zfs_bclone_wait_dirty Ns = Ns Sy 1 Ns | Ns 0 Pq int +When set to 1 the FICLONE and FICLONERANGE ioctls will wait for any dirty +data to be written to disk before proceeding. +This ensures that the clone operation reliably succeeds, even if a file is modified and then immediately cloned. -For small files this may be slower than making a copy of the file. -Therefore, this setting defaults to 0 which causes a clone operation to -immediately fail when encountering a dirty block. +Note that for small files this may be slower than simply copying the file. +When set to 0 the clone operation will immediately fail if it encounters +any dirty blocks. +By default waiting is enabled. . .It Sy zfs_blake3_impl Ns = Ns Sy fastest Pq string Select a BLAKE3 implementation. @@ -1608,6 +1654,10 @@ 2048 ZFS_DEBUG_TRIM Verify TRIM ranges are always within the allocatable range tree. 4096 ZFS_DEBUG_LOG_SPACEMAP Verify that the log summary is consistent with the spacemap log and enable \fBzfs_dbgmsgs\fP for metaslab loading and flushing. + 8192 ZFS_DEBUG_METASLAB_ALLOC Enable debugging messages when allocations fail. + 16384 ZFS_DEBUG_BRT Enable BRT-related debugging messages. + 32768 ZFS_DEBUG_RAIDZ_RECONSTRUCT Enabled debugging messages for raidz reconstruction. + 65536 ZFS_DEBUG_DDT Enable DDT-related debugging messages. .TE .Sy \& * No Requires debug build . . @@ -1949,7 +1999,7 @@ May be unset after the ZFS modules have been loaded to initialize the QAT hardware as long as support is compiled in and the QAT driver is present. . -.It Sy zfs_vnops_read_chunk_size Ns = Ns Sy 1048576 Ns B Po 1 MiB Pc Pq u64 +.It Sy zfs_vnops_read_chunk_size Ns = Ns Sy 33554432 Ns B Po 32 MiB Pc Pq u64 Bytes to read per chunk. . .It Sy zfs_read_history Ns = Ns Sy 0 Pq uint @@ -2501,6 +2551,49 @@ .It Sy zio_requeue_io_start_cut_in_line Ns = Ns Sy 0 Ns | Ns 1 Pq int Prioritize requeued I/O. . +.It Sy zfs_delete_inode Ns = Ns Sy 0 Ns | Ns 1 Pq int +Sets whether the kernel should free an inode structure when the last reference +is released, or cache it in memory. +Intended for testing/debugging. +.Pp +A live inode structure "pins" versious internal OpenZFS structures in memory, +which can result in large amounts of "unusable" memory on systems with lots of +infrequently-accessed files, until the kernel's memory pressure mechanism +asks OpenZFS to release them. +.Pp +The default value of +.Sy 0 +always caches inodes that appear to still exist on disk. +Setting it to +.Sy 1 +will immediately release unused inodes and their associated memory back to the +dbuf cache or the ARC for reuse, but may reduce performance if inodes are +frequently evicted and reloaded. +.Pp +This parameter is only available on Linux. +. +.It Sy zfs_delete_dentry Ns = Ns Sy 0 Ns | Ns 1 Pq int +Sets whether the kernel should free a dentry structure when it is no longer +required, or hold it in the dentry cache. +Intended for testing/debugging. +. +Since a dentry structure holds an inode reference, a cached dentry can "pin" +an inode in memory indefinitely, along with associated OpenZFS structures (See +.Sy zfs_delete_inode ) . +.Pp +The default value of +.Sy 0 +instructs the kernel to cache entries and their associated inodes when they +are no longer directly referenced. +They will be reclaimed as part of the kernel's normal cache management +processes. +Setting it to +.Sy 1 +will instruct the kernel to release directory entries and their inodes as soon +as they are no longer referenced by the filesystem. +.Pp +This parameter is only available on Linux. +. .It Sy zio_taskq_batch_pct Ns = Ns Sy 80 Ns % Pq uint Percentage of online CPUs which will run a worker thread for I/O. These workers are responsible for I/O work such as compression, encryption, @@ -2535,12 +2628,50 @@ Set the queue and thread configuration for the IO read queues. This is an advanced debugging parameter. Don't change this unless you understand what it does. +Each of the four values corresponds to the issue, issue high-priority, +interrupt, and interrupt high-priority queues. +Valid values are +.Sy fixed,N,M +(M queues with N threads each), +.Sy scale[,MIN] +(scale with CPUs, minimum MIN total threads), +.Sy sync , +and +.Sy null . Set values only apply to pools imported/created after that. . .It Sy zio_taskq_write Ns = Ns Sy sync null scale null Pq charp Set the queue and thread configuration for the IO write queues. This is an advanced debugging parameter. Don't change this unless you understand what it does. +Each of the four values corresponds to the issue, issue high-priority, +interrupt, and interrupt high-priority queues. +Valid values are +.Sy fixed,N,M +(M queues with N threads each), +.Sy scale[,MIN] +(scale with CPUs, minimum MIN total threads), +.Sy sync , +and +.Sy null . +Set values only apply to pools imported/created after that. +. +.It Sy zio_taskq_free Ns = Ns Sy scale,32 null null null Pq charp +Set the queue and thread configuration for the IO free queues. +This is an advanced debugging parameter. +Don't change this unless you understand what it does. +Each of the four values corresponds to the issue, issue high-priority, +interrupt, and interrupt high-priority queues. +Valid values are +.Sy fixed,N,M +(M queues with N threads each), +.Sy scale[,MIN] +(scale with CPUs, minimum MIN total threads), +.Sy sync , +and +.Sy null . +The default uses a minimum of 32 threads to improve parallelism for +DDT and BRT metadata operations during frees. Set values only apply to pools imported/created after that. . .It Sy zvol_inhibit_dev Ns = Ns Sy 0 Ns | Ns 1 Pq uint @@ -2573,9 +2704,9 @@ When unset, requests are handled asynchronously by a thread pool. The number of requests which can be handled concurrently is controlled by .Sy zvol_threads . -.Sy zvol_request_sync -is ignored when running on a kernel that supports block multiqueue -.Pq Li blk-mq . +This parameter applies regardless of the +.Sy zvol_use_blk_mq +setting. . .It Sy zvol_num_taskqs Ns = Ns Sy 0 Pq uint Number of zvol taskqs. diff -Nru zfs-linux-2.3.2/man/man7/zfsprops.7 zfs-linux-2.3.9/man/man7/zfsprops.7 --- zfs-linux-2.3.2/man/man7/zfsprops.7 2025-05-01 18:23:23.777215356 +0000 +++ zfs-linux-2.3.9/man/man7/zfsprops.7 2026-08-21 20:57:12.335756824 +0000 @@ -1596,7 +1596,8 @@ ZFS stores an extra copy of only critical metadata. This can improve file create performance since less metadata needs to be written. -If a single on-disk block is corrupt, at worst a single user file can be lost. +If a single on-disk block is corrupt, multiple user files or directories +can be lost. .Pp When set to .Sy none , diff -Nru zfs-linux-2.3.2/man/man8/zdb.8 zfs-linux-2.3.9/man/man8/zdb.8 --- zfs-linux-2.3.2/man/man8/zdb.8 2025-05-01 18:23:23.778215370 +0000 +++ zfs-linux-2.3.9/man/man8/zdb.8 2026-08-21 20:57:12.336591291 +0000 @@ -69,6 +69,13 @@ .Op Fl U Ar cache .Ar poolname Op Ar vdev Oo Ar metaslab Oc Ns … .Nm +.Fl -allocated-map +.Op Fl mAFLPXY +.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns … +.Op Fl t Ar txg +.Op Fl U Ar cache +.Ar poolname Op Ar vdev Oo Ar metaslab Oc Ns … +.Nm .Fl O .Op Fl K Ar key .Ar dataset path @@ -128,6 +135,11 @@ .Sh OPTIONS Display options: .Bl -tag -width Ds +.It Fl Sy -allocated-map +Prints out a list of all the allocated regions in the pool. +Primarily intended for use with the +.Nm zhack metaslab leak +subcommand. .It Fl b , -block-stats Display statistics regarding the number, size .Pq logical, physical and allocated diff -Nru zfs-linux-2.3.2/man/man8/zfs-rewrite.8 zfs-linux-2.3.9/man/man8/zfs-rewrite.8 --- zfs-linux-2.3.2/man/man8/zfs-rewrite.8 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/man/man8/zfs-rewrite.8 2026-08-21 20:57:12.337005348 +0000 @@ -0,0 +1,76 @@ +.\" SPDX-License-Identifier: CDDL-1.0 +.\" +.\" CDDL HEADER START +.\" +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License (the "License"). +.\" You may not use this file except in compliance with the License. +.\" +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +.\" or https://opensource.org/licenses/CDDL-1.0. +.\" See the License for the specific language governing permissions +.\" and limitations under the License. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. +.\" If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying +.\" information: Portions Copyright [yyyy] [name of copyright owner] +.\" +.\" CDDL HEADER END +.\" +.\" Copyright (c) 2025 iXsystems, Inc. +.\" +.Dd May 6, 2025 +.Dt ZFS-REWRITE 8 +.Os +. +.Sh NAME +.Nm zfs-rewrite +.Nd rewrite specified files without modification +.Sh SYNOPSIS +.Nm zfs +.Cm rewrite +.Oo Fl rvx Ns Oc +.Op Fl l Ar length +.Op Fl o Ar offset +.Ar file Ns | Ns Ar directory Ns … +. +.Sh DESCRIPTION +Rewrite blocks of specified +.Ar file +as is without modification at a new location and possibly with new +properties, such as checksum, compression, dedup, copies, etc, +as if they were atomically read and written back. +.Bl -tag -width "-r" +.It Fl l Ar length +Rewrite at most this number of bytes. +.It Fl o Ar offset +Start at this offset in bytes. +.It Fl r +Recurse into directories. +.It Fl v +Print names of all successfully rewritten files. +.It Fl x +Don't cross file system mount points when recursing. +.El +.Sh NOTES +Rewrite of cloned blocks and blocks that are part of any snapshots, +same as some property changes may increase pool space usage. +Holes that were never written or were previously zero-compressed are +not rewritten and will remain holes even if compression is disabled. +.Pp +Rewritten blocks will be seen as modified in next snapshot and as such +included into the incremental +.Nm zfs Cm send +stream. +.Pp +If a +.Fl l +or +.Fl o +value request a rewrite to regions past the end of the file, then those +regions are silently ignored, and no error is reported. +. +.Sh SEE ALSO +.Xr zfsprops 7 diff -Nru zfs-linux-2.3.2/man/man8/zfs-rollback.8 zfs-linux-2.3.9/man/man8/zfs-rollback.8 --- zfs-linux-2.3.2/man/man8/zfs-rollback.8 2025-05-01 18:23:23.779215384 +0000 +++ zfs-linux-2.3.9/man/man8/zfs-rollback.8 2026-08-21 20:57:12.337005348 +0000 @@ -30,7 +30,7 @@ .\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2019 Joyent, Inc. .\" -.Dd March 16, 2022 +.Dd April 28, 2025 .Dt ZFS-ROLLBACK 8 .Os . @@ -75,7 +75,7 @@ .Sh EXAMPLES .\" These are, respectively, examples 8 from zfs.8 .\" Make sure to update them bidirectionally -.Ss Example 8 : No Rolling Back a ZFS File System +.Ss Example 1 : No Rolling Back a ZFS File System The following command reverts the contents of .Ar pool/home/anne to the snapshot named diff -Nru zfs-linux-2.3.2/man/man8/zfs.8 zfs-linux-2.3.9/man/man8/zfs.8 --- zfs-linux-2.3.2/man/man8/zfs.8 2025-05-01 18:23:23.780215398 +0000 +++ zfs-linux-2.3.9/man/man8/zfs.8 2026-08-21 20:57:12.338005334 +0000 @@ -37,7 +37,7 @@ .\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2019 Joyent, Inc. .\" -.Dd May 12, 2022 +.Dd April 18, 2025 .Dt ZFS 8 .Os . @@ -299,6 +299,12 @@ programmatically via a Lua script-language channel program. .El . +.Ss Data rewrite +.Bl -tag -width "" +.It Xr zfs-rewrite 8 +Rewrite specified files without modification. +.El +. .Ss Jails .Bl -tag -width "" .It Xr zfs-jail 8 diff -Nru zfs-linux-2.3.2/man/man8/zpool-events.8 zfs-linux-2.3.9/man/man8/zpool-events.8 --- zfs-linux-2.3.2/man/man8/zpool-events.8 2025-05-01 18:23:23.780215398 +0000 +++ zfs-linux-2.3.9/man/man8/zpool-events.8 2026-08-21 20:57:12.338005334 +0000 @@ -401,12 +401,12 @@ ZIO_STAGE_NOP_WRITE:0x00000100:-W---- -ZIO_STAGE_BRT_FREE:0x00000200:--F--- +ZIO_STAGE_DDT_READ_START:0x00000200:R----- +ZIO_STAGE_DDT_READ_DONE:0x00000400:R----- +ZIO_STAGE_DDT_WRITE:0x00000800:-W---- +ZIO_STAGE_DDT_FREE:0x00001000:--F--- -ZIO_STAGE_DDT_READ_START:0x00000400:R----- -ZIO_STAGE_DDT_READ_DONE:0x00000800:R----- -ZIO_STAGE_DDT_WRITE:0x00001000:-W---- -ZIO_STAGE_DDT_FREE:0x00002000:--F--- +ZIO_STAGE_BRT_FREE:0x00002000:--F--- ZIO_STAGE_GANG_ASSEMBLE:0x00004000:RWFC-- ZIO_STAGE_GANG_ISSUE:0x00008000:RWFC-- diff -Nru zfs-linux-2.3.2/man/man8/zpool-iostat.8 zfs-linux-2.3.9/man/man8/zpool-iostat.8 --- zfs-linux-2.3.2/man/man8/zpool-iostat.8 2025-05-01 18:23:23.781215412 +0000 +++ zfs-linux-2.3.9/man/man8/zpool-iostat.8 2026-08-21 20:57:12.338005334 +0000 @@ -109,10 +109,7 @@ If a script requires the use of a privileged command, like .Xr smartctl 8 , then it's recommended you allow the user access to it in -.Pa /etc/sudoers -or add the user to the -.Pa /etc/sudoers.d/zfs -file. +.Pa /etc/sudoers . .Pp If .Fl c diff -Nru zfs-linux-2.3.2/man/man8/zpool-status.8 zfs-linux-2.3.9/man/man8/zpool-status.8 --- zfs-linux-2.3.2/man/man8/zpool-status.8 2025-05-01 18:23:23.782215426 +0000 +++ zfs-linux-2.3.9/man/man8/zpool-status.8 2026-08-21 20:57:12.339005320 +0000 @@ -37,12 +37,17 @@ .Sh SYNOPSIS .Nm zpool .Cm status -.Op Fl dDegiLpPstvx -.Op Fl T Sy u Ns | Ns Sy d -.Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns … -.Oo Ar pool Oc Ns … +.Op Fl DdegiLPpstvx +.Op Fl c Ar script1 Ns Oo , Ns Ar script2 Ns ,… Oc +.Oo Fl j|--json +.Oo Ns Fl -json-flat-vdevs Oc +.Oo Ns Fl -json-int Oc +.Oo Ns Fl -json-pool-key-guid Oc +.Oc +.Op Fl T Ar d|u +.Op Fl -power +.Op Ar pool .Op Ar interval Op Ar count -.Op Fl j Op Ar --json-int, --json-flat-vdevs, --json-pool-key-guid . .Sh DESCRIPTION Displays the detailed health status for the given pools. @@ -59,9 +64,7 @@ Both of these are only approximate, because the amount of data in the pool and the other workloads on the system can change. .Bl -tag -width Ds -.It Fl -power -Display vdev enclosure slot power status (on or off). -.It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns … +.It Fl c Ar script1 Ns Oo , Ns Ar script2 Ns ,… Oc Run a script (or scripts) on each vdev and include the output as a new column in the .Nm zpool Cm status @@ -71,17 +74,14 @@ option of .Nm zpool Cm iostat for complete details. -.It Fl j , -json Op Ar --json-int, --json-flat-vdevs, --json-pool-key-guid -Display the status for ZFS pools in JSON format. -Specify -.Sy --json-int -to display numbers in integer format instead of strings. -Specify -.Sy --json-flat-vdevs -to display vdevs in flat hierarchy instead of nested vdev objects. -Specify -.Sy --json-pool-key-guid -to set pool GUID as key for pool objects instead of pool names. +.It Fl D +Display a histogram of deduplication statistics, showing the allocated +.Pq physically present on disk +and referenced +.Pq logically referenced in the pool +block counts and sizes by reference count. +If repeated, (-DD), also shows statistics on how much of the DDT is resident +in the ARC. .It Fl d Display the number of Direct I/O read/write checksum verify errors that have occurred on a top-level VDEV. @@ -95,14 +95,6 @@ buffer are being manipulated after the I/O has been issued and is in flight. In the case of Direct I/O read checksum verify errors, the I/O will be reissued through the ARC. -.It Fl D -Display a histogram of deduplication statistics, showing the allocated -.Pq physically present on disk -and referenced -.Pq logically referenced in the pool -block counts and sizes by reference count. -If repeated, (-DD), also shows statistics on how much of the DDT is resident -in the ARC. .It Fl e Only show unhealthy vdevs (not-ONLINE or with errors). .It Fl g @@ -111,19 +103,33 @@ detach/offline/remove/replace commands. .It Fl i Display vdev initialization status. +.It Fl j , -json Oo Ns Fl -json-flat-vdevs Oc Oo Ns Fl -json-int Oc \ +Oo Ns Fl -json-pool-key-guid Oc +Display the status for ZFS pools in JSON format. +Specify +.Sy --json-flat-vdevs +to display vdevs in flat hierarchy instead of nested vdev objects. +Specify +.Sy --json-int +to display numbers in integer format instead of strings. +Specify +.Sy --json-pool-key-guid +to set pool GUID as key for pool objects instead of pool names. .It Fl L Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the .Pa /dev/disk/ path used to open it. -.It Fl p -Display numbers in parsable (exact) values. .It Fl P Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the .Fl L flag. +.It Fl p +Display numbers in parsable (exact) values. +.It Fl -power +Display vdev enclosure slot power status (on or off). .It Fl s Display the number of leaf vdev slow I/O operations. This is the number of I/O operations that didn't complete in @@ -134,20 +140,20 @@ an unreasonably long amount of time. This may indicate a problem with the underlying storage. -.It Fl t -Display vdev TRIM status. -.It Fl T Sy u Ns | Ns Sy d +.It Fl T Sy d Ns | Ns Sy u Display a time stamp. Specify -.Sy u -for a printed representation of the internal representation of time. -See -.Xr time 1 . -Specify .Sy d for standard date format. See .Xr date 1 . +Specify +.Sy u +for a printed representation of the internal representation of time. +See +.Xr time 1 . +.It Fl t +Display vdev TRIM status. .It Fl v Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub. diff -Nru zfs-linux-2.3.2/module/Kbuild.in zfs-linux-2.3.9/module/Kbuild.in --- zfs-linux-2.3.2/module/Kbuild.in 2025-05-01 18:23:23.782215426 +0000 +++ zfs-linux-2.3.9/module/Kbuild.in 2026-08-21 20:57:12.340176992 +0000 @@ -2,7 +2,7 @@ # first. This ensures its module initialization function is run before # any of the other module initialization functions which depend on it. -ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement +ZFS_MODULE_CFLAGS += -std=gnu11 -Wno-declaration-after-statement ZFS_MODULE_CFLAGS += -Wmissing-prototypes ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@ @NO_FORMAT_ZERO_LENGTH@ @@ -176,14 +176,6 @@ $(addprefix $(obj)/icp/,$(ICP_OBJS) $(ICP_OBJS_X86) $(ICP_OBJS_X86_64) \ $(ICP_OBJS_ARM64) $(ICP_OBJS_PPC_PPC64)) : ccflags-y += -I$(icp_include) -I$(zfs_include)/os/linux/spl -I$(zfs_include) -# Suppress objtool "return with modified stack frame" warnings. -OBJECT_FILES_NON_STANDARD_aesni-gcm-x86_64.o := y - -# Suppress objtool "unsupported stack pointer realignment" warnings. -# See #6950 for the reasoning. -OBJECT_FILES_NON_STANDARD_sha256-x86_64.o := y -OBJECT_FILES_NON_STANDARD_sha512-x86_64.o := y - LUA_OBJS := \ lapi.o \ lauxlib.o \ @@ -301,10 +293,9 @@ zfs-objs += $(addprefix zstd/,$(ZSTD_OBJS) $(ZSTD_UPSTREAM_OBJS)) -# Disable aarch64 neon SIMD instructions for kernel mode $(addprefix $(obj)/zstd/,$(ZSTD_OBJS) $(ZSTD_UPSTREAM_OBJS)) : ccflags-y += -I$(zstd_include) $(ZFS_ZSTD_FLAGS) $(addprefix $(obj)/zstd/,$(ZSTD_OBJS) $(ZSTD_UPSTREAM_OBJS)) : asflags-y += -I$(zstd_include) -$(addprefix $(obj)/zstd/,$(ZSTD_UPSTREAM_OBJS)) : ccflags-y += -include $(zstd_include)/aarch64_compat.h -include $(zstd_include)/zstd_compat_wrapper.h -Wp,-w +$(addprefix $(obj)/zstd/,$(ZSTD_UPSTREAM_OBJS)) : ccflags-y += -include $(zstd_include)/zstd_compat_wrapper.h -Wp,-w $(obj)/zstd/zfs_zstd.o : ccflags-y += -include $(zstd_include)/zstd_compat_wrapper.h @@ -440,6 +431,7 @@ ZFS_OBJS_OS := \ abd_os.o \ arc_os.o \ + kasan_compat.o \ mmp_os.o \ policy.o \ qat.o \ @@ -499,11 +491,37 @@ UBSAN_SANITIZE_zfs/zap_micro.o := n UBSAN_SANITIZE_zfs/sa.o := n -# Suppress incorrect warnings from versions of objtool which are not -# aware of x86 EVEX prefix instructions used for AVX512. -OBJECT_FILES_NON_STANDARD_vdev_raidz_math_avx512bw.o := y -OBJECT_FILES_NON_STANDARD_vdev_raidz_math_avx512f.o := y - ifeq ($(CONFIG_ALTIVEC),y) $(obj)/zfs/vdev_raidz_math_powerpc_altivec.o : c_flags += -maltivec endif + +# The following recipes attempt to fix out of src-tree builds, where $(src) != $(obj), so that the +# subdir %.c/%.S -> %.o targets will work as expected. The in-kernel pattern targets do not seem to +# be working on subdirs since about ~6.10 +zobjdirs = $(dir $(zfs-objs)) $(dir $(spl-objs)) \ + $(dir $(zfs-$(CONFIG_X86))) $(dir $(zfs-$(CONFIG_UML_X86))) $(dir $(zfs-$(CONFIG_ARM64))) \ + $(dir $(zfs-$(CONFIG_PPC64))) $(dir $(zfs-$(CONFIG_PPC))) + +z_cdirs = $(sort $(filter-out lua/setjmp/ $(addprefix icp/asm-aarch64/, aes/ blake3/ modes/ sha2/) \ + $(addprefix icp/asm-x86_64/, aes/ blake3/ modes/ sha2/) \ + $(addprefix icp/asm-ppc/, aes/ blake3/ modes/ sha2/) \ + $(addprefix icp/asm-ppc64/, aes/ blake3/ modes/ sha2/), $(zobjdirs))) +z_sdirs = $(sort $(filter lua/setjmp/ $(addprefix icp/asm-aarch64/, aes/ blake3/ modes/ sha2/) \ + $(addprefix icp/asm-x86_64/, aes/ blake3/ modes/ sha2/) \ + $(addprefix icp/asm-ppc/, aes/ blake3/ modes/ sha2/) \ + $(addprefix icp/asm-ppc64/, aes/ blake3/ modes/ sha2/), $(zobjdirs))) + +define ZKMOD_C_O_MAKE_TARGET +$1%.o: $(src)/$1%.c FORCE + $$(call if_changed_rule,cc_o_c) + $$(call cmd,force_checksrc) +endef + +define ZKMOD_S_O_MAKE_TARGET +$1%.o: $(src)/$1%.S FORCE + $$(call if_changed_rule,as_o_S) + $$(call cmd,force_checksrc) +endef + +$(foreach target,$(z_cdirs), $(eval $(call ZKMOD_C_O_MAKE_TARGET,$(target)))) +$(foreach target,$(z_sdirs), $(eval $(call ZKMOD_S_O_MAKE_TARGET,$(target)))) diff -Nru zfs-linux-2.3.2/module/Makefile.bsd zfs-linux-2.3.9/module/Makefile.bsd --- zfs-linux-2.3.2/module/Makefile.bsd 2025-05-01 18:45:26.190139554 +0000 +++ zfs-linux-2.3.9/module/Makefile.bsd 2026-08-21 21:15:51.331492843 +0000 @@ -62,10 +62,11 @@ CFLAGS += -DNDEBUG .endif -.if defined(WITH_VFS_DEBUG) && ${WITH_VFS_DEBUG} == "true" -# kernel must also be built with this option for this to work -CFLAGS+= -DDEBUG_VFS_LOCKS +.for _SAN in KASAN KMSAN KUBSAN +.if defined(WITH_${_SAN}) && ${WITH_${_SAN}} == "true" +KERN_OPTS_EXTRA+= ${_SAN} .endif +.endfor .if defined(WITH_GCOV) && ${WITH_GCOV} == "true" CFLAGS+= -fprofile-arcs -ftest-coverage @@ -521,30 +522,6 @@ CFLAGS.zstd_opt.c= -U__BMI__ -fno-tree-vectorize ${NO_WBITWISE_INSTEAD_OF_LOGICAL} .if ${MACHINE_ARCH} == "aarch64" -__ZFS_ZSTD_AARCH64_FLAGS= -include ${SRCDIR}/zstd/include/aarch64_compat.h -CFLAGS.zstd.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.entropy_common.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.error_private.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.fse_compress.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.fse_decompress.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.hist.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.huf_compress.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.huf_decompress.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.pool.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.xxhash.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_common.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_compress.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_compress_literals.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_compress_sequences.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_compress_superblock.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_ddict.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_decompress.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_decompress_block.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_double_fast.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_fast.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_lazy.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_ldm.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} -CFLAGS.zstd_opt.c+= ${__ZFS_ZSTD_AARCH64_FLAGS} sha256-armv8.o: sha256-armv8.S ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ diff -Nru zfs-linux-2.3.2/module/Makefile.in zfs-linux-2.3.9/module/Makefile.in --- zfs-linux-2.3.2/module/Makefile.in 2025-05-01 18:23:23.782215426 +0000 +++ zfs-linux-2.3.9/module/Makefile.in 2026-08-21 20:57:12.340176992 +0000 @@ -57,6 +57,7 @@ $(if @KERNEL_LD@,LD=@KERNEL_LD@) $(if @KERNEL_LLVM@,LLVM=@KERNEL_LLVM@) \ $(if @KERNEL_CROSS_COMPILE@,CROSS_COMPILE=@KERNEL_CROSS_COMPILE@) \ $(if @KERNEL_ARCH@,ARCH=@KERNEL_ARCH@) \ + $(if @OBJTOOL_DISABLE_WERROR@,objtool=@abs_top_builddir@/scripts/objtool-wrapper) \ M="$$PWD" @KERNEL_MAKE@ CONFIG_ZFS=m modules modules-FreeBSD: @@ -164,7 +165,8 @@ cppcheck: cppcheck-@ac_system@ distdir: - cd @srcdir@ && find . -name '*.[chS]' -exec sh -c 'for f; do mkdir -p $$distdir/$${f%/*}; cp @srcdir@/$$f $$distdir/$$f; done' _ {} + + ( cd @srcdir@ && find . -name '*.[chS]' ) | \ + while read f; do mkdir -p $$distdir/$${f%/*}; cp @srcdir@/$$f $$distdir/$$f; done cp @srcdir@/Makefile.bsd $$distdir/Makefile.bsd gen-zstd-symbols: diff -Nru zfs-linux-2.3.2/module/icp/algs/aes/aes_impl.c zfs-linux-2.3.9/module/icp/algs/aes/aes_impl.c --- zfs-linux-2.3.2/module/icp/algs/aes/aes_impl.c 2025-05-01 18:45:24.662110006 +0000 +++ zfs-linux-2.3.9/module/icp/algs/aes/aes_impl.c 2026-08-21 21:15:50.244505739 +0000 @@ -420,8 +420,6 @@ char *fmt; const uint32_t impl = AES_IMPL_READ(icp_aes_impl); - ASSERT(aes_impl_initialized); - /* list mandatory options */ for (i = 0; i < ARRAY_SIZE(aes_impl_opts); i++) { fmt = (impl == aes_impl_opts[i].sel) ? "[%s] " : "%s "; diff -Nru zfs-linux-2.3.2/module/icp/algs/modes/gcm.c zfs-linux-2.3.9/module/icp/algs/modes/gcm.c --- zfs-linux-2.3.2/module/icp/algs/modes/gcm.c 2025-05-01 18:45:24.699110722 +0000 +++ zfs-linux-2.3.9/module/icp/algs/modes/gcm.c 2026-08-21 21:15:50.274505383 +0000 @@ -948,8 +948,6 @@ char *fmt; const uint32_t impl = GCM_IMPL_READ(icp_gcm_impl); - ASSERT(gcm_impl_initialized); - /* list mandatory options */ for (i = 0; i < ARRAY_SIZE(gcm_impl_opts); i++) { #ifdef CAN_USE_GCM_ASM diff -Nru zfs-linux-2.3.2/module/icp/algs/modes/modes.c zfs-linux-2.3.9/module/icp/algs/modes/modes.c --- zfs-linux-2.3.2/module/icp/algs/modes/modes.c 2025-05-01 18:45:24.709110915 +0000 +++ zfs-linux-2.3.9/module/icp/algs/modes/modes.c 2026-08-21 21:15:50.281505300 +0000 @@ -173,12 +173,12 @@ #if defined(CAN_USE_GCM_ASM) if (ctx->gcm_use_avx == B_TRUE) { ASSERT3P(ctx->gcm_Htable, !=, NULL); - memset(ctx->gcm_Htable, 0, ctx->gcm_htab_len); + explicit_memset(ctx->gcm_Htable, 0, ctx->gcm_htab_len); kmem_free(ctx->gcm_Htable, ctx->gcm_htab_len); } #endif if (ctx->gcm_pt_buf != NULL) { - memset(ctx->gcm_pt_buf, 0, ctx->gcm_pt_buf_len); + explicit_memset(ctx->gcm_pt_buf, 0, ctx->gcm_pt_buf_len); vmem_free(ctx->gcm_pt_buf, ctx->gcm_pt_buf_len); } /* Optional */ diff -Nru zfs-linux-2.3.2/module/icp/algs/sha2/sha2_generic.c zfs-linux-2.3.9/module/icp/algs/sha2/sha2_generic.c --- zfs-linux-2.3.2/module/icp/algs/sha2/sha2_generic.c 2025-05-01 18:45:24.716111050 +0000 +++ zfs-linux-2.3.9/module/icp/algs/sha2/sha2_generic.c 2026-08-21 21:15:50.286505240 +0000 @@ -77,7 +77,8 @@ h = g, g = f, f = e, e = d + T1; \ d = c, c = b, b = a, a = T1 + T2; -static void sha256_generic(uint32_t state[8], const void *data, size_t num_blks) +static void +icp_sha256_generic(uint32_t state[8], const void *data, size_t num_blks) { uint64_t blk; @@ -173,7 +174,8 @@ 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 }; -static void sha512_generic(uint64_t state[8], const void *data, size_t num_blks) +static void +icp_sha512_generic(uint64_t state[8], const void *data, size_t num_blks) { uint64_t blk; @@ -226,7 +228,8 @@ } } -static void sha256_update(sha256_ctx *ctx, const uint8_t *data, size_t len) +static void +icp_sha256_update(sha256_ctx *ctx, const uint8_t *data, size_t len) { uint64_t pos = ctx->count[0]; uint64_t total = ctx->count[1]; @@ -258,7 +261,8 @@ ctx->count[1] = total; } -static void sha512_update(sha512_ctx *ctx, const uint8_t *data, size_t len) +static void +icp_sha512_update(sha512_ctx *ctx, const uint8_t *data, size_t len) { uint64_t pos = ctx->count[0]; uint64_t total = ctx->count[1]; @@ -290,7 +294,8 @@ ctx->count[1] = total; } -static void sha256_final(sha256_ctx *ctx, uint8_t *result, int bits) +static void +icp_sha256_final(sha256_ctx *ctx, uint8_t *result, int bits) { uint64_t mlen, pos = ctx->count[0]; uint8_t *m = ctx->wbuf; @@ -334,7 +339,8 @@ memset(ctx, 0, sizeof (*ctx)); } -static void sha512_final(sha512_ctx *ctx, uint8_t *result, int bits) +static void +icp_sha512_final(sha512_ctx *ctx, uint8_t *result, int bits) { uint64_t mlen, pos = ctx->count[0]; uint8_t *m = ctx->wbuf, *r; @@ -461,14 +467,14 @@ switch (ctx->algotype) { case SHA256: - sha256_update(&ctx->sha256, data, len); + icp_sha256_update(&ctx->sha256, data, len); break; case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - sha512_update(&ctx->sha512, data, len); + icp_sha512_update(&ctx->sha512, data, len); break; case SHA512_256: - sha512_update(&ctx->sha512, data, len); + icp_sha512_update(&ctx->sha512, data, len); break; } } @@ -479,32 +485,33 @@ { switch (ctx->algotype) { case SHA256: - sha256_final(&ctx->sha256, digest, 256); + icp_sha256_final(&ctx->sha256, digest, 256); break; case SHA512: case SHA512_HMAC_MECH_INFO_TYPE: - sha512_final(&ctx->sha512, digest, 512); + icp_sha512_final(&ctx->sha512, digest, 512); break; case SHA512_256: - sha512_final(&ctx->sha512, digest, 256); + icp_sha512_final(&ctx->sha512, digest, 256); break; } } /* the generic implementation is always okay */ -static boolean_t sha2_is_supported(void) +static boolean_t +icp_sha2_is_supported(void) { return (B_TRUE); } const sha256_ops_t sha256_generic_impl = { .name = "generic", - .transform = sha256_generic, - .is_supported = sha2_is_supported + .transform = icp_sha256_generic, + .is_supported = icp_sha2_is_supported }; const sha512_ops_t sha512_generic_impl = { .name = "generic", - .transform = sha512_generic, - .is_supported = sha2_is_supported + .transform = icp_sha512_generic, + .is_supported = icp_sha2_is_supported }; diff -Nru zfs-linux-2.3.2/module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S zfs-linux-2.3.9/module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S --- zfs-linux-2.3.2/module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S 2025-05-01 18:45:24.751111727 +0000 +++ zfs-linux-2.3.9/module/icp/asm-aarch64/blake3/b3_aarch64_sse2.S 2026-08-21 21:15:50.313504920 +0000 @@ -34,8 +34,8 @@ #if defined(__aarch64__) -/* make gcc <= 9 happy */ -#if !defined(LD_VERSION) || LD_VERSION >= 233010000 +/* check for .cfi_negate_ra_state assembler support */ +#if defined(HAVE_AS_CFI_PSEUDO_OP) #define CFI_NEGATE_RA_STATE .cfi_negate_ra_state #else #define CFI_NEGATE_RA_STATE diff -Nru zfs-linux-2.3.2/module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S zfs-linux-2.3.9/module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S --- zfs-linux-2.3.2/module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S 2025-05-01 18:45:24.755111804 +0000 +++ zfs-linux-2.3.9/module/icp/asm-aarch64/blake3/b3_aarch64_sse41.S 2026-08-21 21:15:50.315504896 +0000 @@ -34,8 +34,8 @@ #if defined(__aarch64__) -/* make gcc <= 9 happy */ -#if !defined(LD_VERSION) || LD_VERSION >= 233010000 +/* check for .cfi_negate_ra_state assembler support */ +#if defined(HAVE_AS_CFI_PSEUDO_OP) #define CFI_NEGATE_RA_STATE .cfi_negate_ra_state #else #define CFI_NEGATE_RA_STATE diff -Nru zfs-linux-2.3.2/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S zfs-linux-2.3.9/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S --- zfs-linux-2.3.2/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S 2025-05-01 18:45:24.826113177 +0000 +++ zfs-linux-2.3.9/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S 2026-08-21 21:15:50.366504291 +0000 @@ -50,6 +50,7 @@ #define _ASM #include +#include /* Windows userland links with OpenSSL */ #if !defined (_WIN32) || defined (_KERNEL) @@ -378,6 +379,7 @@ RET .cfi_endproc SET_SIZE(_aesni_ctr32_ghash_6x) +STACK_FRAME_NON_STANDARD _aesni_ctr32_ghash_6x #endif /* ifdef HAVE_MOVBE */ .balign 32 @@ -706,6 +708,7 @@ RET .cfi_endproc SET_SIZE(_aesni_ctr32_ghash_no_movbe_6x) +STACK_FRAME_NON_STANDARD _aesni_ctr32_ghash_no_movbe_6x ENTRY_ALIGN(aesni_gcm_decrypt, 32) .cfi_startproc @@ -823,6 +826,7 @@ RET .cfi_endproc SET_SIZE(aesni_gcm_decrypt) +STACK_FRAME_NON_STANDARD aesni_gcm_decrypt .balign 32 FUNCTION(_aesni_ctr32_6x) @@ -1198,6 +1202,7 @@ RET .cfi_endproc SET_SIZE(aesni_gcm_encrypt) +STACK_FRAME_NON_STANDARD aesni_gcm_encrypt #endif /* !_WIN32 || _KERNEL */ @@ -1257,6 +1262,18 @@ .byte 65,69,83,45,78,73,32,71,67,77,32,109,111,100,117,108,101,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 .balign 64 +/* Workaround for missing asm macro in RHEL 8. */ +#if defined(__linux__) && defined(HAVE_STACK_FRAME_NON_STANDARD) && \ + ! defined(HAVE_STACK_FRAME_NON_STANDARD_ASM) +.section .discard.func_stack_frame_non_standard, "aw" +#ifdef HAVE_MOVBE + .long _aesni_ctr32_ghash_6x - . +#endif + .long _aesni_ctr32_ghash_no_movbe_6x - . + .long aesni_gcm_decrypt - . + .long aesni_gcm_encrypt - . +#endif + /* Mark the stack non-executable. */ #if defined(__linux__) && defined(__ELF__) .section .note.GNU-stack,"",%progbits diff -Nru zfs-linux-2.3.2/module/icp/asm-x86_64/sha2/sha256-x86_64.S zfs-linux-2.3.9/module/icp/asm-x86_64/sha2/sha256-x86_64.S --- zfs-linux-2.3.2/module/icp/asm-x86_64/sha2/sha256-x86_64.S 2025-05-01 18:45:24.837113390 +0000 +++ zfs-linux-2.3.9/module/icp/asm-x86_64/sha2/sha256-x86_64.S 2026-08-21 21:15:50.373504208 +0000 @@ -24,6 +24,7 @@ #define _ASM #include +#include SECTION_STATIC @@ -1420,6 +1421,7 @@ RET .cfi_endproc SET_SIZE(zfs_sha256_transform_x64) +STACK_FRAME_NON_STANDARD zfs_sha256_transform_x64 ENTRY_ALIGN(zfs_sha256_transform_shani, 64) .cfi_startproc @@ -1628,6 +1630,7 @@ RET .cfi_endproc SET_SIZE(zfs_sha256_transform_shani) +STACK_FRAME_NON_STANDARD zfs_sha256_transform_shani ENTRY_ALIGN(zfs_sha256_transform_ssse3, 64) .cfi_startproc @@ -2739,6 +2742,7 @@ RET .cfi_endproc SET_SIZE(zfs_sha256_transform_ssse3) +STACK_FRAME_NON_STANDARD zfs_sha256_transform_ssse3 ENTRY_ALIGN(zfs_sha256_transform_avx, 64) .cfi_startproc @@ -3813,6 +3817,7 @@ RET .cfi_endproc SET_SIZE(zfs_sha256_transform_avx) +STACK_FRAME_NON_STANDARD zfs_sha256_transform_avx ENTRY_ALIGN(zfs_sha256_transform_avx2, 64) .cfi_startproc @@ -5098,6 +5103,18 @@ RET .cfi_endproc SET_SIZE(zfs_sha256_transform_avx2) +STACK_FRAME_NON_STANDARD zfs_sha256_transform_avx2 + +/* Workaround for missing asm macro in RHEL 8. */ +#if defined(__linux__) && defined(HAVE_STACK_FRAME_NON_STANDARD) && \ + ! defined(HAVE_STACK_FRAME_NON_STANDARD_ASM) +.section .discard.func_stack_frame_non_standard, "aw" + .long zfs_sha256_transform_x64 - . + .long zfs_sha256_transform_shani - . + .long zfs_sha256_transform_ssse3 - . + .long zfs_sha256_transform_avx - . + .long zfs_sha256_transform_avx2 - . +#endif #if defined(__ELF__) .section .note.GNU-stack,"",%progbits diff -Nru zfs-linux-2.3.2/module/icp/asm-x86_64/sha2/sha512-x86_64.S zfs-linux-2.3.9/module/icp/asm-x86_64/sha2/sha512-x86_64.S --- zfs-linux-2.3.2/module/icp/asm-x86_64/sha2/sha512-x86_64.S 2025-05-01 18:45:24.841113468 +0000 +++ zfs-linux-2.3.9/module/icp/asm-x86_64/sha2/sha512-x86_64.S 2026-08-21 21:15:50.375504185 +0000 @@ -24,6 +24,7 @@ #define _ASM #include +#include SECTION_STATIC @@ -1463,6 +1464,7 @@ RET .cfi_endproc SET_SIZE(zfs_sha512_transform_x64) +STACK_FRAME_NON_STANDARD zfs_sha512_transform_x64 ENTRY_ALIGN(zfs_sha512_transform_avx, 64) .cfi_startproc @@ -2627,6 +2629,7 @@ RET .cfi_endproc SET_SIZE(zfs_sha512_transform_avx) +STACK_FRAME_NON_STANDARD zfs_sha512_transform_avx ENTRY_ALIGN(zfs_sha512_transform_avx2, 64) .cfi_startproc @@ -4005,6 +4008,16 @@ RET .cfi_endproc SET_SIZE(zfs_sha512_transform_avx2) +STACK_FRAME_NON_STANDARD zfs_sha512_transform_avx2 + +/* Workaround for missing asm macro in RHEL 8. */ +#if defined(__linux__) && defined(HAVE_STACK_FRAME_NON_STANDARD) && \ + ! defined(HAVE_STACK_FRAME_NON_STANDARD_ASM) +.section .discard.func_stack_frame_non_standard, "aw" + .long zfs_sha512_transform_x64 - . + .long zfs_sha512_transform_avx - . + .long zfs_sha512_transform_avx2 - . +#endif #if defined(__ELF__) .section .note.GNU-stack,"",%progbits diff -Nru zfs-linux-2.3.2/module/nvpair/nvpair.c zfs-linux-2.3.9/module/nvpair/nvpair.c --- zfs-linux-2.3.2/module/nvpair/nvpair.c 2025-05-01 18:45:25.089118263 +0000 +++ zfs-linux-2.3.9/module/nvpair/nvpair.c 2026-08-21 21:15:50.557502025 +0000 @@ -135,7 +135,8 @@ #define NVP_SIZE_CALC(name_len, data_len) \ (NV_ALIGN((sizeof (nvpair_t)) + name_len) + NV_ALIGN(data_len)) -static int i_get_value_size(data_type_t type, const void *data, uint_t nelem); +static int i_get_value_size(data_type_t type, const void *data, uint_t nelem, + size_t max_size); static int nvlist_add_common(nvlist_t *nvl, const char *name, data_type_t type, uint_t nelem, const void *data); @@ -810,8 +811,10 @@ * verify nvp_type, nvp_value_elem, and also possibly * verify string values and get the value size. */ - size2 = i_get_value_size(type, NVP_VALUE(nvp), NVP_NELEM(nvp)); size1 = nvp->nvp_size - NVP_VALOFF(nvp); + size2 = i_get_value_size(type, NVP_VALUE(nvp), NVP_NELEM(nvp), + size1); + if (size2 < 0 || size1 != NV_ALIGN(size2)) return (EFAULT); @@ -1002,12 +1005,21 @@ * DATA_TYPE_STRING and * DATA_TYPE_STRING_ARRAY * Is data == NULL then the size of the string(s) is excluded. + * + * If 'max_size' is non-zero, then don't look beyond 'max_size' number of + * bytes when calculating a value size. Note that 'max_size' should include + * the NULL terminator byte when calculating string size. If 'max_size' is 0, + * it is ignored. */ static int -i_get_value_size(data_type_t type, const void *data, uint_t nelem) +i_get_value_size(data_type_t type, const void *data, uint_t nelem, + size_t max_size) { uint64_t value_sz; + if (max_size == 0) + max_size = INT32_MAX; + if (i_validate_type_nelem(type, nelem) != 0) return (-1); @@ -1052,10 +1064,15 @@ break; #endif case DATA_TYPE_STRING: - if (data == NULL) + if (data == NULL) { value_sz = 0; - else - value_sz = strlen(data) + 1; + } else { + value_sz = strnlen(data, max_size); + if (value_sz >= max_size) { + return (-1); /* string not terminated */ + } + value_sz += 1; + } break; case DATA_TYPE_BOOLEAN_ARRAY: value_sz = (uint64_t)nelem * sizeof (boolean_t); @@ -1089,16 +1106,38 @@ break; case DATA_TYPE_STRING_ARRAY: value_sz = (uint64_t)nelem * sizeof (uint64_t); - if (data != NULL) { char *const *strs = data; uint_t i; + size_t newsize; + + /* + * Packed STRING_ARRAY values start with a pointer table + * (nelem * sizeof (uint64_t)), with the strings + * following. We need to skip the pointer table for + * the strnlen() bounds check to function as intended. + * We distinguish packed STRING_ARRAY values from + * arbitrary ones using the value of max_size. + */ + if (max_size != (size_t)INT32_MAX) { + /* packed value region */ + if (max_size < value_sz) + return (-1); + max_size -= (size_t)value_sz; + } /* no alignment requirement for strings */ for (i = 0; i < nelem; i++) { if (strs[i] == NULL) return (-1); - value_sz += strlen(strs[i]) + 1; + + newsize = strnlen(strs[i], max_size); + + if (newsize == max_size) + return (-1); /* not terminated */ + + value_sz += newsize + 1; /* +1 for NULL */ + max_size -= newsize + 1; } } break; @@ -1163,7 +1202,7 @@ * In case of data types DATA_TYPE_STRING and DATA_TYPE_STRING_ARRAY * is the size of the string(s) included. */ - if ((value_sz = i_get_value_size(type, data, nelem)) < 0) + if ((value_sz = i_get_value_size(type, data, nelem, 0)) < 0) return (EINVAL); if (i_validate_nvpair_value(type, nelem, data) != 0) @@ -1588,7 +1627,7 @@ #endif if (data == NULL) return (EINVAL); - if ((value_sz = i_get_value_size(type, NULL, 1)) < 0) + if ((value_sz = i_get_value_size(type, NULL, 1, 0)) < 0) return (EINVAL); memcpy(data, NVP_VALUE(nvp), (size_t)value_sz); if (nelem != NULL) @@ -1923,8 +1962,9 @@ { nvpair_t *nvp; const char *np; - char *sepp = NULL; - char *idxp, *idxep; + const char *sepp = NULL; + const char *idxp; + char *idxep; nvlist_t **nva; long idx = 0; int n; @@ -2955,7 +2995,7 @@ return (nvs_embedded_nvl_array(nvs, nvp, NULL)); } -static void +static int nvpair_native_string_array(nvstream_t *nvs, nvpair_t *nvp) { switch (nvs->nvs_op) { @@ -2974,15 +3014,32 @@ case NVS_OP_DECODE: { char **strp = (void *)NVP_VALUE(nvp); char *buf = ((char *)strp + NVP_NELEM(nvp) * sizeof (uint64_t)); + char *end = (char *)nvp + nvp->nvp_size; int i; for (i = 0; i < NVP_NELEM(nvp); i++) { + size_t max, len; + + if (buf >= end) + return (EFAULT); + + max = (size_t)(end - buf); + len = strnlen(buf, max); + + /* + * The nvpair is corrupt if any of the strings are + * unterminated. + */ + if (len == max) + return (EFAULT); + strp[i] = buf; - buf += strlen(buf) + 1; + buf += len + 1; } break; } } + return (0); } static int @@ -3018,7 +3075,8 @@ * In case of data types DATA_TYPE_STRING and DATA_TYPE_STRING_ARRAY * is the size of the string(s) excluded. */ - if ((value_sz = i_get_value_size(type, NULL, NVP_NELEM(nvp))) < 0) + if ((value_sz = i_get_value_size(type, NULL, NVP_NELEM(nvp), + NVP_SIZE(nvp))) < 0) return (EFAULT); if (NVP_SIZE_CALC(nvp->nvp_name_sz, value_sz) > nvp->nvp_size) @@ -3032,7 +3090,7 @@ ret = nvpair_native_embedded_array(nvs, nvp); break; case DATA_TYPE_STRING_ARRAY: - nvpair_native_string_array(nvs, nvp); + ret = nvpair_native_string_array(nvs, nvp); break; default: break; @@ -3246,7 +3304,8 @@ * xdrproc_t-compatible callbacks for xdr_array() */ -#if defined(_KERNEL) && defined(__linux__) /* Linux kernel */ +#if (defined(__FreeBSD_version) && __FreeBSD_version >= 1600010) || \ + defined(_KERNEL) && defined(__linux__) /* Linux kernel */ #define NVS_BUILD_XDRPROC_T(type) \ static bool_t \ @@ -3255,7 +3314,7 @@ return (xdr_##type(xdrs, ptr)); \ } -#elif !defined(_KERNEL) && defined(XDR_CONTROL) /* tirpc */ +#elif !defined(_KERNEL) && defined(XDR_CONTROL) /* tirpc, FreeBSD < 16 */ #define NVS_BUILD_XDRPROC_T(type) \ static bool_t \ @@ -3271,7 +3330,7 @@ return (xdr_##type(xdrs, ptr)); \ } -#else /* FreeBSD, sunrpc */ +#else /* FreeBSD kernel < 16, sunrpc */ #define NVS_BUILD_XDRPROC_T(type) \ static bool_t \ @@ -3331,7 +3390,7 @@ * In case of data types DATA_TYPE_STRING and DATA_TYPE_STRING_ARRAY * is the size of the string(s) excluded. */ - if ((value_sz = i_get_value_size(type, NULL, nelem)) < 0) + if ((value_sz = i_get_value_size(type, NULL, nelem, NVP_SIZE(nvp))) < 0) return (EFAULT); /* if there is no data to extract then return */ diff -Nru zfs-linux-2.3.2/module/os/freebsd/spl/spl_cmn_err.c zfs-linux-2.3.9/module/os/freebsd/spl/spl_cmn_err.c --- zfs-linux-2.3.2/module/os/freebsd/spl/spl_cmn_err.c 2025-05-01 18:45:25.116118785 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/spl/spl_cmn_err.c 2026-08-21 21:15:50.576501800 +0000 @@ -40,21 +40,21 @@ prefix = NULL; /* silence unwitty compilers */ switch (ce) { case CE_CONT: - prefix = "Solaris(cont): "; + prefix = "zfs(cont): "; break; case CE_NOTE: - prefix = "Solaris: NOTICE: "; + prefix = "zfs: NOTICE: "; break; case CE_WARN: - prefix = "Solaris: WARNING: "; + prefix = "zfs: WARNING: "; break; case CE_PANIC: - prefix = "Solaris(panic): "; + prefix = "zfs(panic): "; break; case CE_IGNORE: break; default: - panic("Solaris: unknown severity level"); + panic("zfs: unknown severity level"); } if (ce == CE_PANIC) { vsnprintf(buf, sizeof (buf), fmt, adx); diff -Nru zfs-linux-2.3.2/module/os/freebsd/spl/spl_misc.c zfs-linux-2.3.9/module/os/freebsd/spl/spl_misc.c --- zfs-linux-2.3.2/module/os/freebsd/spl/spl_misc.c 2025-05-01 18:45:25.129119037 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/spl/spl_misc.c 2026-08-21 21:15:50.585501693 +0000 @@ -101,6 +101,15 @@ va_end(ap); } +/* + * Check if the current thread is a memory reclaim thread. + * Returns true if curproc is pageproc (FreeBSD's page daemon). + */ +int +current_is_reclaim_thread(void) +{ + return (curproc == pageproc); +} SYSINIT(opensolaris_utsname_init, SI_SUB_TUNABLES, SI_ORDER_ANY, opensolaris_utsname_init, NULL); diff -Nru zfs-linux-2.3.2/module/os/freebsd/spl/spl_policy.c zfs-linux-2.3.9/module/os/freebsd/spl/spl_policy.c --- zfs-linux-2.3.2/module/os/freebsd/spl/spl_policy.c 2025-05-01 18:45:25.132119095 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/spl/spl_policy.c 2026-08-21 21:15:50.588501658 +0000 @@ -39,24 +39,10 @@ int -secpolicy_nfs(cred_t *cr) -{ - - return (priv_check_cred(cr, PRIV_NFS_DAEMON)); -} - -int secpolicy_zfs(cred_t *cr) { return (priv_check_cred(cr, PRIV_VFS_MOUNT)); -} - -int -secpolicy_zfs_proc(cred_t *cr, proc_t *proc) -{ - - return (priv_check_cred(cr, PRIV_VFS_MOUNT)); } int diff -Nru zfs-linux-2.3.2/module/os/freebsd/spl/spl_vm.c zfs-linux-2.3.9/module/os/freebsd/spl/spl_vm.c --- zfs-linux-2.3.2/module/os/freebsd/spl/spl_vm.c 2025-05-01 18:45:25.160119636 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/spl/spl_vm.c 2026-08-21 21:15:50.607501432 +0000 @@ -43,6 +43,7 @@ const int zfs_vm_pagerret_bad = VM_PAGER_BAD; const int zfs_vm_pagerret_error = VM_PAGER_ERROR; const int zfs_vm_pagerret_ok = VM_PAGER_OK; +const int zfs_vm_pagerret_pend = VM_PAGER_PEND; const int zfs_vm_pagerput_sync = VM_PAGER_PUT_SYNC; const int zfs_vm_pagerput_inval = VM_PAGER_PUT_INVAL; diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/vdev_geom.c zfs-linux-2.3.9/module/os/freebsd/zfs/vdev_geom.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/vdev_geom.c 2025-05-01 18:45:25.202120448 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/vdev_geom.c 2026-08-21 21:15:50.636501088 +0000 @@ -803,8 +803,9 @@ static int vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { + (void) cr; struct g_provider *pp; struct g_consumer *cp; int error, has_trim; diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_acl.c zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_acl.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_acl.c 2025-05-01 18:45:25.210120603 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_acl.c 2026-08-21 21:15:50.641501029 +0000 @@ -1175,7 +1175,7 @@ int count = 0; zfs_acl_phys_t acl_phys; - if (zp->z_zfsvfs->z_replay == B_FALSE) { + if (ZTOV(zp) != NULL && zp->z_zfsvfs->z_replay == B_FALSE) { ASSERT_VOP_IN_SEQC(ZTOV(zp)); } diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_file_os.c zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_file_os.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_file_os.c 2025-05-01 18:45:25.223120854 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_file_os.c 2026-08-21 21:15:50.650500922 +0000 @@ -48,7 +48,8 @@ #include int -zfs_file_open(const char *path, int flags, int mode, zfs_file_t **fpp) +zfs_file_open(const char *path, int flags, int mode, cred_t *cr, + zfs_file_t **fpp) { struct thread *td; struct vnode *vp; @@ -76,7 +77,7 @@ #else NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); #endif - error = vn_open(&nd, &flags, mode, fp); + error = vn_open_cred(&nd, &flags, mode, 0, cr, fp); if (error != 0) { falloc_abort(td, fp); return (SET_ERROR(error)); @@ -94,7 +95,7 @@ } if (flags & O_TRUNC) { - error = fo_truncate(fp, 0, td->td_ucred, td); + error = fo_truncate(fp, 0, cr, td); if (error != 0) { zfs_file_close(fp); return (SET_ERROR(error)); @@ -164,8 +165,9 @@ int zfs_file_pwrite(zfs_file_t *fp, const void *buf, size_t count, loff_t off, - ssize_t *resid) + uint8_t ashift, ssize_t *resid) { + (void) ashift; return (zfs_file_write_impl(fp, buf, count, &off, resid)); } diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_vnops_os.c zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_vnops_os.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_vnops_os.c 2025-05-01 18:45:25.242121222 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_vnops_os.c 2026-08-21 21:15:50.662500780 +0000 @@ -25,6 +25,7 @@ * Copyright (c) 2012, 2015 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2017 Nexenta Systems, Inc. + * Copyright (c) 2025, Klara, Inc. */ /* Portions Copyright 2007 Jeremy Teo */ @@ -99,14 +100,6 @@ VFS_SMR_DECLARE; -#ifdef DEBUG_VFS_LOCKS -#define VNCHECKREF(vp) \ - VNASSERT((vp)->v_holdcnt > 0 && (vp)->v_usecount > 0, vp, \ - ("%s: wrong ref counts", __func__)); -#else -#define VNCHECKREF(vp) -#endif - #if __FreeBSD_version >= 1400045 typedef uint64_t cookie_t; #else @@ -305,6 +298,18 @@ *(offset_t *)data = off; return (0); } + case ZFS_IOC_REWRITE: { + zfs_rewrite_args_t *args = (zfs_rewrite_args_t *)data; + if ((flag & FWRITE) == 0) + return (SET_ERROR(EBADF)); + error = vn_lock(vp, LK_SHARED); + if (error) + return (error); + error = zfs_rewrite(VTOZ(vp), args->off, args->len, + args->flags, args->arg); + VOP_UNLOCK(vp); + return (error); + } } return (SET_ERROR(ENOTTY)); } @@ -952,9 +957,6 @@ zfs_acl_ids_t acl_ids; boolean_t fuid_dirtied; uint64_t txtype; -#ifdef DEBUG_VFS_LOCKS - vnode_t *dvp = ZTOV(dzp); -#endif if (is_nametoolong(zfsvfs, name)) return (SET_ERROR(ENAMETOOLONG)); @@ -1084,7 +1086,8 @@ getnewvnode_drop_reserve(); out: - VNCHECKREF(dvp); + VNASSERT(ZTOV(dzp)->v_holdcnt > 0 && ZTOV(dzp)->v_usecount > 0, + ZTOV(dzp), ("%s: wrong ref counts", __func__)); if (error == 0) { *zpp = zp; } @@ -3286,7 +3289,7 @@ ZRENAMING, NULL)); } } - if (error == 0) { + if (error == 0 && zfsvfs->z_use_namecache) { cache_vop_rename(sdvp, *svpp, tdvp, *tvpp, scnp, tcnp); } } @@ -4072,6 +4075,33 @@ ap->a_rahead)); } +typedef struct { + uint_t pca_npages; + vm_page_t pca_pages[]; +} putpage_commit_arg_t; + +static void +zfs_putpage_commit_cb(void *arg) +{ + putpage_commit_arg_t *pca = arg; + vm_object_t object = pca->pca_pages[0]->object; + + zfs_vmobject_wlock(object); + + for (uint_t i = 0; i < pca->pca_npages; i++) { + vm_page_t pp = pca->pca_pages[i]; + vm_page_undirty(pp); + vm_page_sunbusy(pp); + } + + vm_object_pip_wakeupn(object, pca->pca_npages); + + zfs_vmobject_wunlock(object); + + kmem_free(pca, + offsetof(putpage_commit_arg_t, pca_pages[pca->pca_npages])); +} + static int zfs_putpages(struct vnode *vp, vm_page_t *ma, size_t len, int flags, int *rtvals) @@ -4173,10 +4203,12 @@ } if (zp->z_blksz < PAGE_SIZE) { - for (i = 0; len > 0; off += tocopy, len -= tocopy, i++) { - tocopy = len > PAGE_SIZE ? PAGE_SIZE : len; + vm_ooffset_t woff = off; + size_t wlen = len; + for (i = 0; wlen > 0; woff += tocopy, wlen -= tocopy, i++) { + tocopy = MIN(PAGE_SIZE, wlen); va = zfs_map_page(ma[i], &sf); - dmu_write(zfsvfs->z_os, zp->z_id, off, tocopy, va, tx); + dmu_write(zfsvfs->z_os, zp->z_id, woff, tocopy, va, tx); zfs_unmap_page(sf); } } else { @@ -4197,19 +4229,48 @@ zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime); err = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx); ASSERT0(err); - /* - * XXX we should be passing a callback to undirty - * but that would make the locking messier - */ - zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, - len, commit, B_FALSE, NULL, NULL); - zfs_vmobject_wlock(object); - for (i = 0; i < ncount; i++) { - rtvals[i] = zfs_vm_pagerret_ok; - vm_page_undirty(ma[i]); + if (commit) { + /* + * Caller requested that we commit immediately. We set + * a callback on the log entry, to be called once its + * on disk after the call to zil_commit() below. The + * pages will be undirtied and unbusied there. + */ + putpage_commit_arg_t *pca = kmem_alloc( + offsetof(putpage_commit_arg_t, pca_pages[ncount]), + KM_SLEEP); + pca->pca_npages = ncount; + memcpy(pca->pca_pages, ma, sizeof (vm_page_t) * ncount); + + zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, + B_TRUE, B_FALSE, zfs_putpage_commit_cb, pca); + + for (i = 0; i < ncount; i++) + rtvals[i] = zfs_vm_pagerret_pend; + } else { + /* + * Caller just wants the page written back somewhere, + * but doesn't need it committed yet. We've already + * written it back to the DMU, so we just need to put + * it on the async log, then undirty the page and + * return. + * + * We cannot use a callback here, because it would keep + * the page busy (locked) until it is eventually + * written down at txg sync. + */ + zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, off, len, + B_FALSE, B_FALSE, NULL, NULL); + + zfs_vmobject_wlock(object); + for (i = 0; i < ncount; i++) { + rtvals[i] = zfs_vm_pagerret_ok; + vm_page_undirty(ma[i]); + } + zfs_vmobject_wunlock(object); } - zfs_vmobject_wunlock(object); + VM_CNT_INC(v_vnodeout); VM_CNT_ADD(v_vnodepgsout, ncount); } @@ -5171,6 +5232,11 @@ return (0); } return (EINVAL); +#ifdef _PC_HAS_HIDDENSYSTEM + case _PC_HAS_HIDDENSYSTEM: + *ap->a_retval = 1; + return (0); +#endif default: return (vop_stdpathconf(ap)); } diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_znode_os.c zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_znode_os.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/zfs_znode_os.c 2025-05-01 18:45:25.245121280 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/zfs_znode_os.c 2026-08-21 21:15:50.665500744 +0000 @@ -67,8 +67,12 @@ #include "zfs_comutil.h" /* Used by fstat(1). */ +#ifdef SYSCTL_SIZEOF +SYSCTL_SIZEOF(znode, znode_t); +#else SYSCTL_INT(_debug_sizeof, OID_AUTO, znode, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, sizeof (znode_t), "sizeof(znode_t)"); +#endif /* * Define ZNODE_STATS to turn on statistic gathering. By default, it is only @@ -146,8 +150,6 @@ zp->z_xattr_cached = NULL; zp->z_xattr_parent = 0; zp->z_vnode = NULL; - zp->z_sync_writes_cnt = 0; - zp->z_async_writes_cnt = 0; return (0); } @@ -168,9 +170,6 @@ ASSERT3P(zp->z_acl_cached, ==, NULL); ASSERT3P(zp->z_xattr_cached, ==, NULL); - - ASSERT0(atomic_load_32(&zp->z_sync_writes_cnt)); - ASSERT0(atomic_load_32(&zp->z_async_writes_cnt)); } @@ -289,6 +288,7 @@ sharezp->z_atime_dirty = 0; sharezp->z_zfsvfs = zfsvfs; sharezp->z_is_sa = zfsvfs->z_use_sa; + sharezp->z_pflags = 0; VERIFY0(zfs_acl_ids_create(sharezp, IS_ROOT_NODE, &vattr, kcred, NULL, &acl_ids, NULL)); @@ -451,8 +451,6 @@ zp->z_blksz = blksz; zp->z_seq = 0x7A4653; zp->z_sync_cnt = 0; - zp->z_sync_writes_cnt = 0; - zp->z_async_writes_cnt = 0; atomic_store_ptr(&zp->z_cached_symlink, NULL); zfs_znode_sa_init(zfsvfs, zp, db, obj_type, hdl); @@ -796,6 +794,10 @@ (*zpp)->z_mode = mode; (*zpp)->z_dnodesize = dnodesize; + vnode_t *vp = ZTOV(*zpp); + if (!(flag & IS_ROOT_NODE)) + vn_seqc_write_begin(vp); + if (vap->va_mask & AT_XVATTR) zfs_xvattr_set(*zpp, (xvattr_t *)vap, tx); @@ -804,7 +806,7 @@ VERIFY0(zfs_aclset_common(*zpp, acl_ids->z_aclp, cr, tx)); } if (!(flag & IS_ROOT_NODE)) { - vnode_t *vp = ZTOV(*zpp); + vn_seqc_write_end(vp); vp->v_vflag |= VV_FORCEINSMQ; int err = insmntque(vp, zfsvfs->z_vfs); vp->v_vflag &= ~VV_FORCEINSMQ; @@ -1725,6 +1727,7 @@ rootzp->z_unlinked = 0; rootzp->z_atime_dirty = 0; rootzp->z_is_sa = USE_SA(version, os); + rootzp->z_pflags = 0; zfsvfs->z_os = os; zfsvfs->z_parent = zfsvfs; diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/zio_crypt.c zfs-linux-2.3.9/module/os/freebsd/zfs/zio_crypt.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/zio_crypt.c 2025-05-01 18:45:25.249121357 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/zio_crypt.c 2026-08-21 21:15:50.667500720 +0000 @@ -371,9 +371,6 @@ return (ret); } -void *failed_decrypt_buf; -int failed_decrypt_size; - /* * This function handles all encryption and decryption in zfs. When * encrypting it expects puio to reference the plaintext and cuio to @@ -1663,9 +1660,6 @@ return (ret); } -void *failed_decrypt_buf; -int faile_decrypt_size; - /* * Primary encryption / decryption entrypoint for zio data. */ @@ -1758,13 +1752,6 @@ return (0); error: - if (!encrypt) { - if (failed_decrypt_buf != NULL) - kmem_free(failed_decrypt_buf, failed_decrypt_size); - failed_decrypt_buf = kmem_alloc(datalen, KM_SLEEP); - failed_decrypt_size = datalen; - memcpy(failed_decrypt_buf, cipherbuf, datalen); - } if (locked) rw_exit(&key->zk_salt_lock); if (authbuf != NULL) @@ -1822,9 +1809,3 @@ return (SET_ERROR(ret)); } - -#if defined(_KERNEL) && defined(HAVE_SPL) -module_param(zfs_key_max_salt_uses, ulong, 0644); -MODULE_PARM_DESC(zfs_key_max_salt_uses, "Max number of times a salt value " - "can be used for generating encryption keys before it is rotated"); -#endif diff -Nru zfs-linux-2.3.2/module/os/freebsd/zfs/zvol_os.c zfs-linux-2.3.9/module/os/freebsd/zfs/zvol_os.c --- zfs-linux-2.3.2/module/os/freebsd/zfs/zvol_os.c 2025-05-01 18:45:25.253121434 +0000 +++ zfs-linux-2.3.9/module/os/freebsd/zfs/zvol_os.c 2026-08-21 21:15:50.669500697 +0000 @@ -1584,13 +1584,21 @@ void zvol_os_set_disk_ro(zvol_state_t *zv, int flags) { - // XXX? set_disk_ro(zv->zv_zso->zvo_disk, flags); + /* + * The ro/rw ZVOL mode is switched using zvol_set_ro() function by + * enabling/disabling ZVOL_RDONLY flag. No additional FreeBSD-specific + * actions are required for readonly zfs property switching. + */ } void zvol_os_set_capacity(zvol_state_t *zv, uint64_t capacity) { - // XXX? set_capacity(zv->zv_zso->zvo_disk, capacity); + /* + * The ZVOL size/capacity is changed by zvol_set_volsize() function. + * Leave this method empty, because all required job is doing by + * zvol_os_update_volsize() platform-specific function. + */ } /* diff -Nru zfs-linux-2.3.2/module/os/linux/spl/spl-generic.c zfs-linux-2.3.9/module/os/linux/spl/spl-generic.c --- zfs-linux-2.3.2/module/os/linux/spl/spl-generic.c 2025-05-01 18:45:25.272121802 +0000 +++ zfs-linux-2.3.9/module/os/linux/spl/spl-generic.c 2026-08-21 21:15:50.681500554 +0000 @@ -555,29 +555,6 @@ } EXPORT_SYMBOL(ddi_copyin); -#define define_spl_param(type, fmt) \ -int \ -spl_param_get_##type(char *buf, zfs_kernel_param_t *kp) \ -{ \ - return (scnprintf(buf, PAGE_SIZE, fmt "\n", \ - *(type *)kp->arg)); \ -} \ -int \ -spl_param_set_##type(const char *buf, zfs_kernel_param_t *kp) \ -{ \ - return (kstrto##type(buf, 0, (type *)kp->arg)); \ -} \ -const struct kernel_param_ops spl_param_ops_##type = { \ - .set = spl_param_set_##type, \ - .get = spl_param_get_##type, \ -}; \ -EXPORT_SYMBOL(spl_param_get_##type); \ -EXPORT_SYMBOL(spl_param_set_##type); \ -EXPORT_SYMBOL(spl_param_ops_##type); - -define_spl_param(s64, "%lld") -define_spl_param(u64, "%llu") - /* * Post a uevent to userspace whenever a new vdev adds to the pool. It is * necessary to sync blkid information with udev, which zed daemon uses diff -Nru zfs-linux-2.3.2/module/os/linux/spl/spl-kmem-cache.c zfs-linux-2.3.9/module/os/linux/spl/spl-kmem-cache.c --- zfs-linux-2.3.2/module/os/linux/spl/spl-kmem-cache.c 2025-05-01 18:45:25.276121879 +0000 +++ zfs-linux-2.3.9/module/os/linux/spl/spl-kmem-cache.c 2026-08-21 21:15:50.684500519 +0000 @@ -139,12 +139,10 @@ static void * kv_alloc(spl_kmem_cache_t *skc, int size, int flags) { - gfp_t lflags = kmem_flags_convert(flags); + gfp_t lflags = kmem_flags_convert(flags | KM_VMEM); void *ptr; - if (skc->skc_flags & KMC_RECLAIMABLE) - lflags |= __GFP_RECLAIMABLE; - ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM); + ptr = spl_vmalloc(size, lflags); /* Resulting allocated memory will be page aligned */ ASSERT(IS_P2ALIGNED(ptr, PAGE_SIZE)); @@ -424,7 +422,7 @@ if (!empty) return (-EEXIST); - if (skc->skc_flags & KMC_RECLAIMABLE) + if (skc->skc_flags & KMC_RECLAIMABLE && !(flags & KM_VMEM)) lflags |= __GFP_RECLAIMABLE; ske = kmalloc(sizeof (*ske), lflags); if (ske == NULL) diff -Nru zfs-linux-2.3.2/module/os/linux/spl/spl-kmem.c zfs-linux-2.3.9/module/os/linux/spl/spl-kmem.c --- zfs-linux-2.3.2/module/os/linux/spl/spl-kmem.c 2025-05-01 18:45:25.279121937 +0000 +++ zfs-linux-2.3.9/module/os/linux/spl/spl-kmem.c 2026-08-21 21:15:50.686500495 +0000 @@ -188,7 +188,13 @@ return (ptr); } - return (spl_vmalloc(size, lflags | __GFP_HIGHMEM)); + /* + * vmalloc fallback. KM_VMEM may not have been requested originally if + * we've come through spl_kmem_alloc_impl(), so we need to remove + * __GFP_COMP, which is not a valid flag for vmalloc. + */ + lflags &= ~__GFP_COMP; + return (spl_vmalloc(size, lflags)); } /* @@ -237,7 +243,7 @@ */ if (size > spl_kmem_alloc_max) { if (flags & KM_VMEM) { - ptr = spl_vmalloc(size, lflags | __GFP_HIGHMEM); + ptr = spl_vmalloc(size, lflags); } else { return (NULL); } diff -Nru zfs-linux-2.3.2/module/os/linux/spl/spl-taskq.c zfs-linux-2.3.9/module/os/linux/spl/spl-taskq.c --- zfs-linux-2.3.2/module/os/linux/spl/spl-taskq.c 2025-05-01 18:45:25.298122305 +0000 +++ zfs-linux-2.3.9/module/os/linux/spl/spl-taskq.c 2026-08-21 21:15:50.698500353 +0000 @@ -37,6 +37,12 @@ #include #include #include +#include + +/* Linux 6.2 renamed timer_delete_sync(); point it at its old name for those. */ +#ifndef HAVE_TIMER_DELETE_SYNC +#define timer_delete_sync(t) del_timer_sync(t) +#endif typedef struct taskq_kstats { /* static values, for completeness */ @@ -633,7 +639,7 @@ */ if (timer_pending(&t->tqent_timer)) { spin_unlock_irqrestore(&tq->tq_lock, flags); - del_timer_sync(&t->tqent_timer); + timer_delete_sync(&t->tqent_timer); spin_lock_irqsave_nested(&tq->tq_lock, flags, tq->tq_lock_class); } @@ -1646,18 +1652,8 @@ static unsigned int spl_taskq_kick = 0; -/* - * 2.6.36 API Change - * module_param_cb is introduced to take kernel_param_ops and - * module_param_call is marked as obsolete. Also set and get operations - * were changed to take a 'const struct kernel_param *'. - */ static int -#ifdef module_param_cb -param_set_taskq_kick(const char *val, const struct kernel_param *kp) -#else -param_set_taskq_kick(const char *val, struct kernel_param *kp) -#endif +param_set_taskq_kick(const char *val, zfs_kernel_param_t *kp) { int ret; taskq_t *tq = NULL; @@ -1687,16 +1683,8 @@ return (ret); } -#ifdef module_param_cb -static const struct kernel_param_ops param_ops_taskq_kick = { - .set = param_set_taskq_kick, - .get = param_get_uint, -}; -module_param_cb(spl_taskq_kick, ¶m_ops_taskq_kick, &spl_taskq_kick, 0644); -#else module_param_call(spl_taskq_kick, param_set_taskq_kick, param_get_uint, &spl_taskq_kick, 0644); -#endif MODULE_PARM_DESC(spl_taskq_kick, "Write nonzero to kick stuck taskqs to spawn more threads"); diff -Nru zfs-linux-2.3.2/module/os/linux/spl/spl-thread.c zfs-linux-2.3.9/module/os/linux/spl/spl-thread.c --- zfs-linux-2.3.2/module/os/linux/spl/spl-thread.c 2025-05-01 18:45:25.302122382 +0000 +++ zfs-linux-2.3.9/module/os/linux/spl/spl-thread.c 2026-08-21 21:15:50.701500317 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include /* * Thread interfaces @@ -197,3 +198,14 @@ } EXPORT_SYMBOL(issig); + +/* + * Check if the current thread is a memory reclaim thread. + * Returns true if current thread is kswapd. + */ +int +current_is_reclaim_thread(void) +{ + return (current_is_kswapd()); +} +EXPORT_SYMBOL(current_is_reclaim_thread); diff -Nru zfs-linux-2.3.2/module/os/linux/spl/spl-zone.c zfs-linux-2.3.9/module/os/linux/spl/spl-zone.c --- zfs-linux-2.3.2/module/os/linux/spl/spl-zone.c 2025-05-01 18:45:25.324122808 +0000 +++ zfs-linux-2.3.9/module/os/linux/spl/spl-zone.c 2026-08-21 21:15:50.715500151 +0000 @@ -25,6 +25,10 @@ * SUCH DAMAGE. */ +/* + * Copyright (c) 2025, Rob Norris + */ + #include #include #include @@ -56,6 +60,19 @@ } zone_dataset_t; #ifdef CONFIG_USER_NS + +/* + * Linux 6.18 moved the generic namespace type away from ns->ops->type onto + * ns_common itself. + */ +#ifdef HAVE_NS_COMMON_TYPE +#define ns_is_newuser(ns) \ + ((ns)->ns_type == CLONE_NEWUSER) +#else +#define ns_is_newuser(ns) \ + ((ns)->ops != NULL && (ns)->ops->type == CLONE_NEWUSER) +#endif + /* * Returns: * - 0 on success @@ -84,7 +101,7 @@ goto done; } ns = get_proc_ns(file_inode(nsfile)); - if (ns->ops->type != CLONE_NEWUSER) { + if (!ns_is_newuser(ns)) { error = ENOTTY; goto done; } diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/abd_os.c zfs-linux-2.3.9/module/os/linux/zfs/abd_os.c --- zfs-linux-2.3.2/module/os/linux/zfs/abd_os.c 2025-05-01 18:45:25.328122885 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/abd_os.c 2026-08-21 21:15:50.717500127 +0000 @@ -23,6 +23,7 @@ * Copyright (c) 2014 by Chunwei Chen. All rights reserved. * Copyright (c) 2019 by Delphix. All rights reserved. * Copyright (c) 2023, 2024, Klara Inc. + * Copyright (c) 2025, Rob Norris */ /* @@ -891,6 +892,14 @@ } } +#ifndef nth_page +/* + * Since 6.18 nth_page() no longer exists, and is no longer required to iterate + * within a single SG entry, so we replace it with a simple addition. + */ +#define nth_page(p, n) ((p)+(n)) +#endif + /* * Map the current chunk into aiter. This can be safely called when the aiter * has already exhausted, in which case this does nothing. @@ -918,7 +927,14 @@ aiter->iter_mapsize = MIN(aiter->iter_sg->length - offset, aiter->iter_abd->abd_size - aiter->iter_pos); - paddr = zfs_kmap_local(sg_page(aiter->iter_sg)); + struct page *page = sg_page(aiter->iter_sg); + if (PageHighMem(page)) { + page = nth_page(page, offset / PAGE_SIZE); + offset &= PAGE_SIZE - 1; + aiter->iter_mapsize = MIN(aiter->iter_mapsize, + PAGE_SIZE - offset); + } + paddr = zfs_kmap_local(page); } aiter->iter_mapaddr = (char *)paddr + offset; @@ -936,8 +952,14 @@ return; if (!abd_is_linear(aiter->iter_abd)) { + size_t offset = aiter->iter_offset; + + struct page *page = sg_page(aiter->iter_sg); + if (PageHighMem(page)) + offset &= PAGE_SIZE - 1; + /* LINTED E_FUNC_SET_NOT_USED */ - zfs_kunmap_local(aiter->iter_mapaddr - aiter->iter_offset); + zfs_kunmap_local(aiter->iter_mapaddr - offset); } ASSERT3P(aiter->iter_mapaddr, !=, NULL); @@ -1340,6 +1362,8 @@ return (io_size); } +EXPORT_SYMBOL(abd_alloc_from_pages); + /* Tunable Parameters */ module_param(zfs_abd_scatter_enabled, int, 0644); MODULE_PARM_DESC(zfs_abd_scatter_enabled, diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/kasan_compat.c zfs-linux-2.3.9/module/os/linux/zfs/kasan_compat.c --- zfs-linux-2.3.2/module/os/linux/zfs/kasan_compat.c 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/kasan_compat.c 2026-08-21 21:15:50.722500068 +0000 @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2025, Rob Norris + */ + +#ifndef _ZFS_LINUX_KASAN_ENABLED_H +#define _ZFS_LINUX_KASAN_ENABLED_H + +#ifdef HAVE_KASAN_ENABLED_GPL_ONLY +/* + * The kernel supports a runtime setting to enable/disable KASAN. The control + * flag kasan_flag_enabled is a GPL-only symbol, which prevents us from + * accessing it. Unfortunately, this is called by the header function + * kasan_enabled(), which in turn is used to call or skip instrumentation + * functions in various header-based kernel facilities. If we inadvertently + * call one, the build breaks. + * + * To work around this, we define our own `kasan_flag_enabled` set to "false", + * disabling use of KASAN inside our code. The linker will resolve this symbol + * at build time, and so never need to reach out to the off-limits kernel + * symbol. + */ +#include +struct static_key_false kasan_flag_enabled = STATIC_KEY_FALSE_INIT; +#endif + +#endif diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/policy.c zfs-linux-2.3.9/module/os/linux/zfs/policy.c --- zfs-linux-2.3.2/module/os/linux/zfs/policy.c 2025-05-01 18:45:25.339123098 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/policy.c 2026-08-21 21:15:50.727500009 +0000 @@ -24,7 +24,11 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2013, Joyent, Inc. All rights reserved. * Copyright (C) 2016 Lawrence Livermore National Security, LLC. - * + * Copyright (c) 2025, Rob Norris + * Copyright (c) 2026, TrueNAS. + */ + +/* * For Linux the vast majority of this enforcement is already handled via * the standard Linux VFS permission checks. However certain administrative * commands which bypass the standard mechanisms may need to make use of @@ -35,28 +39,32 @@ #include #include -/* - * The passed credentials cannot be directly verified because Linux only - * provides and interface to check the *current* process credentials. In - * order to handle this the capable() test is only run when the passed - * credentials match the current process credentials or the kcred. In - * all other cases this function must fail and return the passed err. - */ static int priv_policy_ns(const cred_t *cr, int capability, int err, struct user_namespace *ns) { - if (cr != CRED() && (cr != kcred)) - return (err); + /* + * The passed credentials cannot be directly verified because Linux + * only provides an interface to check the *current* process + * credentials. In order to handle this we check if the passed in + * creds match the current process credentials or the kcred. If not, + * we swap the passed credentials into the current task, perform the + * check, and then revert it before returning. + */ + const cred_t *old = + (cr != CRED() && cr != kcred) ? override_creds(cr) : NULL; #if defined(CONFIG_USER_NS) - if (!(ns ? ns_capable(ns, capability) : capable(capability))) + if (ns ? ns_capable(ns, capability) : capable(capability)) #else - if (!capable(capability)) + if (capable(capability)) #endif - return (err); + err = 0; - return (0); + if (old) + revert_creds(old); + + return (err); } static int @@ -82,21 +90,14 @@ } /* - * Checks for operations that are either client-only or are used by - * both clients and servers. - */ -int -secpolicy_nfs(const cred_t *cr) -{ - return (priv_policy(cr, CAP_SYS_ADMIN, EPERM)); -} - -/* * Catch all system configuration. */ int secpolicy_sys_config(const cred_t *cr, boolean_t checkonly) { + /* pools can only be manipulated from the global zone */ + if (crgetzoneid(cr) != GLOBAL_ZONEID) + return (EACCES); return (priv_policy(cr, CAP_SYS_ADMIN, EPERM)); } @@ -236,6 +237,9 @@ int secpolicy_zinject(const cred_t *cr) { + /* zinject is only in the global zone */ + if (crgetzoneid(cr) != GLOBAL_ZONEID) + return (EACCES); return (priv_policy(cr, CAP_SYS_ADMIN, EACCES)); } @@ -246,22 +250,17 @@ int secpolicy_zfs(const cred_t *cr) { + /* + * Note that CAP_SYS_ADMIN is effectively "root"-like privileges in + * the given user namespace. Those happen to include mount control + * (matching PRIV_SYS_MOUNT on illumos). There is not a narrower + * permission available. It's important that callers do narrower + * permission checks (eg zone checks) along with this call. + * -- robn, 2026-08-14 + */ return (priv_policy(cr, CAP_SYS_ADMIN, EACCES)); } -/* - * Equivalent to secpolicy_zfs(), but works even if the cred_t is not that of - * the current process. Takes both cred_t and proc_t so that this can work - * easily on all platforms. - */ -int -secpolicy_zfs_proc(const cred_t *cr, proc_t *proc) -{ - if (!has_capability(proc, CAP_SYS_ADMIN)) - return (EACCES); - return (0); -} - void secpolicy_setid_clear(vattr_t *vap, cred_t *cr) { diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/vdev_disk.c zfs-linux-2.3.9/module/os/linux/zfs/vdev_disk.c --- zfs-linux-2.3.2/module/os/linux/zfs/vdev_disk.c 2025-05-01 18:45:25.360123504 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/vdev_disk.c 2026-08-21 21:15:50.741499843 +0000 @@ -25,7 +25,7 @@ * Rewritten for Linux by Brian Behlendorf . * LLNL-CODE-403049. * Copyright (c) 2012, 2019 by Delphix. All rights reserved. - * Copyright (c) 2023, 2024, Klara Inc. + * Copyright (c) 2026, TrueNAS. */ #include @@ -281,13 +281,28 @@ } static int +vdev_path_backing_permission(struct path *path, int mask) +{ +#if defined(HAVE_IDMAP_MNTIDMAP) + return (inode_permission(mnt_idmap(path->mnt), + d_backing_inode(path->dentry), mask)); +#elif defined(HAVE_IDMAP_USERNS) + return (inode_permission(mnt_user_ns(path->mnt), + d_backing_inode(path->dentry), mask)); +#else + return (inode_permission(d_backing_inode(path->dentry), mask)); +#endif +} + +static int vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { zfs_bdev_handle_t *bdh; spa_mode_t smode = spa_mode(v->vdev_spa); hrtime_t timeout = MSEC2NSEC(zfs_vdev_open_timeout_ms); vdev_disk_t *vd; + const cred_t *oldcr = NULL; /* Must have a pathname and it must be absolute. */ if (v->vdev_path == NULL || v->vdev_path[0] != '/') { @@ -309,6 +324,13 @@ char disk_name[BDEVNAME_SIZE + 6] = "/dev/"; boolean_t reread_part = B_FALSE; + /* + * Reopening an already-open device, so the caller credential + * is irrelevant - we had access to it before, we can assume + * we still do. + */ + oldcr = override_creds(kcred); + rw_enter(&vd->vd_lock, RW_WRITER); bdh = vd->vd_bdh; vd->vd_bdh = NULL; @@ -357,6 +379,9 @@ rw_init(&vd->vd_lock, NULL, RW_DEFAULT, NULL); rw_enter(&vd->vd_lock, RW_WRITER); + + /* Restrict device access below to caller's permissions. */ + oldcr = override_creds(cr); } /* @@ -387,12 +412,37 @@ * logic in zvol_open(). Extend the timeout and retry the open * subsequent attempts are expected to eventually succeed. */ + hrtime_t start = gethrtime(); - bdh = BDH_ERR_PTR(-ENXIO); - while (BDH_IS_ERR(bdh) && ((gethrtime() - start) < timeout)) { - bdh = vdev_blkdev_get_by_path(v->vdev_path, smode, - zfs_vdev_holder); - if (unlikely(BDH_PTR_ERR(bdh) == -ENOENT)) { + int err = ENXIO; + while (err != 0 && ((gethrtime() - start) < timeout)) { + + /* + * Ensure the caller credential (made live by override_creds() + * above) has access to the device node. This will include + * checking file permissions and considering the + * CAP_DAC_OVERRIDE capability. + */ + struct path devpath; + err = kern_path(v->vdev_path, LOOKUP_FOLLOW, &devpath); + if (err == 0) { + int mask = + (smode & SPA_MODE_READ ? MAY_READ : 0) | + (smode & SPA_MODE_WRITE ? MAY_WRITE : 0); + err = vdev_path_backing_permission(&devpath, mask); + path_put(&devpath); + } + + if (err == 0) { + bdh = vdev_blkdev_get_by_path(v->vdev_path, smode, + zfs_vdev_holder); + err = BDH_IS_ERR(bdh) ? BDH_PTR_ERR(bdh) : 0; + } + + if (err == 0) + break; + + if (unlikely(err == -ENOENT)) { /* * There is no point of waiting since device is removed * explicitly @@ -401,29 +451,30 @@ break; schedule_timeout_interruptible(MSEC_TO_TICK(10)); - } else if (unlikely(BDH_PTR_ERR(bdh) == -ERESTARTSYS)) { + } else if (unlikely(err == -ERESTARTSYS)) { timeout = MSEC2NSEC(zfs_vdev_open_timeout_ms * 10); continue; - } else if (BDH_IS_ERR(bdh)) { - break; } + + break; } - if (BDH_IS_ERR(bdh)) { - int error = -BDH_PTR_ERR(bdh); - vdev_dbgmsg(v, "open error=%d timeout=%llu/%llu", error, + revert_creds(oldcr); + + if (err != 0) { + vdev_dbgmsg(v, "open error=%d timeout=%llu/%llu", -err, (u_longlong_t)(gethrtime() - start), (u_longlong_t)timeout); vd->vd_bdh = NULL; v->vdev_tsd = vd; rw_exit(&vd->vd_lock); - return (SET_ERROR(error)); - } else { - vd->vd_bdh = bdh; - v->vdev_tsd = vd; - rw_exit(&vd->vd_lock); + return (SET_ERROR(-err)); } + vd->vd_bdh = bdh; + v->vdev_tsd = vd; + rw_exit(&vd->vd_lock); + struct block_device *bdev = BDH_BDEV(vd->vd_bdh); /* Determine the physical block size */ @@ -445,7 +496,11 @@ v->vdev_has_securetrim = bdev_secure_discard_supported(bdev); /* Inform the ZIO pipeline that we are non-rotational */ +#ifdef HAVE_BLK_QUEUE_ROT + v->vdev_nonrot = !blk_queue_rot(bdev_get_queue(bdev)); +#else v->vdev_nonrot = blk_queue_nonrot(bdev_get_queue(bdev)); +#endif /* Physical volume size in bytes for the partition */ *psize = bdev_capacity(bdev); @@ -614,7 +669,7 @@ vdev_bio_max_segs(struct block_device *bdev) { /* - * Smallest of the device max segs and the tuneable max segs. Minimum + * Smallest of the device max segs and the tunable max segs. Minimum * 4, so there's room to finish split pages if they come up. */ const uint_t dev_max_segs = queue_max_segments(bdev_get_queue(bdev)); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zfs_ctldir.c zfs-linux-2.3.9/module/os/linux/zfs/zfs_ctldir.c --- zfs-linux-2.3.2/module/os/linux/zfs/zfs_ctldir.c 2025-05-01 18:45:25.375123794 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zfs_ctldir.c 2026-08-21 21:15:50.751499724 +0000 @@ -511,8 +511,6 @@ zp->z_pflags = 0; zp->z_mode = 0; zp->z_sync_cnt = 0; - zp->z_sync_writes_cnt = 0; - zp->z_async_writes_cnt = 0; ip->i_generation = 0; ip->i_ino = id; ip->i_mode = (S_IFDIR | S_IRWXUGO); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zfs_file_os.c zfs-linux-2.3.9/module/os/linux/zfs/zfs_file_os.c --- zfs-linux-2.3.2/module/os/linux/zfs/zfs_file_os.c 2025-05-01 18:45:25.386124006 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zfs_file_os.c 2026-08-21 21:15:50.758499641 +0000 @@ -41,7 +41,8 @@ * Returns 0 on success underlying error on failure. */ int -zfs_file_open(const char *path, int flags, int mode, zfs_file_t **fpp) +zfs_file_open(const char *path, int flags, int mode, cred_t *cr, + zfs_file_t **fpp) { struct file *filp; int saved_umask; @@ -52,7 +53,9 @@ if (flags & O_CREAT) saved_umask = xchg(¤t->fs->umask, 0); + const cred_t *oldcr = override_creds(cr); filp = filp_open(path, flags, mode); + revert_creds(oldcr); if (flags & O_CREAT) (void) xchg(¤t->fs->umask, saved_umask); @@ -115,8 +118,9 @@ */ int zfs_file_pwrite(zfs_file_t *fp, const void *buf, size_t count, loff_t off, - ssize_t *resid) + uint8_t ashift, ssize_t *resid) { + (void) ashift; ssize_t rc; rc = kernel_write(fp, buf, count, &off); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zfs_uio.c zfs-linux-2.3.9/module/os/linux/zfs/zfs_uio.c --- zfs-linux-2.3.2/module/os/linux/zfs/zfs_uio.c 2025-05-01 18:45:25.400124277 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zfs_uio.c 2026-08-21 21:15:50.767499534 +0000 @@ -100,15 +100,17 @@ while (n && uio->uio_resid) { void *paddr; - cnt = MIN(bv->bv_len - skip, n); + size_t offset = bv->bv_offset + skip; + cnt = MIN(PAGE_SIZE - (offset & ~PAGE_MASK), + MIN(bv->bv_len - skip, n)); - paddr = zfs_kmap_local(bv->bv_page); + paddr = zfs_kmap_local(bv->bv_page + (offset >> PAGE_SHIFT)); if (rw == UIO_READ) { /* Copy from buffer 'p' to the bvec data */ - memcpy(paddr + bv->bv_offset + skip, p, cnt); + memcpy(paddr + (offset & ~PAGE_MASK), p, cnt); } else { /* Copy from bvec data to buffer 'p' */ - memcpy(p, paddr + bv->bv_offset + skip, cnt); + memcpy(p, paddr + (offset & ~PAGE_MASK), cnt); } zfs_kunmap_local(paddr); @@ -232,9 +234,8 @@ boolean_t revert) { size_t cnt = MIN(n, uio->uio_resid); - - if (uio->uio_skip) - iov_iter_advance(uio->uio_iter, uio->uio_skip); + size_t oldcnt = cnt; + int error = 0; if (rw == UIO_READ) cnt = copy_to_iter(p, cnt, uio->uio_iter); @@ -250,16 +251,21 @@ return (EFAULT); /* - * Revert advancing the uio_iter. This is set by zfs_uiocopy() - * to avoid consuming the uio and its iov_iter structure. + * When revert is set this is a zfs_uiocopy() which should not + * consume the uio and its iov_iter structure. Otherwise, it's + * a zfs_uiomove() which is expected to update the uio. Partial + * copies are allowed for both copy and move but EFAULT should + * be returned for zfs_uiomove(). */ if (revert) iov_iter_revert(uio->uio_iter, cnt); + else if (cnt != oldcnt) + error = EFAULT; uio->uio_resid -= cnt; uio->uio_loffset += cnt; - return (0); + return (error); } int @@ -507,12 +513,14 @@ zfs_uio_pin_user_pages(zfs_uio_t *uio, zfs_uio_rw_t rw) { long res; - size_t skip = uio->uio_skip; + size_t skip = uio->uio_iter->iov_offset; size_t len = uio->uio_resid - skip; unsigned int gup_flags = 0; unsigned long addr; unsigned long nr_pages; + ASSERT3U(uio->uio_segflg, ==, UIO_ITER); + /* * Kernel 6.2 introduced the FOLL_PCI_P2PDMA flag. This flag could * possibly be used here in the future to allow for P2P operations with @@ -577,7 +585,7 @@ zfs_uio_get_dio_pages_iov_iter(zfs_uio_t *uio, zfs_uio_rw_t rw) { size_t start; - size_t wanted = uio->uio_resid - uio->uio_skip; + size_t wanted = uio->uio_resid; ssize_t rollback = 0; ssize_t cnt; unsigned maxpages = DIV_ROUND_UP(wanted, PAGE_SIZE); @@ -611,7 +619,7 @@ #endif } - ASSERT3U(rollback, ==, uio->uio_resid - uio->uio_skip); + ASSERT3U(rollback, ==, uio->uio_resid); iov_iter_revert(uio->uio_iter, rollback); return (0); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zfs_vfsops.c zfs-linux-2.3.9/module/os/linux/zfs/zfs_vfsops.c --- zfs-linux-2.3.2/module/os/linux/zfs/zfs_vfsops.c 2025-05-01 18:45:25.403124335 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zfs_vfsops.c 2026-08-21 21:15:50.770499499 +0000 @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 by Delphix. All rights reserved. + * Copyright (c) 2026, TrueNAS. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -64,53 +65,15 @@ #include #include "zfs_comutil.h" -enum { - TOKEN_RO, - TOKEN_RW, - TOKEN_SETUID, - TOKEN_NOSETUID, - TOKEN_EXEC, - TOKEN_NOEXEC, - TOKEN_DEVICES, - TOKEN_NODEVICES, - TOKEN_DIRXATTR, - TOKEN_SAXATTR, - TOKEN_XATTR, - TOKEN_NOXATTR, - TOKEN_ATIME, - TOKEN_NOATIME, - TOKEN_RELATIME, - TOKEN_NORELATIME, - TOKEN_NBMAND, - TOKEN_NONBMAND, - TOKEN_MNTPOINT, - TOKEN_LAST, -}; - -static const match_table_t zpl_tokens = { - { TOKEN_RO, MNTOPT_RO }, - { TOKEN_RW, MNTOPT_RW }, - { TOKEN_SETUID, MNTOPT_SETUID }, - { TOKEN_NOSETUID, MNTOPT_NOSETUID }, - { TOKEN_EXEC, MNTOPT_EXEC }, - { TOKEN_NOEXEC, MNTOPT_NOEXEC }, - { TOKEN_DEVICES, MNTOPT_DEVICES }, - { TOKEN_NODEVICES, MNTOPT_NODEVICES }, - { TOKEN_DIRXATTR, MNTOPT_DIRXATTR }, - { TOKEN_SAXATTR, MNTOPT_SAXATTR }, - { TOKEN_XATTR, MNTOPT_XATTR }, - { TOKEN_NOXATTR, MNTOPT_NOXATTR }, - { TOKEN_ATIME, MNTOPT_ATIME }, - { TOKEN_NOATIME, MNTOPT_NOATIME }, - { TOKEN_RELATIME, MNTOPT_RELATIME }, - { TOKEN_NORELATIME, MNTOPT_NORELATIME }, - { TOKEN_NBMAND, MNTOPT_NBMAND }, - { TOKEN_NONBMAND, MNTOPT_NONBMAND }, - { TOKEN_MNTPOINT, MNTOPT_MNTPOINT "=%s" }, - { TOKEN_LAST, NULL }, -}; +vfs_t * +zfsvfs_vfs_alloc(void) +{ + vfs_t *vfsp = kmem_zalloc(sizeof (vfs_t), KM_SLEEP); + mutex_init(&vfsp->vfs_mntpt_lock, NULL, MUTEX_DEFAULT, NULL); + return (vfsp); +} -static void +void zfsvfs_vfs_free(vfs_t *vfsp) { if (vfsp != NULL) { @@ -121,139 +84,6 @@ } } -static int -zfsvfs_parse_option(char *option, int token, substring_t *args, vfs_t *vfsp) -{ - switch (token) { - case TOKEN_RO: - vfsp->vfs_readonly = B_TRUE; - vfsp->vfs_do_readonly = B_TRUE; - break; - case TOKEN_RW: - vfsp->vfs_readonly = B_FALSE; - vfsp->vfs_do_readonly = B_TRUE; - break; - case TOKEN_SETUID: - vfsp->vfs_setuid = B_TRUE; - vfsp->vfs_do_setuid = B_TRUE; - break; - case TOKEN_NOSETUID: - vfsp->vfs_setuid = B_FALSE; - vfsp->vfs_do_setuid = B_TRUE; - break; - case TOKEN_EXEC: - vfsp->vfs_exec = B_TRUE; - vfsp->vfs_do_exec = B_TRUE; - break; - case TOKEN_NOEXEC: - vfsp->vfs_exec = B_FALSE; - vfsp->vfs_do_exec = B_TRUE; - break; - case TOKEN_DEVICES: - vfsp->vfs_devices = B_TRUE; - vfsp->vfs_do_devices = B_TRUE; - break; - case TOKEN_NODEVICES: - vfsp->vfs_devices = B_FALSE; - vfsp->vfs_do_devices = B_TRUE; - break; - case TOKEN_DIRXATTR: - vfsp->vfs_xattr = ZFS_XATTR_DIR; - vfsp->vfs_do_xattr = B_TRUE; - break; - case TOKEN_SAXATTR: - vfsp->vfs_xattr = ZFS_XATTR_SA; - vfsp->vfs_do_xattr = B_TRUE; - break; - case TOKEN_XATTR: - vfsp->vfs_xattr = ZFS_XATTR_SA; - vfsp->vfs_do_xattr = B_TRUE; - break; - case TOKEN_NOXATTR: - vfsp->vfs_xattr = ZFS_XATTR_OFF; - vfsp->vfs_do_xattr = B_TRUE; - break; - case TOKEN_ATIME: - vfsp->vfs_atime = B_TRUE; - vfsp->vfs_do_atime = B_TRUE; - break; - case TOKEN_NOATIME: - vfsp->vfs_atime = B_FALSE; - vfsp->vfs_do_atime = B_TRUE; - break; - case TOKEN_RELATIME: - vfsp->vfs_relatime = B_TRUE; - vfsp->vfs_do_relatime = B_TRUE; - break; - case TOKEN_NORELATIME: - vfsp->vfs_relatime = B_FALSE; - vfsp->vfs_do_relatime = B_TRUE; - break; - case TOKEN_NBMAND: - vfsp->vfs_nbmand = B_TRUE; - vfsp->vfs_do_nbmand = B_TRUE; - break; - case TOKEN_NONBMAND: - vfsp->vfs_nbmand = B_FALSE; - vfsp->vfs_do_nbmand = B_TRUE; - break; - case TOKEN_MNTPOINT: - if (vfsp->vfs_mntpoint != NULL) - kmem_strfree(vfsp->vfs_mntpoint); - vfsp->vfs_mntpoint = match_strdup(&args[0]); - if (vfsp->vfs_mntpoint == NULL) - return (SET_ERROR(ENOMEM)); - break; - default: - break; - } - - return (0); -} - -/* - * Parse the raw mntopts and return a vfs_t describing the options. - */ -static int -zfsvfs_parse_options(char *mntopts, vfs_t **vfsp) -{ - vfs_t *tmp_vfsp; - int error; - - tmp_vfsp = kmem_zalloc(sizeof (vfs_t), KM_SLEEP); - mutex_init(&tmp_vfsp->vfs_mntpt_lock, NULL, MUTEX_DEFAULT, NULL); - - if (mntopts != NULL) { - substring_t args[MAX_OPT_ARGS]; - char *tmp_mntopts, *p, *t; - int token; - - tmp_mntopts = t = kmem_strdup(mntopts); - if (tmp_mntopts == NULL) - return (SET_ERROR(ENOMEM)); - - while ((p = strsep(&t, ",")) != NULL) { - if (!*p) - continue; - - args[0].to = args[0].from = NULL; - token = match_token(p, zpl_tokens, args); - error = zfsvfs_parse_option(p, token, args, tmp_vfsp); - if (error) { - kmem_strfree(tmp_mntopts); - zfsvfs_vfs_free(tmp_vfsp); - return (error); - } - } - - kmem_strfree(tmp_mntopts); - } - - *vfsp = tmp_vfsp; - - return (0); -} - boolean_t zfs_is_readonly(zfsvfs_t *zfsvfs) { @@ -265,6 +95,7 @@ { (void) cr; zfsvfs_t *zfsvfs = sb->s_fs_info; + ASSERT3P(zfsvfs, !=, NULL); /* * Semantically, the only requirement is that the sync be initiated. @@ -273,39 +104,23 @@ if (!wait) return (0); - if (zfsvfs != NULL) { - /* - * Sync a specific filesystem. - */ - dsl_pool_t *dp; - int error; - - if ((error = zfs_enter(zfsvfs, FTAG)) != 0) - return (error); - dp = dmu_objset_pool(zfsvfs->z_os); - - /* - * If the system is shutting down, then skip any - * filesystems which may exist on a suspended pool. - */ - if (spa_suspended(dp->dp_spa)) { - zfs_exit(zfsvfs, FTAG); - return (0); - } - - if (zfsvfs->z_log != NULL) - zil_commit(zfsvfs->z_log, 0); + int err = zfs_enter(zfsvfs, FTAG); + if (err != 0) + return (err); + /* + * If the pool is suspended, just return an error. This is to help + * with shutting down with pools suspended, as we don't want to block + * in that case. + */ + if (spa_suspended(zfsvfs->z_os->os_spa)) { zfs_exit(zfsvfs, FTAG); - } else { - /* - * Sync all ZFS filesystems. This is what happens when you - * run sync(1). Unlike other filesystems, ZFS honors the - * request by waiting for all pools to commit all dirty data. - */ - spa_sync_allpools(); + return (SET_ERROR(EIO)); } + zil_commit(zfsvfs->z_log, 0); + zfs_exit(zfsvfs, FTAG); + return (0); } @@ -1103,11 +918,12 @@ int zfs_statvfs(struct inode *ip, struct kstatfs *statp) { + znode_t *zp = ITOZ(ip); zfsvfs_t *zfsvfs = ITOZSB(ip); uint64_t refdbytes, availbytes, usedobjs, availobjs; int err = 0; - if ((err = zfs_enter(zfsvfs, FTAG)) != 0) + if ((err = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0) return (err); dmu_objset_space(zfsvfs->z_os, @@ -1163,8 +979,6 @@ if (dmu_objset_projectquota_enabled(zfsvfs->z_os) && dmu_objset_projectquota_present(zfsvfs->z_os)) { - znode_t *zp = ITOZ(ip); - if (zp->z_pflags & ZFS_PROJINHERIT && zp->z_projid && zpl_is_valid_projid(zp->z_projid)) err = zfs_statfs_project(zfsvfs, zp, statp, bshift); @@ -1192,6 +1006,63 @@ } /* + * Dentry and inode caches referenced by a task in non-root memcg are + * not going to be scanned by the kernel-provided shrinker. So, if + * kernel prunes nothing, fall back to this manual walk to free dnodes. + * To avoid scanning the same znodes multiple times they are always rotated + * to the end of the z_all_znodes list. New znodes are inserted at the + * end of the list so we're always scanning the oldest znodes first. + */ +static int +zfs_prune_aliases(zfsvfs_t *zfsvfs, unsigned long nr_to_scan) +{ + znode_t **zp_array, *zp; + int max_array = MIN(nr_to_scan, PAGE_SIZE * 8 / sizeof (znode_t *)); + int objects = 0; + int i = 0, j = 0; + + zp_array = vmem_zalloc(max_array * sizeof (znode_t *), KM_SLEEP); + + mutex_enter(&zfsvfs->z_znodes_lock); + while ((zp = list_head(&zfsvfs->z_all_znodes)) != NULL) { + + if ((i++ > nr_to_scan) || (j >= max_array)) + break; + + ASSERT(list_link_active(&zp->z_link_node)); + list_remove(&zfsvfs->z_all_znodes, zp); + list_insert_tail(&zfsvfs->z_all_znodes, zp); + + /* Skip active znodes and .zfs entries */ + if (MUTEX_HELD(&zp->z_lock) || zp->z_is_ctldir) + continue; + + if (igrab(ZTOI(zp)) == NULL) + continue; + + zp_array[j] = zp; + j++; + } + mutex_exit(&zfsvfs->z_znodes_lock); + + for (i = 0; i < j; i++) { + zp = zp_array[i]; + + ASSERT3P(zp, !=, NULL); + d_prune_aliases(ZTOI(zp)); + + if (atomic_read(&ZTOI(zp)->i_count) == 1) + objects++; + + zrele(zp); + } + + vmem_free(zp_array, max_array * sizeof (znode_t *)); + + return (objects); +} + +/* * The ARC has requested that the filesystem drop entries from the dentry * and inode caches. This can occur when the ARC needs to free meta data * blocks but can't because they are all pinned by entries in these caches. @@ -1242,6 +1113,14 @@ *objects = (*shrinker->scan_objects)(shrinker, &sc); #endif + /* + * Fall back to zfs_prune_aliases if kernel's shrinker did nothing + * due to dentry and inode caches being referenced by a task running + * in non-root memcg. + */ + if (*objects == 0) + *objects = zfs_prune_aliases(zfsvfs, nr_to_scan); + zfs_exit(zfsvfs, FTAG); dprintf_ds(zfsvfs->z_os->os_dsl_dataset, @@ -1401,20 +1280,16 @@ static atomic_long_t zfs_bdi_seq = ATOMIC_LONG_INIT(0); int -zfs_domount(struct super_block *sb, zfs_mnt_t *zm, int silent) +zfs_domount(struct super_block *sb, const char *osname, + vfs_t *vfs, int silent) { - const char *osname = zm->mnt_osname; struct inode *root_inode = NULL; uint64_t recordsize; int error = 0; zfsvfs_t *zfsvfs = NULL; - vfs_t *vfs = NULL; int canwrite; int dataset_visible_zone; - ASSERT(zm); - ASSERT(osname); - dataset_visible_zone = zone_dataset_visible(osname, &canwrite); /* @@ -1426,10 +1301,6 @@ return (SET_ERROR(EPERM)); } - error = zfsvfs_parse_options(zm->mnt_data, &vfs); - if (error) - return (error); - /* * If a non-writable filesystem is being mounted without the * read-only flag, pretend it was set, as done for snapshots. @@ -1438,16 +1309,12 @@ vfs->vfs_readonly = B_TRUE; error = zfsvfs_create(osname, vfs->vfs_readonly, &zfsvfs); - if (error) { - zfsvfs_vfs_free(vfs); + if (error) goto out; - } if ((error = dsl_prop_get_integer(osname, "recordsize", - &recordsize, NULL))) { - zfsvfs_vfs_free(vfs); + &recordsize, NULL))) goto out; - } vfs->vfs_data = zfsvfs; zfsvfs->z_vfs = vfs; @@ -1471,6 +1338,12 @@ sb->s_xattr = zpl_xattr_handlers; sb->s_export_op = &zpl_export_operations; +#ifdef HAVE_SET_DEFAULT_D_OP + set_default_d_op(sb, &zpl_dentry_operations); +#else + sb->s_d_op = &zpl_dentry_operations; +#endif + /* Set features for file system. */ zfs_set_fuid_feature(zfsvfs); @@ -1523,6 +1396,13 @@ out: if (error) { if (zfsvfs != NULL) { + /* + * We're returning error, so the caller still owns + * the mount options vfs_t. Remove them from zfsvfs + * so we don't try to free them. + */ + zfsvfs->z_vfs = NULL; + dmu_objset_disown(zfsvfs->z_os, B_TRUE, zfsvfs); zfsvfs_free(zfsvfs); } @@ -1613,24 +1493,16 @@ } int -zfs_remount(struct super_block *sb, int *flags, zfs_mnt_t *zm) +zfs_remount(struct super_block *sb, vfs_t *vfsp, int flags) { zfsvfs_t *zfsvfs = sb->s_fs_info; - vfs_t *vfsp; boolean_t issnap = dmu_objset_is_snapshot(zfsvfs->z_os); - int error; if ((issnap || !spa_writeable(dmu_objset_spa(zfsvfs->z_os))) && - !(*flags & SB_RDONLY)) { - *flags |= SB_RDONLY; + !(flags & SB_RDONLY)) return (EROFS); - } - error = zfsvfs_parse_options(zm->mnt_data, &vfsp); - if (error) - return (error); - - if (!zfs_is_readonly(zfsvfs) && (*flags & SB_RDONLY)) + if (!zfs_is_readonly(zfsvfs) && (flags & SB_RDONLY)) txg_wait_synced(dmu_objset_pool(zfsvfs->z_os), 0); zfs_unregister_callbacks(zfsvfs); @@ -1641,7 +1513,7 @@ if (!issnap) (void) zfs_register_callbacks(vfsp); - return (error); + return (0); } int @@ -1783,6 +1655,24 @@ } /* + * Return a referenced znode at or after zp. The z_znodes_lock protects the + * list walk; the returned inode reference keeps the znode alive after the + * lock is dropped for zfs_rezget(). + */ +static znode_t * +zfs_resume_hold_next_znode(zfsvfs_t *zfsvfs, znode_t *zp) +{ + ASSERT(MUTEX_HELD(&zfsvfs->z_znodes_lock)); + + for (; zp != NULL; zp = list_next(&zfsvfs->z_all_znodes, zp)) { + if (igrab(ZTOI(zp)) != NULL) + return (zp); + } + + return (NULL); +} + +/* * Rebuild SA and release VOPs. Note that ownership of the underlying dataset * is an invariant across any of the operations that can be performed while the * filesystem was suspended. Whether it succeeded or failed, the preconditions @@ -1825,13 +1715,23 @@ * dbufs. If a zfs_rezget() fails, then we unhash the inode * and mark it stale. This prevents a collision if a new * inode/object is created which must use the same inode - * number. The stale inode will be be released when the - * VFS prunes the dentry holding the remaining references - * on the stale inode. + * number. The stale inode will be released when the VFS + * prunes the dentry holding the remaining references on + * the stale inode. + * + * zfs_rezget() takes the per-object znode hold lock. Pin each znode + * while holding z_znodes_lock, then drop the list lock before calling + * zfs_rezget() to preserve the normal zh_lock -> z_znodes_lock order. */ mutex_enter(&zfsvfs->z_znodes_lock); - for (zp = list_head(&zfsvfs->z_all_znodes); zp; - zp = list_next(&zfsvfs->z_all_znodes, zp)) { + zp = zfs_resume_hold_next_znode(zfsvfs, + list_head(&zfsvfs->z_all_znodes)); + while (zp != NULL) { + znode_t *next = zfs_resume_hold_next_znode(zfsvfs, + list_next(&zfsvfs->z_all_znodes, zp)); + + mutex_exit(&zfsvfs->z_znodes_lock); + err2 = zfs_rezget(zp); if (err2) { zpl_d_drop_aliases(ZTOI(zp)); @@ -1840,9 +1740,14 @@ /* see comment in zfs_suspend_fs() */ if (zp->z_suspended) { - zfs_zrele_async(zp); zp->z_suspended = B_FALSE; + zfs_zrele_async(zp); } + + zfs_zrele_async(zp); + + mutex_enter(&zfsvfs->z_znodes_lock); + zp = next; } mutex_exit(&zfsvfs->z_znodes_lock); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zfs_vnops_os.c zfs-linux-2.3.9/module/os/linux/zfs/zfs_vnops_os.c --- zfs-linux-2.3.2/module/os/linux/zfs/zfs_vnops_os.c 2025-05-01 18:45:25.406124393 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zfs_vnops_os.c 2026-08-21 21:15:50.772499475 +0000 @@ -25,12 +25,12 @@ * Copyright (c) 2012, 2018 by Delphix. All rights reserved. * Copyright (c) 2015 by Chunwei Chen. All rights reserved. * Copyright 2017 Nexenta Systems, Inc. + * Copyright (c) 2025, Klara, Inc. */ /* Portions Copyright 2007 Jeremy Teo */ /* Portions Copyright 2010 Robert Milkowski */ - #include #include #include @@ -283,6 +283,13 @@ * When a file is memory mapped, we must keep the I/O data synchronized * between the DMU cache and the memory mapped pages. Preferentially read * from memory mapped pages, otherwise fallback to reading through the dmu. + * + * A run of non-resident pages is read from the DMU in a single call rather + * than one call per page. A page may become resident between the lookup + * and the read, but that is safe: zfs_read() holds the rangelock as reader, + * so the DMU contents of the range are stable (writes, writeback and + * truncation take the writer lock) and a concurrently faulted page is + * filled by zfs_getpage() from those same contents. */ int mappedread(znode_t *zp, int nbytes, zfs_uio_t *uio) @@ -328,6 +335,20 @@ mark_page_accessed(pp); put_page(pp); } else { + /* + * Extend the read over any following non-resident + * pages so they are fetched in one DMU call. + */ + while (bytes < len) { + struct page *tp = find_get_page(mp, + (start + PAGE_SIZE) >> PAGE_SHIFT); + if (tp != NULL) { + put_page(tp); + break; + } + bytes += MIN(PAGE_SIZE, len - bytes); + start += PAGE_SIZE; + } error = dmu_read_uio_dbuf(sa_get_db(zp->z_sa_hdl), uio, bytes); } @@ -2435,9 +2456,13 @@ &zp->z_pflags, sizeof (zp->z_pflags)); if (attrzp) { + /* + * attrzp is zp's hidden xattr directory, so the second + * znode lock acquisition is nested rather than recursive. + */ if (mask & (ATTR_UID|ATTR_GID|ATTR_MODE)) - mutex_enter(&attrzp->z_acl_lock); - mutex_enter(&attrzp->z_lock); + mutex_enter_nested(&attrzp->z_acl_lock, NESTED_SINGLE); + mutex_enter_nested(&attrzp->z_lock, NESTED_SINGLE); SA_ADD_BULK_ATTR(xattr_bulk, xattr_count, SA_ZPL_FLAGS(zfsvfs), NULL, &attrzp->z_pflags, sizeof (attrzp->z_pflags)); @@ -3515,7 +3540,8 @@ boolean_t is_tmpfile = 0; uint64_t txg; - is_tmpfile = (sip->i_nlink == 0 && (sip->i_state & I_LINKABLE)); + is_tmpfile = (sip->i_nlink == 0 && + (inode_state_read_once(sip) & I_LINKABLE)); ASSERT(S_ISDIR(ZTOI(tdzp)->i_mode)); @@ -3682,7 +3708,7 @@ } static void -zfs_putpage_sync_commit_cb(void *arg) +zfs_putpage_commit_cb(void *arg) { struct page *pp = arg; @@ -3690,17 +3716,6 @@ end_page_writeback(pp); } -static void -zfs_putpage_async_commit_cb(void *arg) -{ - struct page *pp = arg; - znode_t *zp = ITOZ(pp->mapping->host); - - ClearPageError(pp); - end_page_writeback(pp); - atomic_dec_32(&zp->z_async_writes_cnt); -} - /* * Push a page out to disk, once the page is on stable storage the * registered commit callback will be run as notification of completion. @@ -3818,15 +3833,6 @@ zfs_rangelock_exit(lr); if (wbc->sync_mode != WB_SYNC_NONE) { - /* - * Speed up any non-sync page writebacks since - * they may take several seconds to complete. - * Refer to the comment in zpl_fsync() for details. - */ - if (atomic_load_32(&zp->z_async_writes_cnt) > 0) { - zil_commit(zfsvfs->z_log, zp->z_id); - } - if (PageWriteback(pp)) #ifdef HAVE_PAGEMAP_FOLIO_WAIT_BIT folio_wait_bit(page_folio(pp), PG_writeback); @@ -3852,8 +3858,6 @@ * was in fact not skipped and should not be counted as if it were. */ wbc->pages_skipped--; - if (!for_sync) - atomic_inc_32(&zp->z_async_writes_cnt); set_page_writeback(pp); unlock_page(pp); @@ -3872,8 +3876,6 @@ #endif ClearPageError(pp); end_page_writeback(pp); - if (!for_sync) - atomic_dec_32(&zp->z_async_writes_cnt); zfs_rangelock_exit(lr); zfs_exit(zfsvfs, FTAG); return (err); @@ -3899,35 +3901,61 @@ err = sa_bulk_update(zp->z_sa_hdl, bulk, cnt, tx); - boolean_t commit = B_FALSE; - if (wbc->sync_mode != WB_SYNC_NONE) { - /* - * Note that this is rarely called under writepages(), because - * writepages() normally handles the entire commit for - * performance reasons. - */ - commit = B_TRUE; - } else if (!for_sync && atomic_load_32(&zp->z_sync_writes_cnt) > 0) { - /* - * If the caller does not intend to wait synchronously - * for this page writeback to complete and there are active - * synchronous calls on this file, do a commit so that - * the latter don't accidentally end up waiting for - * our writeback to complete. Refer to the comment in - * zpl_fsync() (when HAVE_FSYNC_RANGE is defined) for details. - */ - commit = B_TRUE; - } + /* + * A note about for_sync vs wbc->sync_mode. + * + * for_sync indicates that this is a syncing writeback, that is, kernel + * caller expects the data to be durably stored before being notified. + * Often, but not always, the call was triggered by a userspace syncing + * op (eg fsync(), msync(MS_SYNC)). For our purposes, for_sync==TRUE + * means that that page should remain "locked" (in the writeback state) + * until it is definitely on disk (ie zil_commit() or spa_sync()). + * Otherwise, we can unlock and return as soon as it is on the + * in-memory ZIL. + * + * wbc->sync_mode has similar meaning. wbc is passed from the kernel to + * zpl_writepages()/zpl_writepage(); wbc->sync_mode==WB_SYNC_NONE + * indicates this a regular async writeback (eg a cache eviction) and + * so does not need a durability guarantee, while WB_SYNC_ALL indicates + * a syncing op that must be waited on (by convention, we test for + * !WB_SYNC_NONE rather than WB_SYNC_ALL, to prefer durability over + * performance should there ever be a new mode that we have not yet + * added support for). + * + * So, why a separate for_sync field? This is because zpl_writepages() + * calls zfs_putpage() multiple times for a single "logical" operation. + * It wants all the individual pages to be for_sync==TRUE ie only + * unlocked once durably stored, but it only wants one call to + * zil_commit() at the very end, once all the pages are synced. So, + * it repurposes sync_mode slightly to indicate who issue and wait for + * the IO: for NONE, the caller to zfs_putpage() will do it, while for + * ALL, zfs_putpage should do it. + * + * Summary: + * for_sync: 0=unlock immediately; 1 unlock once on disk + * sync_mode: NONE=caller will commit; ALL=we will commit + */ + boolean_t need_commit = (wbc->sync_mode != WB_SYNC_NONE); + + /* + * We use for_sync as the "commit" arg to zfs_log_write() (arg 7) + * because it is a policy flag that indicates "someone will call + * zil_commit() soon". for_sync=TRUE means exactly that; the only + * question is whether it will be us, or zpl_writepages(). + */ + zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, pgoff, pglen, for_sync, + B_FALSE, for_sync ? zfs_putpage_commit_cb : NULL, pp); - zfs_log_write(zfsvfs->z_log, tx, TX_WRITE, zp, pgoff, pglen, commit, - B_FALSE, for_sync ? zfs_putpage_sync_commit_cb : - zfs_putpage_async_commit_cb, pp); + if (!for_sync) { + ClearPageError(pp); + end_page_writeback(pp); + } dmu_tx_commit(tx); zfs_rangelock_exit(lr); - if (commit) + if (need_commit) zil_commit(zfsvfs->z_log, zp->z_id); dataset_kstats_update_write_kstats(&zfsvfs->z_kstat, pglen); @@ -4016,18 +4044,32 @@ { znode_t *zp = ITOZ(ip); zfsvfs_t *zfsvfs = ITOZSB(ip); + krwlock_t *zti_lock = &zfsvfs->z_teardown_inactive_lock; uint64_t atime[2]; int error; int need_unlock = 0; + boolean_t no_lockdep = B_FALSE; /* Only read lock if we haven't already write locked, e.g. rollback */ - if (!RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)) { + if (!RW_WRITE_HELD(zti_lock)) { need_unlock = 1; - rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); + /* + * kswapd reaches evict_inode() with fs_reclaim held. Suppress + * lockdep only for this reclaim-thread acquire/release pair. + */ + no_lockdep = current_is_reclaim_thread(); + if (no_lockdep) + rw_enter_nolockdep(zti_lock, RW_READER); + else + rw_enter(zti_lock, RW_READER); } if (zp->z_sa_hdl == NULL) { - if (need_unlock) - rw_exit(&zfsvfs->z_teardown_inactive_lock); + if (need_unlock) { + if (no_lockdep) + rw_exit_nolockdep(zti_lock); + else + rw_exit(zti_lock); + } return; } @@ -4053,8 +4095,12 @@ } zfs_zinactive(zp); - if (need_unlock) - rw_exit(&zfsvfs->z_teardown_inactive_lock); + if (need_unlock) { + if (no_lockdep) + rw_exit_nolockdep(zti_lock); + else + rw_exit(zti_lock); + } } /* @@ -4069,7 +4115,18 @@ u_offset_t io_off = page_offset(pp); size_t io_len = PAGE_SIZE; - ASSERT3U(io_off, <, i_size); + /* + * The page may be faulted in after the file has been truncated. + * There is no data to read; just zero-fill the page. + */ + if (io_off >= i_size) { + void *zva = kmap(pp); + memset(zva, 0, PAGE_SIZE); + kunmap(pp); + ClearPageError(pp); + SetPageUptodate(pp); + return (0); + } if (io_off + io_len > i_size) io_len = i_size - io_off; @@ -4120,9 +4177,14 @@ if ((error = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0) return (error); - ASSERT3U(io_off, <, i_size); - - if (io_off + io_len > i_size) + /* + * If the page lies entirely at or beyond EOF (e.g. it raced a + * truncate) just lock the page and let zfs_fillpage() re-check + * i_size under the range lock and zero-fill it. + */ + if (io_off >= i_size) + io_len = PAGE_SIZE; + else if (io_off + io_len > i_size) io_len = i_size - io_off; /* diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zfs_znode_os.c zfs-linux-2.3.9/module/os/linux/zfs/zfs_znode_os.c --- zfs-linux-2.3.2/module/os/linux/zfs/zfs_znode_os.c 2025-05-01 18:45:25.410124471 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zfs_znode_os.c 2026-08-21 21:15:50.774499451 +0000 @@ -60,6 +60,9 @@ #include #include #include +#ifdef CONFIG_FS_POSIX_ACL +#include +#endif #include "zfs_prop.h" #include "zfs_comutil.h" @@ -126,8 +129,6 @@ zp->z_acl_cached = NULL; zp->z_xattr_cached = NULL; zp->z_xattr_parent = 0; - zp->z_sync_writes_cnt = 0; - zp->z_async_writes_cnt = 0; return (0); } @@ -149,9 +150,6 @@ ASSERT3P(zp->z_dirlocks, ==, NULL); ASSERT3P(zp->z_acl_cached, ==, NULL); ASSERT3P(zp->z_xattr_cached, ==, NULL); - - ASSERT0(atomic_load_32(&zp->z_sync_writes_cnt)); - ASSERT0(atomic_load_32(&zp->z_async_writes_cnt)); } static int @@ -371,6 +369,12 @@ return (0); } +void +zfs_inode_free(struct inode *ip) +{ + kmem_cache_free(znode_cache, ITOZ(ip)); +} + /* * Called in multiple places when an inode should be destroyed. */ @@ -395,8 +399,15 @@ nvlist_free(zp->z_xattr_cached); zp->z_xattr_cached = NULL; } - - kmem_cache_free(znode_cache, zp); +#ifndef HAVE_SOPS_FREE_INODE + /* + * inode needs to be freed in RCU callback. If we have + * super_operations->free_inode, Linux kernel will do call_rcu + * for us. But if we don't have it, since call_rcu is GPL-only + * symbol, we can only free synchronously and accept the risk. + */ + zfs_inode_free(ip); +#endif } static void @@ -535,8 +546,6 @@ zp->z_blksz = blksz; zp->z_seq = 0x7A4653; zp->z_sync_cnt = 0; - zp->z_sync_writes_cnt = 0; - zp->z_async_writes_cnt = 0; zfs_znode_sa_init(zfsvfs, zp, db, obj_type, hdl); @@ -1187,6 +1196,12 @@ } mutex_exit(&zp->z_acl_lock); +#ifdef CONFIG_FS_POSIX_ACL + /* The VFS cache can still describe the pre-rollback inode. */ + forget_cached_acl(ZTOI(zp), ACL_TYPE_ACCESS); + forget_cached_acl(ZTOI(zp), ACL_TYPE_DEFAULT); +#endif + rw_enter(&zp->z_xattr_lock, RW_WRITER); if (zp->z_xattr_cached) { nvlist_free(zp->z_xattr_cached); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zpl_ctldir.c zfs-linux-2.3.9/module/os/linux/zfs/zpl_ctldir.c --- zfs-linux-2.3.2/module/os/linux/zfs/zpl_ctldir.c 2025-05-01 18:45:25.417124606 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zpl_ctldir.c 2026-08-21 21:15:50.779499392 +0000 @@ -185,10 +185,10 @@ } /* - * Negative dentries must always be revalidated so newly created snapshots - * can be detected and automounted. Normal dentries should be kept because - * as of the 3.18 kernel revaliding the mountpoint dentry will result in - * the snapshot being immediately unmounted. + * Negative dentries must always be revalidated so newly created snapshots can + * be detected and automounted. Normal dentries should be kept because + * revalidating the mountpoint dentry will result in the snapshot being + * immediately unmounted. */ #ifdef HAVE_D_REVALIDATE_4ARGS static int @@ -202,19 +202,56 @@ return (!!dentry->d_inode); } -static dentry_operations_t zpl_dops_snapdirs = { -/* - * Auto mounting of snapshots is only supported for 2.6.37 and - * newer kernels. Prior to this kernel the ops->follow_link() - * callback was used as a hack to trigger the mount. The - * resulting vfsmount was then explicitly grafted in to the - * name space. While it might be possible to add compatibility - * code to accomplish this it would require considerable care. - */ +static const struct dentry_operations zpl_dops_snapdirs = { .d_automount = zpl_snapdir_automount, .d_revalidate = zpl_snapdir_revalidate, }; +/* + * For the .zfs control directory to work properly we must be able to override + * the default operations table and register custom .d_automount and + * .d_revalidate callbacks. + */ +static void +set_snapdir_dentry_ops(struct dentry *dentry, unsigned int extraflags) { + static const unsigned int op_flags = + DCACHE_OP_HASH | DCACHE_OP_COMPARE | + DCACHE_OP_REVALIDATE | DCACHE_OP_DELETE | + DCACHE_OP_PRUNE | DCACHE_OP_WEAK_REVALIDATE | DCACHE_OP_REAL; + +#ifdef HAVE_D_SET_D_OP + /* + * d_set_d_op() will set the DCACHE_OP_ flags according to what it + * finds in the passed dentry_operations, so we don't have to. + * + * We clear the flags and the old op table before calling d_set_d_op() + * because issues a warning when the dentry operations table is already + * set. + */ + dentry->d_op = NULL; + dentry->d_flags &= ~op_flags; + d_set_d_op(dentry, &zpl_dops_snapdirs); + dentry->d_flags |= extraflags; +#else + /* + * Since 6.17 there's no exported way to modify dentry ops, so we have + * to reach in and do it ourselves. This should be safe for our very + * narrow use case, which is to create or splice in an entry to give + * access to a snapshot. + * + * We need to set the op flags directly. We hardcode + * DCACHE_OP_REVALIDATE because that's the only operation we have; if + * we ever extend zpl_dops_snapdirs we will need to update the op flags + * to match. + */ + spin_lock(&dentry->d_lock); + dentry->d_op = &zpl_dops_snapdirs; + dentry->d_flags &= ~op_flags; + dentry->d_flags |= DCACHE_OP_REVALIDATE | extraflags; + spin_unlock(&dentry->d_lock); +#endif +} + static struct dentry * zpl_snapdir_lookup(struct inode *dip, struct dentry *dentry, unsigned int flags) @@ -236,10 +273,7 @@ return (ERR_PTR(error)); ASSERT(error == 0 || ip == NULL); - d_clear_d_op(dentry); - d_set_d_op(dentry, &zpl_dops_snapdirs); - dentry->d_flags |= DCACHE_NEED_AUTOMOUNT; - + set_snapdir_dentry_ops(dentry, DCACHE_NEED_AUTOMOUNT); return (d_splice_alias(ip, dentry)); } @@ -288,15 +322,15 @@ static int #ifdef HAVE_IOPS_RENAME_USERNS -zpl_snapdir_rename2(struct user_namespace *user_ns, struct inode *sdip, +zpl_snapdir_rename(struct user_namespace *user_ns, struct inode *sdip, struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry, unsigned int flags) #elif defined(HAVE_IOPS_RENAME_IDMAP) -zpl_snapdir_rename2(struct mnt_idmap *user_ns, struct inode *sdip, +zpl_snapdir_rename(struct mnt_idmap *user_ns, struct inode *sdip, struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry, unsigned int flags) #else -zpl_snapdir_rename2(struct inode *sdip, struct dentry *sdentry, +zpl_snapdir_rename(struct inode *sdip, struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry, unsigned int flags) #endif { @@ -316,17 +350,6 @@ return (error); } -#if (!defined(HAVE_RENAME_WANTS_FLAGS) && \ - !defined(HAVE_IOPS_RENAME_USERNS) && \ - !defined(HAVE_IOPS_RENAME_IDMAP)) -static int -zpl_snapdir_rename(struct inode *sdip, struct dentry *sdentry, - struct inode *tdip, struct dentry *tdentry) -{ - return (zpl_snapdir_rename2(sdip, sdentry, tdip, tdentry, 0)); -} -#endif - static int zpl_snapdir_rmdir(struct inode *dip, struct dentry *dentry) { @@ -341,14 +364,20 @@ return (error); } +#if defined(HAVE_IOPS_MKDIR_USERNS) static int -#ifdef HAVE_IOPS_MKDIR_USERNS zpl_snapdir_mkdir(struct user_namespace *user_ns, struct inode *dip, struct dentry *dentry, umode_t mode) #elif defined(HAVE_IOPS_MKDIR_IDMAP) +static int +zpl_snapdir_mkdir(struct mnt_idmap *user_ns, struct inode *dip, + struct dentry *dentry, umode_t mode) +#elif defined(HAVE_IOPS_MKDIR_DENTRY) +static struct dentry * zpl_snapdir_mkdir(struct mnt_idmap *user_ns, struct inode *dip, struct dentry *dentry, umode_t mode) #else +static int zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode) #endif { @@ -367,8 +396,7 @@ error = -zfsctl_snapdir_mkdir(dip, dname(dentry), vap, &ip, cr, 0); if (error == 0) { - d_clear_d_op(dentry); - d_set_d_op(dentry, &zpl_dops_snapdirs); + set_snapdir_dentry_ops(dentry, 0); d_instantiate(dentry, ip); } @@ -376,7 +404,11 @@ ASSERT3S(error, <=, 0); crfree(cr); +#if defined(HAVE_IOPS_MKDIR_DENTRY) + return (ERR_PTR(error)); +#else return (error); +#endif } /* @@ -461,13 +493,7 @@ const struct inode_operations zpl_ops_snapdir = { .lookup = zpl_snapdir_lookup, .getattr = zpl_snapdir_getattr, -#if (defined(HAVE_RENAME_WANTS_FLAGS) || \ - defined(HAVE_IOPS_RENAME_USERNS) || \ - defined(HAVE_IOPS_RENAME_IDMAP)) - .rename = zpl_snapdir_rename2, -#else .rename = zpl_snapdir_rename, -#endif .rmdir = zpl_snapdir_rmdir, .mkdir = zpl_snapdir_mkdir, }; diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zpl_file.c zfs-linux-2.3.9/module/os/linux/zfs/zpl_file.c --- zfs-linux-2.3.2/module/os/linux/zfs/zpl_file.c 2025-05-01 18:45:25.424124741 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zpl_file.c 2026-08-21 21:15:50.784499333 +0000 @@ -22,6 +22,7 @@ /* * Copyright (c) 2011, Lawrence Livermore National Security, LLC. * Copyright (c) 2015 by Chunwei Chen. All rights reserved. + * Copyright (c) 2025, Rob Norris */ @@ -36,14 +37,14 @@ #include #include #include -#if defined(HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS) || \ - defined(HAVE_VFS_FILEMAP_DIRTY_FOLIO) -#include -#endif +#include #include #ifdef HAVE_VFS_FILEMAP_DIRTY_FOLIO #include #endif +#ifdef HAVE_FILELOCK_HEADER +#include +#endif /* * When using fallocate(2) to preallocate space, inflate the requested @@ -114,52 +115,11 @@ { struct inode *inode = filp->f_mapping->host; znode_t *zp = ITOZ(inode); - zfsvfs_t *zfsvfs = ITOZSB(inode); cred_t *cr = CRED(); int error; fstrans_cookie_t cookie; - /* - * The variables z_sync_writes_cnt and z_async_writes_cnt work in - * tandem so that sync writes can detect if there are any non-sync - * writes going on and vice-versa. The "vice-versa" part to this logic - * is located in zfs_putpage() where non-sync writes check if there are - * any ongoing sync writes. If any sync and non-sync writes overlap, - * we do a commit to complete the non-sync writes since the latter can - * potentially take several seconds to complete and thus block sync - * writes in the upcoming call to filemap_write_and_wait_range(). - */ - atomic_inc_32(&zp->z_sync_writes_cnt); - /* - * If the following check does not detect an overlapping non-sync write - * (say because it's just about to start), then it is guaranteed that - * the non-sync write will detect this sync write. This is because we - * always increment z_sync_writes_cnt / z_async_writes_cnt before doing - * the check on z_async_writes_cnt / z_sync_writes_cnt here and in - * zfs_putpage() respectively. - */ - if (atomic_load_32(&zp->z_async_writes_cnt) > 0) { - if ((error = zpl_enter(zfsvfs, FTAG)) != 0) { - atomic_dec_32(&zp->z_sync_writes_cnt); - return (error); - } - zil_commit(zfsvfs->z_log, zp->z_id); - zpl_exit(zfsvfs, FTAG); - } - error = filemap_write_and_wait_range(inode->i_mapping, start, end); - - /* - * The sync write is not complete yet but we decrement - * z_sync_writes_cnt since zfs_fsync() increments and decrements - * it internally. If a non-sync write starts just after the decrement - * operation but before we call zfs_fsync(), it may not detect this - * overlapping sync write but it does not matter since we have already - * gone past filemap_write_and_wait_range() and we won't block due to - * the non-sync write. - */ - atomic_dec_32(&zp->z_sync_writes_cnt); - if (error) return (error); @@ -226,7 +186,7 @@ ssize_t count = iov_iter_count(to); zfs_uio_t uio; - zfs_uio_iov_iter_init(&uio, to, kiocb->ki_pos, count, 0); + zfs_uio_iov_iter_init(&uio, to, kiocb->ki_pos, count); crhold(cr); cookie = spl_fstrans_mark(); @@ -276,8 +236,7 @@ if (ret) return (ret); - zfs_uio_iov_iter_init(&uio, from, kiocb->ki_pos, count, - from->iov_offset); + zfs_uio_iov_iter_init(&uio, from, kiocb->ki_pos, count); crhold(cr); cookie = spl_fstrans_mark(); @@ -489,6 +448,7 @@ return (ret); } +#ifdef HAVE_WRITE_CACHE_PAGES #ifdef HAVE_WRITEPAGE_T_FOLIO static int zpl_putfolio(struct folio *pp, struct writeback_control *wbc, void *data) @@ -510,6 +470,78 @@ #endif return (result); } +#else +static inline int +zpl_write_cache_pages(struct address_space *mapping, + struct writeback_control *wbc, void *data) +{ + pgoff_t start = wbc->range_start >> PAGE_SHIFT; + pgoff_t end = wbc->range_end >> PAGE_SHIFT; + + struct folio_batch fbatch; + folio_batch_init(&fbatch); + + /* + * This atomically (-ish) tags all DIRTY pages in the range with + * TOWRITE, allowing users to continue dirtying or undirtying pages + * while we get on with writeback, without us treading on each other. + */ + tag_pages_for_writeback(mapping, start, end); + + int err = 0; + unsigned int npages; + + /* + * Grab references to the TOWRITE pages just flagged. This may not get + * all of them, so we do it in a loop until there are none left. + */ + while ((npages = filemap_get_folios_tag(mapping, &start, end, + PAGECACHE_TAG_TOWRITE, &fbatch)) != 0) { + + /* Loop over each page and write it out. */ + struct folio *folio; + while ((folio = folio_batch_next(&fbatch)) != NULL) { + folio_lock(folio); + + /* + * If the folio has been remapped, or is no longer + * dirty, then there's nothing to do. + */ + if (folio->mapping != mapping || + !folio_test_dirty(folio)) { + folio_unlock(folio); + continue; + } + + /* + * If writeback is already in progress, wait for it to + * finish. We continue after this even if the page + * ends up clean; zfs_putpage() will skip it if no + * further work is required. + */ + while (folio_test_writeback(folio)) + folio_wait_bit(folio, PG_writeback); + + /* + * Write it out and collect any error. zfs_putpage() + * will clear the TOWRITE and DIRTY flags, and return + * with the page unlocked. + */ + int ferr = zpl_putpage(&folio->page, wbc, data); + if (err == 0 && ferr != 0) + err = ferr; + + /* Housekeeping for the caller. */ + wbc->nr_to_write -= folio_nr_pages(folio); + } + + /* Release any remaining references on the batch. */ + folio_batch_release(&fbatch); + } + + return (err); +} +#endif static int zpl_writepages(struct address_space *mapping, struct writeback_control *wbc) @@ -556,6 +588,7 @@ return (result); } +#ifdef HAVE_VFS_WRITEPAGE /* * Write out dirty pages to the ARC, this function is only required to * support mmap(2). Mapped pages may be dirtied by memory operations @@ -572,6 +605,7 @@ return (zpl_putpage(pp, wbc, &for_sync)); } +#endif /* * The flag combination which matches the behavior of zfs_space() is @@ -586,6 +620,8 @@ zpl_fallocate_common(struct inode *ip, int mode, loff_t offset, loff_t len) { cred_t *cr = CRED(); + znode_t *zp = ITOZ(ip); + zfsvfs_t *zfsvfs = ITOZSB(ip); loff_t olen; fstrans_cookie_t cookie; int error = 0; @@ -619,7 +655,7 @@ bf.l_len = len; bf.l_pid = 0; - error = -zfs_space(ITOZ(ip), F_FREESP, &bf, O_RDWR, offset, cr); + error = -zfs_space(zp, F_FREESP, &bf, O_RDWR, offset, cr); } else if ((mode & ~FALLOC_FL_KEEP_SIZE) == 0) { unsigned int percent = zfs_fallocate_reserve_percent; struct kstatfs statfs; @@ -634,7 +670,7 @@ * Use zfs_statvfs() instead of dmu_objset_space() since it * also checks project quota limits, which are relevant here. */ - error = zfs_statvfs(ip, &statfs); + error = -zfs_statvfs(ip, &statfs); if (error) goto out_unmark; @@ -647,8 +683,19 @@ error = -ENOSPC; goto out_unmark; } - if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > olen) - error = zfs_freesp(ITOZ(ip), offset + len, 0, 0, FALSE); + if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > olen) { + error = zpl_enter_verify_zp(zfsvfs, zp, FTAG); + if (error) + goto out_unmark; + + /* + * extend file: log=TRUE drives z_seq bump, + * mtime/ctime advance, and TX_TRUNCATE ZIL + * record; matches zfs_space(). + */ + error = -zfs_freesp(zp, offset + len, 0, 0, TRUE); + zfs_exit(zfsvfs, FTAG); + } } out_unmark: spl_fstrans_unmark(cookie); @@ -692,63 +739,62 @@ if ((error = zpl_enter_verify_zp(zfsvfs, zp, FTAG)) != 0) return (error); - switch (advice) { - case POSIX_FADV_SEQUENTIAL: - case POSIX_FADV_WILLNEED: -#ifdef HAVE_GENERIC_FADVISE - if (zn_has_cached_data(zp, offset, offset + len - 1)) - error = generic_fadvise(filp, offset, len, advice); -#endif - /* - * Pass on the caller's size directly, but note that - * dmu_prefetch_max will effectively cap it. If there - * really is a larger sequential access pattern, perhaps - * dmu_zfetch will detect it. - */ - if (len == 0) - len = i_size_read(ip) - offset; - - dmu_prefetch(os, zp->z_id, 0, offset, len, + if (advice == POSIX_FADV_WILLNEED) { + loff_t rlen = len ? len : i_size_read(ip) - offset; + dmu_prefetch(os, zp->z_id, 0, offset, rlen, ZIO_PRIORITY_ASYNC_READ); - break; - case POSIX_FADV_NORMAL: - case POSIX_FADV_RANDOM: - case POSIX_FADV_DONTNEED: - case POSIX_FADV_NOREUSE: - /* ignored for now */ - break; - default: - error = -EINVAL; - break; + if (!zn_has_cached_data(zp, offset, offset + rlen - 1)) { + zfs_exit(zfsvfs, FTAG); + return (error); + } } zfs_exit(zfsvfs, FTAG); +#ifdef HAVE_GENERIC_FADVISE + error = generic_fadvise(filp, offset, len, advice); +#endif return (error); } -#define ZFS_FL_USER_VISIBLE (FS_FL_USER_VISIBLE | ZFS_PROJINHERIT_FL) -#define ZFS_FL_USER_MODIFIABLE (FS_FL_USER_MODIFIABLE | ZFS_PROJINHERIT_FL) +#define ZFS_FL_USER_VISIBLE (FS_FL_USER_VISIBLE | FS_PROJINHERIT_FL) +#define ZFS_FL_USER_MODIFIABLE (FS_FL_USER_MODIFIABLE | FS_PROJINHERIT_FL) + + +static struct { + uint64_t zfs_flag; + uint32_t fs_flag; + uint32_t xflag; +} flags_lookup[] = { + {ZFS_IMMUTABLE, FS_IMMUTABLE_FL, FS_XFLAG_IMMUTABLE}, + {ZFS_APPENDONLY, FS_APPEND_FL, FS_XFLAG_APPEND}, + {ZFS_NODUMP, FS_NODUMP_FL, FS_XFLAG_NODUMP}, + {ZFS_PROJINHERIT, FS_PROJINHERIT_FL, FS_XFLAG_PROJINHERIT} +}; static uint32_t __zpl_ioctl_getflags(struct inode *ip) { uint64_t zfs_flags = ITOZ(ip)->z_pflags; uint32_t ioctl_flags = 0; + for (int i = 0; i < ARRAY_SIZE(flags_lookup); i++) + if (zfs_flags & flags_lookup[i].zfs_flag) + ioctl_flags |= flags_lookup[i].fs_flag; - if (zfs_flags & ZFS_IMMUTABLE) - ioctl_flags |= FS_IMMUTABLE_FL; - - if (zfs_flags & ZFS_APPENDONLY) - ioctl_flags |= FS_APPEND_FL; + return (ioctl_flags); +} - if (zfs_flags & ZFS_NODUMP) - ioctl_flags |= FS_NODUMP_FL; +static uint32_t +__zpl_ioctl_getxflags(struct inode *ip) +{ + uint64_t zfs_flags = ITOZ(ip)->z_pflags; + uint32_t ioctl_flags = 0; - if (zfs_flags & ZFS_PROJINHERIT) - ioctl_flags |= ZFS_PROJINHERIT_FL; + for (int i = 0; i < ARRAY_SIZE(flags_lookup); i++) + if (zfs_flags & flags_lookup[i].zfs_flag) + ioctl_flags |= flags_lookup[i].xflag; - return (ioctl_flags & ZFS_FL_USER_VISIBLE); + return (ioctl_flags); } /* @@ -762,6 +808,7 @@ int err; flags = __zpl_ioctl_getflags(file_inode(filp)); + flags = flags & ZFS_FL_USER_VISIBLE; err = copy_to_user(arg, &flags, sizeof (flags)); return (err); @@ -785,7 +832,7 @@ xoptattr_t *xoap; if (ioctl_flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | FS_NODUMP_FL | - ZFS_PROJINHERIT_FL)) + FS_PROJINHERIT_FL)) return (-EOPNOTSUPP); if (ioctl_flags & ~ZFS_FL_USER_MODIFIABLE) @@ -816,7 +863,51 @@ xoap->xoa_appendonly); FLAG_CHANGE(FS_NODUMP_FL, ZFS_NODUMP, XAT_NODUMP, xoap->xoa_nodump); - FLAG_CHANGE(ZFS_PROJINHERIT_FL, ZFS_PROJINHERIT, XAT_PROJINHERIT, + FLAG_CHANGE(FS_PROJINHERIT_FL, ZFS_PROJINHERIT, XAT_PROJINHERIT, + xoap->xoa_projinherit); + +#undef FLAG_CHANGE + + return (0); +} + +static int +__zpl_ioctl_setxflags(struct inode *ip, uint32_t ioctl_flags, xvattr_t *xva) +{ + uint64_t zfs_flags = ITOZ(ip)->z_pflags; + xoptattr_t *xoap; + + if (ioctl_flags & ~(FS_XFLAG_IMMUTABLE | FS_XFLAG_APPEND | + FS_XFLAG_NODUMP | FS_XFLAG_PROJINHERIT)) + return (-EOPNOTSUPP); + + if ((fchange(ioctl_flags, zfs_flags, FS_XFLAG_IMMUTABLE, + ZFS_IMMUTABLE) || + fchange(ioctl_flags, zfs_flags, FS_XFLAG_APPEND, ZFS_APPENDONLY)) && + !capable(CAP_LINUX_IMMUTABLE)) + return (-EPERM); + + if (!zpl_inode_owner_or_capable(zfs_init_idmap, ip)) + return (-EACCES); + + xva_init(xva); + xoap = xva_getxoptattr(xva); + +#define FLAG_CHANGE(iflag, zflag, xflag, xfield) do { \ + if (((ioctl_flags & (iflag)) && !(zfs_flags & (zflag))) || \ + ((zfs_flags & (zflag)) && !(ioctl_flags & (iflag)))) { \ + XVA_SET_REQ(xva, (xflag)); \ + (xfield) = ((ioctl_flags & (iflag)) != 0); \ + } \ +} while (0) + + FLAG_CHANGE(FS_XFLAG_IMMUTABLE, ZFS_IMMUTABLE, XAT_IMMUTABLE, + xoap->xoa_immutable); + FLAG_CHANGE(FS_XFLAG_APPEND, ZFS_APPENDONLY, XAT_APPENDONLY, + xoap->xoa_appendonly); + FLAG_CHANGE(FS_XFLAG_NODUMP, ZFS_NODUMP, XAT_NODUMP, + xoap->xoa_nodump); + FLAG_CHANGE(FS_XFLAG_PROJINHERIT, ZFS_PROJINHERIT, XAT_PROJINHERIT, xoap->xoa_projinherit); #undef FLAG_CHANGE @@ -857,7 +948,7 @@ struct inode *ip = file_inode(filp); int err; - fsx.fsx_xflags = __zpl_ioctl_getflags(ip); + fsx.fsx_xflags = __zpl_ioctl_getxflags(ip); fsx.fsx_projid = ITOZ(ip)->z_projid; err = copy_to_user(arg, &fsx, sizeof (fsx)); @@ -881,7 +972,7 @@ if (!zpl_is_valid_projid(fsx.fsx_projid)) return (-EINVAL); - err = __zpl_ioctl_setflags(ip, fsx.fsx_xflags, &xva); + err = __zpl_ioctl_setxflags(ip, fsx.fsx_xflags, &xva); if (err) return (err); @@ -986,6 +1077,27 @@ return (err); } +static int +zpl_ioctl_rewrite(struct file *filp, void __user *arg) +{ + struct inode *ip = file_inode(filp); + zfs_rewrite_args_t args; + fstrans_cookie_t cookie; + int err; + + if (copy_from_user(&args, arg, sizeof (args))) + return (-EFAULT); + + if (unlikely(!(filp->f_mode & FMODE_WRITE))) + return (-EBADF); + + cookie = spl_fstrans_mark(); + err = -zfs_rewrite(ITOZ(ip), args.off, args.len, args.flags, args.arg); + spl_fstrans_unmark(cookie); + + return (err); +} + static long zpl_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { @@ -1004,12 +1116,8 @@ return (zpl_ioctl_getdosflags(filp, (void *)arg)); case ZFS_IOC_SETDOSFLAGS: return (zpl_ioctl_setdosflags(filp, (void *)arg)); - case ZFS_IOC_COMPAT_FICLONE: - return (zpl_ioctl_ficlone(filp, (void *)arg)); - case ZFS_IOC_COMPAT_FICLONERANGE: - return (zpl_ioctl_ficlonerange(filp, (void *)arg)); - case ZFS_IOC_COMPAT_FIDEDUPERANGE: - return (zpl_ioctl_fideduperange(filp, (void *)arg)); + case ZFS_IOC_REWRITE: + return (zpl_ioctl_rewrite(filp, (void *)arg)); default: return (-ENOTTY); } @@ -1047,7 +1155,9 @@ #else .readpage = zpl_readpage, #endif +#ifdef HAVE_VFS_WRITEPAGE .writepage = zpl_writepage, +#endif .writepages = zpl_writepages, .direct_IO = zpl_direct_IO, #ifdef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS @@ -1078,6 +1188,7 @@ .mmap = zpl_mmap, .fsync = zpl_fsync, .fallocate = zpl_fallocate, + .setlease = generic_setlease, .copy_file_range = zpl_copy_file_range, #ifdef HAVE_VFS_CLONE_FILE_RANGE .clone_file_range = zpl_clone_file_range, @@ -1100,6 +1211,7 @@ .read = generic_read_dir, .iterate_shared = zpl_iterate, .fsync = zpl_fsync, + .setlease = generic_setlease, .unlocked_ioctl = zpl_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = zpl_compat_ioctl, diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zpl_file_range.c zfs-linux-2.3.9/module/os/linux/zfs/zpl_file_range.c --- zfs-linux-2.3.2/module/os/linux/zfs/zpl_file_range.c 2025-05-01 18:45:25.427124799 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zpl_file_range.c 2026-08-21 21:15:50.786499309 +0000 @@ -212,85 +212,3 @@ return (-EOPNOTSUPP); } #endif /* HAVE_VFS_DEDUPE_FILE_RANGE */ - -/* Entry point for FICLONE, before Linux 4.5. */ -long -zpl_ioctl_ficlone(struct file *dst_file, void *arg) -{ - unsigned long sfd = (unsigned long)arg; - - struct file *src_file = fget(sfd); - if (src_file == NULL) - return (-EBADF); - - if (dst_file->f_op != src_file->f_op) { - fput(src_file); - return (-EXDEV); - } - - size_t len = i_size_read(file_inode(src_file)); - - ssize_t ret = zpl_clone_file_range_impl(src_file, 0, dst_file, 0, len); - - fput(src_file); - - if (ret < 0) { - if (ret == -EOPNOTSUPP) - return (-ENOTTY); - return (ret); - } - - if (ret != len) - return (-EINVAL); - - return (0); -} - -/* Entry point for FICLONERANGE, before Linux 4.5. */ -long -zpl_ioctl_ficlonerange(struct file *dst_file, void __user *arg) -{ - zfs_ioc_compat_file_clone_range_t fcr; - - if (copy_from_user(&fcr, arg, sizeof (fcr))) - return (-EFAULT); - - struct file *src_file = fget(fcr.fcr_src_fd); - if (src_file == NULL) - return (-EBADF); - - if (dst_file->f_op != src_file->f_op) { - fput(src_file); - return (-EXDEV); - } - - size_t len = fcr.fcr_src_length; - if (len == 0) - len = i_size_read(file_inode(src_file)) - fcr.fcr_src_offset; - - ssize_t ret = zpl_clone_file_range_impl(src_file, fcr.fcr_src_offset, - dst_file, fcr.fcr_dest_offset, len); - - fput(src_file); - - if (ret < 0) { - if (ret == -EOPNOTSUPP) - return (-ENOTTY); - return (ret); - } - - if (ret != len) - return (-EINVAL); - - return (0); -} - -/* Entry point for FIDEDUPERANGE, before Linux 4.5. */ -long -zpl_ioctl_fideduperange(struct file *filp, void *arg) -{ - (void) arg; - - /* No support for dedup yet */ - return (-ENOTTY); -} diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zpl_inode.c zfs-linux-2.3.9/module/os/linux/zfs/zpl_inode.c --- zfs-linux-2.3.2/module/os/linux/zfs/zpl_inode.c 2025-05-01 18:45:25.431124877 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zpl_inode.c 2026-08-21 21:15:50.789499273 +0000 @@ -374,14 +374,20 @@ return (error); } +#if defined(HAVE_IOPS_MKDIR_USERNS) static int -#ifdef HAVE_IOPS_MKDIR_USERNS zpl_mkdir(struct user_namespace *user_ns, struct inode *dir, struct dentry *dentry, umode_t mode) #elif defined(HAVE_IOPS_MKDIR_IDMAP) +static int +zpl_mkdir(struct mnt_idmap *user_ns, struct inode *dir, + struct dentry *dentry, umode_t mode) +#elif defined(HAVE_IOPS_MKDIR_DENTRY) +static struct dentry * zpl_mkdir(struct mnt_idmap *user_ns, struct inode *dir, struct dentry *dentry, umode_t mode) #else +static int zpl_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) #endif { @@ -390,12 +396,14 @@ znode_t *zp; int error; fstrans_cookie_t cookie; -#if !(defined(HAVE_IOPS_MKDIR_USERNS) || defined(HAVE_IOPS_MKDIR_IDMAP)) +#if !(defined(HAVE_IOPS_MKDIR_USERNS) || \ + defined(HAVE_IOPS_MKDIR_IDMAP) || defined(HAVE_IOPS_MKDIR_DENTRY)) zidmap_t *user_ns = kcred->user_ns; #endif if (is_nametoolong(dentry)) { - return (-ENAMETOOLONG); + error = -ENAMETOOLONG; + goto err; } crhold(cr); @@ -422,9 +430,14 @@ spl_fstrans_unmark(cookie); kmem_free(vap, sizeof (vattr_t)); crfree(cr); - ASSERT3S(error, <=, 0); +err: + ASSERT3S(error, <=, 0); +#if defined(HAVE_IOPS_MKDIR_DENTRY) + return (error != 0 ? ERR_PTR(error) : NULL); +#else return (error); +#endif } static int @@ -604,15 +617,15 @@ static int #ifdef HAVE_IOPS_RENAME_USERNS -zpl_rename2(struct user_namespace *user_ns, struct inode *sdip, +zpl_rename(struct user_namespace *user_ns, struct inode *sdip, struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry, unsigned int rflags) #elif defined(HAVE_IOPS_RENAME_IDMAP) -zpl_rename2(struct mnt_idmap *user_ns, struct inode *sdip, +zpl_rename(struct mnt_idmap *user_ns, struct inode *sdip, struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry, unsigned int rflags) #else -zpl_rename2(struct inode *sdip, struct dentry *sdentry, +zpl_rename(struct inode *sdip, struct dentry *sdentry, struct inode *tdip, struct dentry *tdentry, unsigned int rflags) #endif { @@ -647,17 +660,6 @@ return (error); } -#if !defined(HAVE_IOPS_RENAME_USERNS) && \ - !defined(HAVE_RENAME_WANTS_FLAGS) && \ - !defined(HAVE_IOPS_RENAME_IDMAP) -static int -zpl_rename(struct inode *sdip, struct dentry *sdentry, - struct inode *tdip, struct dentry *tdentry) -{ - return (zpl_rename2(sdip, sdentry, tdip, tdentry, 0)); -} -#endif - static int #ifdef HAVE_IOPS_SYMLINK_USERNS zpl_symlink(struct user_namespace *user_ns, struct inode *dir, @@ -822,13 +824,7 @@ .mkdir = zpl_mkdir, .rmdir = zpl_rmdir, .mknod = zpl_mknod, -#if defined(HAVE_RENAME_WANTS_FLAGS) || defined(HAVE_IOPS_RENAME_USERNS) - .rename = zpl_rename2, -#elif defined(HAVE_IOPS_RENAME_IDMAP) - .rename = zpl_rename2, -#else .rename = zpl_rename, -#endif .tmpfile = zpl_tmpfile, .setattr = zpl_setattr, .getattr = zpl_getattr, diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zpl_super.c zfs-linux-2.3.9/module/os/linux/zfs/zpl_super.c --- zfs-linux-2.3.2/module/os/linux/zfs/zpl_super.c 2025-05-01 18:45:25.434124935 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zpl_super.c 2026-08-21 21:15:50.791499249 +0000 @@ -22,6 +22,9 @@ /* * Copyright (c) 2011, Lawrence Livermore National Security, LLC. * Copyright (c) 2023, Datto Inc. All rights reserved. + * Copyright (c) 2025, Klara, Inc. + * Copyright (c) 2025, Rob Norris + * Copyright (c) 2026, TrueNAS. */ @@ -31,7 +34,25 @@ #include #include #include +#include +#include +#include +#include +/* + * What to do when the last reference to an inode is released. If 0, the kernel + * will cache it on the superblock. If 1, the inode will be freed immediately. + * See zpl_drop_inode(). + */ +int zfs_delete_inode = 0; + +/* + * What to do when the last reference to a dentry is released. If 0, the kernel + * will cache it until the entry (file) is destroyed. If 1, the dentry will be + * marked for cleanup, at which time its inode reference will be released. See + * zpl_dentry_delete(). + */ +int zfs_delete_dentry = 0; static struct inode * zpl_inode_alloc(struct super_block *sb) @@ -44,6 +65,15 @@ return (ip); } +#ifdef HAVE_SOPS_FREE_INODE +static void +zpl_inode_free(struct inode *ip) +{ + ASSERT(atomic_read(&ip->i_count) == 0); + zfs_inode_free(ip); +} +#endif + static void zpl_inode_destroy(struct inode *ip) { @@ -67,11 +97,36 @@ } /* - * When ->drop_inode() is called its return value indicates if the - * inode should be evicted from the inode cache. If the inode is - * unhashed and has no links the default policy is to evict it - * immediately. + * ->drop_inode() is called when the last reference to an inode is released. + * Its return value indicates if the inode should be destroyed immediately, or + * cached on the superblock structure. + * + * By default (zfs_delete_inode=0), we call generic_drop_inode(), which returns + * "destroy immediately" if the inode is unhashed and has no links (roughly: no + * longer exists on disk). On datasets with millions of rarely-accessed files, + * this can cause a large amount of memory to be "pinned" by cached inodes, + * which in turn pin their associated dnodes and dbufs, until the kernel starts + * reporting memory pressure and requests OpenZFS release some memory (see + * zfs_prune()). + * + * When set to 1, we call generic_delete_inode(), which always returns "destroy + * immediately", resulting in inodes being destroyed immediately, releasing + * their associated dnodes and dbufs to the dbuf cached and the ARC to be + * evicted as normal. * + * Note that the "last reference" doesn't always mean the last _userspace_ + * reference; the dentry cache also holds a reference, so "busy" inodes will + * still be kept alive that way (subject to dcache tuning). + */ +static int +zpl_drop_inode(struct inode *ip) +{ + if (zfs_delete_inode) + return (generic_delete_inode(ip)); + return (generic_drop_inode(ip)); +} + +/* * The ->evict_inode() callback must minimally truncate the inode pages, * and call clear_inode(). For 2.6.35 and later kernels this will * simply update the inode state, with the sync occurring before the @@ -105,6 +160,42 @@ ASSERT3S(error, <=, 0); } +/* + * zfs_sync() is the underlying implementation for the sync(2) and syncfs(2) + * syscalls, via sb->s_op->sync_fs(). + * + * Before kernel 5.17 (torvalds/linux@5679897eb104), syncfs() -> + * sync_filesystem() would ignore the return from sync_fs(), instead only + * considing the error from syncing the underlying block device (sb->s_dev). + * Since OpenZFS doesn't _have_ an underlying block device, there's no way for + * us to report a sync directly. + * + * However, in 5.8 (torvalds/linux@735e4ae5ba28) the superblock gained an extra + * error store `s_wb_err`, to carry errors seen on page writeback since the + * last call to syncfs(). If sync_filesystem() does not return an error, any + * existing writeback error on the superblock will be used instead (and cleared + * either way). We don't use this (page writeback is a different thing for us), + * so for 5.8-5.17 we can use that instead to get syncfs() to return the error. + * + * Before 5.8, we have no other good options - no matter what happens, the + * userspace program will be told the call has succeeded, and so we must make + * it so, Therefore, when we are asked to wait for sync to complete (wait == + * 1), if zfs_sync() has returned an error we have no choice but to block, + * regardless of the reason. + * + * The 5.17 change was backported to the 5.10, 5.15 and 5.16 series, and likely + * to some vendor kernels. Meanwhile, s_wb_err is still in use in 6.15 (the + * mainline Linux series at time of writing), and has likely been backported to + * vendor kernels before 5.8. We don't really want to use a workaround when we + * don't have to, but we can't really detect whether or not sync_filesystem() + * will return our errors (without a difficult runtime test anyway). So, we use + * a static version check: any kernel reporting its version as 5.17+ will use a + * direct error return, otherwise, we'll either use s_wb_err if it was detected + * at configure (5.8-5.16 + vendor backports). If it's unavailable, we will + * block to ensure the correct semantics. + * + * See https://github.com/openzfs/zfs/issues/17416 for further discussion. + */ static int zpl_sync_fs(struct super_block *sb, int wait) { @@ -115,10 +206,28 @@ crhold(cr); cookie = spl_fstrans_mark(); error = -zfs_sync(sb, wait, cr); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) +#ifdef HAVE_SUPER_BLOCK_S_WB_ERR + if (error && wait) + errseq_set(&sb->s_wb_err, error); +#else + if (error && wait) { + zfsvfs_t *zfsvfs = sb->s_fs_info; + ASSERT3P(zfsvfs, !=, NULL); + if (zfs_enter(zfsvfs, FTAG) == 0) { + txg_wait_synced(dmu_objset_pool(zfsvfs->z_os), 0); + zfs_exit(zfsvfs, FTAG); + error = 0; + } + } +#endif +#endif /* < 5.17.0 */ + spl_fstrans_unmark(cookie); crfree(cr); - ASSERT3S(error, <=, 0); + ASSERT3S(error, <=, 0); return (error); } @@ -159,21 +268,6 @@ } static int -zpl_remount_fs(struct super_block *sb, int *flags, char *data) -{ - zfs_mnt_t zm = { .mnt_osname = NULL, .mnt_data = data }; - fstrans_cookie_t cookie; - int error; - - cookie = spl_fstrans_mark(); - error = -zfs_remount(sb, flags, &zm); - spl_fstrans_unmark(cookie); - ASSERT3S(error, <=, 0); - - return (error); -} - -static int __zpl_show_devname(struct seq_file *seq, zfsvfs_t *zfsvfs) { int error; @@ -248,25 +342,10 @@ } static int -zpl_fill_super(struct super_block *sb, void *data, int silent) -{ - zfs_mnt_t *zm = (zfs_mnt_t *)data; - fstrans_cookie_t cookie; - int error; - - cookie = spl_fstrans_mark(); - error = -zfs_domount(sb, zm, silent); - spl_fstrans_unmark(cookie); - ASSERT3S(error, <=, 0); - - return (error); -} - -static int -zpl_test_super(struct super_block *s, void *data) +zpl_test_super(struct super_block *s, struct fs_context *fc) { zfsvfs_t *zfsvfs = s->s_fs_info; - objset_t *os = data; + objset_t *os = fc->sget_key; /* * If the os doesn't match the z_os in the super_block, assume it is * not a match. Matching would imply a multimount of a dataset. It is @@ -277,21 +356,511 @@ return (zfsvfs != NULL && os == zfsvfs->z_os); } -static struct super_block * -zpl_mount_impl(struct file_system_type *fs_type, int flags, zfs_mnt_t *zm) +static void +zpl_kill_sb(struct super_block *sb) +{ + zfs_preumount(sb); + kill_anon_super(sb); +} + +void +zpl_prune_sb(uint64_t nr_to_scan, void *arg) +{ + struct super_block *sb = (struct super_block *)arg; + int objects = 0; + + /* + * Ensure the superblock is not in the process of being torn down. + */ +#ifdef HAVE_SB_DYING + if (down_read_trylock(&sb->s_umount)) { + if (!(sb->s_flags & SB_DYING) && sb->s_root && + (sb->s_flags & SB_BORN)) { + (void) zfs_prune(sb, nr_to_scan, &objects); + } + up_read(&sb->s_umount); + } +#else + if (down_read_trylock(&sb->s_umount)) { + if (!hlist_unhashed(&sb->s_instances) && + sb->s_root && (sb->s_flags & SB_BORN)) { + (void) zfs_prune(sb, nr_to_scan, &objects); + } + up_read(&sb->s_umount); + } +#endif +} + +/* + * Mount option parsing. + * + * The kernel receives a set of "stringy" mount options, typically a + * comma-separated list through mount(2) or fsconfig(2). These are split into a + * set of struct fs_parameter, and then vfs_parse_fs_param() is called for + * each. That function will handle (and consume) some options directly, and + * other subsystems (mainly security modules) are given the opportunity to + * consume them too. Any left over are passed to zpl_parse_param(). Our job is + * to use them to fill in the vfs_t we've attached previously to + * fc->fs_private, ready for the mount or remount call when it comes. + * + * Historically, mount options have been generated, removed, modified and + * otherwise complicated by multiple different actors over a long time: the + * kernel itself, the original mount(8) utility and later libmount, + * mount.zfs(8), libzfs and the ZFS tools that use it, and any program using + * the various mount APIs that have come and gone over the years. This is + * further complicated by cross-pollination between OpenSolaris/illumos, Linux + * and FreeBSD. Long story short: we could see all sorts of things, and we need + * to at least try not to break old userspace programs. + * + * At time of writing, this is my best understanding of all the options we + * might reasonably see, and where and how they're handled. + * + * + * These are common options for all filesystems that are processed by the + * kernel directly, without zpl_parse_param() being called. They're a bit of a + * mixed bag, but are ultimately all available to us via either sb->s_flags or + * fc->sb_flags: + * + * dirsync: set SB_DIRSYNC + * lazytime: set SB_LAZYTIME + * mand: set SB_MANDLOCK + * ro: set SB_RDONLY + * sync: set SB_SYNCHRONOUS + * + * async: clear SB_SYNCHRONOUS + * nolazytime: clear SB_LAZYTIME + * nomand: clear SB_MANDLOCK + * rw: clear SB_RDONLY + * + * Fortunately, almost all of these are handled directly by the kernel. 'mand' + * and 'nomand' are swallowed by the kernel ('mand' emits a warning in the + * kernel log), but it and the corresponding dataset property have been a no-op + * in OpenZFS for years, so there's nothing for us to do there. + * + * The only tricky one is SB_RDONLY ('ro'/'rw'), which can be both a mount and + * a superblock option. While we won't receive the "stringy" options, the + * kernel will set it for us in fc->sb_flags, and we've always had special + * handling for it at mount and remount time (eg handling snapshot mounts), so + * it's not a problem to do nothing here because we will sort it out later. + * + * + * These are options that we may receive as "stringy" options but also as mount + * flags. + * + * exec: clear MS_NOEXEC + * noexec: set MS_NOEXEC + * suid: clear MS_NOSUID + * nosuid: set MS_NOSUID + * dev: clear MS_NODEV + * nodev: set MS_NODEV + * atime: clear MS_NOATIME + * noatime: set MS_NOATIME + * relatime: set MS_RELATIME + * norelatime: clear MS_RELATIME + * + * In testing, it appears that recent libmount will convert them, but our own + * mount code (libzfs_mount) may not. We will be called for the stringy + * versions, but not for the flags. The flags will later be available on + * vfsmount->mnt_flags, not set on the vfs_t. This tends not to matter in + * practice, as almost all mounts come through libzfs (via zfs-mount(8) or + * mount.zfs(8)) and so as strings, and when they do come through flags, they + * will still be reported correctly via mountinfo and by zfs-get(8), which has + * special handling for "temporary" properties. Also, we never use these + * internally for any decisions; 'exec', 'suid' and 'dev' are handled in the + * kernel, and the kernel provides helpers for 'atime' and 'relatime'. The + * only place the difference is observable is through zfs_get_temporary_prop(), + * which is only used by the zfs.get_prop() Lua call. + * + * This is fixable by getting at vfsmount->mnt_flags, but this is not readily + * available until after the mount operation is completed, and with some + * effort. This is all very low impact, so it's left for future improvement. + * + * + * These are true OpenZFS-specific mount options. They give the equivalent + * of temporarily setting the pool properties as follows: + * + * strictatime atime=on, relatime=off + * + * xattr: xattr=sa + * saxattr: xattr=sa + * dirxattr: xattr=dir + * noxattr: xattr=off + * + * + * mntpoint= provides the canonical mount point for a snapshot mount. This + * is an assist for the snapshot automounter call out to userspace, to + * understand where the snapshot is mounted even when triggered from an + * alternate mount namespace (eg inside a chroot). + * + * mntpoint= vfs->vfs_mntpoint=... + * + * + * These are used for coordination inside libzfs, and should not make it + * to the kernel, but it does not strip them, so we handle them and ignore + * them. + * + * defaults + * zfsutil + * remount + * + * + * These are specific to SELinux. When that security module is running, it + * will consume them, but if not, they will be passed through to us. libzfs + * adds them unconditionally, so we will always see them when SELinux is not + * running, and ignore them. + * + * fscontext + * defcontext + * rootcontext + * context + * + * + * When preparing a remount, libmount will read /proc/self/mountinfo and add + * any unrecognised flags it finds there to the options. So, we have to accept + * anything that __zpl_show_options() can produce. + * + * posixacl + * noacl + * casesensitive + * caseinsensitive + * casemixed + * + * + * mount(8) has a notion of "sloppy" options. According to the documentation, + * when the -s switch is provided, unrecognised mount options will be ignored. + * Only the Linux NFS and SMB filesystems support it, and traditionally + * OpenZFS has too. however, it appears massively underspecified and + * inconsistent. Depending on the interplay between mount(8), the mount helper + * (eg mount.zfs(8)) and libmount, -s may cause unknown options to be filtered + * in userspace, _or_ an additional option 'sloppy' to be passed to the kernel + * either before or after the "unknown" option, _or_ nothing at all happens + * and the unknown option to be passed through to the kernel as-is. The + * kernel NFS and SMB filesystems both expect to see an explicit option + * 'sloppy' and use this to either ignore or reject unknown options, but as + * described, it's very easy for that option to not appear, or appear too late. + * + * OpenZFS has a test for this in the test suite, and it's documented in + * mount.zfs(8), so to support it we accept 'sloppy' and ignore it, and all + * other unknown options produce a notice in the kernel log, and are also + * ignored. This allows the "feature" to continue to work, while avoiding + * the additional housekeeping for the 'sloppy' option. + * + * sloppy + * + * + * Finally, all filesystems get automatic handling for the 'source' option, + * that is, the "name" of the filesystem (the first column of df(1)'s output). + * However, this only happens if the handler does not otherwise handle the + * 'source' option. Since we handle _all_ options because of 'sloppy', we have + * ot handle it ourselves. Normally we would call vfs_parse_fs_param_source() + * to deal with this, but that didn't appear until 5.14, and it's small enough + * that we can just handle it ourselves. + * + * source + * + * + * Thank you for reading this far. I hope you find what you are looking for, + * in this life or the next. + * + * -- robn, 2026-03-26 + */ + +enum { + Opt_source, + Opt_exec, Opt_suid, Opt_dev, + Opt_atime, Opt_relatime, Opt_strictatime, + Opt_saxattr, Opt_dirxattr, Opt_noxattr, + Opt_mntpoint, + + Opt_ignore, Opt_warn, +}; + +static const struct fs_parameter_spec zpl_param_spec[] = { + fsparam_string("source", Opt_source), + + fsparam_flag_no("exec", Opt_exec), + fsparam_flag_no("suid", Opt_suid), + fsparam_flag_no("dev", Opt_dev), + + fsparam_flag_no("atime", Opt_atime), + fsparam_flag_no("relatime", Opt_relatime), + fsparam_flag("strictatime", Opt_strictatime), + + fsparam_flag("xattr", Opt_saxattr), + fsparam_flag("saxattr", Opt_saxattr), + fsparam_flag("dirxattr", Opt_dirxattr), + fsparam_flag("noxattr", Opt_noxattr), + + fsparam_string("mntpoint", Opt_mntpoint), + + fsparam_flag("defaults", Opt_ignore), + fsparam_flag("zfsutil", Opt_ignore), + fsparam_flag("remount", Opt_ignore), + + fsparam_string("fscontext", Opt_ignore), + fsparam_string("defcontext", Opt_ignore), + fsparam_string("rootcontext", Opt_ignore), + fsparam_string("context", Opt_ignore), + + fsparam_flag("posixacl", Opt_ignore), + fsparam_flag("noacl", Opt_ignore), + fsparam_flag("casesensitive", Opt_ignore), + fsparam_flag("caseinsensitive", Opt_ignore), + fsparam_flag("casemixed", Opt_ignore), + + fsparam_flag("sloppy", Opt_ignore), + + {} +}; + +/* + * Before 5.6, fs_parse() took a struct fs_parameter_description + * which wraps the parameter specs with name and enum pointers. From 5.6, + * the description struct was removed and fs_parse() accepts the + * fs_parameter_spec directly. + */ +static int +zpl_fs_parse(struct fs_context *fc, struct fs_parameter *param, + struct fs_parse_result *result) +{ +#ifdef HAVE_FS_PARSE_TAKES_SPEC + return (fs_parse(fc, zpl_param_spec, param, result)); +#else + static const struct fs_parameter_description zpl_param_desc = { + .name = "zfs", + .specs = zpl_param_spec, + }; + return (fs_parse(fc, &zpl_param_desc, param, result)); +#endif +} + +static int +zpl_parse_param(struct fs_context *fc, struct fs_parameter *param) { - struct super_block *s; + vfs_t *vfs = fc->fs_private; + + struct fs_parse_result result; + int opt = zpl_fs_parse(fc, param, &result); + if (opt == -ENOPARAM) { + /* + * Convert unknowns to warnings, to work around the whole + * "sloppy option" mess. + */ + opt = Opt_warn; + } + if (opt < 0) + return (opt); + + switch (opt) { + case Opt_source: + if (fc->source != NULL) { + cmn_err(CE_NOTE, + "ZFS: multiple 'source' options not supported"); + return (-SET_ERROR(EINVAL)); + } + fc->source = param->string; + param->string = NULL; + break; + + case Opt_exec: + vfs->vfs_exec = !result.negated; + vfs->vfs_do_exec = B_TRUE; + break; + case Opt_suid: + vfs->vfs_setuid = !result.negated; + vfs->vfs_do_setuid = B_TRUE; + break; + case Opt_dev: + vfs->vfs_devices = !result.negated; + vfs->vfs_do_devices = B_TRUE; + break; + + case Opt_atime: + vfs->vfs_atime = !result.negated; + vfs->vfs_do_atime = B_TRUE; + break; + case Opt_relatime: + vfs->vfs_relatime = !result.negated; + vfs->vfs_do_relatime = B_TRUE; + break; + case Opt_strictatime: + vfs->vfs_atime = B_TRUE; + vfs->vfs_do_atime = B_TRUE; + vfs->vfs_relatime = B_FALSE; + vfs->vfs_do_relatime = B_TRUE; + break; + + case Opt_saxattr: + vfs->vfs_xattr = ZFS_XATTR_SA; + vfs->vfs_do_xattr = B_TRUE; + break; + case Opt_dirxattr: + vfs->vfs_xattr = ZFS_XATTR_DIR; + vfs->vfs_do_xattr = B_TRUE; + break; + case Opt_noxattr: + vfs->vfs_xattr = ZFS_XATTR_OFF; + vfs->vfs_do_xattr = B_TRUE; + break; + + case Opt_mntpoint: + if (vfs->vfs_mntpoint != NULL) + kmem_strfree(vfs->vfs_mntpoint); + vfs->vfs_mntpoint = kmem_strdup(param->string); + break; + + case Opt_ignore: + break; + + case Opt_warn: + cmn_err(CE_NOTE, + "ZFS: ignoring unknown mount option: %s", param->key); + break; + + default: + return (-SET_ERROR(EINVAL)); + } + + return (0); +} + +/* + * Before Linux 5.8, the kernel's individual parameter parsing had a list of + * "forbidden" options that would always be rejected early. These were options + * that should be specified by MS_* flags, to be set on the superblock + * directly. However, it was inconsistently applied (eg it had various "*atime" + * options but not "atime", and also caused problems when it was not in sync + * with the version of libmount in use. It was deemed needlessly restrictive + * and was dropped in torvalds/linux@9193ae87a8af. + * + * Unfortunately, some of the options on this list are used by OpenZFS, so + * we need to see them. These include the aforementioned "*atime", "dev", + * "exec" and "suid". + * + * There is no easy compile-time check available to detect this, so we use + * a simple version check that should make it available everywhere needed, + * most notably RHEL8's 4.18+extras, which has backported fs_context support + * but does not include the 5.8 commit. + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) +#define HAVE_FORBIDDEN_SB_FLAGS 1 +#endif + +#ifdef HAVE_FORBIDDEN_SB_FLAGS +/* + * The typical path for options parsing through mount(2) is: + * + * ksys_mount + * do_mount + * generic_parse_monolithic + * vfs_parse_fs_string + * vfs_parse_fs_param + * zpl_parse_param + * + * vfs_parse_fs_param() calls the internal vfs_parse_sb_flag(), which is + * where the "forbidden" flags are applied. If it makes it through there, + * it will later call fc->parse_param() ie zpl_parse_param(). We can't + * intercept this chain in the middle anywhere; the earliest thing we can + * override is generic_parse_monolithic(), substituting our own by setting + * fc->parse_monolithic and doing the parsing work ourselves. + * + * Fortunately, generic_parse_monolithic() is almost entirely splitting the + * incoming parameter string on comma and handing off to the rest of the + * pipeline. This is easily replaced (almost entirely by reviving a few bits + * of our old options parser). + * + * To keep the change as narrow as possible, we reuse zpl_param_spec and + * zpl_parse_param() as much as possible. Once we've parsed the option, we call + * fs_parse(zpl_param_spec) to find out if the option is actually one we + * explicitly care about. If it is, we call zpl_parse_param() directly, + * avoiding vfs_parse_fs_param() and so the risk of being rejected. If it is + * not one we explicitly care about, we call zpl_parse_param() as normal, + * letting the kernel reject it if it wishes. If it doesn't, it will end up + * back in zpl_parse_param() via fc->parse_param, and we can ignore or warn + * about it we normally would. + */ +static int +zpl_parse_monolithic(struct fs_context *fc, void *data) +{ + char *mntopts = data; + + if (mntopts == NULL) + return (0); + + /* + * Because we supply a .parse_monolithic callback, the kernel does + * no consideration of the options blob at all. Because of this, we + * have to give LSMs a first look at it. They will remove any options + * of interest to them (eg the SELinux *context= options). + */ + int err = security_sb_eat_lsm_opts(mntopts, &fc->security); + if (err) + return (err); + + char *key; + while ((key = strsep(&mntopts, ",")) != NULL) { + if (!*key) + continue; + + struct fs_parameter param = { + .key = key, + }; + + char *value = strchr(key, '='); + if (value != NULL) { + /* Key starts with '='. Kernel ignores, we will too. */ + if (value == key) + continue; + *value++ = '\0'; + + /* key=value is a "string" type, set up for that */ + param.string = value; + param.type = fs_value_is_string; + param.size = strlen(value); + } else { + /* unadorned key is a "flag" type */ + param.type = fs_value_is_flag; + } + + /* Check if this is one of our options. */ + struct fs_parse_result result; + int opt = zpl_fs_parse(fc, ¶m, &result); + if (opt >= 0) { + /* + * We already know this one of our options, so a + * failure here would be nonsensical. + */ + VERIFY0(zpl_parse_param(fc, ¶m)); + } else { + /* + * Not one of our option, send it through the kernel's + * standard parameter handling. + */ + err = vfs_parse_fs_param(fc, ¶m); + if (err < 0) + return (err); + } + } + + return (0); +} +#endif /* HAVE_FORBIDDEN_SB_FLAGS */ + +static int +zpl_get_tree(struct fs_context *fc) +{ + struct super_block *sb; objset_t *os; boolean_t issnap = B_FALSE; int err; - err = dmu_objset_hold(zm->mnt_osname, FTAG, &os); + err = dmu_objset_hold(fc->source, FTAG, &os); if (err) - return (ERR_PTR(-err)); + return (-err); /* - * The dsl pool lock must be released prior to calling sget(). - * It is possible sget() may block on the lock in grab_super() + * The dsl pool lock must be released prior to calling sget_fc(). + * It is possible sget_fc() may block on the lock in grab_super() * while deactivate_super() holds that same lock and waits for * a txg sync. If the dsl_pool lock is held over sget() * this can prevent the pool sync and cause a deadlock. @@ -299,7 +868,9 @@ dsl_dataset_long_hold(dmu_objset_ds(os), FTAG); dsl_pool_rele(dmu_objset_pool(os), FTAG); - s = sget(fs_type, zpl_test_super, set_anon_super, flags, os); + fc->sget_key = os; + sb = sget_fc(fc, zpl_test_super, set_anon_super_fc); + fc->sget_key = NULL; /* * Recheck with the lock held to prevent mounting the wrong dataset @@ -309,110 +880,215 @@ * also s_umount lock is not held there so it would race with * zfs_umount and zfsvfs can be freed. */ - if (!IS_ERR(s) && s->s_fs_info != NULL) { - zfsvfs_t *zfsvfs = s->s_fs_info; + if (!IS_ERR(sb) && sb->s_fs_info != NULL) { + zfsvfs_t *zfsvfs = sb->s_fs_info; if (zpl_enter(zfsvfs, FTAG) == 0) { if (os != zfsvfs->z_os) - err = -SET_ERROR(EBUSY); + err = SET_ERROR(EBUSY); issnap = zfsvfs->z_issnap; zpl_exit(zfsvfs, FTAG); } else { - err = -SET_ERROR(EBUSY); + err = SET_ERROR(EBUSY); } } dsl_dataset_long_rele(dmu_objset_ds(os), FTAG); dsl_dataset_rele(dmu_objset_ds(os), FTAG); - if (IS_ERR(s)) - return (ERR_CAST(s)); + if (IS_ERR(sb)) + return (PTR_ERR(sb)); if (err) { - deactivate_locked_super(s); - return (ERR_PTR(err)); + deactivate_locked_super(sb); + return (-err); } - if (s->s_root == NULL) { - err = zpl_fill_super(s, zm, flags & SB_SILENT ? 1 : 0); + if (sb->s_root == NULL) { + vfs_t *vfs = fc->fs_private; + + /* + * If SB_RDONLY was set/cleared from mount options, update + * them in the options struct so we set up the filesystem + * in the proper state. + */ + if (fc->sb_flags_mask & SB_RDONLY) { + vfs->vfs_readonly = + (fc->sb_flags & SB_RDONLY) ? B_TRUE : B_FALSE; + vfs->vfs_do_readonly = B_TRUE; + } + + fstrans_cookie_t cookie = spl_fstrans_mark(); + err = zfs_domount(sb, fc->source, vfs, + fc->sb_flags & SB_SILENT ? 1 : 0); + spl_fstrans_unmark(cookie); + if (err) { - deactivate_locked_super(s); - return (ERR_PTR(err)); + deactivate_locked_super(sb); + return (-err); } - s->s_flags |= SB_ACTIVE; - } else if (!issnap && ((flags ^ s->s_flags) & SB_RDONLY)) { + + /* + * zfsvfs has taken ownership of the mount options, so we + * need to ensure we don't free them. + */ + fc->fs_private = NULL; + + sb->s_flags |= SB_ACTIVE; + } else if (!issnap && ((fc->sb_flags ^ sb->s_flags) & SB_RDONLY)) { /* * Skip ro check for snap since snap is always ro regardless * ro flag is passed by mount or not. */ - deactivate_locked_super(s); - return (ERR_PTR(-EBUSY)); + deactivate_locked_super(sb); + return (-SET_ERROR(EBUSY)); } - return (s); + struct dentry *root = dget(sb->s_root); + if (IS_ERR(root)) + return (PTR_ERR(root)); + + fc->root = root; + return (0); } -static struct dentry * -zpl_mount(struct file_system_type *fs_type, int flags, - const char *osname, void *data) +static int +zpl_reconfigure(struct fs_context *fc) { - zfs_mnt_t zm = { .mnt_osname = osname, .mnt_data = data }; + fstrans_cookie_t cookie; + int error; - struct super_block *sb = zpl_mount_impl(fs_type, flags, &zm); - if (IS_ERR(sb)) - return (ERR_CAST(sb)); + cookie = spl_fstrans_mark(); + error = -zfs_remount(fc->root->d_sb, fc->fs_private, fc->sb_flags); + spl_fstrans_unmark(cookie); + ASSERT3S(error, <=, 0); - return (dget(sb->s_root)); -} + if (error == 0) { + /* + * zfsvfs has taken ownership of the mount options, so we + * need to ensure we don't free them. + */ + fc->fs_private = NULL; + } -static void -zpl_kill_sb(struct super_block *sb) -{ - zfs_preumount(sb); - kill_anon_super(sb); + return (error); } -void -zpl_prune_sb(uint64_t nr_to_scan, void *arg) +static int +zpl_dup_fc(struct fs_context *fc, struct fs_context *src_fc) { - struct super_block *sb = (struct super_block *)arg; - int objects = 0; + vfs_t *src_vfs = src_fc->fs_private; + if (src_vfs == NULL) + return (0); + + vfs_t *vfs = zfsvfs_vfs_alloc(); + if (vfs == NULL) + return (-SET_ERROR(ENOMEM)); /* - * Ensure the superblock is not in the process of being torn down. + * This is annoying, but a straight memcpy() would require us to + * reinitialise the lock. */ -#ifdef HAVE_SB_DYING - if (down_read_trylock(&sb->s_umount)) { - if (!(sb->s_flags & SB_DYING) && sb->s_root && - (sb->s_flags & SB_BORN)) { - (void) zfs_prune(sb, nr_to_scan, &objects); - } - up_read(&sb->s_umount); - } -#else - if (down_read_trylock(&sb->s_umount)) { - if (!hlist_unhashed(&sb->s_instances) && - sb->s_root && (sb->s_flags & SB_BORN)) { - (void) zfs_prune(sb, nr_to_scan, &objects); - } - up_read(&sb->s_umount); - } + vfs->vfs_xattr = src_vfs->vfs_xattr; + vfs->vfs_readonly = src_vfs->vfs_readonly; + vfs->vfs_do_readonly = src_vfs->vfs_do_readonly; + vfs->vfs_setuid = src_vfs->vfs_setuid; + vfs->vfs_do_setuid = src_vfs->vfs_do_setuid; + vfs->vfs_exec = src_vfs->vfs_exec; + vfs->vfs_do_exec = src_vfs->vfs_do_exec; + vfs->vfs_devices = src_vfs->vfs_devices; + vfs->vfs_do_devices = src_vfs->vfs_do_devices; + vfs->vfs_do_xattr = src_vfs->vfs_do_xattr; + vfs->vfs_atime = src_vfs->vfs_atime; + vfs->vfs_do_atime = src_vfs->vfs_do_atime; + vfs->vfs_relatime = src_vfs->vfs_relatime; + vfs->vfs_do_relatime = src_vfs->vfs_do_relatime; + vfs->vfs_nbmand = src_vfs->vfs_nbmand; + vfs->vfs_do_nbmand = src_vfs->vfs_do_nbmand; + + mutex_enter(&src_vfs->vfs_mntpt_lock); + if (src_vfs->vfs_mntpoint != NULL) + vfs->vfs_mntpoint = kmem_strdup(src_vfs->vfs_mntpoint); + mutex_exit(&src_vfs->vfs_mntpt_lock); + + fc->fs_private = vfs; + return (0); +} + +static void +zpl_free_fc(struct fs_context *fc) +{ + zfsvfs_vfs_free(fc->fs_private); +} + +const struct fs_context_operations zpl_fs_context_operations = { +#ifdef HAVE_FORBIDDEN_SB_FLAGS + .parse_monolithic = zpl_parse_monolithic, #endif + .parse_param = zpl_parse_param, + .get_tree = zpl_get_tree, + .reconfigure = zpl_reconfigure, + .dup = zpl_dup_fc, + .free = zpl_free_fc, +}; + +static int +zpl_init_fs_context(struct fs_context *fc) +{ + fc->fs_private = zfsvfs_vfs_alloc(); + if (fc->fs_private == NULL) + return (-SET_ERROR(ENOMEM)); + + fc->ops = &zpl_fs_context_operations; + + return (0); } const struct super_operations zpl_super_operations = { .alloc_inode = zpl_inode_alloc, +#ifdef HAVE_SOPS_FREE_INODE + .free_inode = zpl_inode_free, +#endif .destroy_inode = zpl_inode_destroy, .dirty_inode = zpl_dirty_inode, .write_inode = NULL, + .drop_inode = zpl_drop_inode, .evict_inode = zpl_evict_inode, .put_super = zpl_put_super, .sync_fs = zpl_sync_fs, .statfs = zpl_statfs, - .remount_fs = zpl_remount_fs, .show_devname = zpl_show_devname, .show_options = zpl_show_options, .show_stats = NULL, }; +/* + * ->d_delete() is called when the last reference to a dentry is released. Its + * return value indicates if the dentry should be destroyed immediately, or + * retained in the dentry cache. + * + * By default (zfs_delete_dentry=0) the kernel will always cache unused + * entries. Each dentry holds an inode reference, so cached dentries can hold + * the final inode reference indefinitely, leading to the inode and its related + * data being pinned (see zpl_drop_inode()). + * + * When set to 1, we signal that the dentry should be destroyed immediately and + * never cached. This reduces memory usage, at the cost of higher overheads to + * lookup a file, as the inode and its underlying data (dnode/dbuf) need to be + * reloaded and reinflated. + * + * Note that userspace does not have direct control over dentry references and + * reclaim; rather, this is part of the kernel's caching and reclaim subsystems + * (eg vm.vfs_cache_pressure). + */ +static int +zpl_dentry_delete(const struct dentry *dentry) +{ + return (zfs_delete_dentry ? 1 : 0); +} + +const struct dentry_operations zpl_dentry_operations = { + .d_delete = zpl_dentry_delete, +}; + struct file_system_type zpl_fs_type = { .owner = THIS_MODULE, .name = ZFS_DRIVER, @@ -421,6 +1097,13 @@ #else .fs_flags = FS_USERNS_MOUNT, #endif - .mount = zpl_mount, + .init_fs_context = zpl_init_fs_context, .kill_sb = zpl_kill_sb, }; + +ZFS_MODULE_PARAM(zfs, zfs_, delete_inode, INT, ZMOD_RW, + "Delete inodes as soon as the last reference is released."); + +ZFS_MODULE_PARAM(zfs, zfs_, delete_dentry, INT, ZMOD_RW, + "Delete dentries from dentry cache as soon as the last reference is " + "released."); diff -Nru zfs-linux-2.3.2/module/os/linux/zfs/zvol_os.c zfs-linux-2.3.9/module/os/linux/zfs/zvol_os.c --- zfs-linux-2.3.2/module/os/linux/zfs/zvol_os.c 2025-05-01 18:45:25.441125070 +0000 +++ zfs-linux-2.3.9/module/os/linux/zfs/zvol_os.c 2026-08-21 21:15:50.796499190 +0000 @@ -21,7 +21,7 @@ */ /* * Copyright (c) 2012, 2020 by Delphix. All rights reserved. - * Copyright (c) 2024, Rob Norris + * Copyright (c) 2024, 2025, Rob Norris * Copyright (c) 2024, Klara, Inc. */ @@ -377,16 +377,14 @@ } /* - * 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. + * Align the request to volume block boundaries. 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. */ - if (!io_is_secure_erase(bio, rq)) { - start = P2ROUNDUP(start, zv->zv_volblocksize); - end = P2ALIGN_TYPED(end, zv->zv_volblocksize, uint64_t); - size = end - start; - } + start = P2ROUNDUP(start, zv->zv_volblocksize); + end = P2ALIGN_TYPED(end, zv->zv_volblocksize, uint64_t); + size = end - start; if (start >= end) goto unlock; @@ -506,6 +504,24 @@ zv_request_task_free(task); } +/* + * Note: + * + * The kernel uses different enum names for the IO opcode, depending on the + * kernel version ('req_opf', 'req_op'). To sidestep this, use macros rather + * than inline functions for these checks. + */ +/* Should this IO go down the zvol write path? */ +#define ZVOL_OP_IS_WRITE(op) \ + (op == REQ_OP_WRITE || \ + op == REQ_OP_FLUSH || \ + op == REQ_OP_DISCARD) + +/* Is this IO type supported by zvols? */ +#define ZVOL_OP_IS_SUPPORTED(op) (op == REQ_OP_READ || ZVOL_OP_IS_WRITE(op)) + +/* Get the IO opcode */ +#define ZVOL_OP(bio, rq) (bio != NULL ? bio_op(bio) : req_op(rq)) /* * Process a BIO or request @@ -523,7 +539,33 @@ fstrans_cookie_t cookie = spl_fstrans_mark(); uint64_t offset = io_offset(bio, rq); uint64_t size = io_size(bio, rq); - int rw = io_data_dir(bio, rq); + int rw; + + if (unlikely(!ZVOL_OP_IS_SUPPORTED(ZVOL_OP(bio, rq)))) { + zfs_dbgmsg("Unsupported zvol %s, op=%d, flags=0x%x", + rq != NULL ? "request" : "BIO", + ZVOL_OP(bio, rq), + rq != NULL ? rq->cmd_flags : bio->bi_opf); + ASSERT(ZVOL_OP_IS_SUPPORTED(ZVOL_OP(bio, rq))); + zvol_end_io(bio, rq, SET_ERROR(ENOTSUPP)); + goto out; + } + + if (ZVOL_OP_IS_WRITE(ZVOL_OP(bio, rq))) { + rw = WRITE; + } else { + rw = READ; + } + + /* + * Sanity check + * + * If we're a BIO, check our rw matches the kernel's + * bio_data_dir(bio) rw. We need to check because we support fewer + * IO operations, and want to verify that what we think are reads and + * writes from those operations match what the kernel thinks. + */ + ASSERT(rq != NULL || rw == bio_data_dir(bio)); if (unlikely(zv->zv_flags & ZVOL_REMOVING)) { zvol_end_io(bio, rq, -SET_ERROR(ENXIO)); @@ -558,8 +600,8 @@ #ifdef HAVE_BLK_MQ_RQ_HCTX blk_mq_hw_queue = rq->mq_hctx->queue_num; #else - blk_mq_hw_queue = - rq->q->queue_hw_ctx[rq->q->mq_map[rq->cpu]]->queue_num; + blk_mq_hw_queue = rq->q->queue_hw_ctx[ + rq->q->mq_map[raw_smp_processor_id()]]->queue_num; #endif taskq_hash = cityhash3((uintptr_t)zv, offset >> ZVOL_TASKQ_OFFSET_SHIFT, blk_mq_hw_queue); @@ -628,7 +670,7 @@ * interfaces lack this functionality (they block waiting for * the i/o to complete). */ - if (io_is_discard(bio, rq) || io_is_secure_erase(bio, rq)) { + if (io_is_discard(bio, rq)) { if (force_sync) { zvol_discard(&zvr); } else { @@ -1024,12 +1066,13 @@ * tiny devices. For devices over 1 Mib a standard head and sector count * is used to keep the cylinders count reasonable. */ -static int -zvol_getgeo(struct block_device *bdev, struct hd_geometry *geo) +static inline int +zvol_getgeo_impl(struct gendisk *disk, struct hd_geometry *geo) { - zvol_state_t *zv = bdev->bd_disk->private_data; + zvol_state_t *zv = disk->private_data; sector_t sectors; + ASSERT3P(zv, !=, NULL); ASSERT3U(zv->zv_open_count, >, 0); sectors = get_capacity(zv->zv_zso->zvo_disk); @@ -1048,6 +1091,20 @@ return (0); } +#ifdef HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK +static int +zvol_getgeo(struct gendisk *disk, struct hd_geometry *geo) +{ + return (zvol_getgeo_impl(disk, geo)); +} +#else +static int +zvol_getgeo(struct block_device *bdev, struct hd_geometry *geo) +{ + return (zvol_getgeo_impl(bdev->bd_disk, geo)); +} +#endif + /* * Why have two separate block_device_operations structs? * @@ -1397,13 +1454,15 @@ */ if (zv->zv_zso->use_blk_mq) { ret = zvol_alloc_blk_mq(zv, &limits); + if (ret != 0) + goto out_kmem; zso->zvo_disk->fops = &zvol_ops_blk_mq; } else { ret = zvol_alloc_non_blk_mq(zso, &limits); + if (ret != 0) + goto out_kmem; zso->zvo_disk->fops = &zvol_ops; } - if (ret != 0) - goto out_kmem; /* Limit read-ahead to a single page to prevent over-prefetching. */ blk_queue_set_read_ahead(zso->zvo_queue, 1); @@ -1487,7 +1546,7 @@ if (zv->zv_zso->use_blk_mq) blk_mq_free_tag_set(&zv->zv_zso->tag_set); - ida_simple_remove(&zvol_ida, + ida_free(&zvol_ida, MINOR(zv->zv_zso->zvo_dev) >> ZVOL_MINOR_BITS); cv_destroy(&zv->zv_removing_cv); @@ -1621,7 +1680,7 @@ if (zvol_inhibit_dev) return (0); - idx = ida_simple_get(&zvol_ida, 0, 0, kmem_flags_convert(KM_SLEEP)); + idx = ida_alloc(&zvol_ida, kmem_flags_convert(KM_SLEEP)); if (idx < 0) return (SET_ERROR(-idx)); minor = idx << ZVOL_MINOR_BITS; @@ -1629,7 +1688,7 @@ /* too many partitions can cause an overflow */ zfs_dbgmsg("zvol: create minor overflow: %s, minor %u/%u", name, minor, MINOR(minor)); - ida_simple_remove(&zvol_ida, idx); + ida_free(&zvol_ida, idx); return (SET_ERROR(EINVAL)); } @@ -1637,7 +1696,7 @@ if (zv) { ASSERT(MUTEX_HELD(&zv->zv_state_lock)); mutex_exit(&zv->zv_state_lock); - ida_simple_remove(&zvol_ida, idx); + ida_free(&zvol_ida, idx); return (SET_ERROR(EEXIST)); } @@ -1739,7 +1798,7 @@ rw_exit(&zvol_state_lock); error = zvol_os_add_disk(zv->zv_zso->zvo_disk); } else { - ida_simple_remove(&zvol_ida, idx); + ida_free(&zvol_ida, idx); } return (error); diff -Nru zfs-linux-2.3.2/module/zcommon/zfs_valstr.c zfs-linux-2.3.9/module/zcommon/zfs_valstr.c --- zfs-linux-2.3.2/module/zcommon/zfs_valstr.c 2025-05-01 18:45:25.505126308 +0000 +++ zfs-linux-2.3.9/module/zcommon/zfs_valstr.c 2026-08-21 21:15:50.839498680 +0000 @@ -238,11 +238,11 @@ { 'E', "EN", "ENCRYPT" }, { 'C', "CG", "CHECKSUM_GENERATE" }, { 'N', "NW", "NOP_WRITE" }, - { 'B', "BF", "BRT_FREE" }, { 'd', "dS", "DDT_READ_START" }, { 'd', "dD", "DDT_READ_DONE" }, { 'd', "dW", "DDT_WRITE" }, { 'd', "dF", "DDT_FREE" }, + { 'B', "BF", "BRT_FREE" }, { 'G', "GA", "GANG_ASSEMBLE" }, { 'G', "GI", "GANG_ISSUE" }, { 'D', "DT", "DVA_THROTTLE" }, diff -Nru zfs-linux-2.3.2/module/zfs/abd.c zfs-linux-2.3.9/module/zfs/abd.c --- zfs-linux-2.3.2/module/zfs/abd.c 2025-05-01 18:45:25.516126520 +0000 +++ zfs-linux-2.3.9/module/zfs/abd.c 2026-08-21 21:15:50.856498478 +0000 @@ -280,7 +280,8 @@ abd_free_scatter(abd_t *abd) { abd_free_chunks(abd); - abd_update_scatter_stats(abd, ABDSTAT_DECR); + if (!abd_is_from_pages(abd)) + abd_update_scatter_stats(abd, ABDSTAT_DECR); } /* @@ -1111,13 +1112,6 @@ func_raidz_gen(caddrs, daddr, len, dlen); - for (i = parity-1; i >= 0; i--) { - abd_iter_unmap(&caiters[i]); - c_cabds[i] = - abd_advance_abd_iter(cabds[i], c_cabds[i], - &caiters[i], len); - } - if (dsize > 0) { abd_iter_unmap(&daiter); c_dabd = @@ -1126,6 +1120,13 @@ dsize -= dlen; } + for (i = parity - 1; i >= 0; i--) { + abd_iter_unmap(&caiters[i]); + c_cabds[i] = + abd_advance_abd_iter(cabds[i], c_cabds[i], + &caiters[i], len); + } + csize -= len; } abd_exit_critical(flags); @@ -1194,7 +1195,7 @@ func_raidz_rec(xaddrs, len, caddrs, mul); - for (i = parity-1; i >= 0; i--) { + for (i = parity - 1; i >= 0; i--) { abd_iter_unmap(&xiters[i]); abd_iter_unmap(&citers[i]); c_tabds[i] = @@ -1210,3 +1211,5 @@ } abd_exit_critical(flags); } + +EXPORT_SYMBOL(abd_free); diff -Nru zfs-linux-2.3.2/module/zfs/arc.c zfs-linux-2.3.9/module/zfs/arc.c --- zfs-linux-2.3.2/module/zfs/arc.c 2025-05-01 18:45:25.522126636 +0000 +++ zfs-linux-2.3.9/module/zfs/arc.c 2026-08-21 21:15:50.866498360 +0000 @@ -27,7 +27,7 @@ * Copyright (c) 2017, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2019, loli10K . All rights reserved. * Copyright (c) 2020, George Amanakis. All rights reserved. - * Copyright (c) 2019, 2023, Klara Inc. + * Copyright (c) 2019, 2024, 2025, Klara, Inc. * Copyright (c) 2019, Allan Jude * Copyright (c) 2020, The FreeBSD Foundation [1] * Copyright (c) 2021, 2024 by George Melikov. All rights reserved. @@ -297,6 +297,7 @@ #include #include #include +#include #include #include #include @@ -336,6 +337,9 @@ static boolean_t arc_evict_needed = B_FALSE; static clock_t arc_last_uncached_flush; +static taskq_t *arc_evict_taskq; +static struct evict_arg *arc_evict_arg; + /* * Count of bytes evicted since boot. */ @@ -381,8 +385,8 @@ /* log2(fraction of arc to reclaim) */ uint_t arc_shrink_shift = 7; -/* percent of pagecache to reclaim arc to */ #ifdef _KERNEL +/* percent of pagecache to reclaim arc to */ uint_t zfs_arc_pc_percent = 0; #endif @@ -466,6 +470,21 @@ */ static int zfs_arc_prune_task_threads = 1; +/* Used by spa_export/spa_destroy to flush the arc asynchronously */ +static taskq_t *arc_flush_taskq; + +/* + * Controls the number of ARC eviction threads to dispatch sublists to. + * + * Possible values: + * 0 (auto) compute the number of threads using a logarithmic formula. + * 1 (disabled) one thread - parallel eviction is disabled. + * 2+ (manual) set the number manually. + * + * See arc_evict_thread_init() for how "auto" is computed. + */ +static uint_t zfs_arc_evict_threads = 0; + /* The 7 states: */ arc_state_t ARC_anon; arc_state_t ARC_mru; @@ -561,6 +580,7 @@ { "uncached_metadata", KSTAT_DATA_UINT64 }, { "uncached_evictable_data", KSTAT_DATA_UINT64 }, { "uncached_evictable_metadata", KSTAT_DATA_UINT64 }, + { "l2_ndev", KSTAT_DATA_UINT64 }, { "l2_hits", KSTAT_DATA_UINT64 }, { "l2_misses", KSTAT_DATA_UINT64 }, { "l2_prefetch_asize", KSTAT_DATA_UINT64 }, @@ -775,6 +795,23 @@ uint64_t zfs_crc64_table[256]; /* + * Asynchronous ARC flush + * + * We track these in a list for arc_async_flush_guid_inuse(). + * Used for both L1 and L2 async teardown. + */ +static list_t arc_async_flush_list; +static kmutex_t arc_async_flush_lock; + +typedef struct arc_async_flush { + uint64_t af_spa_guid; + taskq_ent_t af_tqent; + uint_t af_cache_level; /* 1 or 2 to differentiate node */ + list_node_t af_node; +} arc_async_flush_t; + + +/* * Level 2 ARC */ @@ -1709,13 +1746,15 @@ */ static arc_buf_hdr_t * arc_buf_alloc_l2only(size_t size, arc_buf_contents_t type, l2arc_dev_t *dev, - dva_t dva, uint64_t daddr, int32_t psize, uint64_t birth, + dva_t dva, uint64_t daddr, int32_t psize, uint64_t asize, uint64_t birth, enum zio_compress compress, uint8_t complevel, boolean_t protected, boolean_t prefetch, arc_state_type_t arcs_state) { arc_buf_hdr_t *hdr; ASSERT(size != 0); + ASSERT(dev->l2ad_vdev != NULL); + hdr = kmem_cache_alloc(hdr_l2only_cache, KM_SLEEP); hdr->b_birth = birth; hdr->b_type = type; @@ -1723,6 +1762,7 @@ arc_hdr_set_flags(hdr, arc_bufc_to_flags(type) | ARC_FLAG_HAS_L2HDR); HDR_SET_LSIZE(hdr, size); HDR_SET_PSIZE(hdr, psize); + HDR_SET_L2SIZE(hdr, asize); arc_hdr_set_compress(hdr, compress); hdr->b_complevel = complevel; if (protected) @@ -1811,7 +1851,7 @@ if (ret == 0) arc_hdr_clear_flags(hdr, ARC_FLAG_NOAUTH); - else if (ret == ENOENT) + else if (ret == EACCES) ret = 0; if (free_abd) @@ -2592,7 +2632,7 @@ ARCSTAT_INCR(arcstat_bonus_size, space); break; case ARC_SPACE_DNODE: - ARCSTAT_INCR(arcstat_dnode_size, space); + aggsum_add(&arc_sums.arcstat_dnode_size, space); break; case ARC_SPACE_DBUF: ARCSTAT_INCR(arcstat_dbuf_size, space); @@ -2638,7 +2678,7 @@ ARCSTAT_INCR(arcstat_bonus_size, -space); break; case ARC_SPACE_DNODE: - ARCSTAT_INCR(arcstat_dnode_size, -space); + aggsum_add(&arc_sums.arcstat_dnode_size, -space); break; case ARC_SPACE_DBUF: ARCSTAT_INCR(arcstat_dbuf_size, -space); @@ -3510,16 +3550,17 @@ l2arc_hdr_arcstats_update(arc_buf_hdr_t *hdr, boolean_t incr, boolean_t state_only) { - l2arc_buf_hdr_t *l2hdr = &hdr->b_l2hdr; - l2arc_dev_t *dev = l2hdr->b_dev; uint64_t lsize = HDR_GET_LSIZE(hdr); uint64_t psize = HDR_GET_PSIZE(hdr); - uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, psize); + uint64_t asize = HDR_GET_L2SIZE(hdr); arc_buf_contents_t type = hdr->b_type; int64_t lsize_s; int64_t psize_s; int64_t asize_s; + /* For L2 we expect the header's b_l2size to be valid */ + ASSERT3U(asize, >=, psize); + if (incr) { lsize_s = lsize; psize_s = psize; @@ -3581,8 +3622,6 @@ { l2arc_buf_hdr_t *l2hdr = &hdr->b_l2hdr; l2arc_dev_t *dev = l2hdr->b_dev; - uint64_t psize = HDR_GET_PSIZE(hdr); - uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, psize); ASSERT(MUTEX_HELD(&dev->l2ad_mtx)); ASSERT(HDR_HAS_L2HDR(hdr)); @@ -3590,7 +3629,10 @@ list_remove(&dev->l2ad_buflist, hdr); l2arc_hdr_arcstats_decrement(hdr); - vdev_space_update(dev->l2ad_vdev, -asize, 0, 0); + if (dev->l2ad_vdev != NULL) { + uint64_t asize = HDR_GET_L2SIZE(hdr); + vdev_space_update(dev->l2ad_vdev, -asize, 0, 0); + } (void) zfs_refcount_remove_many(&dev->l2ad_alloc, arc_hdr_size(hdr), hdr); @@ -4023,6 +4065,62 @@ kmem_free(markers, sizeof (*markers) * count); } +typedef struct evict_arg { + taskq_ent_t eva_tqent; + multilist_t *eva_ml; + arc_buf_hdr_t *eva_marker; + int eva_idx; + uint64_t eva_spa; + uint64_t eva_bytes; + uint64_t eva_evicted; +} evict_arg_t; + +static void +arc_evict_task(void *arg) +{ + evict_arg_t *eva = arg; + eva->eva_evicted = arc_evict_state_impl(eva->eva_ml, eva->eva_idx, + eva->eva_marker, eva->eva_spa, eva->eva_bytes); +} + +static void +arc_evict_thread_init(void) +{ + if (zfs_arc_evict_threads == 0) { + /* + * Compute number of threads we want to use for eviction. + * + * Normally, it's log2(ncpus) + ncpus/32, which gets us to the + * default max of 16 threads at ~256 CPUs. + * + * However, that formula goes to two threads at 4 CPUs, which + * is still rather to low to be really useful, so we just go + * with 1 thread at fewer than 6 cores. + */ + if (max_ncpus < 6) + zfs_arc_evict_threads = 1; + else + zfs_arc_evict_threads = + (highbit64(max_ncpus) - 1) + max_ncpus / 32; + } else if (zfs_arc_evict_threads > max_ncpus) + zfs_arc_evict_threads = max_ncpus; + + if (zfs_arc_evict_threads > 1) { + arc_evict_taskq = taskq_create("arc_evict", + zfs_arc_evict_threads, defclsyspri, 0, INT_MAX, + TASKQ_PREPOPULATE); + arc_evict_arg = kmem_zalloc( + sizeof (evict_arg_t) * zfs_arc_evict_threads, KM_SLEEP); + } +} + +/* + * The minimum number of bytes we can evict at once is a block size. + * So, SPA_MAXBLOCKSIZE is a reasonable minimal value per an eviction task. + * We use this value to compute a scaling factor for the eviction tasks. + */ +#define MIN_EVICT_SIZE (SPA_MAXBLOCKSIZE) + /* * Evict buffers from the given arc state, until we've removed the * specified number of bytes. Move the removed buffers to the @@ -4044,9 +4142,12 @@ multilist_t *ml = &state->arcs_list[type]; int num_sublists; arc_buf_hdr_t **markers; + evict_arg_t *eva = NULL; num_sublists = multilist_get_num_sublists(ml); + boolean_t use_evcttq = zfs_arc_evict_threads > 1; + /* * If we've tried to evict from each sublist, made some * progress, but still have not hit the target number of bytes @@ -4068,25 +4169,91 @@ multilist_sublist_unlock(mls); } + if (use_evcttq) { + if (zthr_iscurthread(arc_evict_zthr)) + eva = arc_evict_arg; + else + eva = kmem_alloc(sizeof (evict_arg_t) * + zfs_arc_evict_threads, KM_NOSLEEP); + if (eva) { + for (int i = 0; i < zfs_arc_evict_threads; i++) { + taskq_init_ent(&eva[i].eva_tqent); + eva[i].eva_ml = ml; + eva[i].eva_spa = spa; + } + } else { + /* + * Fall back to the regular single evict if it is not + * possible to allocate memory for the taskq entries. + */ + use_evcttq = B_FALSE; + } + } + + /* + * Start eviction using a randomly selected sublist, this is to try and + * evenly balance eviction across all sublists. Always starting at the + * same sublist (e.g. index 0) would cause evictions to favor certain + * sublists over others. + */ + uint64_t scan_evicted = 0; + int sublists_left = num_sublists; + int sublist_idx = multilist_get_random_index(ml); + /* * While we haven't hit our target number of bytes to evict, or * we're evicting all available buffers. */ while (total_evicted < bytes) { - int sublist_idx = multilist_get_random_index(ml); - uint64_t scan_evicted = 0; + uint64_t evict = MIN_EVICT_SIZE; + uint_t ntasks = zfs_arc_evict_threads; - /* - * Start eviction using a randomly selected sublist, - * this is to try and evenly balance eviction across all - * sublists. Always starting at the same sublist - * (e.g. index 0) would cause evictions to favor certain - * sublists over others. - */ - for (int i = 0; i < num_sublists; i++) { + if (use_evcttq) { + if (sublists_left < ntasks) + ntasks = sublists_left; + + if (ntasks < 2) + use_evcttq = B_FALSE; + } + + if (use_evcttq) { + uint64_t left = bytes - total_evicted; + + if (bytes == ARC_EVICT_ALL) { + evict = bytes; + } else if (left > ntasks * MIN_EVICT_SIZE) { + evict = DIV_ROUND_UP(left, ntasks); + } else { + ntasks = DIV_ROUND_UP(left, MIN_EVICT_SIZE); + if (ntasks == 1) + use_evcttq = B_FALSE; + } + } + + for (int i = 0; sublists_left > 0; i++, sublist_idx++, + sublists_left--) { uint64_t bytes_remaining; uint64_t bytes_evicted; + /* we've reached the end, wrap to the beginning */ + if (sublist_idx >= num_sublists) + sublist_idx = 0; + + if (use_evcttq) { + if (i == ntasks) + break; + + eva[i].eva_marker = markers[sublist_idx]; + eva[i].eva_idx = sublist_idx; + eva[i].eva_bytes = evict; + + taskq_dispatch_ent(arc_evict_taskq, + arc_evict_task, &eva[i], 0, + &eva[i].eva_tqent); + + continue; + } + if (total_evicted < bytes) bytes_remaining = bytes - total_evicted; else @@ -4097,18 +4264,23 @@ scan_evicted += bytes_evicted; total_evicted += bytes_evicted; + } - /* we've reached the end, wrap to the beginning */ - if (++sublist_idx >= num_sublists) - sublist_idx = 0; + if (use_evcttq) { + taskq_wait(arc_evict_taskq); + + for (int i = 0; i < ntasks; i++) { + scan_evicted += eva[i].eva_evicted; + total_evicted += eva[i].eva_evicted; + } } /* - * If we didn't evict anything during this scan, we have - * no reason to believe we'll evict more during another + * If we scanned all sublists and didn't evict anything, we + * have no reason to believe we'll evict more during another * scan, so break the loop. */ - if (scan_evicted == 0) { + if (scan_evicted == 0 && sublists_left == 0) { /* This isn't possible, let's make that obvious */ ASSERT3S(bytes, !=, 0); @@ -4125,13 +4297,33 @@ break; } + + /* + * If we scanned all sublists but still have more to do, + * reset the counts so we can go around again. + */ + if (sublists_left == 0) { + sublists_left = num_sublists; + sublist_idx = multilist_get_random_index(ml); + scan_evicted = 0; + + /* + * Since we're about to reconsider all sublists, + * re-enable use of the evict threads if available. + */ + use_evcttq = (zfs_arc_evict_threads > 1 && eva != NULL); + } } + if (eva != NULL && eva != arc_evict_arg) + kmem_free(eva, sizeof (evict_arg_t) * zfs_arc_evict_threads); + for (int i = 0; i < num_sublists; i++) { multilist_sublist_t *mls = multilist_sublist_lock_idx(ml, i); multilist_sublist_remove(mls, markers[i]); multilist_sublist_unlock(mls); } + if (markers != arc_state_evict_markers) arc_state_free_markers(markers, num_sublists); @@ -4200,15 +4392,17 @@ arc_evict_adj(uint64_t frac, uint64_t total, uint64_t up, uint64_t down, uint_t balance) { - if (total < 8 || up + down == 0) + if (total < 32 || up + down == 0) return (frac); /* - * We should not have more ghost hits than ghost size, but they - * may get close. Restrict maximum adjustment in that case. + * We should not have more ghost hits than ghost size, but they may + * get close. To avoid overflows below up/down should not be bigger + * than 1/5 of total. But to limit maximum adjustment speed restrict + * it some more. */ - if (up + down >= total / 4) { - uint64_t scale = (up + down) / (total / 8); + if (up + down >= total / 16) { + uint64_t scale = (up + down) / (total / 32); up /= scale; down /= scale; } @@ -4217,6 +4411,7 @@ int s = highbit64(total); s = MIN(64 - s, 32); + ASSERT3U(frac, <=, 1ULL << 32); uint64_t ofrac = (1ULL << 32) - frac; if (frac >= 4 * ofrac) @@ -4227,6 +4422,8 @@ down = (down << s) / (total >> (32 - s)); down = down * 100 / balance; + ASSERT3U(up, <=, (1ULL << 32) - frac); + ASSERT3U(down, <=, frac); return (frac + up - down); } @@ -4294,7 +4491,7 @@ * target is not evictable or if they go over arc_dnode_limit. */ int64_t prune = 0; - int64_t dn = wmsum_value(&arc_sums.arcstat_dnode_size); + int64_t dn = aggsum_value(&arc_sums.arcstat_dnode_size); int64_t nem = zfs_refcount_count(&arc_mru->arcs_size[ARC_BUFC_METADATA]) + zfs_refcount_count(&arc_mfu->arcs_size[ARC_BUFC_METADATA]) - zfs_refcount_count(&arc_mru->arcs_esize[ARC_BUFC_METADATA]) @@ -4378,20 +4575,10 @@ return (total_evicted); } -void -arc_flush(spa_t *spa, boolean_t retry) +static void +arc_flush_impl(uint64_t guid, boolean_t retry) { - uint64_t guid = 0; - - /* - * If retry is B_TRUE, a spa must not be specified since we have - * no good way to determine if all of a spa's buffers have been - * evicted from an arc state. - */ - ASSERT(!retry || spa == NULL); - - if (spa != NULL) - guid = spa_load_guid(spa); + ASSERT(!retry || guid == 0); (void) arc_flush_state(arc_mru, guid, ARC_BUFC_DATA, retry); (void) arc_flush_state(arc_mru, guid, ARC_BUFC_METADATA, retry); @@ -4409,6 +4596,106 @@ (void) arc_flush_state(arc_uncached, guid, ARC_BUFC_METADATA, retry); } +void +arc_flush(spa_t *spa, boolean_t retry) +{ + /* + * If retry is B_TRUE, a spa must not be specified since we have + * no good way to determine if all of a spa's buffers have been + * evicted from an arc state. + */ + ASSERT(!retry || spa == NULL); + + arc_flush_impl(spa != NULL ? spa_load_guid(spa) : 0, retry); +} + +static arc_async_flush_t * +arc_async_flush_add(uint64_t spa_guid, uint_t level) +{ + arc_async_flush_t *af = kmem_alloc(sizeof (*af), KM_SLEEP); + af->af_spa_guid = spa_guid; + af->af_cache_level = level; + taskq_init_ent(&af->af_tqent); + list_link_init(&af->af_node); + + mutex_enter(&arc_async_flush_lock); + list_insert_tail(&arc_async_flush_list, af); + mutex_exit(&arc_async_flush_lock); + + return (af); +} + +static void +arc_async_flush_remove(uint64_t spa_guid, uint_t level) +{ + mutex_enter(&arc_async_flush_lock); + for (arc_async_flush_t *af = list_head(&arc_async_flush_list); + af != NULL; af = list_next(&arc_async_flush_list, af)) { + if (af->af_spa_guid == spa_guid && + af->af_cache_level == level) { + list_remove(&arc_async_flush_list, af); + kmem_free(af, sizeof (*af)); + break; + } + } + mutex_exit(&arc_async_flush_lock); +} + +static void +arc_flush_task(void *arg) +{ + arc_async_flush_t *af = arg; + hrtime_t start_time = gethrtime(); + uint64_t spa_guid = af->af_spa_guid; + + arc_flush_impl(spa_guid, B_FALSE); + arc_async_flush_remove(spa_guid, af->af_cache_level); + + uint64_t elaspsed = NSEC2MSEC(gethrtime() - start_time); + if (elaspsed > 0) { + zfs_dbgmsg("spa %llu arc flushed in %llu ms", + (u_longlong_t)spa_guid, (u_longlong_t)elaspsed); + } +} + +/* + * ARC buffers use the spa's load guid and can continue to exist after + * the spa_t is gone (exported). The blocks are orphaned since each + * spa import has a different load guid. + * + * It's OK if the spa is re-imported while this asynchronous flush is + * still in progress. The new spa_load_guid will be different. + * + * Also, arc_fini will wait for any arc_flush_task to finish. + */ +void +arc_flush_async(spa_t *spa) +{ + uint64_t spa_guid = spa_load_guid(spa); + arc_async_flush_t *af = arc_async_flush_add(spa_guid, 1); + + taskq_dispatch_ent(arc_flush_taskq, arc_flush_task, + af, TQ_SLEEP, &af->af_tqent); +} + +/* + * Check if a guid is still in-use as part of an async teardown task + */ +boolean_t +arc_async_flush_guid_inuse(uint64_t spa_guid) +{ + mutex_enter(&arc_async_flush_lock); + for (arc_async_flush_t *af = list_head(&arc_async_flush_list); + af != NULL; af = list_next(&arc_async_flush_list, af)) { + if (af->af_spa_guid == spa_guid) { + mutex_exit(&arc_async_flush_lock); + return (B_TRUE); + } + } + mutex_exit(&arc_async_flush_lock); + return (B_FALSE); +} + uint64_t arc_reduce_target_size(uint64_t to_free) { @@ -4436,6 +4723,13 @@ } /* + * Since dbuf cache size is a fraction of target ARC size, we should + * notify dbuf about the reduction, which might be significant, + * especially if current ARC size was much smaller than the target. + */ + dbuf_cache_reduce_target_size(); + + /* * Whether or not we reduced the target size, request eviction if the * current size is over it now, since caller obviously wants some RAM. */ @@ -4789,11 +5083,13 @@ * in the ARC. In practice, that's in the tens of MB, which is low * enough to be safe. */ - int64_t over = aggsum_lower_bound(&arc_sums.arcstat_size) - arc_c - + int64_t arc_over = aggsum_lower_bound(&arc_sums.arcstat_size) - arc_c - zfs_max_recordsize; + int64_t dn_over = aggsum_lower_bound(&arc_sums.arcstat_dnode_size) - + arc_dnode_limit; /* Always allow at least one block of overflow. */ - if (over < 0) + if (arc_over < 0 && dn_over <= 0) return (ARC_OVF_NONE); /* If we are under memory pressure, report severe overflow. */ @@ -4804,7 +5100,7 @@ int64_t overflow = (arc_c >> zfs_arc_overflow_shift) / 2; if (use_reserve) overflow *= 3; - return (over < overflow ? ARC_OVF_SOME : ARC_OVF_SEVERE); + return (arc_over < overflow ? ARC_OVF_SOME : ARC_OVF_SEVERE); } static abd_t * @@ -6334,27 +6630,11 @@ arc_state_t *state = hdr->b_l1hdr.b_state; ASSERT3P(hash_lock, ==, HDR_LOCK(hdr)); ASSERT3P(state, !=, arc_anon); + ASSERT3P(state, !=, arc_l2c_only); /* this buffer is not on any list */ ASSERT3S(zfs_refcount_count(&hdr->b_l1hdr.b_refcnt), >, 0); - if (HDR_HAS_L2HDR(hdr)) { - mutex_enter(&hdr->b_l2hdr.b_dev->l2ad_mtx); - - /* - * We have to recheck this conditional again now that - * we're holding the l2ad_mtx to prevent a race with - * another thread which might be concurrently calling - * l2arc_evict(). In that case, l2arc_evict() might have - * destroyed the header's L2 portion as we were waiting - * to acquire the l2ad_mtx. - */ - if (HDR_HAS_L2HDR(hdr)) - arc_hdr_l2hdr_destroy(hdr); - - mutex_exit(&hdr->b_l2hdr.b_dev->l2ad_mtx); - } - /* * Do we have more than one buf? */ @@ -6366,10 +6646,6 @@ boolean_t protected = HDR_PROTECTED(hdr); enum zio_compress compress = arc_hdr_get_compress(hdr); arc_buf_contents_t type = arc_buf_type(hdr); - VERIFY3U(hdr->b_type, ==, type); - - ASSERT(hdr->b_l1hdr.b_buf != buf || buf->b_next != NULL); - VERIFY3S(remove_reference(hdr, tag), >, 0); if (ARC_BUF_SHARED(buf) && !ARC_BUF_COMPRESSED(buf)) { ASSERT3P(hdr->b_l1hdr.b_buf, !=, buf); @@ -6377,10 +6653,10 @@ } /* - * Pull the data off of this hdr and attach it to - * a new anonymous hdr. Also find the last buffer + * Pull the buffer off of this hdr and find the last buffer * in the hdr's buffer list. */ + VERIFY3S(remove_reference(hdr, tag), >, 0); arc_buf_t *lastbuf = arc_buf_remove(hdr, buf); ASSERT3P(lastbuf, !=, NULL); @@ -6389,7 +6665,6 @@ * buffer, then we must stop sharing that block. */ if (ARC_BUF_SHARED(buf)) { - ASSERT3P(hdr->b_l1hdr.b_buf, !=, buf); ASSERT(!arc_buf_is_shared(lastbuf)); /* @@ -6411,7 +6686,6 @@ abd_copy_from_buf(hdr->b_l1hdr.b_pabd, buf->b_data, psize); } - VERIFY3P(lastbuf->b_data, !=, NULL); } else if (HDR_SHARED_DATA(hdr)) { /* * Uncompressed shared buffers are always at the end @@ -6427,18 +6701,10 @@ } ASSERT(hdr->b_l1hdr.b_pabd != NULL || HDR_HAS_RABD(hdr)); - ASSERT3P(state, !=, arc_l2c_only); (void) zfs_refcount_remove_many(&state->arcs_size[type], arc_buf_size(buf), buf); - if (zfs_refcount_is_zero(&hdr->b_l1hdr.b_refcnt)) { - ASSERT3P(state, !=, arc_l2c_only); - (void) zfs_refcount_remove_many( - &state->arcs_esize[type], - arc_buf_size(buf), buf); - } - arc_cksum_verify(buf); arc_buf_unwatch(buf); @@ -6466,6 +6732,15 @@ /* protected by hash lock, or hdr is on arc_anon */ ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); ASSERT(!HDR_IO_IN_PROGRESS(hdr)); + + if (HDR_HAS_L2HDR(hdr)) { + mutex_enter(&hdr->b_l2hdr.b_dev->l2ad_mtx); + /* Recheck to prevent race with l2arc_evict(). */ + if (HDR_HAS_L2HDR(hdr)) + arc_hdr_l2hdr_destroy(hdr); + mutex_exit(&hdr->b_l2hdr.b_dev->l2ad_mtx); + } + hdr->b_l1hdr.b_mru_hits = 0; hdr->b_l1hdr.b_mru_ghost_hits = 0; hdr->b_l1hdr.b_mfu_hits = 0; @@ -6793,6 +7068,8 @@ localprop.zp_nopwrite = B_FALSE; localprop.zp_copies = MIN(localprop.zp_copies, SPA_DVAS_PER_BP - 1); + localprop.zp_gang_copies = + MIN(localprop.zp_gang_copies, SPA_DVAS_PER_BP - 1); } zio_flags |= ZIO_FLAG_RAW; } else if (ARC_BUF_COMPRESSED(buf)) { @@ -7050,7 +7327,7 @@ #if defined(COMPAT_FREEBSD11) as->arcstat_other_size.value.ui64 = wmsum_value(&arc_sums.arcstat_bonus_size) + - wmsum_value(&arc_sums.arcstat_dnode_size) + + aggsum_value(&arc_sums.arcstat_dnode_size) + wmsum_value(&arc_sums.arcstat_dbuf_size); #endif @@ -7092,9 +7369,10 @@ &as->arcstat_uncached_evictable_metadata); as->arcstat_dnode_size.value.ui64 = - wmsum_value(&arc_sums.arcstat_dnode_size); + aggsum_value(&arc_sums.arcstat_dnode_size); as->arcstat_bonus_size.value.ui64 = wmsum_value(&arc_sums.arcstat_bonus_size); + as->arcstat_l2_ndev.value.ui64 = l2arc_ndev; as->arcstat_l2_hits.value.ui64 = wmsum_value(&arc_sums.arcstat_l2_hits); as->arcstat_l2_misses.value.ui64 = @@ -7462,7 +7740,7 @@ wmsum_init(&arc_sums.arcstat_data_size, 0); wmsum_init(&arc_sums.arcstat_metadata_size, 0); wmsum_init(&arc_sums.arcstat_dbuf_size, 0); - wmsum_init(&arc_sums.arcstat_dnode_size, 0); + aggsum_init(&arc_sums.arcstat_dnode_size, 0); wmsum_init(&arc_sums.arcstat_bonus_size, 0); wmsum_init(&arc_sums.arcstat_l2_hits, 0); wmsum_init(&arc_sums.arcstat_l2_misses, 0); @@ -7621,7 +7899,7 @@ wmsum_fini(&arc_sums.arcstat_data_size); wmsum_fini(&arc_sums.arcstat_metadata_size); wmsum_fini(&arc_sums.arcstat_dbuf_size); - wmsum_fini(&arc_sums.arcstat_dnode_size); + aggsum_fini(&arc_sums.arcstat_dnode_size); wmsum_fini(&arc_sums.arcstat_bonus_size); wmsum_fini(&arc_sums.arcstat_l2_hits); wmsum_fini(&arc_sums.arcstat_l2_misses); @@ -7694,6 +7972,7 @@ /* How to set default max varies by platform. */ arc_c_max = arc_default_max(arc_c_min, allmem); } + void arc_init(void) { @@ -7771,6 +8050,14 @@ arc_prune_taskq = taskq_create("arc_prune", zfs_arc_prune_task_threads, defclsyspri, 100, INT_MAX, TASKQ_PREPOPULATE | TASKQ_DYNAMIC); + arc_evict_thread_init(); + + list_create(&arc_async_flush_list, sizeof (arc_async_flush_t), + offsetof(arc_async_flush_t, af_node)); + mutex_init(&arc_async_flush_lock, NULL, MUTEX_DEFAULT, NULL); + arc_flush_taskq = taskq_create("arc_flush", MIN(boot_ncpus, 4), + defclsyspri, 1, INT_MAX, TASKQ_DYNAMIC); + arc_ksp = kstat_create("zfs", 0, "arcstats", "misc", KSTAT_TYPE_NAMED, sizeof (arc_stats) / sizeof (kstat_named_t), KSTAT_FLAG_VIRTUAL); @@ -7836,6 +8123,10 @@ arc_lowmem_fini(); #endif /* _KERNEL */ + /* Wait for any background flushes */ + taskq_wait(arc_flush_taskq); + taskq_destroy(arc_flush_taskq); + /* Use B_TRUE to ensure *all* buffers are evicted */ arc_flush(NULL, B_TRUE); @@ -7847,6 +8138,9 @@ taskq_wait(arc_prune_taskq); taskq_destroy(arc_prune_taskq); + list_destroy(&arc_async_flush_list); + mutex_destroy(&arc_async_flush_lock); + mutex_enter(&arc_prune_mtx); while ((p = list_remove_head(&arc_prune_list)) != NULL) { (void) zfs_refcount_remove(&p->p_refcnt, &arc_prune_list); @@ -7858,11 +8152,20 @@ list_destroy(&arc_prune_list); mutex_destroy(&arc_prune_mtx); + if (arc_evict_taskq != NULL) + taskq_wait(arc_evict_taskq); + (void) zthr_cancel(arc_evict_zthr); (void) zthr_cancel(arc_reap_zthr); arc_state_free_markers(arc_state_evict_markers, arc_state_evict_marker_count); + if (arc_evict_taskq != NULL) { + taskq_destroy(arc_evict_taskq); + kmem_free(arc_evict_arg, + sizeof (evict_arg_t) * zfs_arc_evict_threads); + } + mutex_destroy(&arc_evict_lock); list_destroy(&arc_evict_waiters); @@ -8218,6 +8521,18 @@ return (next); } +static boolean_t +l2arc_dev_invalid(const l2arc_dev_t *dev) +{ + /* + * We want to skip devices that are being rebuilt, trimmed, + * removed, or belong to a spa that is being exported. + */ + return (dev->l2ad_vdev == NULL || vdev_is_dead(dev->l2ad_vdev) || + dev->l2ad_rebuild || dev->l2ad_trim_all || + dev->l2ad_spa == NULL || dev->l2ad_spa->spa_is_exporting); +} + /* * Cycle through L2ARC devices. This is how L2ARC load balances. * If a device is returned, this also returns holding the spa config lock. @@ -8258,12 +8573,10 @@ break; ASSERT3P(next, !=, NULL); - } while (vdev_is_dead(next->l2ad_vdev) || next->l2ad_rebuild || - next->l2ad_trim_all || next->l2ad_spa->spa_is_exporting); + } while (l2arc_dev_invalid(next)); /* if we were unable to find any usable vdevs, return NULL */ - if (vdev_is_dead(next->l2ad_vdev) || next->l2ad_rebuild || - next->l2ad_trim_all || next->l2ad_spa->spa_is_exporting) + if (l2arc_dev_invalid(next)) next = NULL; l2arc_dev_last = next; @@ -8393,6 +8706,8 @@ uint64_t psize = HDR_GET_PSIZE(hdr); l2arc_hdr_arcstats_decrement(hdr); + ASSERT(dev->l2ad_vdev != NULL); + bytes_dropped += vdev_psize_to_asize(dev->l2ad_vdev, psize); (void) zfs_refcount_remove_many(&dev->l2ad_alloc, @@ -8774,6 +9089,8 @@ if (dev->l2ad_log_entries == 0) { return (0); } else { + ASSERT(dev->l2ad_vdev != NULL); + uint64_t log_entries = write_sz >> SPA_MINBLOCKSHIFT; uint64_t log_blocks = (log_entries + @@ -8802,6 +9119,9 @@ vdev_t *vd = dev->l2ad_vdev; boolean_t rerun; + ASSERT(vd != NULL || all); + ASSERT(dev->l2ad_spa != NULL || all); + buflist = &dev->l2ad_buflist; top: @@ -8894,7 +9214,8 @@ if (!all && l2arc_log_blkptr_valid(dev, lb_ptr_buf->lb_ptr)) { break; } else { - vdev_space_update(vd, -asize, 0, 0); + if (vd != NULL) + vdev_space_update(vd, -asize, 0, 0); ARCSTAT_INCR(arcstat_l2_log_blk_asize, -asize); ARCSTAT_BUMPDOWN(arcstat_l2_log_blk_count); zfs_refcount_remove_many(&dev->l2ad_lb_asize, asize, @@ -9308,6 +9629,8 @@ hdr->b_l2hdr.b_hits = 0; hdr->b_l2hdr.b_arcs_state = hdr->b_l1hdr.b_state->arcs_state; + /* l2arc_hdr_arcstats_update() expects a valid asize */ + HDR_SET_L2SIZE(hdr, asize); arc_hdr_set_flags(hdr, ARC_FLAG_HAS_L2HDR | ARC_FLAG_L2_WRITING); @@ -9561,6 +9884,12 @@ spa_t *spa = dev->l2ad_spa; /* + * After a l2arc_remove_vdev(), the spa_t will no longer be valid + */ + if (spa == NULL) + return; + + /* * The L2ARC has to hold at least the payload of one log block for * them to be restored (persistent L2ARC). The payload of a log block * depends on the amount of its log entries. We always write log blocks @@ -9727,53 +10056,110 @@ l2arc_rebuild_dev(dev, reopen); } +typedef struct { + l2arc_dev_t *rva_l2arc_dev; + uint64_t rva_spa_gid; + uint64_t rva_vdev_gid; + boolean_t rva_async; + +} remove_vdev_args_t; + +static void +l2arc_device_teardown(void *arg) +{ + remove_vdev_args_t *rva = arg; + l2arc_dev_t *remdev = rva->rva_l2arc_dev; + hrtime_t start_time = gethrtime(); + + /* + * Clear all buflists and ARC references. L2ARC device flush. + */ + l2arc_evict(remdev, 0, B_TRUE); + list_destroy(&remdev->l2ad_buflist); + ASSERT(list_is_empty(&remdev->l2ad_lbptr_list)); + list_destroy(&remdev->l2ad_lbptr_list); + mutex_destroy(&remdev->l2ad_mtx); + zfs_refcount_destroy(&remdev->l2ad_alloc); + zfs_refcount_destroy(&remdev->l2ad_lb_asize); + zfs_refcount_destroy(&remdev->l2ad_lb_count); + kmem_free(remdev->l2ad_dev_hdr, remdev->l2ad_dev_hdr_asize); + vmem_free(remdev, sizeof (l2arc_dev_t)); + + uint64_t elaspsed = NSEC2MSEC(gethrtime() - start_time); + if (elaspsed > 0) { + zfs_dbgmsg("spa %llu, vdev %llu removed in %llu ms", + (u_longlong_t)rva->rva_spa_gid, + (u_longlong_t)rva->rva_vdev_gid, + (u_longlong_t)elaspsed); + } + + if (rva->rva_async) + arc_async_flush_remove(rva->rva_spa_gid, 2); + kmem_free(rva, sizeof (remove_vdev_args_t)); +} + /* * Remove a vdev from the L2ARC. */ void l2arc_remove_vdev(vdev_t *vd) { - l2arc_dev_t *remdev = NULL; + spa_t *spa = vd->vdev_spa; + boolean_t asynchronous = spa->spa_state == POOL_STATE_EXPORTED || + spa->spa_state == POOL_STATE_DESTROYED; /* * Find the device by vdev */ - remdev = l2arc_vdev_get(vd); + l2arc_dev_t *remdev = l2arc_vdev_get(vd); ASSERT3P(remdev, !=, NULL); /* + * Save info for final teardown + */ + remove_vdev_args_t *rva = kmem_alloc(sizeof (remove_vdev_args_t), + KM_SLEEP); + rva->rva_l2arc_dev = remdev; + rva->rva_spa_gid = spa_load_guid(spa); + rva->rva_vdev_gid = remdev->l2ad_vdev->vdev_guid; + + /* * Cancel any ongoing or scheduled rebuild. */ mutex_enter(&l2arc_rebuild_thr_lock); + remdev->l2ad_rebuild_cancel = B_TRUE; if (remdev->l2ad_rebuild_began == B_TRUE) { - remdev->l2ad_rebuild_cancel = B_TRUE; while (remdev->l2ad_rebuild == B_TRUE) cv_wait(&l2arc_rebuild_thr_cv, &l2arc_rebuild_thr_lock); } mutex_exit(&l2arc_rebuild_thr_lock); + rva->rva_async = asynchronous; /* * Remove device from global list */ + ASSERT(spa_config_held(spa, SCL_L2ARC, RW_WRITER) & SCL_L2ARC); mutex_enter(&l2arc_dev_mtx); list_remove(l2arc_dev_list, remdev); l2arc_dev_last = NULL; /* may have been invalidated */ atomic_dec_64(&l2arc_ndev); + + /* During a pool export spa & vdev will no longer be valid */ + if (asynchronous) { + remdev->l2ad_spa = NULL; + remdev->l2ad_vdev = NULL; + } mutex_exit(&l2arc_dev_mtx); - /* - * Clear all buflists and ARC references. L2ARC device flush. - */ - l2arc_evict(remdev, 0, B_TRUE); - list_destroy(&remdev->l2ad_buflist); - ASSERT(list_is_empty(&remdev->l2ad_lbptr_list)); - list_destroy(&remdev->l2ad_lbptr_list); - mutex_destroy(&remdev->l2ad_mtx); - zfs_refcount_destroy(&remdev->l2ad_alloc); - zfs_refcount_destroy(&remdev->l2ad_lb_asize); - zfs_refcount_destroy(&remdev->l2ad_lb_count); - kmem_free(remdev->l2ad_dev_hdr, remdev->l2ad_dev_hdr_asize); - vmem_free(remdev, sizeof (l2arc_dev_t)); + if (!asynchronous) { + l2arc_device_teardown(rva); + return; + } + + arc_async_flush_t *af = arc_async_flush_add(rva->rva_spa_gid, 2); + + taskq_dispatch_ent(arc_flush_taskq, l2arc_device_teardown, rva, + TQ_SLEEP, &af->af_tqent); } void @@ -10099,7 +10485,15 @@ vmem_free(this_lb, sizeof (*this_lb)); vmem_free(next_lb, sizeof (*next_lb)); - if (!l2arc_rebuild_enabled) { + if (err == ECANCELED) { + /* + * In case the rebuild was canceled do not log to spa history + * log as the pool may be in the process of being removed. + */ + zfs_dbgmsg("L2ARC rebuild aborted, restored %llu blocks", + (u_longlong_t)zfs_refcount_count(&dev->l2ad_lb_count)); + return (err); + } else if (!l2arc_rebuild_enabled) { spa_history_log_internal(spa, "L2ARC rebuild", NULL, "disabled"); } else if (err == 0 && zfs_refcount_count(&dev->l2ad_lb_count) > 0) { @@ -10117,13 +10511,6 @@ "no valid log blocks"); memset(l2dhdr, 0, dev->l2ad_dev_hdr_asize); l2arc_dev_hdr_update(dev); - } else if (err == ECANCELED) { - /* - * In case the rebuild was canceled do not log to spa history - * log as the pool may be in the process of being removed. - */ - zfs_dbgmsg("L2ARC rebuild aborted, restored %llu blocks", - (u_longlong_t)zfs_refcount_count(&dev->l2ad_lb_count)); } else if (err != 0) { spa_history_log_internal(spa, "L2ARC rebuild", NULL, "aborted, restored %llu blocks", @@ -10395,7 +10782,8 @@ arc_buf_hdr_t *hdr, *exists; kmutex_t *hash_lock; arc_buf_contents_t type = L2BLK_GET_TYPE((le)->le_prop); - uint64_t asize; + uint64_t asize = vdev_psize_to_asize(dev->l2ad_vdev, + L2BLK_GET_PSIZE((le)->le_prop)); /* * Do all the allocation before grabbing any locks, this lets us @@ -10404,13 +10792,11 @@ */ hdr = arc_buf_alloc_l2only(L2BLK_GET_LSIZE((le)->le_prop), type, dev, le->le_dva, le->le_daddr, - L2BLK_GET_PSIZE((le)->le_prop), le->le_birth, + L2BLK_GET_PSIZE((le)->le_prop), asize, le->le_birth, L2BLK_GET_COMPRESS((le)->le_prop), le->le_complevel, L2BLK_GET_PROTECTED((le)->le_prop), L2BLK_GET_PREFETCH((le)->le_prop), L2BLK_GET_STATE((le)->le_prop)); - asize = vdev_psize_to_asize(dev->l2ad_vdev, - L2BLK_GET_PSIZE((le)->le_prop)); /* * vdev_space_update() has to be called before arc_hdr_destroy() to @@ -10440,6 +10826,8 @@ exists->b_l2hdr.b_daddr = le->le_daddr; exists->b_l2hdr.b_arcs_state = L2BLK_GET_STATE((le)->le_prop); + /* l2arc_hdr_arcstats_update() expects a valid asize */ + HDR_SET_L2SIZE(exists, asize); mutex_enter(&dev->l2ad_mtx); list_insert_tail(&dev->l2ad_buflist, exists); (void) zfs_refcount_add_many(&dev->l2ad_alloc, @@ -10706,9 +11094,15 @@ l2arc_range_check_overlap(dev->l2ad_hand, dev->l2ad_evict, start) || l2arc_range_check_overlap(dev->l2ad_hand, dev->l2ad_evict, end); - return (start >= dev->l2ad_start && end <= dev->l2ad_end && - asize > 0 && asize <= sizeof (l2arc_log_blk_phys_t) && - (!evicted || dev->l2ad_first)); + if (asize == 0 || asize > sizeof (l2arc_log_blk_phys_t) || + start < dev->l2ad_start || end > dev->l2ad_end) + return (B_FALSE); + + /* On a first sweep only the region below the write hand was written. */ + if (dev->l2ad_first) + return (end < dev->l2ad_hand); + + return (!evicted); } /* @@ -10798,6 +11192,7 @@ EXPORT_SYMBOL(arc_read); EXPORT_SYMBOL(arc_buf_info); EXPORT_SYMBOL(arc_getbuf_func); +EXPORT_SYMBOL(arc_buf_destroy); EXPORT_SYMBOL(arc_add_prune_callback); EXPORT_SYMBOL(arc_remove_prune_callback); @@ -10816,8 +11211,10 @@ ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, shrink_shift, param_set_arc_int, param_get_uint, ZMOD_RW, "log2(fraction of ARC to reclaim)"); +#ifdef _KERNEL ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, pc_percent, UINT, ZMOD_RW, "Percent of pagecache to reclaim ARC to"); +#endif ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, average_blocksize, UINT, ZMOD_RD, "Target average block size"); @@ -10901,3 +11298,6 @@ ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, prune_task_threads, INT, ZMOD_RW, "Number of arc_prune threads"); + +ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, evict_threads, UINT, ZMOD_RD, + "Number of threads to use for ARC eviction."); diff -Nru zfs-linux-2.3.2/module/zfs/dataset_kstats.c zfs-linux-2.3.9/module/zfs/dataset_kstats.c --- zfs-linux-2.3.2/module/zfs/dataset_kstats.c 2025-05-01 18:45:25.552127217 +0000 +++ zfs-linux-2.3.9/module/zfs/dataset_kstats.c 2026-08-21 21:15:50.910497838 +0000 @@ -212,7 +212,7 @@ char *ds_name; ds_name = KSTAT_NAMED_STR_PTR(&dkv->dkv_ds_name); - ASSERT3S(ds_name, !=, NULL); + ASSERT3P(ds_name, !=, NULL); (void) strlcpy(ds_name, name, KSTAT_NAMED_STR_BUFLEN(&dkv->dkv_ds_name)); } diff -Nru zfs-linux-2.3.2/module/zfs/dbuf.c zfs-linux-2.3.9/module/zfs/dbuf.c --- zfs-linux-2.3.2/module/zfs/dbuf.c 2025-05-01 18:45:25.556127294 +0000 +++ zfs-linux-2.3.9/module/zfs/dbuf.c 2026-08-21 21:15:50.917497755 +0000 @@ -668,8 +668,7 @@ { if (dn->dn_objset->os_secondary_cache == ZFS_CACHE_ALL || (dn->dn_objset->os_secondary_cache == ZFS_CACHE_METADATA && - (level > 0 || - DMU_OT_IS_METADATA(dn->dn_handle->dnh_dnode->dn_type)))) { + (level > 0 || DMU_OT_IS_METADATA(dn->dn_type)))) { if (l2arc_exclude_special == 0) return (B_TRUE); @@ -866,12 +865,33 @@ * and grabbing the lock results in massive lock contention. */ if (size > dbuf_cache_target_bytes()) { - if (size > dbuf_cache_hiwater_bytes()) + /* + * Avoid calling dbuf_evict_one() from memory reclaim context + * (e.g. Linux kswapd, FreeBSD pagedaemon) to prevent deadlocks. + * Memory reclaim threads can get stuck waiting for the dbuf + * hash lock. + */ + if (size > dbuf_cache_hiwater_bytes() && + !current_is_reclaim_thread()) { dbuf_evict_one(); + } cv_signal(&dbuf_evict_cv); } } +/* + * Since dbuf cache size is a fraction of target ARC size, ARC calls this when + * its target size is reduced due to memory pressure. + */ +void +dbuf_cache_reduce_target_size(void) +{ + uint64_t size = zfs_refcount_count(&dbuf_caches[DB_DBUF_CACHE].size); + + if (size > dbuf_cache_target_bytes()) + cv_signal(&dbuf_evict_cv); +} + static int dbuf_kstat_update(kstat_t *ksp, int rw) { @@ -1172,16 +1192,9 @@ ASSERT3U(db->db_parent->db_level, ==, db->db_level+1); ASSERT3U(db->db_parent->db.db_object, ==, db->db.db_object); - /* - * dnode_grow_indblksz() can make this fail if we don't - * have the parent's rwlock. XXX indblksz no longer - * grows. safe to do this now? - */ - if (RW_LOCK_HELD(&db->db_parent->db_rwlock)) { - ASSERT3P(db->db_blkptr, ==, - ((blkptr_t *)db->db_parent->db.db_data + - db->db_blkid % epb)); - } + ASSERT3P(db->db_blkptr, ==, + ((blkptr_t *)db->db_parent->db.db_data + + db->db_blkid % epb)); } } if ((db->db_blkptr == NULL || BP_IS_HOLE(db->db_blkptr)) && @@ -1437,6 +1450,7 @@ static int dbuf_read_bonus(dmu_buf_impl_t *db, dnode_t *dn) { + void* db_data; int bonuslen, max_bonuslen; bonuslen = MIN(dn->dn_bonuslen, dn->dn_phys->dn_bonuslen); @@ -1444,21 +1458,22 @@ ASSERT(MUTEX_HELD(&db->db_mtx)); ASSERT(DB_DNODE_HELD(db)); ASSERT3U(bonuslen, <=, db->db.db_size); - db->db.db_data = kmem_alloc(max_bonuslen, KM_SLEEP); + db_data = kmem_alloc(max_bonuslen, KM_SLEEP); arc_space_consume(max_bonuslen, ARC_SPACE_BONUS); if (bonuslen < max_bonuslen) - memset(db->db.db_data, 0, max_bonuslen); + memset(db_data, 0, max_bonuslen); if (bonuslen) - memcpy(db->db.db_data, DN_BONUS(dn->dn_phys), bonuslen); + memcpy(db_data, DN_BONUS(dn->dn_phys), bonuslen); + db->db.db_data = db_data; db->db_state = DB_CACHED; DTRACE_SET_STATE(db, "bonus buffer filled"); return (0); } static void -dbuf_handle_indirect_hole(dmu_buf_impl_t *db, dnode_t *dn, blkptr_t *dbbp) +dbuf_handle_indirect_hole(void *data, dnode_t *dn, blkptr_t *dbbp) { - blkptr_t *bps = db->db.db_data; + blkptr_t *bps = data; uint32_t indbs = 1ULL << dn->dn_indblkshift; int n_bps = indbs >> SPA_BLKPTRSHIFT; @@ -1483,25 +1498,39 @@ dbuf_read_hole(dmu_buf_impl_t *db, dnode_t *dn, blkptr_t *bp) { ASSERT(MUTEX_HELD(&db->db_mtx)); + arc_buf_t *db_data; int is_hole = bp == NULL || BP_IS_HOLE(bp); /* - * For level 0 blocks only, if the above check fails: - * Recheck BP_IS_HOLE() after dnode_block_freed() in case dnode_sync() - * processes the delete record and clears the bp while we are waiting - * for the dn_mtx (resulting in a "no" from block_freed). + * For level 0 blocks only, if the above check didn't find a hole, + * consult dnode_block_freed() to check for pending frees. + * + * If the block has been overridden by a block clone or direct I/O + * write, we can't use dnode_block_freed() directly because it would + * find frees from TXGs before the override, which should not make + * the block appear freed. Instead, check only free ranges from + * TXGs after the override. */ - if (!is_hole && db->db_level == 0) - is_hole = dnode_block_freed(dn, db->db_blkid) || BP_IS_HOLE(bp); + if (!is_hole && db->db_level == 0) { + dbuf_dirty_record_t *dr = list_head(&db->db_dirty_records); + if (dr != NULL && + (dr->dt.dl.dr_brtwrite || dr->dt.dl.dr_diowrite)) { + is_hole = dnode_block_freed_after(dn, + db->db_blkid, dr->dr_txg); + } else { + is_hole = dnode_block_freed(dn, db->db_blkid); + } + } if (is_hole) { - dbuf_set_data(db, dbuf_alloc_arcbuf(db)); - memset(db->db.db_data, 0, db->db.db_size); + db_data = dbuf_alloc_arcbuf(db); + memset(db_data->b_data, 0, db->db.db_size); if (bp != NULL && db->db_level > 0 && BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) != 0) { - dbuf_handle_indirect_hole(db, dn, bp); + dbuf_handle_indirect_hole(db_data->b_data, dn, bp); } + dbuf_set_data(db, db_data); db->db_state = DB_CACHED; DTRACE_SET_STATE(db, "hole read satisfied"); return (0); @@ -2193,6 +2222,17 @@ mutex_enter(&dn->dn_mtx); int txgoff = tx->tx_txg & TXG_MASK; + + /* + * Assert that we are not modifying the range tree for the syncing + * TXG from a non-syncing thread. We verify that the tx's + * transaction group is strictly newer than the one currently + * syncing (meaning we are in open context). If this triggers, + * it indicates a race where syncing dn_free_range tree is + * being modified while dnode_sync() may be iterating over it. + */ + ASSERT(tx->tx_txg > spa_syncing_txg(dn->dn_objset->os_spa)); + if (dn->dn_free_ranges[txgoff] != NULL) { zfs_range_tree_clear(dn->dn_free_ranges[txgoff], blkid, 1); } @@ -2401,6 +2441,7 @@ db->db_blkid != DMU_SPILL_BLKID) { mutex_enter(&dn->dn_mtx); if (dn->dn_free_ranges[txgoff] != NULL) { + FREE_RANGE_VERIFY(tx, dn); zfs_range_tree_clear(dn->dn_free_ranges[txgoff], db->db_blkid, 1); } @@ -2520,6 +2561,7 @@ { dmu_buf_impl_t *db = dr->dr_dbuf; + ASSERT(MUTEX_HELD(&db->db_mtx)); if (dr->dt.dl.dr_data != db->db.db_data) { struct dnode *dn = dr->dr_dnode; int max_bonuslen = DN_SLOTS_TO_BONUSLEN(dn->dn_num_slots); @@ -3373,12 +3415,8 @@ *parentp = NULL; return (err); } - rw_enter(&(*parentp)->db_rwlock, RW_READER); *bpp = ((blkptr_t *)(*parentp)->db.db_data) + (blkid & ((1ULL << epbs) - 1)); - if (blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs))) - ASSERT(BP_IS_HOLE(*bpp)); - rw_exit(&(*parentp)->db_rwlock); return (0); } else { /* the block is referenced from the dnode */ @@ -3525,7 +3563,6 @@ int dpa_curlevel; /* The current level that we're reading */ dnode_t *dpa_dnode; /* The dnode associated with the prefetch */ zio_priority_t dpa_prio; /* The priority I/Os should be issued at. */ - zio_t *dpa_zio; /* The parent zio_t for all prefetches. */ arc_flags_t dpa_aflags; /* Flags to pass to the final prefetch. */ dbuf_prefetch_fn dpa_cb; /* prefetch completion callback */ void *dpa_arg; /* prefetch completion arg */ @@ -3560,12 +3597,9 @@ static void dbuf_issue_final_prefetch(dbuf_prefetch_arg_t *dpa, blkptr_t *bp) { - ASSERT(!BP_IS_REDACTED(bp) || - dsl_dataset_feature_is_active( - dpa->dpa_dnode->dn_objset->os_dsl_dataset, - SPA_FEATURE_REDACTED_DATASETS)); - - if (BP_IS_HOLE(bp) || BP_IS_EMBEDDED(bp) || BP_IS_REDACTED(bp)) + ASSERT(!BP_IS_HOLE(bp)); + ASSERT(!BP_IS_REDACTED(bp)); + if (BP_IS_EMBEDDED(bp)) return (dbuf_prefetch_fini(dpa, B_FALSE)); int zio_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE; @@ -3580,8 +3614,7 @@ ASSERT3U(dpa->dpa_curlevel, ==, BP_GET_LEVEL(bp)); ASSERT3U(dpa->dpa_curlevel, ==, dpa->dpa_zb.zb_level); - ASSERT(dpa->dpa_zio != NULL); - (void) arc_read(dpa->dpa_zio, dpa->dpa_spa, bp, + (void) arc_read(NULL, dpa->dpa_spa, bp, dbuf_issue_final_prefetch_done, dpa, dpa->dpa_prio, zio_flags, &aflags, &dpa->dpa_zb); } @@ -3651,10 +3684,10 @@ blkptr_t *bp = ((blkptr_t *)abuf->b_data) + P2PHASE(nextblkid, 1ULL << dpa->dpa_epbs); - ASSERT(!BP_IS_REDACTED(bp) || (dpa->dpa_dnode && + ASSERT(!BP_IS_REDACTED(bp) || dpa->dpa_dnode == NULL || dsl_dataset_feature_is_active( dpa->dpa_dnode->dn_objset->os_dsl_dataset, - SPA_FEATURE_REDACTED_DATASETS))); + SPA_FEATURE_REDACTED_DATASETS)); if (BP_IS_HOLE(bp) || BP_IS_REDACTED(bp)) { arc_buf_destroy(abuf, private); dbuf_prefetch_fini(dpa, B_TRUE); @@ -3667,15 +3700,21 @@ zbookmark_phys_t zb; /* flag if L2ARC eligible, l2arc_noprefetch then decides */ - if (dpa->dpa_aflags & ARC_FLAG_L2CACHE) - iter_aflags |= ARC_FLAG_L2CACHE; + if (dpa->dpa_dnode) { + if (dnode_level_is_l2cacheable(bp, dpa->dpa_dnode, + dpa->dpa_curlevel)) + iter_aflags |= ARC_FLAG_L2CACHE; + } else { + if (dpa->dpa_aflags & ARC_FLAG_L2CACHE) + iter_aflags |= ARC_FLAG_L2CACHE; + } ASSERT3U(dpa->dpa_curlevel, ==, BP_GET_LEVEL(bp)); SET_BOOKMARK(&zb, dpa->dpa_zb.zb_objset, dpa->dpa_zb.zb_object, dpa->dpa_curlevel, nextblkid); - (void) arc_read(dpa->dpa_zio, dpa->dpa_spa, + (void) arc_read(NULL, dpa->dpa_spa, bp, dbuf_prefetch_indirect_done, dpa, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, @@ -3770,9 +3809,6 @@ ASSERT3U(curlevel, ==, BP_GET_LEVEL(&bp)); - zio_t *pio = zio_root(dmu_objset_spa(dn->dn_objset), NULL, NULL, - ZIO_FLAG_CANFAIL); - dbuf_prefetch_arg_t *dpa = kmem_zalloc(sizeof (*dpa), KM_SLEEP); dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset; SET_BOOKMARK(&dpa->dpa_zb, ds != NULL ? ds->ds_object : DMU_META_OBJSET, @@ -3783,7 +3819,6 @@ dpa->dpa_spa = dn->dn_objset->os_spa; dpa->dpa_dnode = dn; dpa->dpa_epbs = epbs; - dpa->dpa_zio = pio; dpa->dpa_cb = cb; dpa->dpa_arg = arg; @@ -3807,22 +3842,17 @@ zbookmark_phys_t zb; /* flag if L2ARC eligible, l2arc_noprefetch then decides */ - if (dnode_level_is_l2cacheable(&bp, dn, level)) + if (dnode_level_is_l2cacheable(&bp, dn, curlevel)) iter_aflags |= ARC_FLAG_L2CACHE; SET_BOOKMARK(&zb, ds != NULL ? ds->ds_object : DMU_META_OBJSET, dn->dn_object, curlevel, curblkid); - (void) arc_read(dpa->dpa_zio, dpa->dpa_spa, + (void) arc_read(NULL, dpa->dpa_spa, &bp, dbuf_prefetch_indirect_done, dpa, ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE, &iter_aflags, &zb); } - /* - * We use pio here instead of dpa_zio since it's possible that - * dpa may have already been freed. - */ - zio_nowait(pio); return (1); no_issue: if (cb != NULL) @@ -3851,6 +3881,7 @@ { dbuf_dirty_record_t *dr = db->db_data_pending; arc_buf_t *data = dr->dt.dl.dr_data; + arc_buf_t *db_data; enum zio_compress compress_type = arc_get_compression(data); uint8_t complevel = arc_get_complevel(data); @@ -3861,22 +3892,21 @@ uint8_t mac[ZIO_DATA_MAC_LEN]; arc_get_raw_params(data, &byteorder, salt, iv, mac); - dbuf_set_data(db, arc_alloc_raw_buf(dn->dn_objset->os_spa, db, + db_data = arc_alloc_raw_buf(dn->dn_objset->os_spa, db, dmu_objset_id(dn->dn_objset), byteorder, salt, iv, mac, dn->dn_type, arc_buf_size(data), arc_buf_lsize(data), - compress_type, complevel)); + compress_type, complevel); } else if (compress_type != ZIO_COMPRESS_OFF) { - dbuf_set_data(db, arc_alloc_compressed_buf( + db_data = arc_alloc_compressed_buf( dn->dn_objset->os_spa, db, arc_buf_size(data), - arc_buf_lsize(data), compress_type, complevel)); + arc_buf_lsize(data), compress_type, complevel); } else { - dbuf_set_data(db, arc_alloc_buf(dn->dn_objset->os_spa, db, - DBUF_GET_BUFC_TYPE(db), db->db.db_size)); + db_data = arc_alloc_buf(dn->dn_objset->os_spa, db, + DBUF_GET_BUFC_TYPE(db), db->db.db_size); } + memcpy(db_data->b_data, data->b_data, arc_buf_size(data)); - rw_enter(&db->db_rwlock, RW_WRITER); - memcpy(db->db.db_data, data->b_data, arc_buf_size(data)); - rw_exit(&db->db_rwlock); + dbuf_set_data(db, db_data); } /* @@ -3900,7 +3930,8 @@ ASSERT(blkid != DMU_BONUS_BLKID); ASSERT(RW_LOCK_HELD(&dn->dn_struct_rwlock)); - ASSERT3U(dn->dn_nlevels, >, level); + if (!fail_sparse) + ASSERT3U(dn->dn_nlevels, >, level); *dbp = NULL; @@ -3937,6 +3968,7 @@ if (db->db_buf != NULL) { arc_buf_access(db->db_buf); + ASSERT(MUTEX_HELD(&db->db_mtx)); ASSERT3P(db->db.db_data, ==, db->db_buf->b_data); } @@ -5352,8 +5384,8 @@ mutex_enter(&db->db_mtx); dr->dt.dl.dr_override_state = DR_NOT_OVERRIDDEN; zio_write_override(dr->dr_zio, &dr->dt.dl.dr_overridden_by, - dr->dt.dl.dr_copies, dr->dt.dl.dr_nopwrite, - dr->dt.dl.dr_brtwrite); + dr->dt.dl.dr_copies, dr->dt.dl.dr_gang_copies, + dr->dt.dl.dr_nopwrite, dr->dt.dl.dr_brtwrite); mutex_exit(&db->db_mtx); } else if (data == NULL) { ASSERT(zp.zp_checksum == ZIO_CHECKSUM_OFF || diff -Nru zfs-linux-2.3.2/module/zfs/ddt.c zfs-linux-2.3.9/module/zfs/ddt.c --- zfs-linux-2.3.2/module/zfs/ddt.c 2025-05-01 18:45:25.562127410 +0000 +++ zfs-linux-2.3.9/module/zfs/ddt.c 2026-08-21 21:15:50.927497636 +0000 @@ -153,7 +153,7 @@ * storage object (ie ZAP) as normal. OpenZFS will try hard to flush enough to * keep up with the rate of change on dedup entries, but not so much that it * would impact overall throughput, and not using too much memory. See the - * zfs_dedup_log_* tuneables in zfs(4) for more details. + * zfs_dedup_log_* tunables in zfs(4) for more details. * * ## Repair IO * @@ -251,11 +251,6 @@ boolean_t ddt_dump_prune_histogram = B_FALSE; /* - * Don't do more than this many incremental flush passes per txg. - */ -uint_t zfs_dedup_log_flush_passes_max = 8; - -/* * Minimum time to flush per txg. */ uint_t zfs_dedup_log_flush_min_time_ms = 1000; @@ -263,7 +258,32 @@ /* * Minimum entries to flush per txg. */ -uint_t zfs_dedup_log_flush_entries_min = 1000; +uint_t zfs_dedup_log_flush_entries_min = 200; + +/* + * Target number of TXGs until the whole dedup log has been flushed. + * The log size will float around this value times the ingest rate. + */ +uint_t zfs_dedup_log_flush_txgs = 100; + +/* + * Maximum entries to flush per txg. Used for testing the dedup log. + */ +uint_t zfs_dedup_log_flush_entries_max = UINT_MAX; + +/* + * Soft cap for the size of the current dedup log. If the log is larger + * than this size, we slightly increase the aggressiveness of the flushing to + * try to bring it back down to the soft cap. + */ +uint_t zfs_dedup_log_cap = UINT_MAX; + +/* + * If this is set to B_TRUE, the cap above acts more like a hard cap: + * flushing is significantly more aggressive, increasing the minimum amount we + * flush per txg, as well as the maximum. + */ +boolean_t zfs_dedup_log_hard_cap = B_FALSE; /* * Number of txgs to average flow rates across. @@ -1488,7 +1508,7 @@ DMU_POOL_DIRECTORY_OBJECT, name, sizeof (uint64_t), 1, &ddt->ddt_dir_object); if (error == 0) { - ASSERT3U(spa->spa_meta_objset, ==, ddt->ddt_os); + ASSERT3P(spa->spa_meta_objset, ==, ddt->ddt_os); error = zap_lookup(ddt->ddt_os, ddt->ddt_dir_object, DDT_DIR_VERSION, sizeof (uint64_t), 1, @@ -1600,6 +1620,7 @@ ddt->ddt_spa = spa; ddt->ddt_os = spa->spa_meta_objset; ddt->ddt_version = DDT_VERSION_UNCONFIGURED; + ddt->ddt_log_flush_pressure = 10; ddt_log_alloc(ddt); ddt_table_alloc_kstats(ddt); @@ -2013,146 +2034,6 @@ return (new); } -/* Returns true if done for this txg */ -static boolean_t -ddt_sync_flush_log_incremental(ddt_t *ddt, dmu_tx_t *tx) -{ - if (ddt->ddt_flush_pass == 0) { - if (spa_sync_pass(ddt->ddt_spa) == 1) { - /* First run this txg, get set up */ - ddt->ddt_flush_start = gethrtime(); - ddt->ddt_flush_count = 0; - - /* - * How many entries we need to flush. We want to at - * least match the ingest rate. - */ - ddt->ddt_flush_min = MAX( - ddt->ddt_log_ingest_rate, - zfs_dedup_log_flush_entries_min); - - /* - * If we've been asked to flush everything in a hurry, - * try to dump as much as possible on this txg. In - * this case we're only limited by time, not amount. - */ - if (ddt->ddt_flush_force_txg > 0) - ddt->ddt_flush_min = - MAX(ddt->ddt_flush_min, avl_numnodes( - &ddt->ddt_log_flushing->ddl_tree)); - } else { - /* We already decided we're done for this txg */ - return (B_FALSE); - } - } else if (ddt->ddt_flush_pass == spa_sync_pass(ddt->ddt_spa)) { - /* - * We already did some flushing on this pass, skip it. This - * happens when dsl_process_async_destroys() runs during a scan - * (on pass 1) and does an additional ddt_sync() to update - * freed blocks. - */ - return (B_FALSE); - } - - if (spa_sync_pass(ddt->ddt_spa) > - MAX(zfs_dedup_log_flush_passes_max, 1)) { - /* Too many passes this txg, defer until next. */ - ddt->ddt_flush_pass = 0; - return (B_TRUE); - } - - if (avl_is_empty(&ddt->ddt_log_flushing->ddl_tree)) { - /* Nothing to flush, done for this txg. */ - ddt->ddt_flush_pass = 0; - return (B_TRUE); - } - - uint64_t target_time = txg_sync_waiting(ddt->ddt_spa->spa_dsl_pool) ? - MIN(MSEC2NSEC(zfs_dedup_log_flush_min_time_ms), - SEC2NSEC(zfs_txg_timeout)) : SEC2NSEC(zfs_txg_timeout); - - uint64_t elapsed_time = gethrtime() - ddt->ddt_flush_start; - - if (elapsed_time >= target_time) { - /* Too long since we started, done for this txg. */ - ddt->ddt_flush_pass = 0; - return (B_TRUE); - } - - ddt->ddt_flush_pass++; - ASSERT3U(spa_sync_pass(ddt->ddt_spa), ==, ddt->ddt_flush_pass); - - /* - * Estimate how much time we'll need to flush the remaining entries - * based on how long it normally takes. - */ - uint32_t want_time; - if (ddt->ddt_flush_pass == 1) { - /* First pass, use the average time/entries */ - if (ddt->ddt_log_flush_rate == 0) - /* Zero rate, just assume the whole time */ - want_time = target_time; - else - want_time = ddt->ddt_flush_min * - ddt->ddt_log_flush_time_rate / - ddt->ddt_log_flush_rate; - } else { - /* Later pass, calculate from this txg so far */ - want_time = ddt->ddt_flush_min * - elapsed_time / ddt->ddt_flush_count; - } - - /* Figure out how much time we have left */ - uint32_t remain_time = target_time - elapsed_time; - - /* Smear the remaining entries over the remaining passes. */ - uint32_t nentries = ddt->ddt_flush_min / - (MAX(1, zfs_dedup_log_flush_passes_max) + 1 - ddt->ddt_flush_pass); - if (want_time > remain_time) { - /* - * We're behind; try to catch up a bit by doubling the amount - * this pass. If we're behind that means we're in a later - * pass and likely have most of the remaining time to - * ourselves. If we're in the last couple of passes, then - * doubling might just take us over the timeout, but probably - * not be much, and it stops us falling behind. If we're - * in the middle passes, there'll be more to do, but it - * might just help us catch up a bit and we'll recalculate on - * the next pass anyway. - */ - nentries = MIN(ddt->ddt_flush_min, nentries*2); - } - - ddt_lightweight_entry_t ddlwe; - uint32_t count = 0; - while (ddt_log_take_first(ddt, ddt->ddt_log_flushing, &ddlwe)) { - ddt_sync_flush_entry(ddt, &ddlwe, - ddlwe.ddlwe_type, ddlwe.ddlwe_class, tx); - - /* End this pass if we've synced as much as we need to. */ - if (++count >= nentries) - break; - } - ddt->ddt_flush_count += count; - ddt->ddt_flush_min -= count; - - if (avl_is_empty(&ddt->ddt_log_flushing->ddl_tree)) { - /* We emptied it, so truncate on-disk */ - DDT_KSTAT_ZERO(ddt, dds_log_flushing_entries); - ddt_log_truncate(ddt, tx); - /* No more passes needed this txg */ - ddt->ddt_flush_pass = 0; - } else { - /* More to do next time, save checkpoint */ - DDT_KSTAT_SUB(ddt, dds_log_flushing_entries, count); - ddt_log_checkpoint(ddt, &ddlwe, tx); - } - - ddt_sync_update_stats(ddt, tx); - - return (ddt->ddt_flush_pass == 0); -} - static inline void ddt_flush_force_update_txg(ddt_t *ddt, uint64_t txg) { @@ -2190,19 +2071,135 @@ static void ddt_sync_flush_log(ddt_t *ddt, dmu_tx_t *tx) { + spa_t *spa = ddt->ddt_spa; ASSERT(avl_is_empty(&ddt->ddt_tree)); - /* Don't do any flushing when the pool is ready to shut down */ - if (tx->tx_txg > spa_final_dirty_txg(ddt->ddt_spa)) + /* + * Don't do any flushing when the pool is ready to shut down, or in + * passes beyond the first. + */ + if (spa_sync_pass(spa) > 1 || tx->tx_txg > spa_final_dirty_txg(spa)) return; - /* Try to flush some. */ - if (!ddt_sync_flush_log_incremental(ddt, tx)) - /* More to do next time */ - return; + hrtime_t flush_start = gethrtime(); + uint32_t count = 0; + + /* + * How many entries we need to flush. We need to at + * least match the ingest rate, and also consider the + * current backlog of entries. + */ + uint64_t backlog = avl_numnodes(&ddt->ddt_log_flushing->ddl_tree) + + avl_numnodes(&ddt->ddt_log_active->ddl_tree); + + if (avl_is_empty(&ddt->ddt_log_flushing->ddl_tree)) + goto housekeeping; + + uint64_t txgs = MAX(1, zfs_dedup_log_flush_txgs); + uint64_t cap = MAX(1, zfs_dedup_log_cap); + uint64_t flush_min = MAX(backlog / txgs, + zfs_dedup_log_flush_entries_min); + + /* + * The theory for this block is that if we increase the pressure while + * we're growing above the cap, and remove it when we're significantly + * below the cap, we'll stay near cap while not bouncing around too + * much. + * + * The factor of 10 is to smooth the pressure effect by expressing it + * in tenths. The addition of the cap to the backlog in the second + * block is to round up, instead of down. We never let the pressure go + * below 1 (10 tenths). + */ + if (cap != UINT_MAX && backlog > cap && + backlog > ddt->ddt_log_flush_prev_backlog) { + ddt->ddt_log_flush_pressure += 10 * backlog / cap; + } else if (cap != UINT_MAX && backlog < cap) { + ddt->ddt_log_flush_pressure -= + 11 - (((10 * backlog) + cap - 1) / cap); + ddt->ddt_log_flush_pressure = + MAX(ddt->ddt_log_flush_pressure, 10); + } + + if (zfs_dedup_log_hard_cap && cap != UINT_MAX) + flush_min = MAX(flush_min, MIN(backlog - cap, + (flush_min * ddt->ddt_log_flush_pressure) / 10)); + + uint64_t flush_max; + + /* + * If we've been asked to flush everything in a hurry, + * try to dump as much as possible on this txg. In + * this case we're only limited by time, not amount. + * + * Otherwise, if we are over the cap, try to get back down to it. + * + * Finally if there is no cap (or no pressure), just set the max a + * little higher than the min to help smooth out variations in flush + * times. + */ + if (ddt->ddt_flush_force_txg > 0) + flush_max = avl_numnodes(&ddt->ddt_log_flushing->ddl_tree); + else if (cap != UINT32_MAX && !zfs_dedup_log_hard_cap) + flush_max = MAX(flush_min * 5 / 4, MIN(backlog - cap, + (flush_min * ddt->ddt_log_flush_pressure) / 10)); + else + flush_max = flush_min * 5 / 4; + flush_max = MIN(flush_max, zfs_dedup_log_flush_entries_max); + + /* + * When the pool is busy or someone is explicitly waiting for this txg + * to complete, use the zfs_dedup_log_flush_min_time_ms. Otherwise use + * half of the time in the txg timeout. + */ + uint64_t target_time; + + if (txg_sync_waiting(ddt->ddt_spa->spa_dsl_pool) || + vdev_queue_pool_busy(spa)) { + target_time = MIN(MSEC2NSEC(zfs_dedup_log_flush_min_time_ms), + SEC2NSEC(zfs_txg_timeout) / 2); + } else { + target_time = SEC2NSEC(zfs_txg_timeout) / 2; + } + + ddt_lightweight_entry_t ddlwe; + while (ddt_log_take_first(ddt, ddt->ddt_log_flushing, &ddlwe)) { + ddt_sync_flush_entry(ddt, &ddlwe, + ddlwe.ddlwe_type, ddlwe.ddlwe_class, tx); + + /* End if we've synced as much as we needed to. */ + if (++count >= flush_max) + break; + + /* + * As long as we've flushed the absolute minimum, + * stop if we're way over our target time. + */ + uint64_t diff = gethrtime() - flush_start; + if (count > zfs_dedup_log_flush_entries_min && + diff >= target_time * 2) + break; + + /* + * End if we've passed the minimum flush and we're out of time. + */ + if (count > flush_min && diff >= target_time) + break; + } + + if (avl_is_empty(&ddt->ddt_log_flushing->ddl_tree)) { + /* We emptied it, so truncate on-disk */ + DDT_KSTAT_ZERO(ddt, dds_log_flushing_entries); + ddt_log_truncate(ddt, tx); + } else { + /* More to do next time, save checkpoint */ + DDT_KSTAT_SUB(ddt, dds_log_flushing_entries, count); + ddt_log_checkpoint(ddt, &ddlwe, tx); + } - /* No more flushing this txg, so we can do end-of-txg housekeeping */ + ddt_sync_update_stats(ddt, tx); +housekeeping: if (avl_is_empty(&ddt->ddt_log_flushing->ddl_tree) && !avl_is_empty(&ddt->ddt_log_active->ddl_tree)) { /* @@ -2219,12 +2216,13 @@ /* If force flush is no longer necessary, turn it off. */ ddt_flush_force_update_txg(ddt, 0); + ddt->ddt_log_flush_prev_backlog = backlog; + /* - * Update flush rate. This is an exponential weighted moving average of - * the number of entries flushed over recent txgs. + * Update flush rate. This is an exponential weighted moving + * average of the number of entries flushed over recent txgs. */ - ddt->ddt_log_flush_rate = _ewma( - ddt->ddt_flush_count, ddt->ddt_log_flush_rate, + ddt->ddt_log_flush_rate = _ewma(count, ddt->ddt_log_flush_rate, zfs_dedup_log_flush_flow_rate_txgs); DDT_KSTAT_SET(ddt, dds_log_flush_rate, ddt->ddt_log_flush_rate); @@ -2232,12 +2230,21 @@ * Update flush time rate. This is an exponential weighted moving * average of the total time taken to flush over recent txgs. */ - ddt->ddt_log_flush_time_rate = _ewma( - ddt->ddt_log_flush_time_rate, - ((int32_t)(NSEC2MSEC(gethrtime() - ddt->ddt_flush_start))), + ddt->ddt_log_flush_time_rate = _ewma(ddt->ddt_log_flush_time_rate, + (int32_t)NSEC2MSEC(gethrtime() - flush_start), zfs_dedup_log_flush_flow_rate_txgs); DDT_KSTAT_SET(ddt, dds_log_flush_time_rate, ddt->ddt_log_flush_time_rate); + if (avl_numnodes(&ddt->ddt_log_flushing->ddl_tree) > 0 && + zfs_flags & ZFS_DEBUG_DDT) { + zfs_dbgmsg("%lu entries remain(%lu in active), flushed %u @ " + "txg %llu, in %llu ms, flush rate %d, time rate %d", + (ulong_t)avl_numnodes(&ddt->ddt_log_flushing->ddl_tree), + (ulong_t)avl_numnodes(&ddt->ddt_log_active->ddl_tree), + count, (u_longlong_t)tx->tx_txg, + (u_longlong_t)NSEC2MSEC(gethrtime() - flush_start), + ddt->ddt_log_flush_rate, ddt->ddt_log_flush_time_rate); + } } static void @@ -2632,8 +2639,8 @@ }; ddt_lightweight_entry_t ddlwe = {0}; int error; - int valid = 0; - int candidates = 0; + uint64_t valid = 0; + uint64_t candidates = 0; uint64_t now = gethrestime_sec(); ddt_prune_info_t dpi; boolean_t pruning = (cutoff != 0); @@ -2685,8 +2692,8 @@ /* build a histogram */ if (histogram != NULL) { - uint64_t age = MAX(1, (now - class_start) / 3600); - int bin = MIN(highbit64(age) - 1, HIST_BINS - 1); + uint64_t age = (now - class_start) / 3600; + int bin = MIN(highbit64(age), HIST_BINS - 1); histogram->dah_entries++; histogram->dah_age_histo[bin]++; } @@ -2694,7 +2701,7 @@ valid++; } - if (pruning && valid > 0) { + if (pruning) { if (!list_is_empty(&dpi.dpi_candidates)) { /* sync out final batch of prune candidates */ VERIFY0(dsl_sync_task(spa_name(spa), NULL, @@ -2703,10 +2710,13 @@ } list_destroy(&dpi.dpi_candidates); - zfs_dbgmsg("pruned %llu entries (%d%%) across %llu txg syncs", - (u_longlong_t)dpi.dpi_pruned, - (int)((dpi.dpi_pruned * 100) / valid), - (u_longlong_t)dpi.dpi_txg_syncs); + if (valid > 0) { + zfs_dbgmsg("pruned %llu entries (%llu%%) across " + "%llu txg syncs", + (u_longlong_t)dpi.dpi_pruned, + (u_longlong_t)((dpi.dpi_pruned * 100) / valid), + (u_longlong_t)dpi.dpi_txg_syncs); + } } } @@ -2739,11 +2749,12 @@ if (unit == ZPOOL_DDT_PRUNE_PERCENTAGE) { ddt_age_histo_t histogram; uint64_t oldest = 0; + uint64_t now = gethrestime_sec(); /* Make a pass over DDT to build a histogram */ ddt_prune_walk(spa, 0, &histogram); - int target = (histogram.dah_entries * amount) / 100; + uint64_t target = (histogram.dah_entries * amount) / 100; /* * Figure out our cutoff date @@ -2751,16 +2762,16 @@ */ for (int i = HIST_BINS - 1; i >= 0 && target > 0; i--) { if (histogram.dah_age_histo[i] != 0) { - /* less than this bucket remaining */ - if (target < histogram.dah_age_histo[i]) { - oldest = MAX(1, (1<dlu_reclen = reclen; - VERIFY0(dnode_hold(ddt->ddt_os, ddt->ddt_log_active->ddl_object, FTAG, + VERIFY0(dnode_hold(ddt->ddt_os, ddt->ddt_log_active->ddl_object, dlu, &dlu->dlu_dn)); dnode_set_storage_type(dlu->dlu_dn, DMU_OT_DDT_ZAP); @@ -262,7 +262,7 @@ void ddt_log_entry(ddt_t *ddt, ddt_lightweight_entry_t *ddlwe, ddt_log_update_t *dlu) { - ASSERT3U(dlu->dlu_dbp, !=, NULL); + ASSERT3P(dlu->dlu_dbp, !=, NULL); ddt_log_update_entry(ddt, ddt->ddt_log_active, ddlwe); ddt_histogram_add_entry(ddt, &ddt->ddt_log_histogram, ddlwe); @@ -312,7 +312,7 @@ void ddt_log_commit(ddt_t *ddt, ddt_log_update_t *dlu) { - ASSERT3U(dlu->dlu_dbp, !=, NULL); + ASSERT3P(dlu->dlu_dbp, !=, NULL); ASSERT3U(dlu->dlu_block+1, ==, dlu->dlu_ndbp); ASSERT3U(dlu->dlu_offset, >, 0); @@ -326,7 +326,7 @@ ddt->ddt_log_active->ddl_length += dlu->dlu_ndbp * (uint64_t)dlu->dlu_dn->dn_datablksz; - dnode_rele(dlu->dlu_dn, FTAG); + dnode_rele(dlu->dlu_dn, dlu); ddt_log_update_header(ddt, ddt->ddt_log_active, dlu->dlu_tx); diff -Nru zfs-linux-2.3.2/module/zfs/dmu.c zfs-linux-2.3.9/module/zfs/dmu.c --- zfs-linux-2.3.2/module/zfs/dmu.c 2025-05-01 18:45:25.576127681 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu.c 2026-08-21 21:15:50.946497411 +0000 @@ -770,6 +770,8 @@ */ uint8_t ibps = ibs - SPA_BLKPTRSHIFT; limit = P2ROUNDUP(dmu_prefetch_max, 1 << ibs) >> ibs; + if (limit == 0) + end2 = start2; do { level2++; start2 = P2ROUNDUP(start2, 1 << ibps) >> ibps; @@ -1684,8 +1686,8 @@ dmu_object_info_from_dnode(dn, &doi); - for (uint64_t off = 0; off < doi.doi_max_offset; - off += dmu_prefetch_max) { + for (uint64_t off = 0; off < doi.doi_max_offset && + dmu_prefetch_max > 0; off += dmu_prefetch_max) { /* dbuf_read doesn't prefetch L1 blocks. */ dmu_prefetch_by_dnode(dn, 1, off, dmu_prefetch_max, ZIO_PRIORITY_SYNC_READ); @@ -1916,6 +1918,7 @@ dr->dt.dl.dr_overridden_by = *zio->io_bp; dr->dt.dl.dr_override_state = DR_OVERRIDDEN; dr->dt.dl.dr_copies = zio->io_prop.zp_copies; + dr->dt.dl.dr_gang_copies = zio->io_prop.zp_gang_copies; /* * Old style holes are filled with all zeros, whereas @@ -2322,6 +2325,7 @@ boolean_t dedup_verify = os->os_dedup_verify; boolean_t encrypt = B_FALSE; int copies = os->os_copies; + int gang_copies = os->os_copies; /* * We maintain different write policies for each of the following @@ -2354,15 +2358,24 @@ switch (os->os_redundant_metadata) { case ZFS_REDUNDANT_METADATA_ALL: copies++; + gang_copies++; break; case ZFS_REDUNDANT_METADATA_MOST: if (level >= zfs_redundant_metadata_most_ditto_level || DMU_OT_IS_METADATA(type) || (wp & WP_SPILL)) copies++; + if (level + 1 >= + zfs_redundant_metadata_most_ditto_level || + DMU_OT_IS_METADATA(type) || (wp & WP_SPILL)) + gang_copies++; break; case ZFS_REDUNDANT_METADATA_SOME: - if (DMU_OT_IS_CRITICAL(type)) + if (DMU_OT_IS_CRITICAL(type, level)) { copies++; + gang_copies++; + } else if (DMU_OT_IS_METADATA(type)) { + gang_copies++; + } break; case ZFS_REDUNDANT_METADATA_NONE: break; @@ -2370,7 +2383,7 @@ if (dmu_ddt_copies > 0) { /* - * If this tuneable is set, and this is a write for a + * If this tunable is set, and this is a write for a * dedup entry store (zap or log), then we treat it * something like ZFS_REDUNDANT_METADATA_MOST on a * regular dataset: this many copies, and one more for @@ -2407,6 +2420,15 @@ complevel = zio_complevel_select(os->os_spa, compress, complevel, complevel); + /* + * Storing many references to an all zeros block in the dedup + * table would be expensive. Instead, if dedup is enabled, + * store them as holes even if compression is not enabled. + */ + if (compress == ZIO_COMPRESS_OFF && + dedup_checksum != ZIO_CHECKSUM_OFF) + compress = ZIO_COMPRESS_EMPTY; + checksum = (dedup_checksum == ZIO_CHECKSUM_OFF) ? zio_checksum_select(dn->dn_checksum, checksum) : dedup_checksum; @@ -2436,6 +2458,12 @@ nopwrite = (!dedup && (zio_checksum_table[checksum].ci_flags & ZCHECKSUM_FLAG_NOPWRITE) && compress != ZIO_COMPRESS_OFF && zfs_nopwrite_enabled); + + if (os->os_redundant_metadata == ZFS_REDUNDANT_METADATA_ALL || + (os->os_redundant_metadata == + ZFS_REDUNDANT_METADATA_MOST && + zfs_redundant_metadata_most_ditto_level <= 1)) + gang_copies++; } /* @@ -2452,6 +2480,7 @@ if (DMU_OT_IS_ENCRYPTED(type)) { copies = MIN(copies, SPA_DVAS_PER_BP - 1); + gang_copies = MIN(gang_copies, SPA_DVAS_PER_BP - 1); nopwrite = B_FALSE; } else { dedup = B_FALSE; @@ -2469,6 +2498,8 @@ zp->zp_type = (wp & WP_SPILL) ? dn->dn_bonustype : type; zp->zp_level = level; zp->zp_copies = MIN(copies, spa_max_replication(os->os_spa)); + zp->zp_gang_copies = MIN(MAX(gang_copies, copies), + spa_max_replication(os->os_spa)); zp->zp_dedup = dedup; zp->zp_dedup_verify = dedup && dedup_verify; zp->zp_nopwrite = nopwrite; @@ -2497,7 +2528,8 @@ dmu_offset_next(objset_t *os, uint64_t object, boolean_t hole, uint64_t *off) { dnode_t *dn; - int restarted = 0, err; + uint64_t txg, maxtxg = 0; + int err; restart: err = dnode_hold(os, object, FTAG, &dn); @@ -2513,19 +2545,22 @@ * must be synced to disk to accurately report holes. * * Provided a RL_READER rangelock spanning 0-UINT64_MAX is - * held by the caller only a single restart will be required. + * held by the caller only limited restarts will be required. * We tolerate callers which do not hold the rangelock by - * returning EBUSY and not reporting holes after one restart. + * returning EBUSY and not reporting holes after at most + * TXG_CONCURRENT_STATES (3) restarts. */ if (zfs_dmu_offset_next_sync) { rw_exit(&dn->dn_struct_rwlock); dnode_rele(dn, FTAG); - if (restarted) + if (maxtxg == 0) { + txg = spa_last_synced_txg(dmu_objset_spa(os)); + maxtxg = txg + TXG_CONCURRENT_STATES; + } else if (txg >= maxtxg) return (SET_ERROR(EBUSY)); - txg_wait_synced(dmu_objset_pool(os), 0); - restarted = 1; + txg_wait_synced(dmu_objset_pool(os), ++txg); goto restart; } diff -Nru zfs-linux-2.3.2/module/zfs/dmu_direct.c zfs-linux-2.3.9/module/zfs/dmu_direct.c --- zfs-linux-2.3.2/module/zfs/dmu_direct.c 2025-05-01 18:45:25.582127797 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_direct.c 2026-08-21 21:15:50.956497292 +0000 @@ -91,6 +91,7 @@ dmu_sync_arg_t *dsa = zio->io_private; dbuf_dirty_record_t *dr = dsa->dsa_dr; dmu_buf_impl_t *db = dr->dr_dbuf; + dmu_tx_t *tx = dsa->dsa_tx; abd_free(zio->io_abd); @@ -101,6 +102,11 @@ db->db_state = DB_UNCACHED; mutex_exit(&db->db_mtx); + /* + * dmu_sync_done() owns dsa and frees it after publishing the final + * override state. The direct-I/O error path still needs the original + * open-context tx to roll the dirty record back with dbuf_undirty(). + */ dmu_sync_done(zio, NULL, zio->io_private); if (zio->io_error != 0) { @@ -120,7 +126,7 @@ * calling dbuf_undirty(). */ mutex_enter(&db->db_mtx); - VERIFY3B(dbuf_undirty(db, dsa->dsa_tx), ==, B_FALSE); + VERIFY3B(dbuf_undirty(db, tx), ==, B_FALSE); mutex_exit(&db->db_mtx); } @@ -393,5 +399,5 @@ } #endif /* _KERNEL */ -EXPORT_SYMBOL(dmu_read_uio_direct); -EXPORT_SYMBOL(dmu_write_uio_direct); +EXPORT_SYMBOL(dmu_read_abd); +EXPORT_SYMBOL(dmu_write_abd); diff -Nru zfs-linux-2.3.2/module/zfs/dmu_objset.c zfs-linux-2.3.9/module/zfs/dmu_objset.c --- zfs-linux-2.3.2/module/zfs/dmu_objset.c 2025-05-01 18:45:25.589127932 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_objset.c 2026-08-21 21:15:50.965497185 +0000 @@ -34,6 +34,7 @@ * Copyright (c) 2019, Klara Inc. * Copyright (c) 2019, Allan Jude * Copyright (c) 2022 Hewlett Packard Enterprise Development LP. + * Copyright (c) 2025, Rob Norris */ /* Portions Copyright 2010 Robert Milkowski */ @@ -68,6 +69,7 @@ #include #include #include +#include /* * Needed to close a window in dnode_move() that allows the objset to be freed @@ -763,7 +765,7 @@ err = dmu_objset_from_ds(ds, osp); if (err != 0) { - dsl_dataset_rele(ds, tag); + dsl_dataset_rele_flags(ds, flags, tag); dsl_pool_rele(dp, tag); } @@ -1179,7 +1181,6 @@ typedef struct dmu_objset_create_arg { const char *doca_name; cred_t *doca_cred; - proc_t *doca_proc; void (*doca_userfunc)(objset_t *os, void *arg, cred_t *cr, dmu_tx_t *tx); void *doca_userarg; @@ -1223,7 +1224,7 @@ } error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, - doca->doca_cred, doca->doca_proc); + doca->doca_cred); if (error != 0) { dsl_dir_rele(pdd, FTAG); return (error); @@ -1350,9 +1351,11 @@ dmu_objset_create_arg_t doca; dsl_crypto_params_t tmp_dcp = { 0 }; + cred_t *cr = CRED(); + crhold(cr); + doca.doca_name = name; - doca.doca_cred = CRED(); - doca.doca_proc = curproc; + doca.doca_cred = cr; doca.doca_flags = flags; doca.doca_userfunc = func; doca.doca_userarg = arg; @@ -1374,6 +1377,9 @@ if (rv == 0) zvol_create_minor(name); + + crfree(cr); + return (rv); } @@ -1381,7 +1387,6 @@ const char *doca_clone; const char *doca_origin; cred_t *doca_cred; - proc_t *doca_proc; } dmu_objset_clone_arg_t; static int @@ -1409,7 +1414,7 @@ } error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, - doca->doca_cred, doca->doca_proc); + doca->doca_cred); if (error != 0) { dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EDQUOT)); @@ -1465,10 +1470,12 @@ { dmu_objset_clone_arg_t doca; + cred_t *cr = CRED(); + crhold(cr); + doca.doca_clone = clone; doca.doca_origin = origin; - doca.doca_cred = CRED(); - doca.doca_proc = curproc; + doca.doca_cred = cr; int rv = dsl_sync_task(clone, dmu_objset_clone_check, dmu_objset_clone_sync, &doca, @@ -1477,6 +1484,8 @@ if (rv == 0) zvol_create_minor(clone); + crfree(cr); + return (rv); } @@ -2263,8 +2272,10 @@ dbuf_dirty_record_t *dr; void *data; - if (db->db_dirtycnt == 0) + if (db->db_dirtycnt == 0) { + ASSERT(MUTEX_HELD(&db->db_mtx)); return (db->db.db_data); /* Nothing is changing */ + } dr = dbuf_find_dirty_eq(db, tx->tx_txg); @@ -3106,7 +3117,7 @@ int dmu_fsname(const char *snapname, char *buf) { - char *atp = strchr(snapname, '@'); + const char *atp = strchr(snapname, '@'); if (atp == NULL) return (SET_ERROR(EINVAL)); if (atp - snapname >= ZFS_MAX_DATASET_NAME_LEN) diff -Nru zfs-linux-2.3.2/module/zfs/dmu_recv.c zfs-linux-2.3.9/module/zfs/dmu_recv.c --- zfs-linux-2.3.2/module/zfs/dmu_recv.c 2025-05-01 18:45:25.593128009 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_recv.c 2026-08-21 21:15:50.970497126 +0000 @@ -30,6 +30,7 @@ * Copyright (c) 2019, Allan Jude * Copyright (c) 2019 Datto Inc. * Copyright (c) 2022 Axcient. + * Copyright (c) 2025, Rob Norris */ #include @@ -68,6 +69,7 @@ #include #endif #include +#include static uint_t zfs_recv_queue_length = SPA_MAXBLOCKSIZE; static uint_t zfs_recv_queue_ff = 20; @@ -145,7 +147,6 @@ const char *drba_origin; dmu_recv_cookie_t *drba_cookie; cred_t *drba_cred; - proc_t *drba_proc; dsl_crypto_params_t *drba_dcp; } dmu_recv_begin_arg_t; @@ -411,7 +412,7 @@ * against that limit. */ error = dsl_fs_ss_limit_check(ds->ds_dir, 1, ZFS_PROP_SNAPSHOT_LIMIT, - NULL, drba->drba_cred, drba->drba_proc); + NULL, drba->drba_cred); if (error != 0) return (error); @@ -750,16 +751,14 @@ * filesystems and increment those counts during begin_sync). */ error = dsl_fs_ss_limit_check(ds->ds_dir, 1, - ZFS_PROP_FILESYSTEM_LIMIT, NULL, - drba->drba_cred, drba->drba_proc); + ZFS_PROP_FILESYSTEM_LIMIT, NULL, drba->drba_cred); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); } error = dsl_fs_ss_limit_check(ds->ds_dir, 1, - ZFS_PROP_SNAPSHOT_LIMIT, NULL, - drba->drba_cred, drba->drba_proc); + ZFS_PROP_SNAPSHOT_LIMIT, NULL, drba->drba_cred); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); @@ -1265,6 +1264,9 @@ dmu_recv_begin_arg_t drba = { 0 }; int err = 0; + cred_t *cr = CRED(); + crhold(cr); + memset(drc, 0, sizeof (dmu_recv_cookie_t)); drc->drc_drr_begin = drr_begin; drc->drc_drrb = &drr_begin->drr_u.drr_begin; @@ -1273,8 +1275,7 @@ drc->drc_force = force; drc->drc_heal = heal; drc->drc_resumable = resumable; - drc->drc_cred = CRED(); - drc->drc_proc = curproc; + drc->drc_cred = cr; drc->drc_clone = (origin != NULL); if (drc->drc_drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) { @@ -1286,6 +1287,8 @@ (void) fletcher_4_incremental_native(drr_begin, sizeof (dmu_replay_record_t), &drc->drc_cksum); } else { + crfree(cr); + drc->drc_cred = NULL; return (SET_ERROR(EINVAL)); } @@ -1302,9 +1305,11 @@ * upper limit. Systems with less than 1GB of RAM will see a lower * limit from `arc_all_memory() / 4`. */ - if (payloadlen > (MIN((1U << 28), arc_all_memory() / 4))) - return (E2BIG); - + if (payloadlen > (MIN((1U << 28), arc_all_memory() / 4))) { + crfree(cr); + drc->drc_cred = NULL; + return (SET_ERROR(E2BIG)); + } if (payloadlen != 0) { void *payload = vmem_alloc(payloadlen, KM_SLEEP); @@ -1320,6 +1325,8 @@ payload); if (err != 0) { vmem_free(payload, payloadlen); + crfree(cr); + drc->drc_cred = NULL; return (err); } err = nvlist_unpack(payload, payloadlen, &drc->drc_begin_nvl, @@ -1328,6 +1335,8 @@ if (err != 0) { kmem_free(drc->drc_next_rrd, sizeof (*drc->drc_next_rrd)); + crfree(cr); + drc->drc_cred = NULL; return (err); } } @@ -1337,8 +1346,7 @@ drba.drba_origin = origin; drba.drba_cookie = drc; - drba.drba_cred = CRED(); - drba.drba_proc = curproc; + drba.drba_cred = drc->drc_cred; if (drc->drc_featureflags & DMU_BACKUP_FEATURE_RESUMING) { err = dsl_sync_task(tofs, @@ -1373,6 +1381,8 @@ if (err != 0) { kmem_free(drc->drc_next_rrd, sizeof (*drc->drc_next_rrd)); nvlist_free(drc->drc_begin_nvl); + crfree(cr); + drc->drc_cred = NULL; } return (err); } @@ -2300,6 +2310,9 @@ zp.zp_nopwrite = B_FALSE; zp.zp_copies = MIN(zp.zp_copies, SPA_DVAS_PER_BP - 1); + zp.zp_gang_copies = + MIN(zp.zp_gang_copies, + SPA_DVAS_PER_BP - 1); } zio_flags |= ZIO_FLAG_RAW; } else if (DRR_WRITE_COMPRESSED(drrw)) { @@ -2449,7 +2462,9 @@ } struct receive_record_arg *first_rrd = list_head(&rwa->write_batch); - struct drr_write *first_drrw = &first_rrd->header.drr_u.drr_write; + struct drr_write *first_drrw = NULL; + if (first_rrd != NULL) + first_drrw = &first_rrd->header.drr_u.drr_write; uint64_t batch_size = MIN(zfs_recv_write_batch_size, DMU_MAX_ACCESS / 2); if (first_rrd != NULL && @@ -2865,16 +2880,20 @@ { struct drr_object *drro = &drc->drc_rrd->header.drr_u.drr_object; - uint32_t size = DRR_OBJECT_PAYLOAD_SIZE(drro); + uint32_t size; void *buf = NULL; dmu_object_info_t doi; + size = DRR_OBJECT_PAYLOAD_SIZE(drro); + if (size > SPA_MAXBLOCKSIZE) + return (SET_ERROR(ERANGE)); + if (size != 0) - buf = kmem_zalloc(size, KM_SLEEP); + buf = vmem_zalloc(size, KM_SLEEP); err = receive_read_payload_and_next_header(drc, size, buf); if (err != 0) { - kmem_free(buf, size); + vmem_free(buf, size); return (err); } err = dmu_object_info(drc->drc_os, drro->drr_object, &doi); @@ -2898,7 +2917,11 @@ case DRR_WRITE: { struct drr_write *drrw = &drc->drc_rrd->header.drr_u.drr_write; - int size = DRR_WRITE_PAYLOAD_SIZE(drrw); + uint64_t size = DRR_WRITE_PAYLOAD_SIZE(drrw); + + if (size > SPA_MAXBLOCKSIZE) + return (SET_ERROR(ERANGE)); + abd_t *abd = abd_alloc_linear(size, B_FALSE); err = receive_read_payload_and_next_header(drc, size, abd_to_buf(abd)); @@ -2915,12 +2938,18 @@ { struct drr_write_embedded *drrwe = &drc->drc_rrd->header.drr_u.drr_write_embedded; - uint32_t size = P2ROUNDUP(drrwe->drr_psize, 8); - void *buf = kmem_zalloc(size, KM_SLEEP); + uint32_t size; + void *buf; + + size = P2ROUNDUP(drrwe->drr_psize, 8); + if (size > SPA_MAXBLOCKSIZE) + return (SET_ERROR(ERANGE)); + + buf = vmem_zalloc(size, KM_SLEEP); err = receive_read_payload_and_next_header(drc, size, buf); if (err != 0) { - kmem_free(buf, size); + vmem_free(buf, size); return (err); } @@ -2949,7 +2978,11 @@ case DRR_SPILL: { struct drr_spill *drrs = &drc->drc_rrd->header.drr_u.drr_spill; - int size = DRR_SPILL_PAYLOAD_SIZE(drrs); + uint64_t size = DRR_SPILL_PAYLOAD_SIZE(drrs); + + if (size > SPA_MAXBLOCKSIZE) + return (SET_ERROR(ERANGE)); + abd_t *abd = abd_alloc_linear(size, B_FALSE); err = receive_read_payload_and_next_header(drc, size, abd_to_buf(abd)); @@ -3100,7 +3133,7 @@ abd_free(rrd->abd); rrd->abd = NULL; } else if (rrd->payload != NULL) { - kmem_free(rrd->payload, rrd->payload_size); + vmem_free(rrd->payload, rrd->payload_size); rrd->payload = NULL; } return (0); @@ -3114,7 +3147,7 @@ rrd->abd = NULL; rrd->payload = NULL; } else if (rrd->payload != NULL) { - kmem_free(rrd->payload, rrd->payload_size); + vmem_free(rrd->payload, rrd->payload_size); rrd->payload = NULL; } @@ -3127,7 +3160,7 @@ { struct drr_object *drro = &rrd->header.drr_u.drr_object; err = receive_object(rwa, drro, rrd->payload); - kmem_free(rrd->payload, rrd->payload_size); + vmem_free(rrd->payload, rrd->payload_size); rrd->payload = NULL; break; } @@ -3165,7 +3198,7 @@ struct drr_write_embedded *drrwe = &rrd->header.drr_u.drr_write_embedded; err = receive_write_embedded(rwa, drrwe, rrd->payload); - kmem_free(rrd->payload, rrd->payload_size); + vmem_free(rrd->payload, rrd->payload_size); rrd->payload = NULL; break; } @@ -3234,7 +3267,7 @@ rrd->abd = NULL; rrd->payload = NULL; } else if (rrd->payload != NULL) { - kmem_free(rrd->payload, rrd->payload_size); + vmem_free(rrd->payload, rrd->payload_size); rrd->payload = NULL; } /* @@ -3524,6 +3557,8 @@ */ dmu_recv_cleanup_ds(drc); nvlist_free(drc->drc_keynvl); + crfree(drc->drc_cred); + drc->drc_cred = NULL; } objlist_destroy(drc->drc_ignore_objlist); @@ -3598,8 +3633,7 @@ return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx, B_TRUE, 1, - drc->drc_cred, drc->drc_proc); + drc->drc_tosnap, tx, B_TRUE, 1, drc->drc_cred); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -3607,8 +3641,7 @@ error = dsl_destroy_head_check_impl(drc->drc_ds, 1); } else { error = dsl_dataset_snapshot_check_impl(drc->drc_ds, - drc->drc_tosnap, tx, B_TRUE, 1, - drc->drc_cred, drc->drc_proc); + drc->drc_tosnap, tx, B_TRUE, 1, drc->drc_cred); } return (error); } @@ -3820,6 +3853,10 @@ zvol_create_minor(snapname); kmem_strfree(snapname); } + + crfree(drc->drc_cred); + drc->drc_cred = NULL; + return (error); } diff -Nru zfs-linux-2.3.2/module/zfs/dmu_redact.c zfs-linux-2.3.9/module/zfs/dmu_redact.c --- zfs-linux-2.3.2/module/zfs/dmu_redact.c 2025-05-01 18:45:25.596128067 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_redact.c 2026-08-21 21:15:50.975497067 +0000 @@ -568,7 +568,7 @@ { dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(os->os_spa)->dp_mos_dir); dmu_tx_hold_space(tx, sizeof (struct redact_block_list_node)); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); uint64_t txg = dmu_tx_get_txg(tx); if (!md->md_synctask_txg[txg & TXG_MASK]) { dsl_sync_task_nowait(dmu_tx_pool(tx), diff -Nru zfs-linux-2.3.2/module/zfs/dmu_send.c zfs-linux-2.3.9/module/zfs/dmu_send.c --- zfs-linux-2.3.2/module/zfs/dmu_send.c 2025-05-01 18:45:25.599128125 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_send.c 2026-08-21 21:15:50.980497007 +0000 @@ -1844,7 +1844,7 @@ continue; } uint64_t file_max = - MIN(dn->dn_maxblkid, range->end_blkid); + MIN(dn->dn_maxblkid + 1, range->end_blkid); /* * The object exists, so we need to try to find the * blkptr for each block in the range we're processing. @@ -2687,8 +2687,8 @@ } if (fromsnap != 0) { - err = dsl_dataset_hold_obj_flags(dspp.dp, fromsnap, dsflags, - FTAG, &fromds); + err = dsl_dataset_hold_obj(dspp.dp, fromsnap, FTAG, &fromds); + if (err != 0) { dsl_dataset_rele_flags(dspp.to_ds, dsflags, FTAG); dsl_pool_rele(dspp.dp, FTAG); @@ -2740,7 +2740,7 @@ kmem_free(dspp.fromredactsnaps, dspp.numfromredactsnaps * sizeof (uint64_t)); - dsl_dataset_rele(dspp.to_ds, FTAG); + dsl_dataset_rele_flags(dspp.to_ds, dsflags, FTAG); return (err); } diff -Nru zfs-linux-2.3.2/module/zfs/dmu_traverse.c zfs-linux-2.3.9/module/zfs/dmu_traverse.c --- zfs-linux-2.3.2/module/zfs/dmu_traverse.c 2025-05-01 18:45:25.603128203 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_traverse.c 2026-08-21 21:15:50.984496960 +0000 @@ -813,11 +813,5 @@ ZFS_MODULE_PARAM(zfs, zfs_, traverse_indirect_prefetch_limit, UINT, ZMOD_RW, "Traverse prefetch number of blocks pointed by indirect block"); -#if defined(_KERNEL) -module_param_named(ignore_hole_birth, send_holes_without_birth_time, int, 0644); -MODULE_PARM_DESC(ignore_hole_birth, - "Alias for send_holes_without_birth_time"); -#endif - ZFS_MODULE_PARAM(zfs, , send_holes_without_birth_time, INT, ZMOD_RW, "Ignore hole_birth txg for zfs send"); diff -Nru zfs-linux-2.3.2/module/zfs/dmu_tx.c zfs-linux-2.3.9/module/zfs/dmu_tx.c --- zfs-linux-2.3.2/module/zfs/dmu_tx.c 2025-05-01 18:45:25.606128261 +0000 +++ zfs-linux-2.3.9/module/zfs/dmu_tx.c 2026-08-21 21:15:50.989496901 +0000 @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, 2017 by Delphix. All rights reserved. - * Copyright (c) 2024, Klara, Inc. + * Copyright (c) 2024, 2025, Klara, Inc. */ #include @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -547,17 +548,45 @@ } static void -dmu_tx_count_clone(dmu_tx_hold_t *txh, uint64_t off, uint64_t len) +dmu_tx_count_clone(dmu_tx_hold_t *txh, uint64_t off, uint64_t len, + uint_t blksz) { + dmu_tx_t *tx = txh->txh_tx; + dnode_t *dn = txh->txh_dnode; + int err; - /* - * Reuse dmu_tx_count_free(), it does exactly what we need for clone. - */ - dmu_tx_count_free(txh, off, len); + ASSERT0(tx->tx_txg); + ASSERT(dn->dn_indblkshift != 0); + ASSERT(blksz != 0); + ASSERT0(off % blksz); + + (void) zfs_refcount_add_many(&txh->txh_memory_tohold, + len / blksz * sizeof (brt_entry_t), FTAG); + + int shift = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + uint64_t start = off / blksz >> shift; + uint64_t end = (off + len) / blksz >> shift; + + (void) zfs_refcount_add_many(&txh->txh_space_towrite, + (end - start + 1) << dn->dn_indblkshift, FTAG); + + zio_t *zio = zio_root(tx->tx_pool->dp_spa, + NULL, NULL, ZIO_FLAG_CANFAIL); + for (uint64_t i = start; i <= end; i++) { + err = dmu_tx_check_ioerr(zio, dn, 1, i); + if (err != 0) { + tx->tx_err = err; + break; + } + } + err = zio_wait(zio); + if (err != 0) + tx->tx_err = err; } void -dmu_tx_hold_clone_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, int len) +dmu_tx_hold_clone_by_dnode(dmu_tx_t *tx, dnode_t *dn, uint64_t off, + uint64_t len, uint_t blksz) { dmu_tx_hold_t *txh; @@ -567,7 +596,7 @@ txh = dmu_tx_hold_dnode_impl(tx, dn, THT_CLONE, off, len); if (txh != NULL) { dmu_tx_count_dnode(txh); - dmu_tx_count_clone(txh, off, len); + dmu_tx_count_clone(txh, off, len, blksz); } } @@ -1017,7 +1046,7 @@ * decreasing performance. */ static int -dmu_tx_try_assign(dmu_tx_t *tx, uint64_t flags) +dmu_tx_try_assign(dmu_tx_t *tx) { spa_t *spa = tx->tx_pool->dp_spa; @@ -1032,19 +1061,10 @@ DMU_TX_STAT_BUMP(dmu_tx_suspended); /* - * If the user has indicated a blocking failure mode - * then return ERESTART which will block in dmu_tx_wait(). - * Otherwise, return EIO so that an error can get - * propagated back to the VOP calls. - * - * Note that we always honor the `flags` flag regardless - * of the failuremode setting. + * Let dmu_tx_assign() know specifically what happened, so + * it can make the right choice based on the caller flags. */ - if (spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE && - !(flags & DMU_TX_WAIT)) - return (SET_ERROR(EIO)); - - return (SET_ERROR(ERESTART)); + return (SET_ERROR(ESHUTDOWN)); } if (!tx->tx_dirty_delayed && @@ -1184,6 +1204,12 @@ * they have already called dmu_tx_wait() (though most likely on a * different tx). * + * If DMU_TX_SUSPEND is set, this indicates that this tx should ignore + * the pool being or becoming suspending while it is in progress. This will + * cause dmu_tx_assign() (and dmu_tx_wait()) to block until the pool resumes. + * If this flag is not set and the pool suspends, the return will be either + * ERESTART or EIO, depending on the value of the pool's failmode= property. + * * It is guaranteed that subsequent successful calls to dmu_tx_assign() * will assign the tx to monotonically increasing txgs. Of course this is * not strong monotonicity, because the same txg can be returned multiple @@ -1201,12 +1227,13 @@ * 1 <- dmu_tx_get_txg(T3) */ int -dmu_tx_assign(dmu_tx_t *tx, uint64_t flags) +dmu_tx_assign(dmu_tx_t *tx, dmu_tx_flag_t flags) { int err; ASSERT(tx->tx_txg == 0); - ASSERT0(flags & ~(DMU_TX_WAIT | DMU_TX_NOTHROTTLE)); + ASSERT0(flags & ~(DMU_TX_WAIT | DMU_TX_NOTHROTTLE | DMU_TX_SUSPEND)); + IMPLY(flags & DMU_TX_SUSPEND, flags & DMU_TX_WAIT); ASSERT(!dsl_pool_sync_context(tx->tx_pool)); /* If we might wait, we must not hold the config lock. */ @@ -1215,13 +1242,74 @@ if ((flags & DMU_TX_NOTHROTTLE)) tx->tx_dirty_delayed = B_TRUE; - while ((err = dmu_tx_try_assign(tx, flags)) != 0) { + if (!(flags & DMU_TX_SUSPEND)) + tx->tx_break_on_suspend = B_TRUE; + + while ((err = dmu_tx_try_assign(tx)) != 0) { dmu_tx_unassign(tx); + boolean_t suspended = (err == ESHUTDOWN); + if (suspended) { + /* + * Pool suspended. We need to decide whether to block + * and retry, or return error, depending on the + * caller's flags and the pool config. + */ + if (flags & DMU_TX_SUSPEND) + /* + * The caller expressly does not care about + * suspend, so treat it as a normal retry. + */ + err = SET_ERROR(ERESTART); + else if ((flags & DMU_TX_WAIT) && + spa_get_failmode(tx->tx_pool->dp_spa) == + ZIO_FAILURE_MODE_CONTINUE) + /* + * Caller wants to wait, but pool config is + * overriding that, so return EIO to be + * propagated back to userspace. + */ + err = SET_ERROR(EIO); + else + /* Anything else, we should just block. */ + err = SET_ERROR(ERESTART); + } + + /* + * Return unless we decided to retry, or the caller does not + * want to block. + */ if (err != ERESTART || !(flags & DMU_TX_WAIT)) return (err); + /* + * Wait until there's room in this txg, or until it's been + * synced out and a new one is available. + * + * If we're here because the pool suspended above, then we + * unset tx_break_on_suspend to make sure that if dmu_tx_wait() + * has to fall back to a txg_wait_synced_flags(), it doesn't + * immediately return because the pool is suspended. That would + * then immediately return here, and we'd end up in a busy loop + * until the pool resumes. + * + * On the other hand, if the pool hasn't suspended yet, then it + * should be allowed to break a txg wait if the pool does + * suspend, so we can loop and reassess it in + * dmu_tx_try_assign(). + */ + if (suspended) + tx->tx_break_on_suspend = B_FALSE; + dmu_tx_wait(tx); + + /* + * Reset tx_break_on_suspend for DMU_TX_SUSPEND. We do this + * here so that it's available if we return for some other + * reason, and then the caller calls dmu_tx_wait(). + */ + if (!(flags & DMU_TX_SUSPEND)) + tx->tx_break_on_suspend = B_TRUE; } txg_rele_to_quiesce(&tx->tx_txgh); @@ -1239,6 +1327,16 @@ ASSERT(tx->tx_txg == 0); ASSERT(!dsl_pool_config_held(tx->tx_pool)); + /* + * Break on suspend according to whether or not DMU_TX_SUSPEND was + * supplied to the previous dmu_tx_assign() call. For clients, this + * ensures that after dmu_tx_assign() fails, the followup dmu_tx_wait() + * gets the same behaviour wrt suspend. See also the comments in + * dmu_tx_assign(). + */ + txg_wait_flag_t flags = + (tx->tx_break_on_suspend ? TXG_WAIT_SUSPEND : TXG_WAIT_NONE); + before = gethrtime(); if (tx->tx_wait_dirty) { @@ -1276,7 +1374,7 @@ * obtain a tx. If that's the case then tx_lasttried_txg * would not have been set. */ - txg_wait_synced(dp, spa_last_synced_txg(spa) + 1); + txg_wait_synced_flags(dp, spa_last_synced_txg(spa) + 1, flags); } else if (tx->tx_needassign_txh) { dnode_t *dn = tx->tx_needassign_txh->txh_dnode; @@ -1291,7 +1389,7 @@ * out a TXG at which point we'll hopefully have synced * a portion of the changes. */ - txg_wait_synced(dp, spa_last_synced_txg(spa) + 1); + txg_wait_synced_flags(dp, spa_last_synced_txg(spa) + 1, flags); } spa_tx_assign_add_nsecs(spa, gethrtime() - before); @@ -1323,6 +1421,7 @@ void dmu_tx_commit(dmu_tx_t *tx) { + /* This function should only be used on assigned transactions. */ ASSERT(tx->tx_txg != 0); /* @@ -1361,7 +1460,12 @@ void dmu_tx_abort(dmu_tx_t *tx) { - ASSERT(tx->tx_txg == 0); + /* This function should not be used on assigned transactions. */ + ASSERT0(tx->tx_txg); + + /* Should not be needed, but better be safe than sorry. */ + if (tx->tx_tempreserve_cookie) + dsl_dir_tempreserve_clear(tx->tx_tempreserve_cookie, tx); /* * Call any registered callbacks with an error code. @@ -1369,6 +1473,9 @@ if (!list_is_empty(&tx->tx_callbacks)) dmu_tx_do_callbacks(&tx->tx_callbacks, SET_ERROR(ECANCELED)); + /* Should not be needed, but better be safe than sorry. */ + dmu_tx_unassign(tx); + dmu_tx_destroy(tx); } diff -Nru zfs-linux-2.3.2/module/zfs/dnode.c zfs-linux-2.3.9/module/zfs/dnode.c --- zfs-linux-2.3.2/module/zfs/dnode.c 2025-05-01 18:45:25.613128396 +0000 +++ zfs-linux-2.3.9/module/zfs/dnode.c 2026-08-21 21:15:50.998496794 +0000 @@ -86,6 +86,19 @@ static kmem_cbrc_t dnode_move(void *, void *, size_t, void *); #endif /* _KERNEL */ +static char * +rt_name(dnode_t *dn, const char *name) +{ + struct objset *os = dn->dn_objset; + + return (kmem_asprintf("{spa=%s objset=%llu obj=%llu %s}", + spa_name(os->os_spa), + (u_longlong_t)(os->os_dsl_dataset ? + os->os_dsl_dataset->ds_object : DMU_META_OBJSET), + (u_longlong_t)dn->dn_object, + name)); +} + static int dbuf_compare(const void *x1, const void *x2) { @@ -2435,9 +2448,13 @@ mutex_enter(&dn->dn_mtx); { int txgoff = tx->tx_txg & TXG_MASK; + + FREE_RANGE_VERIFY(tx, dn); if (dn->dn_free_ranges[txgoff] == NULL) { - dn->dn_free_ranges[txgoff] = zfs_range_tree_create(NULL, - ZFS_RANGE_SEG64, NULL, 0, 0); + dn->dn_free_ranges[txgoff] = + zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, rt_name(dn, "dn_free_ranges")); } zfs_range_tree_clear(dn->dn_free_ranges[txgoff], blkid, nblks); zfs_range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks); @@ -2490,6 +2507,37 @@ return (i < TXG_SIZE); } +/* + * Check if a level-0 block was freed in a TXG after override_txg. + * + * When a block has been overridden (e.g., by block clone or direct I/O), + * we can't use dnode_block_freed() because it checks all active TXGs. + * A free from a TXG *before* the override should not make the block appear + * freed. + */ +uint64_t +dnode_block_freed_after(dnode_t *dn, uint64_t blkid, uint64_t override_txg) +{ + ASSERT(blkid != DMU_BONUS_BLKID); + ASSERT(blkid != DMU_SPILL_BLKID); + + if (dn->dn_free_txg) + return (TRUE); + + mutex_enter(&dn->dn_mtx); + uint64_t open = spa_open_txg(dmu_objset_spa(dn->dn_objset)); + for (uint64_t txg = override_txg + 1; txg <= open; txg++) { + int i = txg & TXG_MASK; + if (dn->dn_free_ranges[i] != NULL && + zfs_range_tree_contains(dn->dn_free_ranges[i], blkid, 1)) { + mutex_exit(&dn->dn_mtx); + return (TRUE); + } + } + mutex_exit(&dn->dn_mtx); + return (FALSE); +} + /* call from syncing context when we actually write/free space for this dnode */ void dnode_diduse_space(dnode_t *dn, int64_t delta) @@ -2559,6 +2607,11 @@ error = 0; epb = dn->dn_phys->dn_nblkptr; data = dn->dn_phys->dn_blkptr; + if (dn->dn_dbuf != NULL) + rw_enter(&dn->dn_dbuf->db_rwlock, RW_READER); + else if (dmu_objset_ds(dn->dn_objset) != NULL) + rrw_enter(&dmu_objset_ds(dn->dn_objset)->ds_bp_rwlock, + RW_READER, FTAG); } else { uint64_t blkid = dbuf_whichblock(dn, lvl, *offset); error = dbuf_hold_impl(dn, lvl, blkid, TRUE, FALSE, FTAG, &db); @@ -2663,12 +2716,44 @@ if (db != NULL) { rw_exit(&db->db_rwlock); dbuf_rele(db, FTAG); + } else { + if (dn->dn_dbuf != NULL) + rw_exit(&dn->dn_dbuf->db_rwlock); + else if (dmu_objset_ds(dn->dn_objset) != NULL) + rrw_exit(&dmu_objset_ds(dn->dn_objset)->ds_bp_rwlock, + FTAG); } return (error); } /* + * Adjust *offset to the next (or previous) block byte offset at lvl. + * Returns FALSE if *offset would overflow or underflow. + */ +static boolean_t +dnode_next_block(dnode_t *dn, int flags, uint64_t *offset, int lvl) +{ + int epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + int span = lvl * epbs + dn->dn_datablkshift; + uint64_t blkid, maxblkid; + + if (span >= 8 * sizeof (uint64_t)) + return (B_FALSE); + + blkid = *offset >> span; + maxblkid = 1ULL << (8 * sizeof (*offset) - span); + if (!(flags & DNODE_FIND_BACKWARDS) && blkid + 1 < maxblkid) + *offset = (blkid + 1) << span; + else if ((flags & DNODE_FIND_BACKWARDS) && blkid > 0) + *offset = (blkid << span) - 1; + else + return (B_FALSE); + + return (B_TRUE); +} + +/* * Find the next hole, data, or sparse region at or after *offset. * The value 'blkfill' tells us how many items we expect to find * in an L0 data block; this value is 1 for normal objects, @@ -2695,7 +2780,7 @@ dnode_next_offset(dnode_t *dn, int flags, uint64_t *offset, int minlvl, uint64_t blkfill, uint64_t txg) { - uint64_t initial_offset = *offset; + uint64_t matched = *offset; int lvl, maxlvl; int error = 0; @@ -2719,16 +2804,36 @@ maxlvl = dn->dn_phys->dn_nlevels; - for (lvl = minlvl; lvl <= maxlvl; lvl++) { + for (lvl = minlvl; lvl <= maxlvl; ) { error = dnode_next_offset_level(dn, flags, offset, lvl, blkfill, txg); - if (error != ESRCH) + if (error == 0 && lvl > minlvl) { + --lvl; + matched = *offset; + } else if (error == ESRCH && lvl < maxlvl && + dnode_next_block(dn, flags, &matched, lvl)) { + /* + * Continue search at next/prev offset in lvl+1 block. + * + * Usually we only search upwards at the start of the + * search as higher level blocks point at a matching + * minlvl block in most cases, but we backtrack if not. + * + * This can happen for txg > 0 searches if the block + * contains only BPs/dnodes freed at that txg. It also + * happens if we are still syncing out the tree, and + * some BP's at higher levels are not updated yet. + * + * We must adjust offset to avoid coming back to the + * same offset and getting stuck looping forever. This + * also deals with the case where offset is already at + * the beginning or end of the object. + */ + ++lvl; + *offset = matched; + } else { break; - } - - while (error == 0 && --lvl >= minlvl) { - error = dnode_next_offset_level(dn, - flags, offset, lvl, blkfill, txg); + } } /* @@ -2740,9 +2845,6 @@ error = 0; } - if (error == 0 && (flags & DNODE_FIND_BACKWARDS ? - initial_offset < *offset : initial_offset > *offset)) - error = SET_ERROR(ESRCH); out: if (!(flags & DNODE_FIND_HAVELOCK)) rw_exit(&dn->dn_struct_rwlock); diff -Nru zfs-linux-2.3.2/module/zfs/dnode_sync.c zfs-linux-2.3.9/module/zfs/dnode_sync.c --- zfs-linux-2.3.2/module/zfs/dnode_sync.c 2025-05-01 18:45:25.616128454 +0000 +++ zfs-linux-2.3.9/module/zfs/dnode_sync.c 2026-08-21 21:15:51.003496735 +0000 @@ -440,24 +440,6 @@ } } -typedef struct dnode_sync_free_range_arg { - dnode_t *dsfra_dnode; - dmu_tx_t *dsfra_tx; - boolean_t dsfra_free_indirects; -} dnode_sync_free_range_arg_t; - -static void -dnode_sync_free_range(void *arg, uint64_t blkid, uint64_t nblks) -{ - dnode_sync_free_range_arg_t *dsfra = arg; - dnode_t *dn = dsfra->dsfra_dnode; - - mutex_exit(&dn->dn_mtx); - dnode_sync_free_range_impl(dn, blkid, nblks, - dsfra->dsfra_free_indirects, dsfra->dsfra_tx); - mutex_enter(&dn->dn_mtx); -} - /* * Try to kick all the dnode's dbufs out of the cache... */ @@ -634,6 +616,64 @@ } /* + * We cannot simply detach the range tree (set dn_free_ranges to NULL) + * before processing it because dnode_block_freed() relies on it to + * correctly identify blocks that have been freed in the current TXG + * (for dbuf_read() calls on holes). If we detached it early, a concurrent + * reader might see the block as valid on disk and return stale data + * instead of zeros. + * + * We also can't use zfs_range_tree_walk() nor zfs_range_tree_vacate() + * with a callback that drops dn_mtx (dnode_sync_free_range()). This is + * unsafe because another thread (spa_sync_deferred_frees() -> + * dnode_free_range()) could acquire dn_mtx and modify the tree while the + * walk or vacate was in progress. This leads to tree corruption or panic + * when we resume. + * + * To fix the race while maintaining visibility, we process the tree + * incrementally. We pick a segment, drop the lock to sync it, and + * re-acquire the lock to remove it. By always restarting from the head + * of the tree, we ensure we are never using an invalid iterator. + * We use zfs_range_tree_clear() instead of ..._remove() because the range + * might have already been removed while the lock was dropped (specifically + * in the dbuf_dirty path mentioned above). ..._clear() handles this + * gracefully, while ..._remove() would panic on a missing segment. + */ +static void +dnode_sync_free_ranges(dnode_t *dn, dmu_tx_t *tx) +{ + int txgoff = tx->tx_txg & TXG_MASK; + + mutex_enter(&dn->dn_mtx); + zfs_range_tree_t *rt = dn->dn_free_ranges[txgoff]; + if (rt != NULL) { + boolean_t freeing_dnode = dn->dn_free_txg > 0 && + dn->dn_free_txg <= tx->tx_txg; + zfs_range_seg_t *rs; + + if (freeing_dnode) { + ASSERT(zfs_range_tree_contains(rt, 0, + dn->dn_maxblkid + 1)); + } + + while ((rs = zfs_range_tree_first(rt)) != NULL) { + uint64_t start = zfs_rs_get_start(rs, rt); + uint64_t size = zfs_rs_get_end(rs, rt) - start; + + mutex_exit(&dn->dn_mtx); + dnode_sync_free_range_impl(dn, start, size, + freeing_dnode, tx); + mutex_enter(&dn->dn_mtx); + + zfs_range_tree_clear(rt, start, size); + } + zfs_range_tree_destroy(rt); + dn->dn_free_ranges[txgoff] = NULL; + } + mutex_exit(&dn->dn_mtx); +} + +/* * Write out the dnode's dirty buffers. * Does not wait for zio completions. */ @@ -780,32 +820,7 @@ } /* process all the "freed" ranges in the file */ - if (dn->dn_free_ranges[txgoff] != NULL) { - dnode_sync_free_range_arg_t dsfra; - dsfra.dsfra_dnode = dn; - dsfra.dsfra_tx = tx; - dsfra.dsfra_free_indirects = freeing_dnode; - mutex_enter(&dn->dn_mtx); - if (freeing_dnode) { - ASSERT(zfs_range_tree_contains( - dn->dn_free_ranges[txgoff], 0, - dn->dn_maxblkid + 1)); - } - /* - * Because dnode_sync_free_range() must drop dn_mtx during its - * processing, using it as a callback to zfs_range_tree_vacate() - * is not safe. No other operations (besides destroy) are - * allowed once zfs_range_tree_vacate() has begun, and dropping - * dn_mtx would leave a window open for another thread to - * observe that invalid (and unsafe) state. - */ - zfs_range_tree_walk(dn->dn_free_ranges[txgoff], - dnode_sync_free_range, &dsfra); - zfs_range_tree_vacate(dn->dn_free_ranges[txgoff], NULL, NULL); - zfs_range_tree_destroy(dn->dn_free_ranges[txgoff]); - dn->dn_free_ranges[txgoff] = NULL; - mutex_exit(&dn->dn_mtx); - } + dnode_sync_free_ranges(dn, tx); if (freeing_dnode) { dn->dn_objset->os_freed_dnodes++; @@ -827,7 +842,7 @@ } /* - * This must be done after dnode_sync_free_range() + * This must be done after dnode_sync_free_ranges() * and dnode_increase_indirection(). See dnode_new_blkid() * for an explanation of the high bit being set. */ diff -Nru zfs-linux-2.3.2/module/zfs/dsl_bookmark.c zfs-linux-2.3.9/module/zfs/dsl_bookmark.c --- zfs-linux-2.3.2/module/zfs/dsl_bookmark.c 2025-05-01 18:45:25.619128512 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_bookmark.c 2026-08-21 21:15:51.008496675 +0000 @@ -39,10 +39,10 @@ static int dsl_bookmark_hold_ds(dsl_pool_t *dp, const char *fullname, - dsl_dataset_t **dsp, const void *tag, char **shortnamep) + dsl_dataset_t **dsp, const void *tag, const char **shortnamep) { char buf[ZFS_MAX_DATASET_NAME_LEN]; - char *hashp; + const char *hashp; if (strlen(fullname) >= ZFS_MAX_DATASET_NAME_LEN) return (SET_ERROR(ENAMETOOLONG)); @@ -105,7 +105,7 @@ dsl_bookmark_lookup(dsl_pool_t *dp, const char *fullname, dsl_dataset_t *later_ds, zfs_bookmark_phys_t *bmp) { - char *shortname; + const char *shortname; dsl_dataset_t *ds; int error; @@ -219,7 +219,7 @@ int error; dsl_dataset_t *newbm_ds; - char *newbm_short; + const char *newbm_short; zfs_bookmark_phys_t bmark_phys; error = dsl_bookmark_hold_ds(dp, newbm, &newbm_ds, FTAG, &newbm_short); @@ -329,7 +329,7 @@ } static dsl_bookmark_node_t * -dsl_bookmark_node_alloc(char *shortname) +dsl_bookmark_node_alloc(const char *shortname) { dsl_bookmark_node_t *dbn = kmem_alloc(sizeof (*dbn), KM_SLEEP); dbn->dbn_name = spa_strdup(shortname); @@ -445,7 +445,7 @@ dsl_pool_t *dp = dmu_tx_pool(tx); objset_t *mos = dp->dp_meta_objset; dsl_dataset_t *snapds, *bmark_fs; - char *shortname; + const char *shortname; boolean_t bookmark_redacted; uint64_t *dsredactsnaps; uint64_t dsnumsnaps; @@ -535,7 +535,7 @@ { dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *bmark_fs_source, *bmark_fs_new; - char *source_shortname, *new_shortname; + const char *source_shortname, *new_shortname; zfs_bookmark_phys_t source_phys; VERIFY0(dsl_bookmark_hold_ds(dp, source_name, &bmark_fs_source, FTAG, @@ -1106,7 +1106,7 @@ dsl_dataset_t *ds; zfs_bookmark_phys_t bm; int error; - char *shortname; + const char *shortname; error = dsl_bookmark_hold_ds(dp, fullname, &ds, FTAG, &shortname); @@ -1162,7 +1162,7 @@ for (nvpair_t *pair = nvlist_next_nvpair(dbda->dbda_success, NULL); pair != NULL; pair = nvlist_next_nvpair(dbda->dbda_success, pair)) { dsl_dataset_t *ds; - char *shortname; + const char *shortname; uint64_t zap_cnt; VERIFY0(dsl_bookmark_hold_ds(dp, nvpair_name(pair), diff -Nru zfs-linux-2.3.2/module/zfs/dsl_crypt.c zfs-linux-2.3.9/module/zfs/dsl_crypt.c --- zfs-linux-2.3.2/module/zfs/dsl_crypt.c 2025-05-01 18:45:25.623128589 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_crypt.c 2026-08-21 21:15:51.013496616 +0000 @@ -2679,23 +2679,16 @@ spa_crypt_get_salt(spa_t *spa, uint64_t dsobj, uint8_t *salt) { int ret; - dsl_crypto_key_t *dck = NULL; + dsl_crypto_key_t *dck; /* look up the key from the spa's keystore */ ret = spa_keystore_lookup_key(spa, dsobj, FTAG, &dck); if (ret != 0) - goto error; + return (SET_ERROR(EACCES)); ret = zio_crypt_key_get_salt(&dck->dck_key, salt); - if (ret != 0) - goto error; - spa_keystore_dsl_key_rele(spa, dck, FTAG); - return (0); -error: - if (dck != NULL) - spa_keystore_dsl_key_rele(spa, dck, FTAG); return (ret); } @@ -2710,9 +2703,7 @@ abd_t *abd, uint_t datalen, boolean_t byteswap) { int ret; - dsl_crypto_key_t *dck = NULL; - void *buf = abd_borrow_buf_copy(abd, datalen); - objset_phys_t *osp = buf; + dsl_crypto_key_t *dck; uint8_t portable_mac[ZIO_OBJSET_MAC_LEN]; uint8_t local_mac[ZIO_OBJSET_MAC_LEN]; const uint8_t zeroed_mac[ZIO_OBJSET_MAC_LEN] = {0}; @@ -2720,15 +2711,19 @@ /* look up the key from the spa's keystore */ ret = spa_keystore_lookup_key(spa, dsobj, FTAG, &dck); if (ret != 0) - goto error; + return (SET_ERROR(EACCES)); + + void *buf = abd_borrow_buf_copy(abd, datalen); + objset_phys_t *osp = buf; /* calculate both HMACs */ ret = zio_crypt_do_objset_hmacs(&dck->dck_key, buf, datalen, byteswap, portable_mac, local_mac); - if (ret != 0) - goto error; - spa_keystore_dsl_key_rele(spa, dck, FTAG); + if (ret != 0) { + abd_return_buf(abd, buf, datalen); + return (ret); + } /* if we are generating encode the HMACs in the objset_phys_t */ if (generate) { @@ -2762,14 +2757,7 @@ } abd_return_buf(abd, buf, datalen); - return (0); - -error: - if (dck != NULL) - spa_keystore_dsl_key_rele(spa, dck, FTAG); - abd_return_buf(abd, buf, datalen); - return (ret); } int @@ -2777,23 +2765,22 @@ uint_t datalen, uint8_t *mac) { int ret; - dsl_crypto_key_t *dck = NULL; - uint8_t *buf = abd_borrow_buf_copy(abd, datalen); + dsl_crypto_key_t *dck; uint8_t digestbuf[ZIO_DATA_MAC_LEN]; /* look up the key from the spa's keystore */ ret = spa_keystore_lookup_key(spa, dsobj, FTAG, &dck); if (ret != 0) - goto error; + return (SET_ERROR(EACCES)); + uint8_t *buf = abd_borrow_buf_copy(abd, datalen); /* perform the hmac */ ret = zio_crypt_do_hmac(&dck->dck_key, buf, datalen, digestbuf, ZIO_DATA_MAC_LEN); - if (ret != 0) - goto error; - - abd_return_buf(abd, buf, datalen); spa_keystore_dsl_key_rele(spa, dck, FTAG); + abd_return_buf(abd, buf, datalen); + if (ret != 0) + return (ret); /* * Truncate and fill in mac buffer if we were asked to generate a MAC. @@ -2808,12 +2795,6 @@ return (SET_ERROR(ECKSUM)); return (0); - -error: - if (dck != NULL) - spa_keystore_dsl_key_rele(spa, dck, FTAG); - abd_return_buf(abd, buf, datalen); - return (ret); } /* diff -Nru zfs-linux-2.3.2/module/zfs/dsl_dataset.c zfs-linux-2.3.9/module/zfs/dsl_dataset.c --- zfs-linux-2.3.2/module/zfs/dsl_dataset.c 2025-05-01 18:45:25.626128647 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_dataset.c 2026-08-21 21:15:51.017496569 +0000 @@ -32,6 +32,7 @@ * Copyright (c) 2019, Klara Inc. * Copyright (c) 2019, Allan Jude * Copyright (c) 2020 The FreeBSD Foundation [1] + * Copyright (c) 2025, Rob Norris * * [1] Portions of this software were developed by Allan Jude * under sponsorship from the FreeBSD Foundation. @@ -1518,7 +1519,7 @@ int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr, proc_t *proc) + dmu_tx_t *tx, boolean_t recv, uint64_t cnt, cred_t *cr) { int error; uint64_t value; @@ -1563,7 +1564,7 @@ */ if (cnt != 0 && cr != NULL) { error = dsl_fs_ss_limit_check(ds->ds_dir, cnt, - ZFS_PROP_SNAPSHOT_LIMIT, NULL, cr, proc); + ZFS_PROP_SNAPSHOT_LIMIT, NULL, cr); if (error != 0) return (error); } @@ -1664,7 +1665,7 @@ if (error == 0) { error = dsl_fs_ss_limit_check(ds->ds_dir, cnt, ZFS_PROP_SNAPSHOT_LIMIT, NULL, - ddsa->ddsa_cr, ddsa->ddsa_proc); + ddsa->ddsa_cr); dsl_dataset_rele(ds, FTAG); } @@ -1702,7 +1703,7 @@ if (error == 0) { /* passing 0/NULL skips dsl_fs_ss_limit_check */ error = dsl_dataset_snapshot_check_impl(ds, - atp + 1, tx, B_FALSE, 0, NULL, NULL); + atp + 1, tx, B_FALSE, 0, NULL); dsl_dataset_rele(ds, FTAG); } @@ -1976,11 +1977,13 @@ } } + cred_t *cr = CRED(); + crhold(cr); + ddsa.ddsa_snaps = snaps; ddsa.ddsa_props = props; ddsa.ddsa_errors = errors; - ddsa.ddsa_cr = CRED(); - ddsa.ddsa_proc = curproc; + ddsa.ddsa_cr = cr; if (error == 0) { error = dsl_sync_task(firstname, dsl_dataset_snapshot_check, @@ -1988,6 +1991,8 @@ fnvlist_num_pairs(snaps) * 3, ZFS_SPACE_CHECK_NORMAL); } + crfree(cr); + if (suspended != NULL) { for (pair = nvlist_next_nvpair(suspended, NULL); pair != NULL; pair = nvlist_next_nvpair(suspended, pair)) { @@ -2028,7 +2033,7 @@ /* NULL cred means no limit check for tmp snapshot */ error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, - tx, B_FALSE, 0, NULL, NULL); + tx, B_FALSE, 0, NULL); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); @@ -2881,6 +2886,9 @@ stat->dds_guid = dsl_get_guid(ds); stat->dds_redacted = dsl_get_redacted(ds); stat->dds_origin[0] = '\0'; + stat->dds_flags = DDS_FLAG_HAS_ENCRYPTED; + if (ds->ds_dir->dd_crypto_obj != 0) + stat->dds_flags |= DDS_FLAG_ENCRYPTED; if (ds->ds_is_snapshot) { stat->dds_is_snapshot = B_TRUE; stat->dds_num_clones = dsl_get_numclones(ds); @@ -3496,7 +3504,7 @@ /* Check that there is enough space and limit headroom here */ err = dsl_dir_transfer_possible(origin_ds->ds_dir, hds->ds_dir, - 0, ss_mv_cnt, ddpa->used, ddpa->cr, ddpa->proc); + 0, ss_mv_cnt, ddpa->used, ddpa->cr); if (err != 0) goto out; @@ -3932,15 +3940,19 @@ if (error != 0) return (error); + cred_t *cr = CRED(); + crhold(cr); + ddpa.ddpa_clonename = name; ddpa.err_ds = fnvlist_alloc(); - ddpa.cr = CRED(); - ddpa.proc = curproc; + ddpa.cr = cr; error = dsl_sync_task(name, dsl_dataset_promote_check, dsl_dataset_promote_sync, &ddpa, 2 + numsnaps, ZFS_SPACE_CHECK_RESERVED); + crfree(cr); + /* * Return the first conflicting snapshot found. */ diff -Nru zfs-linux-2.3.2/module/zfs/dsl_dir.c zfs-linux-2.3.9/module/zfs/dsl_dir.c --- zfs-linux-2.3.2/module/zfs/dsl_dir.c 2025-05-01 18:45:25.640128918 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_dir.c 2026-08-21 21:15:51.036496343 +0000 @@ -28,6 +28,7 @@ * Copyright (c) 2016 Actifio, Inc. All rights reserved. * Copyright (c) 2018, loli10K . All rights reserved. * Copyright (c) 2023 Hewlett Packard Enterprise Development LP. + * Copyright (c) 2025, Rob Norris */ #include @@ -416,7 +417,7 @@ static int getcomponent(const char *path, char *component, const char **nextp) { - char *p; + const char *p; if ((path == NULL) || (path[0] == '\0')) return (SET_ERROR(ENOENT)); @@ -759,7 +760,7 @@ static enforce_res_t dsl_enforce_ds_ss_limits(dsl_dir_t *dd, zfs_prop_t prop, - cred_t *cr, proc_t *proc) + cred_t *cr) { enforce_res_t enforce = ENFORCE_ALWAYS; uint64_t obj; @@ -774,16 +775,8 @@ if (crgetzoneid(cr) != GLOBAL_ZONEID) return (ENFORCE_ALWAYS); - /* - * We are checking the saved credentials of the user process, which is - * not the current process. Note that we can't use secpolicy_zfs(), - * because it only works if the cred is that of the current process (on - * Linux). - */ - if (secpolicy_zfs_proc(cr, proc) == 0) + if (secpolicy_zfs(cr) == 0) return (ENFORCE_NEVER); -#else - (void) proc; #endif if ((obj = dsl_dir_phys(dd)->dd_head_dataset_obj) == 0) @@ -817,7 +810,7 @@ */ int dsl_fs_ss_limit_check(dsl_dir_t *dd, uint64_t delta, zfs_prop_t prop, - dsl_dir_t *ancestor, cred_t *cr, proc_t *proc) + dsl_dir_t *ancestor, cred_t *cr) { objset_t *os = dd->dd_pool->dp_meta_objset; uint64_t limit, count; @@ -849,7 +842,7 @@ * are allowed to change the limit on the current dataset, but there * is another limit in the tree above. */ - enforce = dsl_enforce_ds_ss_limits(dd, prop, cr, proc); + enforce = dsl_enforce_ds_ss_limits(dd, prop, cr); if (enforce == ENFORCE_NEVER) return (0); @@ -893,7 +886,7 @@ if (dd->dd_parent != NULL) err = dsl_fs_ss_limit_check(dd->dd_parent, delta, prop, - ancestor, cr, proc); + ancestor, cr); return (err); } @@ -1539,9 +1532,28 @@ } /* call from syncing context when we actually write/free space for this dd */ -void -dsl_dir_diduse_space(dsl_dir_t *dd, dd_used_t type, - int64_t used, int64_t compressed, int64_t uncompressed, dmu_tx_t *tx) +static void dsl_dir_diduse_transfer_space_impl(dsl_dir_t *dd, int64_t used, + int64_t compressed, int64_t uncompressed, int64_t tonew, + dd_used_t oldtype, dd_used_t newtype, boolean_t nested, dmu_tx_t *tx); + +static void +dsl_dir_lock_enter(dsl_dir_t *dd, boolean_t nested) +{ + /* + * lockdep needs an explicit subclass when a child dd_lock + * nests an ancestor. + */ + if (nested) { + mutex_enter_nested(&dd->dd_lock, NESTED_SINGLE); + } else { + mutex_enter(&dd->dd_lock); + } +} + +static void +dsl_dir_diduse_space_impl(dsl_dir_t *dd, dd_used_t type, + int64_t used, int64_t compressed, int64_t uncompressed, + boolean_t nested, dmu_tx_t *tx) { int64_t accounted_delta; @@ -1559,7 +1571,7 @@ */ boolean_t needlock = !MUTEX_HELD(&dd->dd_lock); if (needlock) - mutex_enter(&dd->dd_lock); + dsl_dir_lock_enter(dd, nested); dsl_dir_phys_t *ddp = dsl_dir_phys(dd); accounted_delta = parent_delta(dd, ddp->dd_used_bytes, used); ASSERT(used >= 0 || ddp->dd_used_bytes >= -used); @@ -1587,13 +1599,21 @@ mutex_exit(&dd->dd_lock); if (dd->dd_parent != NULL) { - dsl_dir_diduse_transfer_space(dd->dd_parent, + dsl_dir_diduse_transfer_space_impl(dd->dd_parent, accounted_delta, compressed, uncompressed, - used, DD_USED_CHILD_RSRV, DD_USED_CHILD, tx); + used, DD_USED_CHILD_RSRV, DD_USED_CHILD, nested, tx); } } void +dsl_dir_diduse_space(dsl_dir_t *dd, dd_used_t type, int64_t used, + int64_t compressed, int64_t uncompressed, dmu_tx_t *tx) +{ + dsl_dir_diduse_space_impl(dd, type, used, compressed, uncompressed, + B_FALSE, tx); +} + +void dsl_dir_transfer_space(dsl_dir_t *dd, int64_t delta, dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) { @@ -1617,10 +1637,10 @@ mutex_exit(&dd->dd_lock); } -void -dsl_dir_diduse_transfer_space(dsl_dir_t *dd, int64_t used, +static void +dsl_dir_diduse_transfer_space_impl(dsl_dir_t *dd, int64_t used, int64_t compressed, int64_t uncompressed, int64_t tonew, - dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) + dd_used_t oldtype, dd_used_t newtype, boolean_t nested, dmu_tx_t *tx) { int64_t accounted_delta; @@ -1630,7 +1650,7 @@ dmu_buf_will_dirty(dd->dd_dbuf, tx); - mutex_enter(&dd->dd_lock); + dsl_dir_lock_enter(dd, nested); dsl_dir_phys_t *ddp = dsl_dir_phys(dd); accounted_delta = parent_delta(dd, ddp->dd_used_bytes, used); ASSERT(used >= 0 || ddp->dd_used_bytes >= -used); @@ -1661,12 +1681,21 @@ mutex_exit(&dd->dd_lock); if (dd->dd_parent != NULL) { - dsl_dir_diduse_transfer_space(dd->dd_parent, + dsl_dir_diduse_transfer_space_impl(dd->dd_parent, accounted_delta, compressed, uncompressed, - used, DD_USED_CHILD_RSRV, DD_USED_CHILD, tx); + used, DD_USED_CHILD_RSRV, DD_USED_CHILD, nested, tx); } } +void +dsl_dir_diduse_transfer_space(dsl_dir_t *dd, int64_t used, + int64_t compressed, int64_t uncompressed, int64_t tonew, + dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) +{ + dsl_dir_diduse_transfer_space_impl(dd, used, compressed, + uncompressed, tonew, oldtype, newtype, B_FALSE, tx); +} + typedef struct dsl_dir_set_qr_arg { const char *ddsqra_name; zprop_source_t ddsqra_source; @@ -1833,8 +1862,8 @@ if (dd->dd_parent != NULL) { /* Roll up this additional usage into our ancestors */ - dsl_dir_diduse_space(dd->dd_parent, DD_USED_CHILD_RSRV, - delta, 0, 0, tx); + dsl_dir_diduse_space_impl(dd->dd_parent, DD_USED_CHILD_RSRV, + delta, 0, 0, B_TRUE, tx); } mutex_exit(&dd->dd_lock); } @@ -1916,7 +1945,6 @@ const char *ddra_oldname; const char *ddra_newname; cred_t *ddra_cred; - proc_t *ddra_proc; } dsl_dir_rename_arg_t; typedef struct dsl_valid_rename_arg { @@ -2095,8 +2123,7 @@ } error = dsl_dir_transfer_possible(dd->dd_parent, - newparent, fs_cnt, ss_cnt, myspace, - ddra->ddra_cred, ddra->ddra_proc); + newparent, fs_cnt, ss_cnt, myspace, ddra->ddra_cred); if (error != 0) { dsl_dir_rele(newparent, FTAG); dsl_dir_rele(dd, FTAG); @@ -2213,22 +2240,27 @@ int dsl_dir_rename(const char *oldname, const char *newname) { + cred_t *cr = CRED(); + crhold(cr); + dsl_dir_rename_arg_t ddra; ddra.ddra_oldname = oldname; ddra.ddra_newname = newname; - ddra.ddra_cred = CRED(); - ddra.ddra_proc = curproc; + ddra.ddra_cred = cr; - return (dsl_sync_task(oldname, + int err = dsl_sync_task(oldname, dsl_dir_rename_check, dsl_dir_rename_sync, &ddra, - 3, ZFS_SPACE_CHECK_RESERVED)); + 3, ZFS_SPACE_CHECK_RESERVED); + + crfree(cr); + return (err); } int dsl_dir_transfer_possible(dsl_dir_t *sdd, dsl_dir_t *tdd, uint64_t fs_cnt, uint64_t ss_cnt, uint64_t space, - cred_t *cr, proc_t *proc) + cred_t *cr) { dsl_dir_t *ancestor; int64_t adelta; @@ -2242,11 +2274,11 @@ return (SET_ERROR(ENOSPC)); err = dsl_fs_ss_limit_check(tdd, fs_cnt, ZFS_PROP_FILESYSTEM_LIMIT, - ancestor, cr, proc); + ancestor, cr); if (err != 0) return (err); err = dsl_fs_ss_limit_check(tdd, ss_cnt, ZFS_PROP_SNAPSHOT_LIMIT, - ancestor, cr, proc); + ancestor, cr); if (err != 0) return (err); diff -Nru zfs-linux-2.3.2/module/zfs/dsl_pool.c zfs-linux-2.3.9/module/zfs/dsl_pool.c --- zfs-linux-2.3.2/module/zfs/dsl_pool.c 2025-05-01 18:45:25.643128976 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_pool.c 2026-08-21 21:15:51.041496284 +0000 @@ -405,13 +405,21 @@ taskq_destroy(dp->dp_zil_clean_taskq); spa_sync_tq_destroy(dp->dp_spa); - /* - * We can't set retry to TRUE since we're explicitly specifying - * a spa to flush. This is good enough; any missed buffers for - * this spa won't cause trouble, and they'll eventually fall - * out of the ARC just like any other unused buffer. - */ - arc_flush(dp->dp_spa, FALSE); + if (dp->dp_spa->spa_state == POOL_STATE_EXPORTED || + dp->dp_spa->spa_state == POOL_STATE_DESTROYED) { + /* + * On export/destroy perform the ARC flush asynchronously. + */ + arc_flush_async(dp->dp_spa); + } else { + /* + * We can't set retry to TRUE since we're explicitly specifying + * a spa to flush. This is good enough; any missed buffers for + * this spa won't cause trouble, and they'll eventually fall + * out of the ARC just like any other unused buffer. + */ + arc_flush(dp->dp_spa, FALSE); + } mmp_fini(dp->dp_spa); txg_fini(dp); diff -Nru zfs-linux-2.3.2/module/zfs/dsl_scan.c zfs-linux-2.3.9/module/zfs/dsl_scan.c --- zfs-linux-2.3.2/module/zfs/dsl_scan.c 2025-05-01 18:45:25.650129112 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_scan.c 2026-08-21 21:15:51.050496177 +0000 @@ -235,6 +235,9 @@ #define DSL_SCAN_IS_SCRUB(scn) \ ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB) +#define DSL_SCAN_IS_RESILVER(scn) \ + ((scn)->scn_phys.scn_func == POOL_SCAN_RESILVER) + /* * Enable/disable the processing of the free_bpobj object. */ @@ -1021,7 +1024,7 @@ if (err == 0) { spa_event_notify(spa, NULL, NULL, ESC_ZFS_ERRORSCRUB_RESUME); - return (ECANCELED); + return (0); } return (SET_ERROR(err)); } @@ -1037,7 +1040,7 @@ POOL_SCRUB_NORMAL); if (err == 0) { spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_RESUME); - return (SET_ERROR(ECANCELED)); + return (0); } return (SET_ERROR(err)); } @@ -1132,10 +1135,6 @@ } } - scn->scn_phys.scn_state = complete ? DSS_FINISHED : DSS_CANCELED; - - spa_notify_waiters(spa); - if (dsl_scan_restarting(scn, tx)) { spa_history_log_internal(spa, "scan aborted, restarting", tx, "errors=%llu", (u_longlong_t)spa_approx_errlog_size(spa)); @@ -1173,7 +1172,7 @@ vdev_dtl_reassess(spa->spa_root_vdev, tx->tx_txg, scn->scn_phys.scn_max_txg, B_TRUE, B_FALSE); - if (scn->scn_phys.scn_min_txg) { + if (DSL_SCAN_IS_RESILVER(scn)) { nvlist_t *aux = fnvlist_alloc(); fnvlist_add_string(aux, ZFS_EV_RESILVER_TYPE, "healing"); @@ -1194,6 +1193,9 @@ * Don't clear flag until after vdev_dtl_reassess to ensure that * DTL_MISSING will get updated when possible. */ + scn->scn_phys.scn_state = complete ? DSS_FINISHED : + DSS_CANCELED; + scn->scn_phys.scn_end_time = gethrestime_sec(); spa->spa_scrub_started = B_FALSE; /* @@ -1223,9 +1225,13 @@ /* Clear recent error events (i.e. duplicate events tracking) */ if (complete) zfs_ereport_clear(spa, NULL); + } else { + scn->scn_phys.scn_state = complete ? DSS_FINISHED : + DSS_CANCELED; + scn->scn_phys.scn_end_time = gethrestime_sec(); } - scn->scn_phys.scn_end_time = gethrestime_sec(); + spa_notify_waiters(spa); if (spa->spa_errata == ZPOOL_ERRATA_ZOL_2094_SCRUB) spa->spa_errata = 0; @@ -1270,6 +1276,7 @@ spa->spa_scan_pass_errorscrub_pause = gethrestime_sec(); scn->errorscrub_phys.dep_paused_flags = B_TRUE; dsl_errorscrub_sync_state(scn, tx); + zap_cursor_fini(&scn->errorscrub_cursor); spa_event_notify(spa, NULL, NULL, ESC_ZFS_ERRORSCRUB_PAUSED); } else { ASSERT3U(*cmd, ==, POOL_SCRUB_NORMAL); @@ -1434,7 +1441,7 @@ if (txg == 0) { dmu_tx_t *tx; tx = dmu_tx_create_dd(dp->dp_mos_dir); - VERIFY(0 == dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); txg = dmu_tx_get_txg(tx); dp->dp_scan->scn_restart_txg = txg; diff -Nru zfs-linux-2.3.2/module/zfs/dsl_synctask.c zfs-linux-2.3.9/module/zfs/dsl_synctask.c --- zfs-linux-2.3.2/module/zfs/dsl_synctask.c 2025-05-01 18:45:25.654129189 +0000 +++ zfs-linux-2.3.9/module/zfs/dsl_synctask.c 2026-08-21 21:15:51.055496118 +0000 @@ -58,7 +58,7 @@ top: tx = dmu_tx_create_dd(dp->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); dst.dst_pool = dp; dst.dst_txg = dmu_tx_get_txg(tx); @@ -86,12 +86,19 @@ dmu_tx_commit(tx); - if (sigfunc != NULL && txg_wait_synced_sig(dp, dst.dst_txg)) { - /* current contract is to call func once */ - sigfunc(arg, tx); - sigfunc = NULL; /* in case we're performing an EAGAIN retry */ - } - txg_wait_synced(dp, dst.dst_txg); + if (sigfunc != NULL) { + err = txg_wait_synced_flags(dp, dst.dst_txg, TXG_WAIT_SIGNAL); + if (err != 0) { + VERIFY3U(err, ==, EINTR); + /* current contract is to call func once */ + sigfunc(arg, tx); + /* in case we're performing an EAGAIN retry */ + sigfunc = NULL; + + txg_wait_synced(dp, dst.dst_txg); + } + } else + txg_wait_synced(dp, dst.dst_txg); if (dst.dst_error == EAGAIN) { txg_wait_synced(dp, dst.dst_txg + TXG_DEFER_SIZE); diff -Nru zfs-linux-2.3.2/module/zfs/fm.c zfs-linux-2.3.9/module/zfs/fm.c --- zfs-linux-2.3.2/module/zfs/fm.c 2025-05-01 18:45:25.664129382 +0000 +++ zfs-linux-2.3.9/module/zfs/fm.c 2026-08-21 21:15:51.067495975 +0000 @@ -1368,7 +1368,8 @@ fm_ksp = NULL; } } -#endif /* _KERNEL */ ZFS_MODULE_PARAM(zfs_zevent, zfs_zevent_, len_max, UINT, ZMOD_RW, "Max event queue length"); + +#endif /* _KERNEL */ diff -Nru zfs-linux-2.3.2/module/zfs/gzip.c zfs-linux-2.3.9/module/zfs/gzip.c --- zfs-linux-2.3.2/module/zfs/gzip.c 2025-05-01 18:45:25.667129440 +0000 +++ zfs-linux-2.3.9/module/zfs/gzip.c 2026-08-21 21:15:51.072495916 +0000 @@ -96,13 +96,17 @@ /* check if hardware accelerator can be used */ if (qat_dc_use_accel(d_len)) { if (qat_compress(QAT_DECOMPRESS, s_start, s_len, - d_start, d_len, &dstlen) == CPA_STATUS_SUCCESS) - return (0); + d_start, d_len, &dstlen) == CPA_STATUS_SUCCESS) { + if ((size_t)dstlen == d_len) + return (0); + } /* if hardware de-compress fail, do it again with software */ } if (uncompress_func(d_start, &dstlen, s_start, s_len) != Z_OK) return (-1); + if ((size_t)dstlen != d_len) + return (-1); return (0); } diff -Nru zfs-linux-2.3.2/module/zfs/lz4_zfs.c zfs-linux-2.3.9/module/zfs/lz4_zfs.c --- zfs-linux-2.3.2/module/zfs/lz4_zfs.c 2025-05-01 18:45:25.677129634 +0000 +++ zfs-linux-2.3.9/module/zfs/lz4_zfs.c 2026-08-21 21:15:51.086495750 +0000 @@ -88,17 +88,24 @@ (void) n; const char *src = s_start; uint32_t bufsiz = BE_IN32(src); + int decoded; /* invalid compressed buffer size encoded at start */ if (bufsiz + sizeof (bufsiz) > s_len) return (1); /* - * Returns 0 on success (decompression function returned non-negative) - * and non-zero on failure (decompression function returned negative). + * LZ4_uncompress_unknownOutputSize returns the number of bytes decoded + * on success, or a negative value on failure. An OpenZFS block must + * expand to exactly d_len bytes */ - return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], - d_start, bufsiz, d_len) < 0); + decoded = LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], + d_start, bufsiz, d_len); + if (decoded < 0) + return (1); + if (d_len != (size_t)decoded) + return (1); + return (0); } ZFS_COMPRESS_WRAP_DECL(zfs_lz4_compress) diff -Nru zfs-linux-2.3.2/module/zfs/metaslab.c zfs-linux-2.3.9/module/zfs/metaslab.c --- zfs-linux-2.3.2/module/zfs/metaslab.c 2025-05-01 18:45:25.684129769 +0000 +++ zfs-linux-2.3.9/module/zfs/metaslab.c 2026-08-21 21:15:51.096495631 +0000 @@ -370,6 +370,16 @@ #define METASLABSTAT_BUMP(stat) \ atomic_inc_64(&metaslab_stats.stat.value.ui64); +char * +metaslab_rt_name(metaslab_group_t *mg, metaslab_t *ms, const char *name) +{ + return (kmem_asprintf("{spa=%s vdev_guid=%llu ms_id=%llu %s}", + spa_name(mg->mg_vd->vdev_spa), + (u_longlong_t)mg->mg_vd->vdev_guid, + (u_longlong_t)ms->ms_id, + name)); +} + static kstat_t *metaslab_ksp; @@ -433,10 +443,12 @@ { spa_t *spa = mc->mc_spa; - ASSERT(mc->mc_alloc == 0); - ASSERT(mc->mc_deferred == 0); - ASSERT(mc->mc_space == 0); - ASSERT(mc->mc_dspace == 0); + ASSERT0(mc->mc_alloc); + ASSERT0(mc->mc_dalloc); + ASSERT0(mc->mc_deferred); + ASSERT0(mc->mc_ddeferred); + ASSERT0(mc->mc_space); + ASSERT0(mc->mc_dspace); for (int i = 0; i < spa->spa_alloc_count; i++) { metaslab_class_allocator_t *mca = &mc->mc_allocator[i]; @@ -477,10 +489,13 @@ static void metaslab_class_space_update(metaslab_class_t *mc, int64_t alloc_delta, - int64_t defer_delta, int64_t space_delta, int64_t dspace_delta) + int64_t dalloc_delta, int64_t deferred_delta, int64_t ddeferred_delta, + int64_t space_delta, int64_t dspace_delta) { atomic_add_64(&mc->mc_alloc, alloc_delta); - atomic_add_64(&mc->mc_deferred, defer_delta); + atomic_add_64(&mc->mc_dalloc, dalloc_delta); + atomic_add_64(&mc->mc_deferred, deferred_delta); + atomic_add_64(&mc->mc_ddeferred, ddeferred_delta); atomic_add_64(&mc->mc_space, space_delta); atomic_add_64(&mc->mc_dspace, dspace_delta); } @@ -488,25 +503,34 @@ uint64_t metaslab_class_get_alloc(metaslab_class_t *mc) { - return (mc->mc_alloc); + return (atomic_load_64(&mc->mc_alloc)); +} + +uint64_t +metaslab_class_get_dalloc(metaslab_class_t *mc) +{ + return (spa_deflate(mc->mc_spa) ? atomic_load_64(&mc->mc_dalloc) : + atomic_load_64(&mc->mc_alloc)); } uint64_t metaslab_class_get_deferred(metaslab_class_t *mc) { - return (mc->mc_deferred); + return (spa_deflate(mc->mc_spa) ? atomic_load_64(&mc->mc_ddeferred) : + atomic_load_64(&mc->mc_deferred)); } uint64_t metaslab_class_get_space(metaslab_class_t *mc) { - return (mc->mc_space); + return (atomic_load_64(&mc->mc_space)); } uint64_t metaslab_class_get_dspace(metaslab_class_t *mc) { - return (spa_deflate(mc->mc_spa) ? mc->mc_dspace : mc->mc_space); + return (spa_deflate(mc->mc_spa) ? atomic_load_64(&mc->mc_dspace) : + atomic_load_64(&mc->mc_space)); } void @@ -969,14 +993,16 @@ if (msp != NULL) { mutex_enter(&msp->ms_lock); metaslab_passivate(msp, - metaslab_weight_from_range_tree(msp)); + metaslab_weight(msp, B_TRUE) & + ~METASLAB_ACTIVE_MASK); mutex_exit(&msp->ms_lock); } msp = mga->mga_secondary; if (msp != NULL) { mutex_enter(&msp->ms_lock); metaslab_passivate(msp, - metaslab_weight_from_range_tree(msp)); + metaslab_weight(msp, B_TRUE) & + ~METASLAB_ACTIVE_MASK); mutex_exit(&msp->ms_lock); } } @@ -2686,16 +2712,21 @@ } void -metaslab_space_update(vdev_t *vd, metaslab_class_t *mc, int64_t alloc_delta, +metaslab_space_update(metaslab_group_t *mg, int64_t alloc_delta, int64_t defer_delta, int64_t space_delta) { + vdev_t *vd = mg->mg_vd; + int64_t dalloc_delta = vdev_deflated_space(vd, alloc_delta); + int64_t ddefer_delta = vdev_deflated_space(vd, defer_delta); + int64_t dspace_delta = vdev_deflated_space(vd, space_delta); + vdev_space_update(vd, alloc_delta, defer_delta, space_delta); ASSERT3P(vd->vdev_spa->spa_root_vdev, ==, vd->vdev_parent); ASSERT(vd->vdev_ms_count != 0); - metaslab_class_space_update(mc, alloc_delta, defer_delta, space_delta, - vdev_deflated_space(vd, space_delta)); + metaslab_class_space_update(mg->mg_class, alloc_delta, dalloc_delta, + defer_delta, ddefer_delta, space_delta, dspace_delta); } int @@ -2755,30 +2786,43 @@ zfs_range_seg_type_t type = metaslab_calculate_range_tree_type(vd, ms, &start, &shift); - ms->ms_allocatable = zfs_range_tree_create(NULL, type, NULL, start, - shift); + ms->ms_allocatable = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_allocatable")); for (int t = 0; t < TXG_SIZE; t++) { - ms->ms_allocating[t] = zfs_range_tree_create(NULL, type, - NULL, start, shift); - } - ms->ms_freeing = zfs_range_tree_create(NULL, type, NULL, start, shift); - ms->ms_freed = zfs_range_tree_create(NULL, type, NULL, start, shift); + ms->ms_allocating[t] = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, + metaslab_rt_name(mg, ms, "ms_allocating")); + } + ms->ms_freeing = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_freeing")); + ms->ms_freed = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_freed")); for (int t = 0; t < TXG_DEFER_SIZE; t++) { - ms->ms_defer[t] = zfs_range_tree_create(NULL, type, NULL, - start, shift); - } - ms->ms_checkpointing = - zfs_range_tree_create(NULL, type, NULL, start, shift); - ms->ms_unflushed_allocs = - zfs_range_tree_create(NULL, type, NULL, start, shift); + ms->ms_defer[t] = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_defer")); + } + ms->ms_checkpointing = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_checkpointing")); + ms->ms_unflushed_allocs = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_unflushed_allocs")); metaslab_rt_arg_t *mrap = kmem_zalloc(sizeof (*mrap), KM_SLEEP); mrap->mra_bt = &ms->ms_unflushed_frees_by_size; mrap->mra_floor_shift = metaslab_by_size_min_shift; - ms->ms_unflushed_frees = zfs_range_tree_create(&metaslab_rt_ops, - type, mrap, start, shift); - - ms->ms_trim = zfs_range_tree_create(NULL, type, NULL, start, shift); + ms->ms_unflushed_frees = zfs_range_tree_create_flags( + &metaslab_rt_ops, type, mrap, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_unflushed_frees")); + + ms->ms_trim = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, metaslab_rt_name(mg, ms, "ms_trim")); metaslab_group_add(mg, ms); metaslab_set_fragmentation(ms, B_FALSE); @@ -2794,8 +2838,7 @@ */ if (txg <= TXG_INITIAL) { metaslab_sync_done(ms, 0); - metaslab_space_update(vd, mg->mg_class, - metaslab_allocated_space(ms), 0, 0); + metaslab_space_update(mg, metaslab_allocated_space(ms), 0, 0); } if (txg != 0) { @@ -2857,9 +2900,8 @@ * subtracted. */ if (!msp->ms_new) { - metaslab_space_update(vd, mg->mg_class, - -metaslab_allocated_space(msp), 0, -msp->ms_size); - + metaslab_space_update(mg, -metaslab_allocated_space(msp), 0, + -msp->ms_size); } space_map_close(msp->ms_sm); msp->ms_sm = NULL; @@ -3752,7 +3794,10 @@ type = metaslab_calculate_range_tree_type(msp->ms_group->mg_vd, msp, &start, &shift); - condense_tree = zfs_range_tree_create(NULL, type, NULL, start, shift); + condense_tree = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, + metaslab_rt_name(msp->ms_group, msp, "condense_tree")); for (int t = 0; t < TXG_DEFER_SIZE; t++) { zfs_range_tree_walk(msp->ms_defer[t], @@ -3809,8 +3854,10 @@ * followed by FREES (due to space_map_write() in metaslab_sync()) for * sync pass 1. */ - zfs_range_tree_t *tmp_tree = zfs_range_tree_create(NULL, type, NULL, - start, shift); + zfs_range_tree_t *tmp_tree = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, + ZFS_RT_F_DYN_NAME, + metaslab_rt_name(msp->ms_group, msp, "tmp_tree")); zfs_range_tree_add(tmp_tree, msp->ms_start, msp->ms_size); space_map_write(sm, tmp_tree, SM_ALLOC, SM_NO_VDEVID, tx); space_map_write(sm, msp->ms_allocatable, SM_FREE, SM_NO_VDEVID, tx); @@ -4362,7 +4409,7 @@ if (msp->ms_new) { /* this is a new metaslab, add its capacity to the vdev */ - metaslab_space_update(vd, mg->mg_class, 0, 0, msp->ms_size); + metaslab_space_update(mg, 0, 0, msp->ms_size); /* there should be no allocations nor frees at this point */ VERIFY0(msp->ms_allocated_this_txg); @@ -4391,8 +4438,7 @@ } else { defer_delta -= zfs_range_tree_space(*defer_tree); } - metaslab_space_update(vd, mg->mg_class, alloc_delta + defer_delta, - defer_delta, 0); + metaslab_space_update(mg, alloc_delta + defer_delta, defer_delta, 0); if (spa_syncing_log_sm(spa) == NULL) { /* @@ -5073,29 +5119,16 @@ /* * We were unable to allocate from this metaslab so determine - * a new weight for this metaslab. Now that we have loaded - * the metaslab we can provide a better hint to the metaslab - * selector. - * - * For space-based metaslabs, we use the maximum block size. - * This information is only available when the metaslab - * is loaded and is more accurate than the generic free - * space weight that was calculated by metaslab_weight(). - * This information allows us to quickly compare the maximum - * available allocation in the metaslab to the allocation - * size being requested. - * - * For segment-based metaslabs, determine the new weight - * based on the highest bucket in the range tree. We - * explicitly use the loaded segment weight (i.e. the range - * tree histogram) since it contains the space that is - * currently available for allocation and is accurate - * even within a sync pass. + * a new weight for this metaslab. The weight was last + * recalculated either when we loaded it (if this is the first + * TXG it's been loaded in), or the last time a txg was synced + * out. */ uint64_t weight; if (WEIGHT_IS_SPACEBASED(msp->ms_weight)) { - weight = metaslab_largest_allocatable(msp); - WEIGHT_SET_SPACEBASED(weight); + metaslab_set_fragmentation(msp, B_TRUE); + weight = metaslab_space_weight(msp) & + ~METASLAB_ACTIVE_MASK; } else { weight = metaslab_weight_from_range_tree(msp); } @@ -5107,13 +5140,6 @@ * For the case where we use the metaslab that is * active for another allocator we want to make * sure that we retain the activation mask. - * - * Note that we could attempt to use something like - * metaslab_recalculate_weight_and_sort() that - * retains the activation mask here. That function - * uses metaslab_weight() to set the weight though - * which is not as accurate as the calculations - * above. */ weight |= msp->ms_weight & METASLAB_ACTIVE_MASK; metaslab_group_sort(mg, msp, weight); @@ -5329,8 +5355,16 @@ */ if (mca->mca_aliquot == 0 && metaslab_bias_enabled) { vdev_stat_t *vs = &vd->vdev_stat; - int64_t vs_free = vs->vs_space - vs->vs_alloc; - int64_t mc_free = mc->mc_space - mc->mc_alloc; + uint64_t vs_space = + atomic_load_64(&vs->vs_space); + uint64_t mc_space = + atomic_load_64(&mc->mc_space); + uint64_t mc_alloc = + atomic_load_64(&mc->mc_alloc); + uint64_t vs_alloc = + atomic_load_64(&vs->vs_alloc); + int64_t vs_free = vs_space - vs_alloc; + int64_t mc_free = mc_space - mc_alloc; int64_t ratio; /* diff -Nru zfs-linux-2.3.2/module/zfs/mmp.c zfs-linux-2.3.9/module/zfs/mmp.c --- zfs-linux-2.3.2/module/zfs/mmp.c 2025-05-01 18:45:25.688129846 +0000 +++ zfs-linux-2.3.9/module/zfs/mmp.c 2026-08-21 21:15:51.100495584 +0000 @@ -145,6 +145,15 @@ * Additionally, the duration is then extended by a random 25% to attempt to to * detect simultaneous imports. For example, if both partner hosts are rebooted * at the same time and automatically attempt to import the pool. + * + * Once the read-only activity check completes and the pool is determined to + * be inactive a second check is performed to claim the pool. During this + * phase the host writes out MMP uberblocks to each of the devices which are + * identical to the best uberblock but with a randomly selected sequence id. + * The "best" uberblock is then read back and it must contain this new sequence + * number. This check is performed multiple times to ensure that there is + * no window where a concurrently importing system can incorrectly determine + * the pool to be inactive. */ /* @@ -187,6 +196,22 @@ */ uint_t zfs_multihost_fail_intervals = MMP_DEFAULT_FAIL_INTERVALS; +#ifndef _KERNEL +/* + * Manual recovery only, set by zhack. Drops the mirror legs this host + * cannot open from the uberblock claim's required write count, so a pool + * whose config still expects legs that died with a peer host can be + * imported by hand. Every leg which can be opened is still required. + * + * This is deliberately absent from the kernel module. The write, the wait + * and the re-read are untouched, so a competing importer which shares any + * visibility with us is still caught; a live peer whose legs are all + * invisible from here is not, and cannot be by any write-and-read scheme. + * That residual is why this is a manual operation guarded by fencing. + */ +boolean_t mmp_claim_relaxed = B_FALSE; +#endif + static const void *const mmp_tag = "mmp_write_uberblock"; static __attribute__((noreturn)) void mmp_thread(void *arg); @@ -237,8 +262,8 @@ if (!mmp->mmp_thread) { mmp->mmp_thread = thread_create(NULL, 0, mmp_thread, spa, 0, &p0, TS_RUN, defclsyspri); - zfs_dbgmsg("MMP thread started pool '%s' " - "gethrtime %llu", spa_name(spa), gethrtime()); + zfs_dbgmsg("mmp: mmp thread started spa=%s " + "gethrtime=%llu", spa_name(spa), gethrtime()); } mutex_exit(&mmp->mmp_thread_lock); } @@ -257,7 +282,7 @@ cv_wait(&mmp->mmp_thread_cv, &mmp->mmp_thread_lock); } mutex_exit(&mmp->mmp_thread_lock); - zfs_dbgmsg("MMP thread stopped pool '%s' gethrtime %llu", + zfs_dbgmsg("mmp: mmp thread stopped spa=%s gethrtime=%llu", spa_name(spa), gethrtime()); ASSERT(mmp->mmp_thread == NULL); @@ -449,9 +474,9 @@ spa_config_enter_mmp(spa, SCL_STATE, mmp_tag, RW_READER); lock_acquire_time = gethrtime() - lock_acquire_time; if (lock_acquire_time > (MSEC2NSEC(MMP_MIN_INTERVAL) / 10)) - zfs_dbgmsg("MMP SCL_STATE acquisition pool '%s' took %llu ns " - "gethrtime %llu", spa_name(spa), lock_acquire_time, - gethrtime()); + zfs_dbgmsg("mmp: long SCL_STATE acquisition, spa=%s " + "acquire_time=%llu gethrtime=%llu", spa_name(spa), + lock_acquire_time, gethrtime()); mutex_enter(&mmp->mmp_io_lock); @@ -474,8 +499,8 @@ spa_mmp_history_add(spa, mmp->mmp_ub.ub_txg, gethrestime_sec(), mmp->mmp_delay, NULL, 0, mmp->mmp_kstat_id++, error); - zfs_dbgmsg("MMP error choosing leaf pool '%s' " - "gethrtime %llu fail_mask %#x", spa_name(spa), + zfs_dbgmsg("mmp: error choosing leaf, spa=%s " + "gethrtime=%llu fail_mask=%#x", spa_name(spa), gethrtime(), error); } mutex_exit(&mmp->mmp_io_lock); @@ -485,11 +510,11 @@ vd = spa->spa_mmp.mmp_last_leaf; if (mmp->mmp_skip_error != 0) { - mmp->mmp_skip_error = 0; - zfs_dbgmsg("MMP write after skipping due to unavailable " - "leaves, pool '%s' gethrtime %llu leaf %llu", + zfs_dbgmsg("mmp: write after skipping due to unavailable " + "leaves, spa=%s gethrtime=%llu vdev=%llu error=%d", spa_name(spa), (u_longlong_t)gethrtime(), - (u_longlong_t)vd->vdev_guid); + (u_longlong_t)vd->vdev_guid, mmp->mmp_skip_error); + mmp->mmp_skip_error = 0; } if (mmp->mmp_zio_root == NULL) @@ -540,6 +565,176 @@ zio_nowait(zio); } +static void +mmp_claim_uberblock_sync_done(zio_t *zio) +{ + uint64_t *good_writes = zio->io_private; + + if (zio->io_error == 0 && zio->io_vd->vdev_top->vdev_ms_array != 0) + atomic_inc_64(good_writes); +} + +/* + * Write the uberblock to the first label of all leaves of the specified vdev. + * One write per mirror leg the config still expects present, one for a + * singleton, and parity+1 for raidz or draid vdevs. + */ +static void +mmp_claim_uberblock_sync(zio_t *zio, uint64_t *good_writes, + uint64_t *issued_writes, uint64_t *req_writes, uberblock_t *ub, vdev_t *vd, + int flags) +{ + for (uint64_t c = 0; c < vd->vdev_children; c++) { + vdev_t *cvd = vd->vdev_child[c]; + + if (cvd->vdev_islog || cvd->vdev_isspare || + cvd->vdev_isl2cache || cvd->vdev_ishole || + cvd->vdev_ops == &vdev_indirect_ops) + continue; + + if (cvd->vdev_top == cvd) { + uint64_t nparity = vdev_get_nparity(cvd); + if (nparity) { + *req_writes += nparity + 1; + } else { + /* + * Mirror: any single leg is enough for a + * remote host to see the claim, so require a + * write to every leg the pool config still + * expects to be present. A leg taken out of + * service is recorded persistently in the + * config (offline, faulted, or removed) and + * is seen the same way by every host, so it + * is not required and a degraded mirror can + * still be claimed. A leg merely unreachable + * from this host has none of those states and + * stays required, so a host which can see + * only some of the legs of an otherwise + * healthy mirror still fails the claim and + * cannot split the pool. + */ + uint64_t present = 0; + for (uint64_t l = 0; l < cvd->vdev_children; + l++) { + vdev_t *lvd = cvd->vdev_child[l]; +#ifndef _KERNEL + /* + * Manual recovery forgives the legs + * this host could not open, and marks + * that same set offline before it + * exports, so the relaxed claim + * accepts nothing the later ordinary + * imports would not. + */ + if (mmp_claim_relaxed && + lvd->vdev_not_present) + continue; +#endif + if (!lvd->vdev_offline && + !lvd->vdev_faulted && + !lvd->vdev_removed) + present++; + } + *req_writes += MAX(present, 1); + } + } + + mmp_claim_uberblock_sync(zio, good_writes, issued_writes, + req_writes, ub, cvd, flags); + } + + if (!vd->vdev_ops->vdev_op_leaf) + return; + + if (!vdev_writeable(vd)) + return; + + if (vd->vdev_ops == &vdev_draid_spare_ops) + return; + + /* + * Count the writes actually issued alongside those required. A leaf + * the config expects present but which cannot be written is never + * issued one, so a shortfall here means a device is missing rather + * than failing. Gated exactly as good_writes is in + * mmp_claim_uberblock_sync_done() so that the two counts describe the + * same set of leaves and can be compared. + */ + if (vd->vdev_top->vdev_ms_array != 0) + (*issued_writes)++; + + abd_t *ub_abd = abd_alloc_for_io(VDEV_UBERBLOCK_SIZE(vd), B_TRUE); + abd_copy_from_buf(ub_abd, ub, sizeof (uberblock_t)); + abd_zero_off(ub_abd, sizeof (uberblock_t), + VDEV_UBERBLOCK_SIZE(vd) - sizeof (uberblock_t)); + + vdev_label_write(zio, vd, 0, ub_abd, + VDEV_UBERBLOCK_OFFSET(vd, VDEV_UBERBLOCK_COUNT(vd) - + MMP_BLOCKS_PER_LABEL), VDEV_UBERBLOCK_SIZE(vd), + mmp_claim_uberblock_sync_done, good_writes, + flags | ZIO_FLAG_DONT_PROPAGATE); + + abd_free(ub_abd); +} + +int +mmp_claim_uberblock(spa_t *spa, vdev_t *vd, uberblock_t *ub) +{ + int flags = ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_CANFAIL; + uint64_t good_writes = 0; + uint64_t issued_writes = 0; + uint64_t req_writes = 0; + zio_t *zio; + + ASSERT(MMP_VALID(ub)); + ASSERT(MMP_SEQ_VALID(ub)); + + spa_config_enter(spa, SCL_ALL, mmp_tag, RW_WRITER); + + /* Sync the uberblock to all writeable leaves */ + zio = zio_root(spa, NULL, NULL, flags); + mmp_claim_uberblock_sync(zio, &good_writes, &issued_writes, &req_writes, + ub, vd, flags); + (void) zio_wait(zio); + + /* Flush the new uberblocks so they're immediately visible */ + zio = zio_root(spa, NULL, NULL, flags); + zio_flush(zio, vd); + (void) zio_wait(zio); + + spa_config_exit(spa, SCL_ALL, mmp_tag); + + zfs_dbgmsg("mmp: claiming uberblock, spa=%s txg=%llu seq=%llu " + "req_writes=%llu issued_writes=%llu good_writes=%llu", + spa_load_name(spa), + (u_longlong_t)ub->ub_txg, (u_longlong_t)MMP_SEQ(ub), + (u_longlong_t)req_writes, (u_longlong_t)issued_writes, + (u_longlong_t)good_writes); + + /* + * To guarantee visibility from a remote host we require a minimum + * number of good writes. For raidz/draid vdevs parity+1 writes, for + * mirrors one write per leg the config expects present, and for + * singletons 1 write. + * + * Distinguish the two ways of falling short. Too few writes issued + * means a device the config expects present could not be written at + * all, which persists across retries and is what 'zhack mmp reclaim' + * recovers. Enough issued but too few good means the writes reached + * present devices and failed, which a retry may clear. + */ + if (req_writes == 0) + return (SET_ERROR(EIO)); + + if (issued_writes < req_writes) + return (SET_ERROR(ENODEV)); + + if (good_writes < req_writes) + return (SET_ERROR(EIO)); + + return (0); +} + static __attribute__((noreturn)) void mmp_thread(void *arg) { @@ -616,11 +811,11 @@ next_time = gethrtime() + mmp_interval / leaves; if (mmp_fail_ns != last_mmp_fail_ns) { - zfs_dbgmsg("MMP interval change pool '%s' " - "gethrtime %llu last_mmp_interval %llu " - "mmp_interval %llu last_mmp_fail_intervals %u " - "mmp_fail_intervals %u mmp_fail_ns %llu " - "skip_wait %d leaves %d next_time %llu", + zfs_dbgmsg("mmp: interval change, spa=%s " + "gethrtime=%llu last_mmp_interval=%llu " + "mmp_interval=%llu last_mmp_fail_intervals=%u " + "mmp_fail_intervals=%u mmp_fail_ns=%llu " + "skip_wait=%d leaves=%d next_time=%llu", spa_name(spa), (u_longlong_t)gethrtime(), (u_longlong_t)last_mmp_interval, (u_longlong_t)mmp_interval, last_mmp_fail_intervals, @@ -635,9 +830,9 @@ */ if ((!last_spa_multihost && multihost) || (last_spa_suspended && !suspended)) { - zfs_dbgmsg("MMP state change pool '%s': gethrtime %llu " - "last_spa_multihost %u multihost %u " - "last_spa_suspended %u suspended %u", + zfs_dbgmsg("mmp: state change spa=%s: gethrtime=%llu " + "last_spa_multihost=%u multihost=%u " + "last_spa_suspended=%u suspended=%u", spa_name(spa), (u_longlong_t)gethrtime(), last_spa_multihost, multihost, last_spa_suspended, suspended); @@ -663,9 +858,10 @@ */ if (multihost && !suspended && mmp_fail_intervals && (gethrtime() - mmp->mmp_last_write) > mmp_fail_ns) { - zfs_dbgmsg("MMP suspending pool '%s': gethrtime %llu " - "mmp_last_write %llu mmp_interval %llu " - "mmp_fail_intervals %llu mmp_fail_ns %llu txg %llu", + zfs_dbgmsg("mmp: suspending pool, spa=%s " + "gethrtime=%llu mmp_last_write=%llu " + "mmp_interval=%llu mmp_fail_intervals=%llu " + "mmp_fail_ns=%llu txg=%llu", spa_name(spa), (u_longlong_t)gethrtime(), (u_longlong_t)mmp->mmp_last_write, (u_longlong_t)mmp_interval, diff -Nru zfs-linux-2.3.2/module/zfs/multilist.c zfs-linux-2.3.9/module/zfs/multilist.c --- zfs-linux-2.3.2/module/zfs/multilist.c 2025-05-01 18:45:25.691129904 +0000 +++ zfs-linux-2.3.9/module/zfs/multilist.c 2026-08-21 21:15:51.105495524 +0000 @@ -81,7 +81,7 @@ ml->ml_num_sublists = num; ml->ml_index_func = index_func; - ml->ml_sublists = kmem_zalloc(sizeof (multilist_sublist_t) * + ml->ml_sublists = vmem_zalloc(sizeof (multilist_sublist_t) * ml->ml_num_sublists, KM_SLEEP); ASSERT3P(ml->ml_sublists, !=, NULL); @@ -134,7 +134,7 @@ } ASSERT3P(ml->ml_sublists, !=, NULL); - kmem_free(ml->ml_sublists, + vmem_free(ml->ml_sublists, sizeof (multilist_sublist_t) * ml->ml_num_sublists); ml->ml_num_sublists = 0; diff -Nru zfs-linux-2.3.2/module/zfs/range_tree.c zfs-linux-2.3.9/module/zfs/range_tree.c --- zfs-linux-2.3.2/module/zfs/range_tree.c 2025-05-01 18:45:25.702130117 +0000 +++ zfs-linux-2.3.9/module/zfs/range_tree.c 2026-08-21 21:15:51.115495406 +0000 @@ -201,10 +201,10 @@ ZFS_BTREE_FIND_IN_BUF_FUNC(zfs_range_tree_seg_gap_find_in_buf, zfs_range_seg_gap_t, zfs_range_tree_seg_gap_compare) -zfs_range_tree_t * -zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops, +static zfs_range_tree_t * +zfs_range_tree_create_impl(const zfs_range_tree_ops_t *ops, zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift, - uint64_t gap) + uint64_t gap, uint64_t flags, const char *name) { zfs_range_tree_t *rt = kmem_zalloc(sizeof (zfs_range_tree_t), KM_SLEEP); @@ -236,6 +236,8 @@ rt->rt_ops = ops; rt->rt_gap = gap; + rt->rt_flags = flags; + rt->rt_name = name; rt->rt_arg = arg; rt->rt_type = type; rt->rt_start = start; @@ -248,10 +250,29 @@ } zfs_range_tree_t * +zfs_range_tree_create_gap(const zfs_range_tree_ops_t *ops, + zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift, + uint64_t gap) +{ + return (zfs_range_tree_create_impl(ops, type, arg, start, shift, gap, + 0, NULL)); +} + +zfs_range_tree_t * zfs_range_tree_create(const zfs_range_tree_ops_t *ops, zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift) { - return (zfs_range_tree_create_gap(ops, type, arg, start, shift, 0)); + return (zfs_range_tree_create_impl(ops, type, arg, start, shift, 0, + 0, NULL)); +} + +zfs_range_tree_t * +zfs_range_tree_create_flags(const zfs_range_tree_ops_t *ops, + zfs_range_seg_type_t type, void *arg, uint64_t start, uint64_t shift, + uint64_t flags, const char *name) +{ + return (zfs_range_tree_create_impl(ops, type, arg, start, shift, 0, + flags, name)); } void @@ -262,6 +283,9 @@ if (rt->rt_ops != NULL && rt->rt_ops->rtop_destroy != NULL) rt->rt_ops->rtop_destroy(rt, rt->rt_arg); + if (rt->rt_name != NULL && (rt->rt_flags & ZFS_RT_F_DYN_NAME)) + kmem_strfree((char *)(uintptr_t)rt->rt_name); + zfs_btree_destroy(&rt->rt_root); kmem_free(rt, sizeof (*rt)); } @@ -271,15 +295,17 @@ int64_t delta) { if (delta < 0 && delta * -1 >= zfs_rs_get_fill(rs, rt)) { - zfs_panic_recover("zfs: attempting to decrease fill to or " - "below 0; probable double remove in segment [%llx:%llx]", + zfs_panic_recover("zfs: rt=%s: attempting to decrease fill to " + "or below 0; probable double remove in segment [%llx:%llx]", + ZFS_RT_NAME(rt), (longlong_t)zfs_rs_get_start(rs, rt), (longlong_t)zfs_rs_get_end(rs, rt)); } if (zfs_rs_get_fill(rs, rt) + delta > zfs_rs_get_end(rs, rt) - zfs_rs_get_start(rs, rt)) { - zfs_panic_recover("zfs: attempting to increase fill beyond " - "max; probable double add in segment [%llx:%llx]", + zfs_panic_recover("zfs: rt=%s: attempting to increase fill " + "beyond max; probable double add in segment [%llx:%llx]", + ZFS_RT_NAME(rt), (longlong_t)zfs_rs_get_start(rs, rt), (longlong_t)zfs_rs_get_end(rs, rt)); } @@ -319,14 +345,17 @@ * the normal code paths. */ if (rs != NULL) { + uint64_t rstart = zfs_rs_get_start(rs, rt); + uint64_t rend = zfs_rs_get_end(rs, rt); if (gap == 0) { - zfs_panic_recover("zfs: adding existent segment to " - "range tree (offset=%llx size=%llx)", - (longlong_t)start, (longlong_t)size); + zfs_panic_recover("zfs: rt=%s: adding segment " + "(offset=%llx size=%llx) overlapping with existing " + "one (offset=%llx size=%llx)", + ZFS_RT_NAME(rt), + (longlong_t)start, (longlong_t)size, + (longlong_t)rstart, (longlong_t)(rend - rstart)); return; } - uint64_t rstart = zfs_rs_get_start(rs, rt); - uint64_t rend = zfs_rs_get_end(rs, rt); if (rstart <= start && rend >= end) { zfs_range_tree_adjust_fill(rt, rs, fill); return; @@ -451,6 +480,7 @@ zfs_range_seg_t *rs; zfs_range_seg_max_t rsearch, rs_tmp; uint64_t end = start + size; + uint64_t rstart, rend; boolean_t left_over, right_over; VERIFY3U(size, !=, 0); @@ -464,12 +494,15 @@ /* Make sure we completely overlap with someone */ if (rs == NULL) { - zfs_panic_recover("zfs: removing nonexistent segment from " - "range tree (offset=%llx size=%llx)", - (longlong_t)start, (longlong_t)size); + zfs_panic_recover("zfs: rt=%s: removing nonexistent segment " + "from range tree (offset=%llx size=%llx)", + ZFS_RT_NAME(rt), (longlong_t)start, (longlong_t)size); return; } + rstart = zfs_rs_get_start(rs, rt); + rend = zfs_rs_get_end(rs, rt); + /* * Range trees with gap support must only remove complete segments * from the tree. This allows us to maintain accurate fill accounting @@ -479,31 +512,36 @@ if (rt->rt_gap != 0) { if (do_fill) { if (zfs_rs_get_fill(rs, rt) == size) { - start = zfs_rs_get_start(rs, rt); - end = zfs_rs_get_end(rs, rt); + start = rstart; + end = rend; size = end - start; } else { zfs_range_tree_adjust_fill(rt, rs, -size); return; } - } else if (zfs_rs_get_start(rs, rt) != start || - zfs_rs_get_end(rs, rt) != end) { - zfs_panic_recover("zfs: freeing partial segment of " - "gap tree (offset=%llx size=%llx) of " + } else if (rstart != start || rend != end) { + zfs_panic_recover("zfs: rt=%s: freeing partial segment " + "of gap tree (offset=%llx size=%llx) of " "(offset=%llx size=%llx)", + ZFS_RT_NAME(rt), (longlong_t)start, (longlong_t)size, - (longlong_t)zfs_rs_get_start(rs, rt), - (longlong_t)zfs_rs_get_end(rs, rt) - - zfs_rs_get_start(rs, rt)); + (longlong_t)rstart, (longlong_t)(rend - rstart)); return; } } - VERIFY3U(zfs_rs_get_start(rs, rt), <=, start); - VERIFY3U(zfs_rs_get_end(rs, rt), >=, end); + if (!(rstart <= start && rend >= end)) { + zfs_panic_recover("zfs: rt=%s: removing segment " + "(offset=%llx size=%llx) not completely overlapped by " + "existing one (offset=%llx size=%llx)", + ZFS_RT_NAME(rt), + (longlong_t)start, (longlong_t)size, + (longlong_t)rstart, (longlong_t)(rend - rstart)); + return; + } - left_over = (zfs_rs_get_start(rs, rt) != start); - right_over = (zfs_rs_get_end(rs, rt) != end); + left_over = (rstart != start); + right_over = (rend != end); zfs_range_tree_stat_decr(rt, rs); @@ -659,7 +697,7 @@ } rs = zfs_btree_next(&rt->rt_root, &where, &where); - if (rs == NULL || zfs_rs_get_start(rs, rt) > start + size) + if (rs == NULL || zfs_rs_get_start(rs, rt) >= start + size) return (B_FALSE); *ostart = zfs_rs_get_start(rs, rt); diff -Nru zfs-linux-2.3.2/module/zfs/sa.c zfs-linux-2.3.9/module/zfs/sa.c --- zfs-linux-2.3.2/module/zfs/sa.c 2025-05-01 18:45:25.711130291 +0000 +++ zfs-linux-2.3.9/module/zfs/sa.c 2026-08-21 21:15:50.907497873 +0000 @@ -1598,8 +1598,8 @@ bulk = kmem_zalloc(sizeof (sa_bulk_attr_t) * ZPL_END, KM_SLEEP); attrs = kmem_zalloc(sizeof (sa_bulk_attr_t) * ZPL_END, KM_SLEEP); - mutex_enter(&hdl->sa_lock); mutex_enter(&zp->z_lock); + mutex_enter(&hdl->sa_lock); err = sa_lookup_locked(hdl, SA_ZPL_PROJID(zfsvfs), &projid, sizeof (uint64_t)); @@ -1743,8 +1743,8 @@ zp->z_is_sa = B_TRUE; out: - mutex_exit(&zp->z_lock); mutex_exit(&hdl->sa_lock); + mutex_exit(&zp->z_lock); kmem_free(attrs, sizeof (sa_bulk_attr_t) * ZPL_END); kmem_free(bulk, sizeof (sa_bulk_attr_t) * ZPL_END); if (dxattr_obj) diff -Nru zfs-linux-2.3.2/module/zfs/spa.c zfs-linux-2.3.9/module/zfs/spa.c --- zfs-linux-2.3.2/module/zfs/spa.c 2025-05-01 18:45:25.722130504 +0000 +++ zfs-linux-2.3.9/module/zfs/spa.c 2026-08-21 21:15:51.015496592 +0000 @@ -140,7 +140,7 @@ #define ZTI_P(n, q) { ZTI_MODE_FIXED, (n), (q) } #define ZTI_PCT(n) { ZTI_MODE_ONLINE_PERCENT, (n), 1 } -#define ZTI_SCALE { ZTI_MODE_SCALE, 0, 1 } +#define ZTI_SCALE(min) { ZTI_MODE_SCALE, (min), 1 } #define ZTI_SYNC { ZTI_MODE_SYNC, 0, 1 } #define ZTI_NULL { ZTI_MODE_NULL, 0, 0 } @@ -179,13 +179,13 @@ static zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ_TYPES] = { /* ISSUE ISSUE_HIGH INTR INTR_HIGH */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* NULL */ - { ZTI_N(8), ZTI_NULL, ZTI_SCALE, ZTI_NULL }, /* READ */ + { ZTI_N(8), ZTI_NULL, ZTI_SCALE(0), ZTI_NULL }, /* READ */ #ifdef illumos - { ZTI_SYNC, ZTI_N(5), ZTI_SCALE, ZTI_N(5) }, /* WRITE */ + { ZTI_SYNC, ZTI_N(5), ZTI_SCALE(0), ZTI_N(5) }, /* WRITE */ #else - { ZTI_SYNC, ZTI_NULL, ZTI_SCALE, ZTI_NULL }, /* WRITE */ + { ZTI_SYNC, ZTI_NULL, ZTI_SCALE(0), ZTI_NULL }, /* WRITE */ #endif - { ZTI_SCALE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* FREE */ + { ZTI_SCALE(32), ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* FREE */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* CLAIM */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* FLUSH */ { ZTI_N(4), ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* TRIM */ @@ -1130,7 +1130,7 @@ uint_t value = ztip->zti_value; uint_t count = ztip->zti_count; spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; - uint_t cpus, flags = TASKQ_DYNAMIC; + uint_t cpus, threads, flags = TASKQ_DYNAMIC; switch (mode) { case ZTI_MODE_FIXED: @@ -1143,8 +1143,8 @@ * Create one wr_iss taskq for every 'zio_taskq_write_tpq' CPUs, * not to exceed the number of spa allocators, and align to it. */ - cpus = MAX(1, boot_ncpus * zio_taskq_batch_pct / 100); - count = MAX(1, cpus / MAX(1, zio_taskq_write_tpq)); + threads = MAX(1, boot_ncpus * zio_taskq_batch_pct / 100); + count = MAX(1, threads / MAX(1, zio_taskq_write_tpq)); count = MAX(count, (zio_taskq_batch_pct + 99) / 100); count = MIN(count, spa->spa_alloc_count); while (spa->spa_alloc_count % count != 0 && @@ -1161,14 +1161,14 @@ break; case ZTI_MODE_SCALE: - flags |= TASKQ_THREADS_CPU_PCT; /* * We want more taskqs to reduce lock contention, but we want * less for better request ordering and CPU utilization. */ - cpus = MAX(1, boot_ncpus * zio_taskq_batch_pct / 100); + threads = MAX(1, boot_ncpus * zio_taskq_batch_pct / 100); + threads = MAX(threads, value); if (zio_taskq_batch_tpq > 0) { - count = MAX(1, (cpus + zio_taskq_batch_tpq / 2) / + count = MAX(1, (threads + zio_taskq_batch_tpq / 2) / zio_taskq_batch_tpq); } else { /* @@ -1188,13 +1188,23 @@ * 128 10 8% 10 100 * 256 14 6% 15 210 */ - count = 1 + cpus / 6; + cpus = MIN(threads, boot_ncpus); + count = 1 + threads / 6; while (count * count > cpus) count--; } - /* Limit each taskq within 100% to not trigger assertion. */ - count = MAX(count, (zio_taskq_batch_pct + 99) / 100); - value = (zio_taskq_batch_pct + count / 2) / count; + + /* + * Try to represent the number of threads per taskq as percent + * of online CPUs to allow scaling with later online/offline. + * Fall back to absolute numbers if can't. + */ + value = (threads * 100 + boot_ncpus * count / 2) / + (boot_ncpus * count); + if (value < 5 || value > 100) + value = MAX(1, (threads + count / 2) / count); + else + flags |= TASKQ_THREADS_CPU_PCT; break; case ZTI_MODE_NULL: @@ -1231,29 +1241,14 @@ spa->spa_proc, zio_taskq_basedc, flags); } else { #endif - pri_t pri = maxclsyspri; /* * The write issue taskq can be extremely CPU * intensive. Run it at slightly less important * priority than the other taskqs. - * - * Under Linux and FreeBSD this means incrementing - * the priority value as opposed to platforms like - * illumos where it should be decremented. - * - * On FreeBSD, if priorities divided by four (RQ_PPQ) - * are equal then a difference between them is - * insignificant. */ - if (t == ZIO_TYPE_WRITE && q == ZIO_TASKQ_ISSUE) { -#if defined(__linux__) - pri++; -#elif defined(__FreeBSD__) - pri += 4; -#else -#error "unknown OS" -#endif - } + const pri_t pri = (t == ZIO_TYPE_WRITE && + q == ZIO_TASKQ_ISSUE) ? + wtqclsyspri : maxclsyspri; tq = taskq_create_proc(name, value, pri, 50, INT_MAX, spa->spa_proc, flags); #ifdef HAVE_SYSDC @@ -1408,8 +1403,30 @@ break; } + /* + * SCALE is optionally parameterised by minimum number of + * threads. + */ case ZTI_MODE_SCALE: { - const zio_taskq_info_t zti = ZTI_SCALE; + unsigned long long mint = 0; + if (c != NULL && *c != '\0') { + /* Need a number */ + if (!(isdigit(*c))) + break; + tok = c; + + /* Take digits */ + err = ddi_strtoull(tok, &tok, 10, &mint); + /* Must succeed, and moved forward */ + if (err != 0 || tok == c || *tok != '\0') + break; + + /* Sanity check */ + if (mint >= 16384) + break; + } + + const zio_taskq_info_t zti = ZTI_SCALE(mint); row[q] = zti; break; } @@ -1476,6 +1493,9 @@ pos += sprintf(&buf[pos], "%s%s,%u,%u", sep, modes[zti->zti_mode], zti->zti_count, zti->zti_value); + else if (zti->zti_mode == ZTI_MODE_SCALE && zti->zti_value > 0) + pos += sprintf(&buf[pos], "%s%s,%u", sep, + modes[zti->zti_mode], zti->zti_value); else pos += sprintf(&buf[pos], "%s%s", sep, modes[zti->zti_mode]); @@ -1495,9 +1515,10 @@ { char *cfg = kmem_strdup(val); int err = spa_taskq_param_set(ZIO_TYPE_READ, cfg); - kmem_free(cfg, strlen(val)+1); + kmem_strfree(cfg); return (-err); } + static int spa_taskq_read_param_get(char *buf, zfs_kernel_param_t *kp) { @@ -1509,14 +1530,30 @@ { char *cfg = kmem_strdup(val); int err = spa_taskq_param_set(ZIO_TYPE_WRITE, cfg); - kmem_free(cfg, strlen(val)+1); + kmem_strfree(cfg); return (-err); } + static int spa_taskq_write_param_get(char *buf, zfs_kernel_param_t *kp) { return (spa_taskq_param_get(ZIO_TYPE_WRITE, buf, TRUE)); } + +static int +spa_taskq_free_param_set(const char *val, zfs_kernel_param_t *kp) +{ + char *cfg = kmem_strdup(val); + int err = spa_taskq_param_set(ZIO_TYPE_FREE, cfg); + kmem_strfree(cfg); + return (-err); +} + +static int +spa_taskq_free_param_get(char *buf, zfs_kernel_param_t *kp) +{ + return (spa_taskq_param_get(ZIO_TYPE_FREE, buf, TRUE)); +} #else /* * On FreeBSD load-time parameters can be set up before malloc() is available, @@ -1549,6 +1586,19 @@ return (err); return (spa_taskq_param_set(ZIO_TYPE_WRITE, buf)); } + +static int +spa_taskq_free_param(ZFS_MODULE_PARAM_ARGS) +{ + char buf[SPA_TASKQ_PARAM_MAX]; + int err; + + (void) spa_taskq_param_get(ZIO_TYPE_FREE, buf, FALSE); + err = sysctl_handle_string(oidp, buf, sizeof (buf), req); + if (err || req->newptr == NULL) + return (err); + return (spa_taskq_param_set(ZIO_TYPE_FREE, buf)); +} #endif #endif /* _KERNEL */ @@ -1683,6 +1733,7 @@ ASSERT(spa->spa_state == POOL_STATE_UNINITIALIZED); spa->spa_state = POOL_STATE_ACTIVE; + spa->spa_final_txg = UINT64_MAX; spa->spa_mode = mode; spa->spa_read_spacemaps = spa_mode_readable_spacemaps; @@ -1984,7 +2035,7 @@ spa_unload_log_sm_flush_all(spa_t *spa) { dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); ASSERT3U(spa->spa_log_flushall_txg, ==, 0); spa->spa_log_flushall_txg = dmu_tx_get_txg(tx); @@ -2085,6 +2136,11 @@ vdev_rebuild_stop_all(spa); l2arc_spa_rebuild_stop(spa); } + + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + spa->spa_final_txg = spa_last_synced_txg(spa) + + TXG_DEFER_SIZE + 1; + spa_config_exit(spa, SCL_ALL, FTAG); } /* @@ -2194,6 +2250,7 @@ } spa->spa_raidz_expand = NULL; + spa->spa_checkpoint_txg = 0; spa_config_exit(spa, SCL_ALL, spa); } @@ -2300,7 +2357,7 @@ vd->vdev_top = vd; vd->vdev_aux = &spa->spa_spares; - if (vdev_open(vd) != 0) + if (vdev_open(vd, CRED()) != 0) continue; if (vdev_validate_aux(vd) == 0) @@ -2413,7 +2470,7 @@ spa_l2cache_activate(vd); - if (vdev_open(vd) != 0) + if (vdev_open(vd, CRED()) != 0) continue; (void) vdev_validate_aux(vd); @@ -3505,72 +3562,152 @@ #endif /* - * Determine whether the activity check is required. + * Check the results load_info results from previous tryimport. + * + * error results: + * 0 - Pool remains in an idle state + * EREMOTEIO - Pool was known to be active on the other host + * ENOENT - The config does not contain complete tryimport info */ -static boolean_t -spa_activity_check_required(spa_t *spa, uberblock_t *ub, nvlist_t *label, - nvlist_t *config) +static int +spa_activity_verify_config(spa_t *spa, uberblock_t *ub) { - uint64_t state = 0; - uint64_t hostid = 0; + uint64_t tryconfig_mmp_state = MMP_STATE_ACTIVE; uint64_t tryconfig_txg = 0; uint64_t tryconfig_timestamp = 0; uint16_t tryconfig_mmp_seq = 0; - nvlist_t *nvinfo; + nvlist_t *nvinfo, *config = spa->spa_config; + int error; - if (nvlist_exists(config, ZPOOL_CONFIG_LOAD_INFO)) { - nvinfo = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_LOAD_INFO); - (void) nvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_MMP_TXG, - &tryconfig_txg); - (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_TIMESTAMP, - &tryconfig_timestamp); - (void) nvlist_lookup_uint16(nvinfo, ZPOOL_CONFIG_MMP_SEQ, - &tryconfig_mmp_seq); - } + /* Simply a non-zero value to indicate the verify was done. */ + spa->spa_mmp.mmp_import_ns = 1000; - (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, &state); + error = nvlist_lookup_nvlist(config, ZPOOL_CONFIG_LOAD_INFO, &nvinfo); + if (error) + return (SET_ERROR(ENOENT)); /* - * Disable the MMP activity check - This is used by zdb which - * is intended to be used on potentially active pools. + * If ZPOOL_CONFIG_MMP_STATE is present an activity check was performed + * during the earlier tryimport. If the state recorded there isn't + * MMP_STATE_INACTIVE the pool is known to be active on another host. */ - if (spa->spa_import_flags & ZFS_IMPORT_SKIP_MMP) - return (B_FALSE); + error = nvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_MMP_STATE, + &tryconfig_mmp_state); + if (error) + return (SET_ERROR(ENOENT)); + + if (tryconfig_mmp_state != MMP_STATE_INACTIVE) { + spa_load_failed(spa, "mmp: pool is active on remote host, " + "state=%llu", (u_longlong_t)tryconfig_mmp_state); + return (SET_ERROR(EREMOTEIO)); + } /* - * Skip the activity check when the MMP feature is disabled. + * If ZPOOL_CONFIG_MMP_TXG is present an activity check was performed + * during the earlier tryimport. If the txg recorded there is 0 then + * the pool is known to be active on another host. */ - if (ub->ub_mmp_magic == MMP_MAGIC && ub->ub_mmp_delay == 0) - return (B_FALSE); + error = nvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_MMP_TXG, + &tryconfig_txg); + if (error) + return (SET_ERROR(ENOENT)); - /* - * If the tryconfig_ values are nonzero, they are the results of an - * earlier tryimport. If they all match the uberblock we just found, - * then the pool has not changed and we return false so we do not test - * a second time. - */ - if (tryconfig_txg && tryconfig_txg == ub->ub_txg && - tryconfig_timestamp && tryconfig_timestamp == ub->ub_timestamp && - tryconfig_mmp_seq && tryconfig_mmp_seq == - (MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0)) - return (B_FALSE); + if (tryconfig_txg == 0) { + spa_load_failed(spa, "mmp: pool is active on remote host, " + "tryconfig_txg=%llu", (u_longlong_t)tryconfig_txg); + return (SET_ERROR(EREMOTEIO)); + } + + error = nvlist_lookup_uint64(config, ZPOOL_CONFIG_TIMESTAMP, + &tryconfig_timestamp); + if (error) + return (SET_ERROR(ENOENT)); + + error = nvlist_lookup_uint16(nvinfo, ZPOOL_CONFIG_MMP_SEQ, + &tryconfig_mmp_seq); + if (error) + return (SET_ERROR(ENOENT)); + + if (tryconfig_timestamp == ub->ub_timestamp && + tryconfig_txg == ub->ub_txg && + MMP_SEQ_VALID(ub) && tryconfig_mmp_seq == MMP_SEQ(ub)) { + zfs_dbgmsg("mmp: verified pool mmp tryimport config, " + "spa=%s", spa_load_name(spa)); + return (0); + } + + spa_load_failed(spa, "mmp: pool is active on remote host, " + "tc_timestamp=%llu ub_timestamp=%llu " + "tc_txg=%llu ub_txg=%llu tc_seq=%llu ub_seq=%llu", + (u_longlong_t)tryconfig_timestamp, (u_longlong_t)ub->ub_timestamp, + (u_longlong_t)tryconfig_txg, (u_longlong_t)ub->ub_txg, + (u_longlong_t)tryconfig_mmp_seq, (u_longlong_t)MMP_SEQ(ub)); + + return (SET_ERROR(EREMOTEIO)); +} + +/* + * Determine whether the activity check is required. + */ +static boolean_t +spa_activity_check_required(spa_t *spa, uberblock_t *ub, nvlist_t *label) +{ + nvlist_t *config = spa->spa_config; + uint64_t state = POOL_STATE_ACTIVE; + uint64_t hostid = 0; /* - * Allow the activity check to be skipped when importing the pool - * on the same host which last imported it. Since the hostid from - * configuration may be stale use the one read from the label. + * Disable the MMP activity check - This is used by zdb which + * is always read-only and intended to be used on potentially + * active pools. */ - if (nvlist_exists(label, ZPOOL_CONFIG_HOSTID)) - hostid = fnvlist_lookup_uint64(label, ZPOOL_CONFIG_HOSTID); - - if (hostid == spa_get_hostid(spa)) + if (spa->spa_import_flags & ZFS_IMPORT_SKIP_MMP) { + zfs_dbgmsg("mmp: skipping check ZFS_IMPORT_SKIP_MMP is set, " + "spa=%s", spa_load_name(spa)); return (B_FALSE); + } /* - * Skip the activity test when the pool was cleanly exported. + * Skip the activity check when the MMP feature is disabled. + * - MMP_MAGIC not set - Legacy pool predates the MMP feature, or + * - MMP_MAGIC set && mmp_delay == 0 - MMP feature is disabled. */ - if (state != POOL_STATE_ACTIVE) + if ((ub->ub_mmp_magic != MMP_MAGIC) || + (ub->ub_mmp_magic == MMP_MAGIC && ub->ub_mmp_delay == 0)) { + zfs_dbgmsg("mmp: skipping check: feature is disabled, " + "spa=%s", spa_load_name(spa)); return (B_FALSE); + } + + /* + * Allow the activity check to be skipped when importing a cleanly + * exported pool on the same host which last imported it. Since the + * hostid from configuration may be stale use the one read from the + * label. Imports from other hostids must perform the activity check. + */ + if (label != NULL) { + if (nvlist_exists(label, ZPOOL_CONFIG_HOSTID)) + hostid = fnvlist_lookup_uint64(label, + ZPOOL_CONFIG_HOSTID); + + if (nvlist_exists(config, ZPOOL_CONFIG_POOL_STATE)) + state = fnvlist_lookup_uint64(config, + ZPOOL_CONFIG_POOL_STATE); + + if (spa_get_hostid(spa) && hostid == spa_get_hostid(spa) && + state == POOL_STATE_EXPORTED) { + zfs_dbgmsg("mmp: skipping check: hostid matches " + "and pool is exported, spa=%s, hostid=%llx", + spa_load_name(spa), (u_longlong_t)hostid); + return (B_FALSE); + } + + if (state == POOL_STATE_DESTROYED) { + zfs_dbgmsg("mmp: skipping check: intentionally " + "destroyed pool, spa=%s", spa_load_name(spa)); + return (B_FALSE); + } + } return (B_TRUE); } @@ -3605,9 +3742,10 @@ import_delay = MMP_FAIL_INT(ub) * MSEC2NSEC(MMP_INTERVAL(ub)) * MMP_IMPORT_SAFETY_FACTOR / 100; - zfs_dbgmsg("fail_intvals>0 import_delay=%llu ub_mmp " - "mmp_fails=%llu ub_mmp mmp_interval=%llu " - "import_intervals=%llu", (u_longlong_t)import_delay, + zfs_dbgmsg("mmp: settings spa=%s fail_intvals>0 " + "import_delay=%llu mmp_fails=%llu mmp_interval=%llu " + "import_intervals=%llu", spa_load_name(spa), + (u_longlong_t)import_delay, (u_longlong_t)MMP_FAIL_INT(ub), (u_longlong_t)MMP_INTERVAL(ub), (u_longlong_t)import_intervals); @@ -3619,9 +3757,10 @@ import_delay = MAX(import_delay, (MSEC2NSEC(MMP_INTERVAL(ub)) + ub->ub_mmp_delay) * import_intervals); - zfs_dbgmsg("fail_intvals=0 import_delay=%llu ub_mmp " - "mmp_interval=%llu ub_mmp_delay=%llu " - "import_intervals=%llu", (u_longlong_t)import_delay, + zfs_dbgmsg("mmp: settings spa=%s fail_intvals=0 " + "import_delay=%llu mmp_interval=%llu ub_mmp_delay=%llu " + "import_intervals=%llu", spa_load_name(spa), + (u_longlong_t)import_delay, (u_longlong_t)MMP_INTERVAL(ub), (u_longlong_t)ub->ub_mmp_delay, (u_longlong_t)import_intervals); @@ -3634,17 +3773,18 @@ import_delay = MAX(import_delay, (multihost_interval + ub->ub_mmp_delay) * import_intervals); - zfs_dbgmsg("import_delay=%llu ub_mmp_delay=%llu " - "import_intervals=%llu leaves=%u", - (u_longlong_t)import_delay, + zfs_dbgmsg("mmp: settings spa=%s import_delay=%llu " + "ub_mmp_delay=%llu import_intervals=%llu leaves=%u", + spa_load_name(spa), (u_longlong_t)import_delay, (u_longlong_t)ub->ub_mmp_delay, (u_longlong_t)import_intervals, vdev_count_leaves(spa)); } else { /* Using local tunings is the only reasonable option */ - zfs_dbgmsg("pool last imported on non-MMP aware " - "host using import_delay=%llu multihost_interval=%llu " - "import_intervals=%llu", (u_longlong_t)import_delay, + zfs_dbgmsg("mmp: pool last imported on non-MMP aware " + "host using settings spa=%s import_delay=%llu " + "multihost_interval=%llu import_intervals=%llu", + spa_load_name(spa), (u_longlong_t)import_delay, (u_longlong_t)multihost_interval, (u_longlong_t)import_intervals); } @@ -3653,7 +3793,145 @@ } /* - * Remote host activity check. + * Store the observed pool status in spa->spa_load_info nvlist. If the + * remote hostname or hostid are available from configuration read from + * disk store them as well. Additionally, provide some diagnostic info + * for which activity checks were run and their duration. This allows + * 'zpool import' to generate a more useful message. + * + * Mandatory observed pool status + * - ZPOOL_CONFIG_MMP_STATE - observed pool status (active/inactive) + * - ZPOOL_CONFIG_MMP_TXG - observed pool txg number + * - ZPOOL_CONFIG_MMP_SEQ - observed pool sequence id + * + * Optional information for detailed reporting + * - ZPOOL_CONFIG_MMP_HOSTNAME - hostname from the active pool + * - ZPOOL_CONFIG_MMP_HOSTID - hostid from the active pool + * - ZPOOL_CONFIG_MMP_RESULT - set to result of activity check + * - ZPOOL_CONFIG_MMP_TRYIMPORT_NS - tryimport duration in nanosec + * - ZPOOL_CONFIG_MMP_IMPORT_NS - import duration in nanosec + * - ZPOOL_CONFIG_MMP_CLAIM_NS - claim duration in nanosec + * + * ZPOOL_CONFIG_MMP_RESULT can be set to: + * - ENXIO - system hostid not set + * - ESRCH - activity check skipped + * - EREMOTEIO - activity check detected active pool + * - ENODEV - claim could not be written to a device the config expects + * - EIO - claim writes were issued to present devices and failed + * - EINTR - activity check interrupted + * - 0 - activity check detected no activity + * + * ENODEV and EIO are reported with ZPOOL_CONFIG_MMP_STATE set to + * MMP_STATE_ACTIVE even though no remote host was seen. Nothing is actually + * active in either case, but an older zpool(8) knows only the two existing + * states and reaches zfs_error_aux() with an uninitialized buffer for any + * other value, so the state is kept as one it understands and the real cause + * travels in the result. + */ +static void +spa_activity_set_load_info(spa_t *spa, nvlist_t *label, mmp_state_t state, + uint64_t txg, uint16_t seq, int error) +{ + mmp_thread_t *mmp = &spa->spa_mmp; + const char *hostname = NULL; + uint64_t hostid = 0; + + /* Always report a zero txg and seq id for active pools. */ + if (state == MMP_STATE_ACTIVE) { + ASSERT0(txg); + ASSERT0(seq); + } + + if (label) { + if (nvlist_exists(label, ZPOOL_CONFIG_HOSTNAME)) { + hostname = fnvlist_lookup_string(label, + ZPOOL_CONFIG_HOSTNAME); + fnvlist_add_string(spa->spa_load_info, + ZPOOL_CONFIG_MMP_HOSTNAME, hostname); + } + + if (nvlist_exists(label, ZPOOL_CONFIG_HOSTID)) { + hostid = fnvlist_lookup_uint64(label, + ZPOOL_CONFIG_HOSTID); + fnvlist_add_uint64(spa->spa_load_info, + ZPOOL_CONFIG_MMP_HOSTID, hostid); + } + } + + fnvlist_add_uint64(spa->spa_load_info, ZPOOL_CONFIG_MMP_STATE, state); + fnvlist_add_uint64(spa->spa_load_info, ZPOOL_CONFIG_MMP_TXG, txg); + fnvlist_add_uint16(spa->spa_load_info, ZPOOL_CONFIG_MMP_SEQ, seq); + fnvlist_add_uint32(spa->spa_load_info, ZPOOL_CONFIG_MMP_RESULT, error); + + if (mmp->mmp_tryimport_ns > 0) { + fnvlist_add_uint64(spa->spa_load_info, + ZPOOL_CONFIG_MMP_TRYIMPORT_NS, mmp->mmp_tryimport_ns); + } + + if (mmp->mmp_import_ns > 0) { + fnvlist_add_uint64(spa->spa_load_info, + ZPOOL_CONFIG_MMP_IMPORT_NS, mmp->mmp_import_ns); + } + + if (mmp->mmp_claim_ns > 0) { + fnvlist_add_uint64(spa->spa_load_info, + ZPOOL_CONFIG_MMP_CLAIM_NS, mmp->mmp_claim_ns); + } + + zfs_dbgmsg("mmp: set spa_load_info, spa=%s hostname=%s hostid=%llx " + "state=%d txg=%llu seq=%llu tryimport_ns=%lld import_ns=%lld " + "claim_ns=%lld", spa_load_name(spa), + hostname != NULL ? hostname : "none", (u_longlong_t)hostid, + (int)state, (u_longlong_t)txg, (u_longlong_t)seq, + (longlong_t)mmp->mmp_tryimport_ns, (longlong_t)mmp->mmp_import_ns, + (longlong_t)mmp->mmp_claim_ns); +} + +static int +spa_ld_activity_result(spa_t *spa, int error, const char *state) +{ + switch (error) { + case ENXIO: + cmn_err(CE_WARN, "pool '%s' system hostid not set, " + "aborted import during %s", spa_load_name(spa), state); + /* Userspace expects EREMOTEIO for no system hostid */ + error = EREMOTEIO; + break; + case ENODEV: + cmn_err(CE_WARN, "pool '%s' could not claim every device the " + "config expects present, aborted import during %s; if a " + "device is permanently gone see 'zhack mmp reclaim'", + spa_load_name(spa), state); + /* Userspace expects EREMOTEIO for a failed claim */ + error = EREMOTEIO; + break; + case EIO: + cmn_err(CE_WARN, "pool '%s' had I/O errors writing the claim, " + "aborted import during %s", spa_load_name(spa), state); + /* Userspace expects EREMOTEIO for a failed claim */ + error = EREMOTEIO; + break; + case EREMOTEIO: + cmn_err(CE_WARN, "pool '%s' activity detected, aborted " + "import during %s", spa_load_name(spa), state); + break; + case EINTR: + cmn_err(CE_WARN, "pool '%s' activity check, interrupted " + "import during %s", spa_load_name(spa), state); + break; + case 0: + cmn_err(CE_NOTE, "pool '%s' activity check completed " + "successfully", spa_load_name(spa)); + break; + } + + return (error); +} + + +/* + * Remote host activity check. Performed during tryimport when the pool + * has passed on the basic sanity check and is open read-only. * * error results: * 0 - no activity detected @@ -3661,17 +3939,9 @@ * EINTR - user canceled the operation */ static int -spa_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *config, +spa_activity_check_tryimport(spa_t *spa, uberblock_t *spa_ub, boolean_t importing) { - uint64_t txg = ub->ub_txg; - uint64_t timestamp = ub->ub_timestamp; - uint64_t mmp_config = ub->ub_mmp_config; - uint16_t mmp_seq = MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0; - uint64_t import_delay; - hrtime_t import_expire, now; - nvlist_t *mmp_label = NULL; - vdev_t *rvd = spa->spa_root_vdev; kcondvar_t cv; kmutex_t mtx; int error = 0; @@ -3680,65 +3950,55 @@ mutex_init(&mtx, NULL, MUTEX_DEFAULT, NULL); mutex_enter(&mtx); - /* - * If ZPOOL_CONFIG_MMP_TXG is present an activity check was performed - * during the earlier tryimport. If the txg recorded there is 0 then - * the pool is known to be active on another host. - * - * Otherwise, the pool might be in use on another host. Check for - * changes in the uberblocks on disk if necessary. - */ - if (nvlist_exists(config, ZPOOL_CONFIG_LOAD_INFO)) { - nvlist_t *nvinfo = fnvlist_lookup_nvlist(config, - ZPOOL_CONFIG_LOAD_INFO); - - if (nvlist_exists(nvinfo, ZPOOL_CONFIG_MMP_TXG) && - fnvlist_lookup_uint64(nvinfo, ZPOOL_CONFIG_MMP_TXG) == 0) { - vdev_uberblock_load(rvd, ub, &mmp_label); - error = SET_ERROR(EREMOTEIO); - goto out; - } - } - - import_delay = spa_activity_check_duration(spa, ub); + uint64_t import_delay = spa_activity_check_duration(spa, spa_ub); + hrtime_t start_time = gethrtime(); /* Add a small random factor in case of simultaneous imports (0-25%) */ import_delay += import_delay * random_in_range(250) / 1000; - - import_expire = gethrtime() + import_delay; + hrtime_t import_expire = gethrtime() + import_delay; if (importing) { + /* Console message includes tryimport and claim time */ + hrtime_t extra_delay = MMP_IMPORT_VERIFY_ITERS * + MSEC2NSEC(MMP_INTERVAL_VALID(spa_ub) ? + MMP_INTERVAL(spa_ub) : MMP_MIN_INTERVAL); + cmn_err(CE_NOTE, "pool '%s' activity check required, " + "%llu seconds remaining", spa_load_name(spa), + (u_longlong_t)MAX(NSEC2SEC(import_delay + extra_delay), 1)); spa_import_progress_set_notes(spa, "Checking MMP activity, " "waiting %llu ms", (u_longlong_t)NSEC2MSEC(import_delay)); } - int iterations = 0; + hrtime_t now; + nvlist_t *mmp_label = NULL; + while ((now = gethrtime()) < import_expire) { - if (importing && iterations++ % 30 == 0) { - spa_import_progress_set_notes(spa, "Checking MMP " - "activity, %llu ms remaining", - (u_longlong_t)NSEC2MSEC(import_expire - now)); - } + vdev_t *rvd = spa->spa_root_vdev; + uberblock_t mmp_ub; if (importing) { (void) spa_import_progress_set_mmp_check(spa_guid(spa), NSEC2SEC(import_expire - gethrtime())); } - vdev_uberblock_load(rvd, ub, &mmp_label); - - if (txg != ub->ub_txg || timestamp != ub->ub_timestamp || - mmp_seq != (MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0)) { - zfs_dbgmsg("multihost activity detected " - "txg %llu ub_txg %llu " - "timestamp %llu ub_timestamp %llu " - "mmp_config %#llx ub_mmp_config %#llx", - (u_longlong_t)txg, (u_longlong_t)ub->ub_txg, - (u_longlong_t)timestamp, - (u_longlong_t)ub->ub_timestamp, - (u_longlong_t)mmp_config, - (u_longlong_t)ub->ub_mmp_config); + vdev_uberblock_load(rvd, &mmp_ub, &mmp_label); + if (vdev_uberblock_compare(spa_ub, &mmp_ub)) { + spa_load_failed(spa, "mmp: activity detected during " + "tryimport, spa_ub_txg=%llu mmp_ub_txg=%llu " + "spa_ub_seq=%llu mmp_ub_seq=%llu " + "spa_ub_timestamp=%llu mmp_ub_timestamp=%llu " + "spa_ub_config=%#llx mmp_ub_config=%#llx", + (u_longlong_t)spa_ub->ub_txg, + (u_longlong_t)mmp_ub.ub_txg, + (u_longlong_t)(MMP_SEQ_VALID(spa_ub) ? + MMP_SEQ(spa_ub) : 0), + (u_longlong_t)(MMP_SEQ_VALID(&mmp_ub) ? + MMP_SEQ(&mmp_ub) : 0), + (u_longlong_t)spa_ub->ub_timestamp, + (u_longlong_t)mmp_ub.ub_timestamp, + (u_longlong_t)spa_ub->ub_mmp_config, + (u_longlong_t)mmp_ub.ub_mmp_config); error = SET_ERROR(EREMOTEIO); break; } @@ -3756,55 +4016,269 @@ error = 0; } -out: mutex_exit(&mtx); mutex_destroy(&mtx); cv_destroy(&cv); + if (mmp_label) + nvlist_free(mmp_label); + + if (spa->spa_load_state == SPA_LOAD_IMPORT || + spa->spa_load_state == SPA_LOAD_OPEN) { + spa->spa_mmp.mmp_import_ns = gethrtime() - start_time; + } else { + spa->spa_mmp.mmp_tryimport_ns = gethrtime() - start_time; + } + + return (error); +} + +/* + * Remote host activity check. Performed during import when the pool has + * passed most sanity check and has been reopened read/write. + * + * error results: + * 0 - no activity detected + * EREMOTEIO - remote activity detected + * ENODEV - the claim could not be written to a device the config + * expects to be present + * EIO - the claim writes were issued to present devices and failed + * EINTR - user canceled the operation + */ +static int +spa_activity_check_claim(spa_t *spa) +{ + vdev_t *rvd = spa->spa_root_vdev; + nvlist_t *mmp_label; + uberblock_t spa_ub; + kcondvar_t cv; + kmutex_t mtx; + int error = 0; + + cv_init(&cv, NULL, CV_DEFAULT, NULL); + mutex_init(&mtx, NULL, MUTEX_DEFAULT, NULL); + mutex_enter(&mtx); + + hrtime_t start_time = gethrtime(); + /* - * If the pool is determined to be active store the status in the - * spa->spa_load_info nvlist. If the remote hostname or hostid are - * available from configuration read from disk store them as well. - * This allows 'zpool import' to generate a more useful message. - * - * ZPOOL_CONFIG_MMP_STATE - observed pool status (mandatory) - * ZPOOL_CONFIG_MMP_HOSTNAME - hostname from the active pool - * ZPOOL_CONFIG_MMP_HOSTID - hostid from the active pool - */ - if (error == EREMOTEIO) { - const char *hostname = ""; - uint64_t hostid = 0; + * Load the best uberblock and verify it matches the uberblock already + * identified and stored as spa->spa_uberblock to verify the pool has + * not changed. + */ + vdev_uberblock_load(rvd, &spa_ub, &mmp_label); - if (mmp_label) { - if (nvlist_exists(mmp_label, ZPOOL_CONFIG_HOSTNAME)) { - hostname = fnvlist_lookup_string(mmp_label, - ZPOOL_CONFIG_HOSTNAME); - fnvlist_add_string(spa->spa_load_info, - ZPOOL_CONFIG_MMP_HOSTNAME, hostname); - } + if (memcmp(&spa->spa_uberblock, &spa_ub, sizeof (uberblock_t))) { + spa_load_failed(spa, "mmp: uberblock changed on disk"); + error = SET_ERROR(EREMOTEIO); + goto out; + } - if (nvlist_exists(mmp_label, ZPOOL_CONFIG_HOSTID)) { - hostid = fnvlist_lookup_uint64(mmp_label, - ZPOOL_CONFIG_HOSTID); - fnvlist_add_uint64(spa->spa_load_info, - ZPOOL_CONFIG_MMP_HOSTID, hostid); - } + if (!MMP_VALID(&spa_ub) || !MMP_INTERVAL_VALID(&spa_ub) || + !MMP_SEQ_VALID(&spa_ub) || !MMP_FAIL_INT_VALID(&spa_ub)) { + spa_load_failed(spa, "mmp: is not enabled in spa uberblock"); + error = SET_ERROR(EREMOTEIO); + goto out; + } + + nvlist_free(mmp_label); + mmp_label = NULL; + + uint64_t spa_ub_interval = MMP_INTERVAL(&spa_ub); + uint16_t spa_ub_seq = MMP_SEQ(&spa_ub); + + /* + * In the highly unlikely event the sequence numbers have been + * exhaused reset the sequence to zero. As long as the MMP + * uberblock is updated on all of the vdevs the activity will + * still be detected. + */ + if (MMP_SEQ_MAX == spa_ub_seq) + spa_ub_seq = 0; + + spa_import_progress_set_notes(spa, + "Establishing MMP claim, waiting %llu ms", + (u_longlong_t)(MMP_IMPORT_VERIFY_ITERS * spa_ub_interval)); + + /* + * Repeatedly sync out an MMP uberblock with a randomly selected + * sequence number, then read it back after the MMP interval. This + * random value acts as a claim token and is visible on other hosts. + * If the same random value is read back we can be certain no other + * pool is attempting to import the pool. + */ + for (int i = MMP_IMPORT_VERIFY_ITERS; i > 0; i--) { + uberblock_t set_ub, mmp_ub; + uint16_t mmp_seq; + + (void) spa_import_progress_set_mmp_check(spa_guid(spa), + NSEC2SEC(i * MSEC2NSEC(spa_ub_interval))); + + set_ub = spa_ub; + mmp_seq = spa_ub_seq + 1 + + random_in_range(MMP_SEQ_MAX - spa_ub_seq); + MMP_SEQ_CLEAR(&set_ub); + set_ub.ub_mmp_config |= MMP_SEQ_SET(mmp_seq); + + error = mmp_claim_uberblock(spa, rvd, &set_ub); + if (error) { + spa_load_failed(spa, "mmp: uberblock claim " + "failed, error=%d", error); + /* + * ENODEV and EIO are both kept distinct from the + * EREMOTEIO returned when another host is seen below. + * Failing to write the claim is not evidence of a + * remote host, and only the ENODEV case has a + * recovery. + */ + break; } - fnvlist_add_uint64(spa->spa_load_info, - ZPOOL_CONFIG_MMP_STATE, MMP_STATE_ACTIVE); - fnvlist_add_uint64(spa->spa_load_info, - ZPOOL_CONFIG_MMP_TXG, 0); + error = cv_timedwait_sig(&cv, &mtx, ddi_get_lbolt() + + MSEC_TO_TICK(spa_ub_interval)); + if (error != -1) { + error = SET_ERROR(EINTR); + break; + } + + vdev_uberblock_load(rvd, &mmp_ub, &mmp_label); + + if (vdev_uberblock_compare(&set_ub, &mmp_ub)) { + spa_load_failed(spa, "mmp: activity detected during " + "claim, set_ub_txg=%llu mmp_ub_txg=%llu " + "set_ub_seq=%llu mmp_ub_seq=%llu " + "set_ub_timestamp=%llu mmp_ub_timestamp=%llu " + "set_ub_config=%#llx mmp_ub_config=%#llx", + (u_longlong_t)set_ub.ub_txg, + (u_longlong_t)mmp_ub.ub_txg, + (u_longlong_t)(MMP_SEQ_VALID(&set_ub) ? + MMP_SEQ(&set_ub) : 0), + (u_longlong_t)(MMP_SEQ_VALID(&mmp_ub) ? + MMP_SEQ(&mmp_ub) : 0), + (u_longlong_t)set_ub.ub_timestamp, + (u_longlong_t)mmp_ub.ub_timestamp, + (u_longlong_t)set_ub.ub_mmp_config, + (u_longlong_t)mmp_ub.ub_mmp_config); + error = SET_ERROR(EREMOTEIO); + break; + } + + if (mmp_label) { + nvlist_free(mmp_label); + mmp_label = NULL; + } + + error = 0; + } +out: + spa->spa_mmp.mmp_claim_ns = gethrtime() - start_time; + (void) spa_import_progress_set_mmp_check(spa_guid(spa), 0); + + /* + * A claim shortfall reaches userspace as EREMOTEIO exactly as remote + * activity does, so an older zpool(8) sees no change. The cause + * travels in the result for a zpool(8) which knows to read it. + */ + if (error == EREMOTEIO || error == ENODEV || error == EIO) { + spa_activity_set_load_info(spa, mmp_label, + MMP_STATE_ACTIVE, 0, 0, error); + } else { + spa_activity_set_load_info(spa, mmp_label, + MMP_STATE_INACTIVE, spa_ub.ub_txg, MMP_SEQ(&spa_ub), 0); + } - error = spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO); + /* + * Restore the original sequence, this allows us to retry the + * import procedure if a subsequent step fails during import. + * Failure to restore it reduces the available sequence ids for + * the next import but shouldn't be considered fatal. + */ + int restore_error = mmp_claim_uberblock(spa, rvd, &spa_ub); + if (restore_error) { + zfs_dbgmsg("mmp: uberblock restore failed, spa=%s error=%d", + spa_load_name(spa), restore_error); } if (mmp_label) nvlist_free(mmp_label); + mutex_exit(&mtx); + mutex_destroy(&mtx); + cv_destroy(&cv); + return (error); } +static int +spa_ld_activity_check(spa_t *spa, uberblock_t *ub, nvlist_t *label) +{ + vdev_t *rvd = spa->spa_root_vdev; + int error; + + if (ub->ub_mmp_magic == MMP_MAGIC && ub->ub_mmp_delay && + spa_get_hostid(spa) == 0) { + spa_activity_set_load_info(spa, label, MMP_STATE_NO_HOSTID, + ub->ub_txg, MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0, ENXIO); + zfs_dbgmsg("mmp: system hostid not set, ub_mmp_magic=%llx " + "ub_mmp_delay=%llu hostid=%llx", + (u_longlong_t)ub->ub_mmp_magic, + (u_longlong_t)ub->ub_mmp_delay, + (u_longlong_t)spa_get_hostid(spa)); + return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, ENXIO)); + } + + switch (spa->spa_load_state) { + case SPA_LOAD_TRYIMPORT: +tryimport: + error = spa_activity_check_tryimport(spa, ub, B_TRUE); + if (error == EREMOTEIO) { + spa_activity_set_load_info(spa, label, + MMP_STATE_ACTIVE, 0, 0, EREMOTEIO); + return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO)); + } else if (error) { + ASSERT3S(error, ==, EINTR); + spa_activity_set_load_info(spa, label, + MMP_STATE_ACTIVE, 0, 0, EINTR); + return (error); + } + + spa_activity_set_load_info(spa, label, MMP_STATE_INACTIVE, + ub->ub_txg, MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0, 0); + + break; + + case SPA_LOAD_IMPORT: + case SPA_LOAD_OPEN: + error = spa_activity_verify_config(spa, ub); + if (error == EREMOTEIO) { + spa_activity_set_load_info(spa, label, + MMP_STATE_ACTIVE, 0, 0, EREMOTEIO); + return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO)); + } else if (error) { + ASSERT3S(error, ==, ENOENT); + goto tryimport; + } + + /* Load info set in spa_activity_check_claim() */ + + break; + + case SPA_LOAD_RECOVER: + zfs_dbgmsg("mmp: skipping mmp check for rewind, spa=%s", + spa_load_name(spa)); + break; + + default: + spa_activity_set_load_info(spa, label, MMP_STATE_ACTIVE, + 0, 0, EREMOTEIO); + zfs_dbgmsg("mmp: unreachable, spa=%s spa_load_state=%d", + spa_load_name(spa), spa->spa_load_state); + return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO)); + } + + return (0); +} + /* * Called from zfs_ioc_clear for a pool that was suspended * after failing mmp write checks. @@ -3844,8 +4318,9 @@ if (best_ub.ub_txg != spa->spa_uberblock.ub_txg || best_ub.ub_timestamp != spa->spa_uberblock.ub_timestamp) { - zfs_dbgmsg("txg mismatch detected during pool clear " - "txg %llu ub_txg %llu timestamp %llu ub_timestamp %llu", + zfs_dbgmsg("mmp: txg mismatch detected during pool clear, " + "spa=%s txg=%llu ub_txg=%llu timestamp=%llu " + "ub_timestamp=%llu", spa_name(spa), (u_longlong_t)spa->spa_uberblock.ub_txg, (u_longlong_t)best_ub.ub_txg, (u_longlong_t)spa->spa_uberblock.ub_timestamp, @@ -3856,8 +4331,7 @@ /* * Perform an activity check looking for any remote writer */ - return (spa_activity_check(spa, &spa->spa_uberblock, spa->spa_config, - B_FALSE) != 0); + return (spa_activity_check_tryimport(spa, &best_ub, B_FALSE) != 0); } static int @@ -4032,7 +4506,7 @@ MAX(zfs_max_missing_tvds, spa->spa_missing_tvds_allowed); spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - error = vdev_open(spa->spa_root_vdev); + error = vdev_open(spa->spa_root_vdev, CRED()); spa_config_exit(spa, SCL_ALL, FTAG); if (spa->spa_missing_tvds != 0) { @@ -4117,7 +4591,6 @@ vdev_t *rvd = spa->spa_root_vdev; nvlist_t *label; uberblock_t *ub = &spa->spa_uberblock; - boolean_t activity_check = B_FALSE; /* * If we are opening the checkpointed state of the pool by @@ -4169,37 +4642,25 @@ (u_longlong_t)RRSS_GET_OFFSET(ub)); } - /* * For pools which have the multihost property on determine if the * pool is truly inactive and can be safely imported. Prevent * hosts which don't have a hostid set from importing the pool. */ - activity_check = spa_activity_check_required(spa, ub, label, - spa->spa_config); - if (activity_check) { - if (ub->ub_mmp_magic == MMP_MAGIC && ub->ub_mmp_delay && - spa_get_hostid(spa) == 0) { - nvlist_free(label); - fnvlist_add_uint64(spa->spa_load_info, - ZPOOL_CONFIG_MMP_STATE, MMP_STATE_NO_HOSTID); - return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO)); - } - - int error = - spa_activity_check(spa, ub, spa->spa_config, B_TRUE); + spa->spa_activity_check = spa_activity_check_required(spa, ub, label); + if (spa->spa_activity_check) { + int error = spa_ld_activity_check(spa, ub, label); if (error) { + spa_load_state_t state = spa->spa_load_state; + error = spa_ld_activity_result(spa, error, + state == SPA_LOAD_TRYIMPORT ? "tryimport" : + state == SPA_LOAD_IMPORT ? "import" : "open"); nvlist_free(label); return (error); } - - fnvlist_add_uint64(spa->spa_load_info, - ZPOOL_CONFIG_MMP_STATE, MMP_STATE_INACTIVE); - fnvlist_add_uint64(spa->spa_load_info, - ZPOOL_CONFIG_MMP_TXG, ub->ub_txg); - fnvlist_add_uint16(spa->spa_load_info, - ZPOOL_CONFIG_MMP_SEQ, - (MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0)); + } else { + fnvlist_add_uint32(spa->spa_load_info, + ZPOOL_CONFIG_MMP_RESULT, ESRCH); } /* @@ -4482,6 +4943,24 @@ } } + /* + * Final sanity check for multihost pools that no other host is + * accessing the pool. All of the read-only check have passed at + * this point, perform targetted updates to the mmp uberblocks to + * safely force a visible change. + */ + if (spa->spa_load_state != SPA_LOAD_TRYIMPORT && + !spa->spa_extreme_rewind && spa->spa_activity_check) { + + error = spa_activity_check_claim(spa); + error = spa_ld_activity_result(spa, error, "claim"); + + if (error == EREMOTEIO) + return (spa_vdev_err(rvd, VDEV_AUX_ACTIVE, EREMOTEIO)); + else if (error) + return (error); + } + error = spa_check_for_missing_logs(spa); if (error != 0) return (spa_vdev_err(rvd, VDEV_AUX_BAD_GUID_SUM, ENXIO)); @@ -5530,11 +6009,12 @@ * pool. If we are importing the pool in read-write mode, a few * additional steps must be performed to finish the import. */ - spa_import_progress_set_notes(spa, "Starting import"); if (spa_writeable(spa) && (spa->spa_load_state == SPA_LOAD_RECOVER || spa->spa_load_max_txg == UINT64_MAX)) { uint64_t config_cache_txg = spa->spa_config_txg; + spa_import_progress_set_notes(spa, "Starting import"); + ASSERT(spa->spa_load_state != SPA_LOAD_TRYIMPORT); /* @@ -5703,13 +6183,21 @@ load_error = rewind_error = spa_load(spa, state, SPA_IMPORT_EXISTING); if (load_error == 0) return (0); - if (load_error == ZFS_ERR_NO_CHECKPOINT) { - /* - * When attempting checkpoint-rewind on a pool with no - * checkpoint, we should not attempt to load uberblocks - * from previous txgs when spa_load fails. - */ + + /* Do not attempt to load uberblocks from previous txgs when: */ + switch (load_error) { + case ZFS_ERR_NO_CHECKPOINT: + /* Attempting checkpoint-rewind on a pool with no checkpoint */ ASSERT(spa->spa_import_flags & ZFS_IMPORT_CHECKPOINT); + zfs_fallthrough; + case EREMOTEIO: + /* MMP determines the pool is active on another host */ + zfs_fallthrough; + case EBADF: + /* The config cache is out of sync (vdevs or hostid) */ + zfs_fallthrough; + case EINTR: + /* The user interactively interrupted the import */ spa_import_progress_remove(spa_guid(spa)); return (load_error); } @@ -6267,7 +6755,7 @@ vd->vdev_top = vd; - if ((error = vdev_open(vd)) == 0 && + if ((error = vdev_open(vd, CRED())) == 0 && (error = vdev_label_init(vd, crtxg, label)) == 0) { fnvlist_add_uint64(dev[i], ZPOOL_CONFIG_GUID, vd->vdev_guid); @@ -6498,6 +6986,7 @@ spa->spa_removing_phys.sr_removing_vdev = -1; spa->spa_removing_phys.sr_prev_indirect_vdev = -1; spa->spa_indirect_vdevs_loaded = B_TRUE; + spa->spa_deflate = (version >= SPA_VERSION_RAIDZ_DEFLATE); /* * Create "The Godfather" zio to hold all async IOs @@ -6627,7 +7116,6 @@ /* Newly created pools with the right version are always deflated. */ if (version >= SPA_VERSION_RAIDZ_DEFLATE) { - spa->spa_deflate = TRUE; if (zap_add(spa->spa_meta_objset, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_DEFLATE, sizeof (uint64_t), 1, &spa->spa_deflate, tx) != 0) { @@ -6916,6 +7404,8 @@ spa_activate(spa, SPA_MODE_READ); kmem_free(name, MAXPATHLEN); + spa->spa_load_name = spa_strdup(poolname); + /* * Rewind pool if a max txg was provided. */ @@ -6924,9 +7414,9 @@ spa->spa_load_max_txg = policy.zlp_txg; spa->spa_extreme_rewind = B_TRUE; zfs_dbgmsg("spa_tryimport: importing %s, max_txg=%lld", - poolname, (longlong_t)policy.zlp_txg); + spa_load_name(spa), (longlong_t)policy.zlp_txg); } else { - zfs_dbgmsg("spa_tryimport: importing %s", poolname); + zfs_dbgmsg("spa_tryimport: importing %s", spa_load_name(spa)); } if (nvlist_lookup_string(tryconfig, ZPOOL_CONFIG_CACHEFILE, &cachefile) @@ -6954,7 +7444,8 @@ */ if (spa->spa_root_vdev != NULL) { config = spa_config_generate(spa, NULL, -1ULL, B_TRUE); - fnvlist_add_string(config, ZPOOL_CONFIG_POOL_NAME, poolname); + fnvlist_add_string(config, ZPOOL_CONFIG_POOL_NAME, + spa_load_name(spa)); fnvlist_add_uint64(config, ZPOOL_CONFIG_POOL_STATE, state); fnvlist_add_uint64(config, ZPOOL_CONFIG_TIMESTAMP, spa->spa_uberblock.ub_timestamp); @@ -6988,7 +7479,7 @@ MAXPATHLEN); } else { (void) snprintf(dsname, MAXPATHLEN, - "%s/%s", poolname, ++cp); + "%s/%s", spa_load_name(spa), ++cp); } fnvlist_add_string(config, ZPOOL_CONFIG_BOOTFS, dsname); @@ -7431,6 +7922,82 @@ } /* + * Given a vdev to be replaced and its parent, check for a possible + * "double spare" condition if a vdev is to be replaced by a spare. When this + * happens, you can get two spares assigned to one failed vdev. + * + * To trigger a double spare condition: + * + * 1. disk1 fails + * 2. 1st spare is kicked in for disk1 and it resilvers + * 3. Someone replaces disk1 with a new blank disk + * 4. New blank disk starts resilvering + * 5. While resilvering, new blank disk has IO errors and faults + * 6. 2nd spare is kicked in for new blank disk + * 7. At this point two spares are kicked in for the original disk1. + * + * It looks like this: + * + * NAME STATE READ WRITE CKSUM + * tank2 DEGRADED 0 0 0 + * draid2:6d:10c:2s-0 DEGRADED 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d1 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d2 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d3 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d4 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d5 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d6 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d7 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d8 ONLINE 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d9 ONLINE 0 0 0 + * spare-9 DEGRADED 0 0 0 + * replacing-0 DEGRADED 0 93 0 + * scsi-0QEMU_QEMU_HARDDISK_d10-part1/old UNAVAIL 0 0 0 + * spare-1 DEGRADED 0 0 0 + * scsi-0QEMU_QEMU_HARDDISK_d10 REMOVED 0 0 0 + * draid2-0-0 ONLINE 0 0 0 + * draid2-0-1 ONLINE 0 0 0 + * spares + * draid2-0-0 INUSE currently in use + * draid2-0-1 INUSE currently in use + * + * ARGS: + * + * newvd: New spare disk + * pvd: Parent vdev_t the spare should attach to + * + * This function returns B_TRUE if adding the new vdev would create a double + * spare condition, B_FALSE otherwise. + */ +static boolean_t +spa_vdev_new_spare_would_cause_double_spares(vdev_t *newvd, vdev_t *pvd) +{ + vdev_t *ppvd; + + ppvd = pvd->vdev_parent; + if (ppvd == NULL) + return (B_FALSE); + + /* + * To determine if this configuration would cause a double spare, we + * look at the vdev_op of the parent vdev, and of the parent's parent + * vdev. We also look at vdev_isspare on the new disk. A double spare + * condition looks like this: + * + * 1. parent of parent's op is a spare or draid spare + * 2. parent's op is replacing + * 3. new disk is a spare + */ + if ((ppvd->vdev_ops == &vdev_spare_ops) || + (ppvd->vdev_ops == &vdev_draid_spare_ops)) + if (pvd->vdev_ops == &vdev_replacing_ops) + if (newvd->vdev_isspare) + return (B_TRUE); + + return (B_FALSE); +} + +/* * Attach a device to a vdev specified by its guid. The vdev type can be * a mirror, a raidz, or a leaf device that is also a top-level (e.g. a * single device). When the vdev is a single device, a mirror vdev will be @@ -7604,6 +8171,12 @@ return (spa_vdev_exit(spa, newrootvd, txg, ENOTSUP)); } + if (spa_vdev_new_spare_would_cause_double_spares(newvd, pvd)) { + vdev_dbgmsg(newvd, + "disk would create double spares, ignore."); + return (spa_vdev_exit(spa, newrootvd, txg, EEXIST)); + } + if (newvd->vdev_isspare) pvops = &vdev_spare_ops; else @@ -7770,7 +8343,7 @@ if (rebuild) { newvd->vdev_rebuild_txg = txg; - vdev_rebuild(tvd); + vdev_rebuild(tvd, txg); } else { newvd->vdev_resilver_txg = txg; @@ -9243,7 +9816,7 @@ void spa_async_request(spa_t *spa, int task) { - zfs_dbgmsg("spa=%s async request task=%u", spa->spa_name, task); + zfs_dbgmsg("spa=%s async request task=%u", spa_load_name(spa), task); mutex_enter(&spa->spa_async_lock); spa->spa_async_tasks |= task; mutex_exit(&spa->spa_async_lock); @@ -11087,6 +11660,9 @@ ZFS_MODULE_VIRTUAL_PARAM_CALL(zfs_zio, zio_, taskq_write, spa_taskq_write_param_set, spa_taskq_write_param_get, ZMOD_RW, "Configure IO queues for write IO"); +ZFS_MODULE_VIRTUAL_PARAM_CALL(zfs_zio, zio_, taskq_free, + spa_taskq_free_param_set, spa_taskq_free_param_get, ZMOD_RW, + "Configure IO queues for free IO"); #endif ZFS_MODULE_PARAM(zfs_zio, zio_, taskq_write_tpq, UINT, ZMOD_RW, diff -Nru zfs-linux-2.3.2/module/zfs/spa_config.c zfs-linux-2.3.9/module/zfs/spa_config.c --- zfs-linux-2.3.2/module/zfs/spa_config.c 2025-05-01 18:45:25.728130620 +0000 +++ zfs-linux-2.3.9/module/zfs/spa_config.c 2026-08-21 21:15:51.029496426 +0000 @@ -102,11 +102,11 @@ (void) snprintf(pathname, MAXPATHLEN, "%s", spa_config_path); - err = zfs_file_open(pathname, O_RDONLY, 0, &fp); + err = zfs_file_open(pathname, O_RDONLY, 0, kcred, &fp); #ifdef __FreeBSD__ if (err) - err = zfs_file_open(ZPOOL_CACHE_BOOT, O_RDONLY, 0, &fp); + err = zfs_file_open(ZPOOL_CACHE_BOOT, O_RDONLY, 0, kcred, &fp); #endif kmem_free(pathname, MAXPATHLEN); @@ -173,7 +173,7 @@ int flags = O_RDWR | O_TRUNC; zfs_file_t *fp; - error = zfs_file_open(dp->scd_path, flags, 0644, &fp); + error = zfs_file_open(dp->scd_path, flags, 0644, kcred, &fp); if (error == 0) { (void) zfs_file_fsync(fp, O_SYNC); (void) zfs_file_close(fp); @@ -216,7 +216,7 @@ * is instead truncated and overwritten in place. This way we always * have a consistent view of the data or a zero length file. */ - err = zfs_file_open(dp->scd_path, oflags, 0644, &fp); + err = zfs_file_open(dp->scd_path, oflags, 0644, kcred, &fp); if (err == 0) { err = zfs_file_write(fp, buf, buflen, NULL); if (err == 0) @@ -461,6 +461,8 @@ fnvlist_add_uint64(config, ZPOOL_CONFIG_POOL_TXG, txg); fnvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID, spa_guid(spa)); fnvlist_add_uint64(config, ZPOOL_CONFIG_ERRATA, spa->spa_errata); + fnvlist_add_uint64(config, ZPOOL_CONFIG_MIN_ALLOC, spa->spa_min_alloc); + fnvlist_add_uint64(config, ZPOOL_CONFIG_MAX_ALLOC, spa->spa_max_alloc); if (spa->spa_comment != NULL) fnvlist_add_string(config, ZPOOL_CONFIG_COMMENT, spa->spa_comment); @@ -635,5 +637,7 @@ "SPA config file (/etc/zfs/zpool.cache)"); #endif +#ifdef _KERNEL ZFS_MODULE_PARAM(zfs, zfs_, autoimport_disable, INT, ZMOD_RW, "Disable pool import at module load"); +#endif diff -Nru zfs-linux-2.3.2/module/zfs/spa_errlog.c zfs-linux-2.3.9/module/zfs/spa_errlog.c --- zfs-linux-2.3.2/module/zfs/spa_errlog.c 2025-05-01 18:45:25.732130697 +0000 +++ zfs-linux-2.3.9/module/zfs/spa_errlog.c 2026-08-21 21:15:51.117495382 +0000 @@ -468,7 +468,7 @@ kmem_free(zc, sizeof (*zc)); out: - kmem_free(snap_obj_array, sizeof (*snap_obj_array)); + kmem_free(snap_obj_array, snap_count * sizeof (*snap_obj_array)); return (error); } diff -Nru zfs-linux-2.3.2/module/zfs/spa_log_spacemap.c zfs-linux-2.3.9/module/zfs/spa_log_spacemap.c --- zfs-linux-2.3.2/module/zfs/spa_log_spacemap.c 2025-05-01 18:45:25.738130813 +0000 +++ zfs-linux-2.3.9/module/zfs/spa_log_spacemap.c 2026-08-21 21:15:51.127495264 +0000 @@ -1255,10 +1255,9 @@ zfs_range_tree_space(m->ms_unflushed_allocs) - zfs_range_tree_space(m->ms_unflushed_frees); - vdev_t *vd = m->ms_group->mg_vd; - metaslab_space_update(vd, m->ms_group->mg_class, + metaslab_space_update(m->ms_group, zfs_range_tree_space(m->ms_unflushed_allocs), 0, 0); - metaslab_space_update(vd, m->ms_group->mg_class, + metaslab_space_update(m->ms_group, -zfs_range_tree_space(m->ms_unflushed_frees), 0, 0); ASSERT0(m->ms_weight & METASLAB_ACTIVE_MASK); diff -Nru zfs-linux-2.3.2/module/zfs/spa_misc.c zfs-linux-2.3.9/module/zfs/spa_misc.c --- zfs-linux-2.3.2/module/zfs/spa_misc.c 2025-05-01 18:45:25.742130891 +0000 +++ zfs-linux-2.3.9/module/zfs/spa_misc.c 2026-08-21 21:15:51.129495240 +0000 @@ -413,7 +413,7 @@ (void) vsnprintf(buf, sizeof (buf), fmt, adx); va_end(adx); - zfs_dbgmsg("spa_load(%s, config %s): FAILED: %s", spa->spa_name, + zfs_dbgmsg("spa_load(%s, config %s): FAILED: %s", spa_load_name(spa), spa->spa_trust_config ? "trusted" : "untrusted", buf); } @@ -427,7 +427,7 @@ (void) vsnprintf(buf, sizeof (buf), fmt, adx); va_end(adx); - zfs_dbgmsg("spa_load(%s, config %s): %s", spa->spa_name, + zfs_dbgmsg("spa_load(%s, config %s): %s", spa_load_name(spa), spa->spa_trust_config ? "trusted" : "untrusted", buf); spa_import_progress_set_notes_nolog(spa, "%s", buf); @@ -814,6 +814,7 @@ spa->spa_min_ashift = INT_MAX; spa->spa_max_ashift = 0; spa->spa_min_alloc = INT_MAX; + spa->spa_max_alloc = 0; spa->spa_gcd_alloc = INT_MAX; /* Reset cached value */ @@ -856,6 +857,9 @@ if (spa->spa_root) spa_strfree(spa->spa_root); + if (spa->spa_load_name) + spa_strfree(spa->spa_load_name); + while ((dp = list_remove_head(&spa->spa_config_list)) != NULL) { if (dp->scd_path != NULL) spa_strfree(dp->scd_path); @@ -1241,7 +1245,7 @@ mutex_enter(&spa->spa_vdev_top_lock); mutex_enter(&spa_namespace_lock); - ASSERT0(spa->spa_export_thread); + ASSERT0P(spa->spa_export_thread); vdev_autotrim_stop_all(spa); @@ -1260,7 +1264,7 @@ mutex_enter(&spa->spa_vdev_top_lock); mutex_enter(&spa_namespace_lock); - ASSERT0(spa->spa_export_thread); + ASSERT0P(spa->spa_export_thread); vdev_autotrim_stop_all(spa); @@ -1589,6 +1593,34 @@ return (guid); } +static boolean_t +spa_load_guid_exists(uint64_t guid) +{ + avl_tree_t *t = &spa_namespace_avl; + + ASSERT(MUTEX_HELD(&spa_namespace_lock)); + + for (spa_t *spa = avl_first(t); spa != NULL; spa = AVL_NEXT(t, spa)) { + if (spa_load_guid(spa) == guid) + return (B_TRUE); + } + + return (arc_async_flush_guid_inuse(guid)); +} + +uint64_t +spa_generate_load_guid(void) +{ + uint64_t guid; + + do { + (void) random_get_pseudo_bytes((void *)&guid, + sizeof (guid)); + } while (guid == 0 || spa_load_guid_exists(guid)); + + return (guid); +} + void snprintf_blkptr(char *buf, size_t buflen, const blkptr_t *bp) { @@ -1748,6 +1780,19 @@ return (spa->spa_name); } +char * +spa_load_name(spa_t *spa) +{ + /* + * During spa_tryimport() the pool name includes a unique prefix. + * Returns the original name which can be used for log messages. + */ + if (spa->spa_load_name) + return (spa->spa_load_name); + + return (spa->spa_name); +} + uint64_t spa_guid(spa_t *spa) { @@ -1805,6 +1850,12 @@ return (spa->spa_syncing_txg); } +uint64_t +spa_open_txg(spa_t *spa) +{ + return (spa->spa_dsl_pool->dp_tx.tx_open_txg); +} + /* * Return the last txg where data can be dirtied. The final txgs * will be used to just clear out any deferred frees that remain. @@ -1849,6 +1900,19 @@ } /* + * Return the range of minimum allocation sizes for the normal allocation + * class. This can be used by external consumers of the DMU to estimate + * potential wasted capacity when setting the recordsize for an object. + * This is mainly for dRAID pools which always pad to a full stripe width. + */ +void +spa_get_min_alloc_range(spa_t *spa, uint64_t *min_alloc, uint64_t *max_alloc) +{ + *min_alloc = spa->spa_min_alloc; + *max_alloc = spa->spa_max_alloc; +} + +/* * Return the amount of slop space in bytes. It is typically 1/32 of the pool * (3.2%), minus the embedded log space. On very small pools, it may be * slightly larger than this. On very large pools, it will be capped to @@ -1930,7 +1994,10 @@ ASSERT3U(spa->spa_rdspace, >=, spa->spa_nonallocating_dspace); spa->spa_rdspace -= spa->spa_nonallocating_dspace; } - spa->spa_dspace = spa->spa_rdspace + ddt_get_dedup_dspace(spa) + + spa->spa_dspace = spa->spa_rdspace + + metaslab_class_get_dalloc(spa_special_class(spa)) + + metaslab_class_get_dalloc(spa_dedup_class(spa)) + + ddt_get_dedup_dspace(spa) + brt_get_dspace(spa); } @@ -3047,6 +3114,7 @@ EXPORT_SYMBOL(spa_altroot); EXPORT_SYMBOL(spa_sync_pass); EXPORT_SYMBOL(spa_name); +EXPORT_SYMBOL(spa_load_name); EXPORT_SYMBOL(spa_guid); EXPORT_SYMBOL(spa_last_synced_txg); EXPORT_SYMBOL(spa_first_txg); @@ -3055,6 +3123,7 @@ EXPORT_SYMBOL(spa_state); EXPORT_SYMBOL(spa_load_state); EXPORT_SYMBOL(spa_freeze_txg); +EXPORT_SYMBOL(spa_get_min_alloc_range); /* for Lustre */ EXPORT_SYMBOL(spa_get_dspace); EXPORT_SYMBOL(spa_update_dspace); EXPORT_SYMBOL(spa_deflate); diff -Nru zfs-linux-2.3.2/module/zfs/txg.c zfs-linux-2.3.9/module/zfs/txg.c --- zfs-linux-2.3.2/module/zfs/txg.c 2025-05-01 18:45:25.755131142 +0000 +++ zfs-linux-2.3.9/module/zfs/txg.c 2026-08-21 21:15:51.141495097 +0000 @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska * Copyright (c) 2012, 2019 by Delphix. All rights reserved. + * Copyright (c) 2025, Klara, Inc. */ #include @@ -699,11 +700,13 @@ mutex_exit(&tx->tx_sync_lock); } -static boolean_t -txg_wait_synced_impl(dsl_pool_t *dp, uint64_t txg, boolean_t wait_sig) +int +txg_wait_synced_flags(dsl_pool_t *dp, uint64_t txg, txg_wait_flag_t flags) { + int error = 0; tx_state_t *tx = &dp->dp_tx; + ASSERT0(flags & ~(TXG_WAIT_SIGNAL | TXG_WAIT_SUSPEND)); ASSERT(!dsl_pool_config_held(dp)); mutex_enter(&tx->tx_sync_lock); @@ -715,13 +718,28 @@ dprintf("txg=%llu quiesce_txg=%llu sync_txg=%llu\n", (u_longlong_t)txg, (u_longlong_t)tx->tx_quiesce_txg_waiting, (u_longlong_t)tx->tx_sync_txg_waiting); + + /* + * Keep pushing util the pool gets to the wanted txg. If something + * else interesting happens, we'll set an error and break out. + */ while (tx->tx_synced_txg < txg) { + if ((flags & TXG_WAIT_SUSPEND) && spa_suspended(dp->dp_spa)) { + /* + * Pool suspended and the caller does not want to + * block; inform them immediately. + */ + error = SET_ERROR(ESHUTDOWN); + break; + } + dprintf("broadcasting sync more " "tx_synced=%llu waiting=%llu dp=%px\n", (u_longlong_t)tx->tx_synced_txg, (u_longlong_t)tx->tx_sync_txg_waiting, dp); cv_broadcast(&tx->tx_sync_more_cv); - if (wait_sig) { + + if (flags & TXG_WAIT_SIGNAL) { /* * Condition wait here but stop if the thread receives a * signal. The caller may call txg_wait_synced*() again @@ -729,31 +747,32 @@ */ if (cv_wait_io_sig(&tx->tx_sync_done_cv, &tx->tx_sync_lock) == 0) { - mutex_exit(&tx->tx_sync_lock); - return (B_TRUE); + error = SET_ERROR(EINTR); + break; } } else { + /* Uninterruptable wait, until the condvar fires */ cv_wait_io(&tx->tx_sync_done_cv, &tx->tx_sync_lock); } } + mutex_exit(&tx->tx_sync_lock); - return (B_FALSE); + return (error); } void txg_wait_synced(dsl_pool_t *dp, uint64_t txg) { - VERIFY0(txg_wait_synced_impl(dp, txg, B_FALSE)); + VERIFY0(txg_wait_synced_flags(dp, txg, TXG_WAIT_NONE)); } -/* - * Similar to a txg_wait_synced but it can be interrupted from a signal. - * Returns B_TRUE if the thread was signaled while waiting. - */ -boolean_t -txg_wait_synced_sig(dsl_pool_t *dp, uint64_t txg) +void +txg_wait_kick(dsl_pool_t *dp) { - return (txg_wait_synced_impl(dp, txg, B_TRUE)); + tx_state_t *tx = &dp->dp_tx; + mutex_enter(&tx->tx_sync_lock); + cv_broadcast(&tx->tx_sync_done_cv); + mutex_exit(&tx->tx_sync_lock); } /* diff -Nru zfs-linux-2.3.2/module/zfs/vdev.c zfs-linux-2.3.9/module/zfs/vdev.c --- zfs-linux-2.3.2/module/zfs/vdev.c 2025-05-01 18:45:25.765131335 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev.c 2026-08-21 21:15:51.053496141 +0000 @@ -31,6 +31,8 @@ * Copyright (c) 2019, Datto Inc. All rights reserved. * Copyright (c) 2021, Klara Inc. * Copyright (c) 2021, 2023 Hewlett Packard Enterprise Development LP. + * Copyright (c) 2026, Seagate Technology, LLC. + * Copyright (c) 2026, TrueNAS. */ #include @@ -243,6 +245,25 @@ vdev_dbgmsg_print_tree(vd->vdev_child[i], indent + 2); } +char * +vdev_rt_name(vdev_t *vd, const char *name) +{ + return (kmem_asprintf("{spa=%s vdev_guid=%llu %s}", + spa_name(vd->vdev_spa), + (u_longlong_t)vd->vdev_guid, + name)); +} + +static char * +vdev_rt_name_dtl(vdev_t *vd, const char *name, vdev_dtl_type_t dtl_type) +{ + return (kmem_asprintf("{spa=%s vdev_guid=%llu %s[%d]}", + spa_name(vd->vdev_spa), + (u_longlong_t)vd->vdev_guid, + name, + dtl_type)); +} + /* * Virtual device management. */ @@ -540,6 +561,7 @@ pvd->vdev_child = newchild; pvd->vdev_child[id] = cvd; + pvd->vdev_nonrot &= cvd->vdev_nonrot; cvd->vdev_top = (pvd->vdev_top ? pvd->vdev_top: cvd); ASSERT(cvd->vdev_top->vdev_parent->vdev_parent == NULL); @@ -648,7 +670,7 @@ if (spa->spa_root_vdev == NULL) { ASSERT(ops == &vdev_root_ops); spa->spa_root_vdev = vd; - spa->spa_load_guid = spa_generate_guid(NULL); + spa->spa_load_guid = spa_generate_load_guid(); } if (guid == 0 && ops != &vdev_hole_ops) { @@ -678,8 +700,9 @@ rw_init(&vd->vdev_indirect_rwlock, NULL, RW_DEFAULT, NULL); mutex_init(&vd->vdev_obsolete_lock, NULL, MUTEX_DEFAULT, NULL); - vd->vdev_obsolete_segments = zfs_range_tree_create(NULL, - ZFS_RANGE_SEG64, NULL, 0, 0); + vd->vdev_obsolete_segments = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vdev_obsolete_segments")); /* * Initialize rate limit structs for events. We rate limit ZIO delay @@ -733,8 +756,9 @@ cv_init(&vd->vdev_rebuild_cv, NULL, CV_DEFAULT, NULL); for (int t = 0; t < DTL_TYPES; t++) { - vd->vdev_dtl[t] = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + vd->vdev_dtl[t] = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name_dtl(vd, "vdev_dtl", t)); } txg_list_create(&vd->vdev_ms_list, spa, @@ -1361,6 +1385,7 @@ mvd->vdev_physical_ashift = cvd->vdev_physical_ashift; mvd->vdev_state = cvd->vdev_state; mvd->vdev_crtxg = cvd->vdev_crtxg; + mvd->vdev_nonrot = cvd->vdev_nonrot; vdev_remove_child(pvd, cvd); vdev_add_child(pvd, mvd); @@ -1451,12 +1476,14 @@ { if (min_alloc < spa->spa_min_alloc) spa->spa_min_alloc = min_alloc; - if (spa->spa_gcd_alloc == INT_MAX) { + + if (min_alloc > spa->spa_max_alloc) + spa->spa_max_alloc = min_alloc; + + if (spa->spa_gcd_alloc == INT_MAX) spa->spa_gcd_alloc = min_alloc; - } else { - spa->spa_gcd_alloc = vdev_gcd(min_alloc, - spa->spa_gcd_alloc); - } + else + spa->spa_gcd_alloc = vdev_gcd(min_alloc, spa->spa_gcd_alloc); } void @@ -1510,8 +1537,7 @@ if (vd->vdev_ashift < spa->spa_min_ashift) spa->spa_min_ashift = vd->vdev_ashift; - uint64_t min_alloc = vdev_get_min_alloc(vd); - vdev_spa_set_alloc(spa, min_alloc); + vdev_spa_set_alloc(spa, vdev_get_min_alloc(vd)); } } } @@ -1567,6 +1593,18 @@ vd->vdev_ms = mspp; vd->vdev_ms_count = newc; + /* + * Weighting algorithms can depend on the number of metaslabs in the + * vdev. In order to ensure that all weights are correct at all times, + * we need to recalculate here. + */ + for (uint64_t m = 0; m < oldc; m++) { + metaslab_t *msp = vd->vdev_ms[m]; + mutex_enter(&msp->ms_lock); + metaslab_recalculate_weight_and_sort(msp); + mutex_exit(&msp->ms_lock); + } + for (uint64_t m = oldc; m < newc; m++) { uint64_t object = 0; /* @@ -1624,11 +1662,12 @@ /* * The metaslab was marked as dirty at the end of * metaslab_init(). Remove it from the dirty list so that we - * can uninitialize and reinitialize it to the new class. + * can uninitialize and reinitialize it to the new class. It + * may be dirty in any txg slot, so clear them all. */ - if (txg != 0) { + for (int t = 0; t < TXG_SIZE; t++) { (void) txg_list_remove_this(&vd->vdev_ms_list, - slog_ms, txg); + slog_ms, t); } uint64_t sm_obj = space_map_object(slog_ms->ms_sm); metaslab_fini(slog_ms); @@ -1760,8 +1799,11 @@ * change the state in a spa_async_request. Probes that * were initiated from a vdev_open can change the state * as part of the open call. + * Skip fault injection if this vdev is already removed + * or a removal is pending. */ - if (vps->vps_zio_done_probe) { + if (vps->vps_zio_done_probe && + !vd->vdev_remove_wanted && !vd->vdev_removed) { vd->vdev_fault_wanted = B_TRUE; spa_async_request(spa, SPA_ASYNC_FAULT_VDEV); } @@ -1878,14 +1920,23 @@ vd->vdev_load_error = vdev_load(vd); } +typedef struct { + vdev_t *voc_vdev; + cred_t *voc_cred; +} vdev_open_child_t; + static void vdev_open_child(void *arg) { - vdev_t *vd = arg; + vdev_open_child_t *voc = arg; + vdev_t *vd = voc->voc_vdev; vd->vdev_open_thread = curthread; - vd->vdev_open_error = vdev_open(vd); + vd->vdev_open_error = vdev_open(vd, voc->voc_cred); vd->vdev_open_thread = NULL; + + crfree(voc->voc_cred); + kmem_free(voc, sizeof (vdev_open_child_t)); } static boolean_t @@ -1919,7 +1970,8 @@ * deadlock when the current thread is holding the spa_namespace_lock. */ static void -vdev_open_children_impl(vdev_t *vd, vdev_open_children_func_t *open_func) +vdev_open_children_impl(vdev_t *vd, cred_t *cred, + vdev_open_children_func_t *open_func) { int children = vd->vdev_children; @@ -1934,10 +1986,15 @@ continue; if (tq == NULL || vdev_uses_zvols(vd)) { - cvd->vdev_open_error = vdev_open(cvd); + cvd->vdev_open_error = vdev_open(cvd, cred); } else { + vdev_open_child_t *voc = + kmem_alloc(sizeof (vdev_open_child_t), KM_SLEEP); + voc->voc_vdev = cvd; + voc->voc_cred = cred; + crhold(cred); VERIFY(taskq_dispatch(tq, vdev_open_child, - cvd, TQ_SLEEP) != TASKQID_INVALID); + voc, TQ_SLEEP) != TASKQID_INVALID); } } @@ -1945,6 +2002,10 @@ taskq_wait(tq); for (int c = 0; c < children; c++) { vdev_t *cvd = vd->vdev_child[c]; + + if (open_func(cvd) == B_FALSE || + cvd->vdev_state <= VDEV_STATE_FAULTED) + continue; vd->vdev_nonrot &= cvd->vdev_nonrot; } @@ -1956,18 +2017,19 @@ * Open all child vdevs. */ void -vdev_open_children(vdev_t *vd) +vdev_open_children(vdev_t *vd, cred_t *cred) { - vdev_open_children_impl(vd, vdev_default_open_children_func); + vdev_open_children_impl(vd, cred, vdev_default_open_children_func); } /* * Conditionally open a subset of child vdevs. */ void -vdev_open_children_subset(vdev_t *vd, vdev_open_children_func_t *open_func) +vdev_open_children_subset(vdev_t *vd, cred_t *cred, + vdev_open_children_func_t *open_func) { - vdev_open_children_impl(vd, open_func); + vdev_open_children_impl(vd, cred, open_func); } /* @@ -2043,7 +2105,7 @@ * Prepare a virtual device for access. */ int -vdev_open(vdev_t *vd) +vdev_open(vdev_t *vd, cred_t *cred) { spa_t *spa = vd->vdev_spa; int error; @@ -2084,7 +2146,7 @@ } error = vd->vdev_ops->vdev_op_open(vd, &osize, &max_osize, - &logical_ashift, &physical_ashift); + &logical_ashift, &physical_ashift, cred); /* Keep the device in removed state if unplugged */ if (error == ENOENT && vd->vdev_removed) { @@ -2776,7 +2838,7 @@ /* set the reopening flag unless we're taking the vdev offline */ vd->vdev_reopening = !vd->vdev_offline; vdev_close(vd); - (void) vdev_open(vd); + (void) vdev_open(vd, CRED()); /* * Call vdev_validate() here to make sure we have the same device. @@ -2831,7 +2893,7 @@ * For a create, however, we want to fail the request if * there are any components we can't open. */ - error = vdev_open(vd); + error = vdev_open(vd, CRED()); if (error || vd->vdev_state != VDEV_STATE_HEALTHY) { vdev_close(vd); @@ -2998,8 +3060,11 @@ ASSERT(spa_writeable(vd->vdev_spa)); mutex_enter(&vd->vdev_dtl_lock); - if (!zfs_range_tree_contains(rt, txg, size)) + if (!zfs_range_tree_contains(rt, txg, size)) { + /* Clear whatever is there already. */ + zfs_range_tree_clear(rt, txg, size); zfs_range_tree_add(rt, txg, size); + } mutex_exit(&vd->vdev_dtl_lock); } @@ -3416,7 +3481,9 @@ return (error); ASSERT(vd->vdev_dtl_sm != NULL); - rt = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0); + rt = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vdev_dtl_load:rt")); error = space_map_load(vd->vdev_dtl_sm, rt, SM_ALLOC); if (error == 0) { mutex_enter(&vd->vdev_dtl_lock); @@ -3564,7 +3631,8 @@ ASSERT(vd->vdev_dtl_sm != NULL); } - rtsync = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0); + rtsync = zfs_range_tree_create_flags(NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "rtsync")); mutex_enter(&vd->vdev_dtl_lock); zfs_range_tree_walk(rt, zfs_range_tree_add, rtsync); @@ -5081,11 +5149,13 @@ if (type == ZIO_TYPE_WRITE && txg != 0 && (!(flags & ZIO_FLAG_IO_REPAIR) || (flags & ZIO_FLAG_SCAN_THREAD) || + zio->io_priority == ZIO_PRIORITY_REBUILD || spa->spa_claiming)) { /* * This is either a normal write (not a repair), or it's * a repair induced by the scrub thread, or it's a repair - * made by zil_claim() during spa_load() in the first txg. + * made by zil_claim() during spa_load() in the first txg, + * or its repair induced by rebuild (sequential resilver). * In the normal case, we commit the DTL change in the same * txg as the block was born. In the scrub-induced repair * case, we know that scrubs run in first-pass syncing context, @@ -5096,27 +5166,38 @@ * self-healing writes triggered by normal (non-scrubbing) * reads, because we have no transactional context in which to * do so -- and it's not clear that it'd be desirable anyway. + * + * For rebuild, since we don't have any information about BPs + * and txgs that are being rebuilt, we need to add all known + * txgs (starting from TXG_INITIAL) to DTL so that during + * healing resilver we would be able to check all txgs at + * vdev_draid_need_resilver(). */ + uint64_t size = 1; if (vd->vdev_ops->vdev_op_leaf) { uint64_t commit_txg = txg; if (flags & ZIO_FLAG_SCAN_THREAD) { ASSERT(flags & ZIO_FLAG_IO_REPAIR); ASSERT(spa_sync_pass(spa) == 1); - vdev_dtl_dirty(vd, DTL_SCRUB, txg, 1); + vdev_dtl_dirty(vd, DTL_SCRUB, txg, size); commit_txg = spa_syncing_txg(spa); } else if (spa->spa_claiming) { ASSERT(flags & ZIO_FLAG_IO_REPAIR); commit_txg = spa_first_txg(spa); + } else if (zio->io_priority == ZIO_PRIORITY_REBUILD) { + ASSERT(flags & ZIO_FLAG_IO_REPAIR); + vdev_rebuild_txgs(vd->vdev_top, &txg, &size); + commit_txg = spa_open_txg(spa); } ASSERT(commit_txg >= spa_syncing_txg(spa)); - if (vdev_dtl_contains(vd, DTL_MISSING, txg, 1)) + if (vdev_dtl_contains(vd, DTL_MISSING, txg, size)) return; for (pvd = vd; pvd != rvd; pvd = pvd->vdev_parent) - vdev_dtl_dirty(pvd, DTL_PARTIAL, txg, 1); + vdev_dtl_dirty(pvd, DTL_PARTIAL, txg, size); vdev_dirty(vd->vdev_top, VDD_DTL, vd, commit_txg); } if (vd != rvd) - vdev_dtl_dirty(vd, DTL_MISSING, txg, 1); + vdev_dtl_dirty(vd, DTL_MISSING, txg, size); } } @@ -6100,7 +6181,7 @@ spa_t *spa = vd->vdev_spa; objset_t *mos = spa->spa_meta_objset; int err = 0; - uint64_t objid; + uint64_t objid = 0; uint64_t vdev_guid; nvpair_t *elem = NULL; nvlist_t *nvprops = NULL; diff -Nru zfs-linux-2.3.2/module/zfs/vdev_draid.c zfs-linux-2.3.9/module/zfs/vdev_draid.c --- zfs-linux-2.3.2/module/zfs/vdev_draid.c 2025-05-01 18:45:25.769131413 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_draid.c 2026-08-21 21:15:51.120495346 +0000 @@ -22,6 +22,7 @@ /* * Copyright (c) 2018 Intel Corporation. * Copyright (c) 2020 by Lawrence Livermore National Security, LLC. + * Copyright (c) 2026, Wasabi Technologies, Inc. */ #include @@ -1159,7 +1160,7 @@ /* * Allocatable space for dRAID is (children - nspares) * sizeof(smallest child) * rounded down to the last full slice. So each child must provide at least - * 1 / (children - nspares) of its asize. + * 1 / (children - nspares) of its asize rounded up to VDEV_DRAID_ROWHEIGHT. */ static uint64_t vdev_draid_min_asize(vdev_t *vd) @@ -1169,7 +1170,9 @@ ASSERT3P(vd->vdev_ops, ==, &vdev_draid_ops); return (VDEV_DRAID_REFLOW_RESERVE + - (vd->vdev_min_asize + vdc->vdc_ndisks - 1) / (vdc->vdc_ndisks)); + ((vd->vdev_min_asize + vdc->vdc_ndisks - 1) / (vdc->vdc_ndisks) + + VDEV_DRAID_ROWHEIGHT - 1) / VDEV_DRAID_ROWHEIGHT * + VDEV_DRAID_ROWHEIGHT); } /* @@ -1187,7 +1190,7 @@ } /* - * Returns true if the txg range does not exist on any leaf vdev. + * Returns false if the txg range exists on any leaf vdev, true otherwise. * * A dRAID spare does not fit into the DTL model. While it has child vdevs * there is no redundancy among them, and the effective child vdev is @@ -1245,8 +1248,7 @@ if (vd == NULL) return (B_TRUE); - return (vdev_draid_missing(vd, physical_offset, - txg, size)); + return (vdev_draid_missing(vd, physical_offset, txg, size)); } return (vdev_dtl_contains(vd, DTL_MISSING, txg, size)); @@ -1450,13 +1452,6 @@ /* Transaction group is known to be partially replicated. */ if (vdev_draid_partial(cvd, physical_offset, txg, size)) return (B_TRUE); - - /* - * Always check groups with active distributed spares - * because any vdev failure in the pool will affect them. - */ - if (vdev_draid_find_spare(cvd) != NULL) - return (B_TRUE); } return (B_FALSE); @@ -1526,7 +1521,7 @@ */ static int vdev_draid_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { vdev_draid_config_t *vdc = vd->vdev_tsd; uint64_t nparity = vdc->vdc_nparity; @@ -1543,8 +1538,8 @@ * ordering is important to ensure the distributed spares calculate * the correct psize in the event that the dRAID vdevs were expanded. */ - vdev_open_children_subset(vd, vdev_draid_open_children); - vdev_open_children_subset(vd, vdev_draid_open_spares); + vdev_open_children_subset(vd, cr, vdev_draid_open_children); + vdev_open_children_subset(vd, cr, vdev_draid_open_spares); /* Verify enough of the children are available to continue. */ for (int c = 0; c < vd->vdev_children; c++) { @@ -1912,12 +1907,34 @@ } if (vdev_draid_missing(cvd, rc->rc_offset, zio->io_txg, 1)) { + vdev_t *svd; + if (c >= rr->rr_firstdatacol) rr->rr_missingdata++; else rr->rr_missingparity++; rc->rc_error = SET_ERROR(ESTALE); rc->rc_skipped = 1; + + /* + * If this child has draid spare attached, and that + * spare by rc_offset maps to another spare, the repair + * would go to that spare, and we want all mirrored + * children on it to be updated with the repaired data, + * even when we cannot vouch for it during rebuilds + * (which don't have checksums). Otherwise, we will have + * a lot of checksum errors on that spares during scrub. + * The worst thing that can happen in this case is that + * we will update the reserved spare column on some + * device with unverified data, which is harmless. + */ + if ((svd = vdev_draid_find_spare(cvd)) != NULL) { + svd = vdev_draid_spare_get_child(svd, + rc->rc_offset); + if (svd && (svd->vdev_ops == &vdev_spare_ops || + svd->vdev_ops == &vdev_replacing_ops)) + rc->rc_tgt_is_dspare = 1; + } continue; } @@ -1935,34 +1952,15 @@ vdev_t *svd; /* - * Sequential rebuilds need to always consider the data - * on the child being rebuilt to be stale. This is - * important when all columns are available to aid - * known reconstruction in identifing which columns - * contain incorrect data. - * - * Furthermore, all repairs need to be constrained to - * the devices being rebuilt because without a checksum - * we cannot verify the data is actually correct and - * performing an incorrect repair could result in - * locking in damage and making the data unrecoverable. + * Repairs need to be constrained to the devices being + * rebuilt since without a checksum we cannot verify the + * data is actually correct and performing an incorrect + * repair could result in locking in the damage and + * making the data unrecoverable. */ - if (zio->io_priority == ZIO_PRIORITY_REBUILD) { - if (vdev_draid_rebuilding(cvd)) { - if (c >= rr->rr_firstdatacol) - rr->rr_missingdata++; - else - rr->rr_missingparity++; - rc->rc_error = SET_ERROR(ESTALE); - rc->rc_skipped = 1; - rc->rc_allow_repair = 1; - continue; - } else { - rc->rc_allow_repair = 0; - } - } else { - rc->rc_allow_repair = 1; - } + if (zio->io_priority == ZIO_PRIORITY_REBUILD && + !vdev_draid_rebuilding(cvd)) + rc->rc_allow_repair = 0; /* * If this child is a distributed spare then the @@ -2438,8 +2436,9 @@ */ static int vdev_draid_spare_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { + (void) cr; vdev_draid_spare_t *vds = vd->vdev_tsd; vdev_t *rvd = vd->vdev_spa->spa_root_vdev; uint64_t asize, max_asize; @@ -2482,6 +2481,7 @@ *max_psize = max_asize + VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; vds->vds_draid_vdev = tvd; + vd->vdev_nonrot = tvd->vdev_nonrot; return (0); } diff -Nru zfs-linux-2.3.2/module/zfs/vdev_file.c zfs-linux-2.3.9/module/zfs/vdev_file.c --- zfs-linux-2.3.2/module/zfs/vdev_file.c 2025-05-01 18:45:25.775131529 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_file.c 2026-08-21 21:15:51.125495287 +0000 @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2020 by Delphix. All rights reserved. * Copyright (c) 2025, Klara, Inc. + * Copyright (c) 2026, TrueNAS. */ #include @@ -97,7 +98,7 @@ static int vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { vdev_file_t *vf; zfs_file_t *fp; @@ -152,7 +153,8 @@ ASSERT3S(vd->vdev_path[0], ==, '/'); error = zfs_file_open(vd->vdev_path, - vdev_file_open_mode(spa_mode(vd->vdev_spa)), 0, &fp); + vdev_file_open_mode(spa_mode(vd->vdev_spa)), 0, cr, &fp); + if (error) { vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; return (error); @@ -228,7 +230,8 @@ abd_return_buf_copy(zio->io_abd, buf, size); } else { buf = abd_borrow_buf_copy(zio->io_abd, zio->io_size); - err = zfs_file_pwrite(vf->vf_file, buf, size, off, &resid); + err = zfs_file_pwrite(vf->vf_file, buf, size, off, + vd->vdev_ashift, &resid); abd_return_buf(zio->io_abd, buf, size); } zio->io_error = err; diff -Nru zfs-linux-2.3.2/module/zfs/vdev_indirect.c zfs-linux-2.3.9/module/zfs/vdev_indirect.c --- zfs-linux-2.3.2/module/zfs/vdev_indirect.c 2025-05-01 18:45:25.779131606 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_indirect.c 2026-08-21 21:15:50.851498538 +0000 @@ -569,7 +569,7 @@ dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); dmu_tx_hold_space(tx, sizeof (*vimep) + sizeof (count)); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); int txgoff = dmu_tx_get_txg(tx) & TXG_MASK; /* @@ -949,8 +949,9 @@ static int vdev_indirect_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { + (void) cr; *psize = *max_psize = vd->vdev_asize + VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; *logical_ashift = vd->vdev_ashift; diff -Nru zfs-linux-2.3.2/module/zfs/vdev_initialize.c zfs-linux-2.3.9/module/zfs/vdev_initialize.c --- zfs-linux-2.3.2/module/zfs/vdev_initialize.c 2025-05-01 18:45:25.789131800 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_initialize.c 2026-08-21 21:15:50.853498514 +0000 @@ -158,7 +158,7 @@ vd->vdev_initialize_state = new_state; dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); if (new_state != VDEV_INITIALIZE_NONE) { dsl_sync_task_nowait(spa_get_dsl(spa), @@ -250,7 +250,7 @@ mutex_exit(&vd->vdev_initialize_io_lock); dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); uint64_t txg = dmu_tx_get_txg(tx); spa_config_enter(spa, SCL_STATE_ALL, vd, RW_READER); @@ -541,8 +541,9 @@ abd_t *deadbeef = vdev_initialize_block_alloc(); - vd->vdev_initialize_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + vd->vdev_initialize_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vdev_initialize_tree")); for (uint64_t i = 0; !vd->vdev_detached && i < vd->vdev_top->vdev_ms_count; i++) { diff -Nru zfs-linux-2.3.2/module/zfs/vdev_label.c zfs-linux-2.3.9/module/zfs/vdev_label.c --- zfs-linux-2.3.2/module/zfs/vdev_label.c 2025-05-01 18:45:25.792131857 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_label.c 2026-08-21 21:15:50.863498395 +0000 @@ -511,6 +511,8 @@ fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASHIFT, vd->vdev_ashift); fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASIZE, vd->vdev_asize); + fnvlist_add_uint64(nv, ZPOOL_CONFIG_MIN_ALLOC, + vdev_get_min_alloc(vd)); fnvlist_add_uint64(nv, ZPOOL_CONFIG_IS_LOG, vd->vdev_islog); if (vd->vdev_noalloc) { fnvlist_add_uint64(nv, ZPOOL_CONFIG_NONALLOCATING, @@ -1374,6 +1376,7 @@ VB_NVLIST); break; } + vbe->vbe_bootenv[sizeof (vbe->vbe_bootenv) - 1] = '\0'; fnvlist_add_string(bootenv, FREEBSD_BOOTONCE, buf); } @@ -1498,7 +1501,7 @@ * conflicting uberblocks on disk with the same txg. The solution is simple: * among uberblocks with equal txg, choose the one with the latest timestamp. */ -static int +int vdev_uberblock_compare(const uberblock_t *ub1, const uberblock_t *ub2) { int cmp = TREE_CMP(ub1->ub_txg, ub2->ub_txg); @@ -1629,8 +1632,10 @@ * matches the txg for our uberblock. */ if (cb.ubl_vd != NULL) { - vdev_dbgmsg(cb.ubl_vd, "best uberblock found for spa %s. " - "txg %llu", spa->spa_name, (u_longlong_t)ub->ub_txg); + vdev_dbgmsg(cb.ubl_vd, "best uberblock found for spa %s, " + "txg=%llu seq=%llu", spa_load_name(spa), + (u_longlong_t)ub->ub_txg, + (u_longlong_t)(MMP_SEQ_VALID(ub) ? MMP_SEQ(ub) : 0)); if (ub->ub_raidz_reflow_info != cb.ubl_latest.ub_raidz_reflow_info) { @@ -1638,7 +1643,7 @@ "spa=%s best uberblock (txg=%llu info=0x%llx) " "has different raidz_reflow_info than latest " "uberblock (txg=%llu info=0x%llx)", - spa->spa_name, + spa_load_name(spa), (u_longlong_t)ub->ub_txg, (u_longlong_t)ub->ub_raidz_reflow_info, (u_longlong_t)cb.ubl_latest.ub_txg, diff -Nru zfs-linux-2.3.2/module/zfs/vdev_mirror.c zfs-linux-2.3.9/module/zfs/vdev_mirror.c --- zfs-linux-2.3.2/module/zfs/vdev_mirror.c 2025-05-01 18:45:25.796131935 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_mirror.c 2026-08-21 21:15:50.868498336 +0000 @@ -386,7 +386,7 @@ static int vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { int numerrors = 0; int lasterror = 0; @@ -396,7 +396,7 @@ return (SET_ERROR(EINVAL)); } - vdev_open_children(vd); + vdev_open_children(vd, cr); for (int c = 0; c < vd->vdev_children; c++) { vdev_t *cvd = vd->vdev_child[c]; @@ -669,18 +669,19 @@ } while (children--) { - mc = &mm->mm_child[c]; - c++; + mc = &mm->mm_child[c++]; /* - * When sequentially resilvering only issue write repair - * IOs to the vdev which is being rebuilt since performance - * is limited by the slowest child. This is an issue for - * faster replacement devices such as distributed spares. + * When sequentially resilvering and the integrity of the data + * is speculative (ZIO_FLAG_SPECULATIVE), issue write repair IOs + * only to the vdev which is being rebuilt. Existing data on + * other children must never be overwritten with unconfirmed + * data to avoid unrecoverable damage to the pool. */ if ((zio->io_priority == ZIO_PRIORITY_REBUILD) && (zio->io_flags & ZIO_FLAG_IO_REPAIR) && !(zio->io_flags & ZIO_FLAG_SCRUB) && + (zio->io_flags & ZIO_FLAG_SPECULATIVE) && mm->mm_rebuilding && !mc->mc_rebuilding) { continue; } diff -Nru zfs-linux-2.3.2/module/zfs/vdev_missing.c zfs-linux-2.3.9/module/zfs/vdev_missing.c --- zfs-linux-2.3.2/module/zfs/vdev_missing.c 2025-05-01 18:45:25.799131993 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_missing.c 2026-08-21 21:15:50.858498455 +0000 @@ -45,7 +45,7 @@ static int vdev_missing_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, - uint64_t *ashift, uint64_t *pshift) + uint64_t *ashift, uint64_t *pshift, cred_t *cr) { /* * Really this should just fail. But then the root vdev will be in the @@ -53,7 +53,7 @@ * VDEV_AUX_BAD_GUID_SUM. So we pretend to succeed, knowing that we * will fail the GUID sum check before ever trying to open the pool. */ - (void) vd; + (void) vd, (void) cr; *psize = 0; *max_psize = 0; *ashift = 0; diff -Nru zfs-linux-2.3.2/module/zfs/vdev_queue.c zfs-linux-2.3.9/module/zfs/vdev_queue.c --- zfs-linux-2.3.2/module/zfs/vdev_queue.c 2025-05-01 18:45:25.802132051 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_queue.c 2026-08-21 21:15:50.878498217 +0000 @@ -1050,6 +1050,16 @@ mutex_exit(&vq->vq_lock); } +boolean_t +vdev_queue_pool_busy(spa_t *spa) +{ + 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; + + return (dp->dp_dirty_total > min_bytes); +} + /* * As these two methods are only used for load calculations we're not * concerned if we get an incorrect value on 32bit platforms due to lack of diff -Nru zfs-linux-2.3.2/module/zfs/vdev_raidz.c zfs-linux-2.3.9/module/zfs/vdev_raidz.c --- zfs-linux-2.3.2/module/zfs/vdev_raidz.c 2025-05-01 18:45:25.806132128 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_raidz.c 2026-08-21 21:15:50.873498277 +0000 @@ -24,6 +24,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2020 by Delphix. All rights reserved. * Copyright (c) 2016 Gvozden Nešković. All rights reserved. + * Copyright (c) 2026, Wasabi Technologies, Inc. */ #include @@ -2137,7 +2138,7 @@ static int vdev_raidz_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, - uint64_t *logical_ashift, uint64_t *physical_ashift) + uint64_t *logical_ashift, uint64_t *physical_ashift, cred_t *cr) { vdev_raidz_t *vdrz = vd->vdev_tsd; uint64_t nparity = vdrz->vd_nparity; @@ -2153,7 +2154,7 @@ return (SET_ERROR(EINVAL)); } - vdev_open_children(vd); + vdev_open_children(vd, cr); for (c = 0; c < vd->vdev_children; c++) { vdev_t *cvd = vd->vdev_child[c]; @@ -2572,16 +2573,6 @@ next_offset = synced_offset; } } - if (use_scratch) { - zfs_dbgmsg("zio=%px %s io_offset=%llu offset_synced=" - "%lld next_offset=%lld use_scratch=%u", - zio, - zio->io_type == ZIO_TYPE_WRITE ? "WRITE" : "READ", - (long long)zio->io_offset, - (long long)synced_offset, - (long long)next_offset, - use_scratch); - } rm = vdev_raidz_map_alloc_expanded(zio, tvd->vdev_ashift, vdrz->vd_physical_width, @@ -2720,8 +2711,6 @@ continue; if (abd_cmp(orig[c], rc->rc_abd) != 0) { - zfs_dbgmsg("found error on col=%u devidx=%u off %llx", - c, (int)rc->rc_devidx, (u_longlong_t)rc->rc_offset); vdev_raidz_checksum_error(zio, rc, orig[c]); rc->rc_error = SET_ERROR(ECKSUM); ret++; @@ -2752,6 +2741,7 @@ int parity_errors = 0; int parity_untried = 0; int data_errors = 0; + zio_flag_t add_flags = 0; ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); @@ -2782,10 +2772,30 @@ * Note that we also regenerate parity when resilvering so we * can write it out to failed devices later. */ - if (parity_errors + parity_untried < - rr->rr_firstdatacol - data_errors || - (zio->io_flags & ZIO_FLAG_RESILVER)) { + boolean_t parity_verify = (parity_errors + parity_untried) < + (rr->rr_firstdatacol - data_errors); + if (parity_verify || (zio->io_flags & ZIO_FLAG_RESILVER)) { int n = raidz_parity_verify(zio, rr); + /* + * In, Reed-Solomon encoding, if we have ndata+1 columns and + * the parity doesn't match, it means the data integrity is + * compromised. We shouldn't try to repair anything in this + * case. + */ + if (parity_verify && n > 0 && + zio->io_priority == ZIO_PRIORITY_REBUILD) + return; + /* + * If we have only ndata columns, the data integrity will + * be checked by the checksums normally, but not in case + * of rebuild when we don't have checksums. In this case, + * we add ZIO_FLAG_SPECULATIVE and try to not spread + * unverified data. For example, when the target vdev happens + * to be the mirroring spare vdev, we would repair only that + * child in it which is being rebuilt. + */ + if (!parity_verify && zio->io_priority == ZIO_PRIORITY_REBUILD) + add_flags |= ZIO_FLAG_SPECULATIVE; unexpected_errors += n; } @@ -2811,9 +2821,19 @@ */ ASSERT0(zio->io_flags & ZIO_FLAG_DIO_READ); - zfs_dbgmsg("zio=%px repairing c=%u devidx=%u " - "offset=%llx", - zio, c, rc->rc_devidx, (long long)rc->rc_offset); + /* + * When the target vdev is draid spare, we should clear + * ZIO_FLAG_SPECULATIVE. First, if that draid spare maps + * to another spare having an online/degraded disk, that + * disk must be repaired also. Otherwise, the scrub will + * detect a lot of cksum errors later. Second, since it + * is draid spare, there is no harm in updating its + * content on any vdev it maps to because the space is + * reserved as a spare anyway. + */ + zio_flag_t aflags = add_flags; + if (rc->rc_tgt_is_dspare) + aflags &= ~ZIO_FLAG_SPECULATIVE; zio_nowait(zio_vdev_child_io(zio, NULL, cvd, rc->rc_offset, rc->rc_abd, rc->rc_size, @@ -2821,7 +2841,7 @@ zio->io_priority == ZIO_PRIORITY_REBUILD ? ZIO_PRIORITY_REBUILD : ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_IO_REPAIR | (unexpected_errors ? - ZIO_FLAG_SELF_HEAL : 0), NULL, NULL)); + ZIO_FLAG_SELF_HEAL : 0) | aflags, NULL, NULL)); } } @@ -4556,8 +4576,10 @@ uint64_t shift, start; zfs_range_seg_type_t type = metaslab_calculate_range_tree_type( raidvd, msp, &start, &shift); - zfs_range_tree_t *rt = zfs_range_tree_create(NULL, type, NULL, - start, shift); + zfs_range_tree_t *rt = zfs_range_tree_create_flags( + NULL, type, NULL, start, shift, ZFS_RT_F_DYN_NAME, + metaslab_rt_name(msp->ms_group, msp, + "spa_raidz_expand_thread:rt")); zfs_range_tree_add(rt, msp->ms_start, msp->ms_size); zfs_range_tree_walk(msp->ms_allocatable, zfs_range_tree_remove, rt); @@ -4625,7 +4647,8 @@ dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, + DMU_TX_WAIT | DMU_TX_SUSPEND)); uint64_t txg = dmu_tx_get_txg(tx); /* diff -Nru zfs-linux-2.3.2/module/zfs/vdev_raidz_math.c zfs-linux-2.3.9/module/zfs/vdev_raidz_math.c --- zfs-linux-2.3.2/module/zfs/vdev_raidz_math.c 2025-05-01 18:45:25.809132186 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_raidz_math.c 2026-08-21 21:15:50.888498099 +0000 @@ -643,8 +643,6 @@ char *fmt; const uint32_t impl = RAIDZ_IMPL_READ(zfs_vdev_raidz_impl); - ASSERT(raidz_math_initialized); - /* list mandatory options */ for (i = 0; i < ARRAY_SIZE(math_impl_opts) - 2; i++) { fmt = (impl == math_impl_opts[i].sel) ? "[%s] " : "%s "; diff -Nru zfs-linux-2.3.2/module/zfs/vdev_raidz_math_aarch64_neon_common.h zfs-linux-2.3.9/module/zfs/vdev_raidz_math_aarch64_neon_common.h --- zfs-linux-2.3.2/module/zfs/vdev_raidz_math_aarch64_neon_common.h 2025-05-01 18:45:25.816132322 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_raidz_math_aarch64_neon_common.h 2026-08-21 21:15:51.156494919 +0000 @@ -102,14 +102,14 @@ #define WVR(X) [w##X] "=w" (w##X) -#define UVR0_(REG, ...) [w##REG] "+&w" (w##REG) -#define UVR1_(_1, REG, ...) [w##REG] "+&w" (w##REG) -#define UVR2_(_1, _2, REG, ...) [w##REG] "+&w" (w##REG) -#define UVR3_(_1, _2, _3, REG, ...) [w##REG] "+&w" (w##REG) -#define UVR4_(_1, _2, _3, _4, REG, ...) [w##REG] "+&w" (w##REG) -#define UVR5_(_1, _2, _3, _4, _5, REG, ...) [w##REG] "+&w" (w##REG) -#define UVR6_(_1, _2, _3, _4, _5, _6, REG, ...) [w##REG] "+&w" (w##REG) -#define UVR7_(_1, _2, _3, _4, _5, _6, _7, REG, ...) [w##REG] "+&w" (w##REG) +#define UVR0_(REG, ...) [w##REG] "+w" (w##REG) +#define UVR1_(_1, REG, ...) [w##REG] "+w" (w##REG) +#define UVR2_(_1, _2, REG, ...) [w##REG] "+w" (w##REG) +#define UVR3_(_1, _2, _3, REG, ...) [w##REG] "+w" (w##REG) +#define UVR4_(_1, _2, _3, _4, REG, ...) [w##REG] "+w" (w##REG) +#define UVR5_(_1, _2, _3, _4, _5, REG, ...) [w##REG] "+w" (w##REG) +#define UVR6_(_1, _2, _3, _4, _5, _6, REG, ...) [w##REG] "+w" (w##REG) +#define UVR7_(_1, _2, _3, _4, _5, _6, _7, REG, ...) [w##REG] "+w" (w##REG) #define UVR0(r...) UVR0_(r) #define UVR1(r...) UVR1_(r) @@ -120,7 +120,7 @@ #define UVR6(r...) UVR6_(r, 36, 35, 34, 33, 32, 31) #define UVR7(r...) UVR7_(r, 36, 35, 34, 33, 32, 31, 30) -#define UVR(X) [w##X] "+&w" (w##X) +#define UVR(X) [w##X] "+w" (w##X) #define R_01(REG1, REG2, ...) REG1, REG2 #define _R_23(_0, _1, REG2, REG3, ...) REG2, REG3 diff -Nru zfs-linux-2.3.2/module/zfs/vdev_rebuild.c zfs-linux-2.3.9/module/zfs/vdev_rebuild.c --- zfs-linux-2.3.2/module/zfs/vdev_rebuild.c 2025-05-01 18:45:25.853133037 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_rebuild.c 2026-08-21 21:15:50.883498158 +0000 @@ -23,7 +23,7 @@ * * Copyright (c) 2018, Intel Corporation. * Copyright (c) 2020 by Lawrence Livermore National Security, LLC. - * Copyright (c) 2022 Hewlett Packard Enterprise Development LP. + * Copyright (c) 2022, 2026 Hewlett Packard Enterprise Development LP. * Copyright (c) 2024 by Delphix. All rights reserved. */ @@ -233,7 +233,7 @@ mutex_enter(&vd->vdev_rebuild_lock); memset(vrp, 0, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES); vrp->vrp_rebuild_state = VDEV_REBUILD_ACTIVE; - vrp->vrp_min_txg = 0; + vrp->vrp_min_txg = TXG_INITIAL; vrp->vrp_max_txg = dmu_tx_get_txg(tx); vrp->vrp_start_time = gethrestime_sec(); vrp->vrp_scan_time_ms = 0; @@ -278,7 +278,7 @@ * active for the duration of the rebuild, then revert to the enabled state. */ static void -vdev_rebuild_initiate(vdev_t *vd) +vdev_rebuild_initiate(vdev_t *vd, uint64_t txg) { spa_t *spa = vd->vdev_spa; @@ -286,8 +286,7 @@ ASSERT(MUTEX_HELD(&vd->vdev_rebuild_lock)); ASSERT(!vd->vdev_rebuilding); - dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + dmu_tx_t *tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg); vd->vdev_rebuilding = B_TRUE; @@ -416,7 +415,7 @@ ASSERT3P(vd->vdev_rebuild_thread, ==, NULL); vrp->vrp_last_offset = 0; - vrp->vrp_min_txg = 0; + vrp->vrp_min_txg = TXG_INITIAL; vrp->vrp_max_txg = dmu_tx_get_txg(tx); vrp->vrp_bytes_scanned = 0; vrp->vrp_bytes_issued = 0; @@ -592,8 +591,9 @@ mutex_exit(&vr->vr_io_lock); dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); uint64_t txg = dmu_tx_get_txg(tx); + vr->vr_last_txg = txg; spa_config_enter(spa, SCL_STATE_ALL, vd, RW_READER); mutex_enter(&vd->vdev_rebuild_lock); @@ -617,7 +617,6 @@ return (SET_ERROR(EINTR)); } mutex_exit(&vd->vdev_rebuild_lock); - dmu_tx_commit(tx); vr->vr_scan_offset[txg & TXG_MASK] = start + size; vr->vr_pass_bytes_issued += size; @@ -627,6 +626,9 @@ abd_alloc(psize, B_FALSE), psize, vdev_rebuild_cb, vr, ZIO_PRIORITY_REBUILD, ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL | ZIO_FLAG_RESILVER, NULL)); + /* vdev_rebuild_cb releases SCL_STATE_ALL */ + + dmu_tx_commit(tx); return (0); } @@ -763,6 +765,7 @@ vdev_t *vd = arg; spa_t *spa = vd->vdev_spa; vdev_t *rvd = spa->spa_root_vdev; + dsl_pool_t *dp = spa_get_dsl(spa); int error = 0; /* @@ -770,9 +773,8 @@ * is not required for a correct rebuild, but we do want rebuilds to * emulate the resilver behavior as much as possible. */ - dsl_pool_t *dsl = spa_get_dsl(spa); - if (dsl_scan_scrubbing(dsl)) - dsl_scan_cancel(dsl); + if (dsl_scan_scrubbing(dp)) + dsl_scan_cancel(dp); spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); mutex_enter(&vd->vdev_rebuild_lock); @@ -787,8 +789,9 @@ vdev_rebuild_phys_t *vrp = &vr->vr_rebuild_phys; vr->vr_top_vdev = vd; vr->vr_scan_msp = NULL; - vr->vr_scan_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, - 0, 0); + vr->vr_scan_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "vr_scan_tree")); mutex_init(&vr->vr_io_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&vr->vr_io_cv, NULL, CV_DEFAULT, NULL); @@ -822,6 +825,7 @@ uint64_t limit = (arc_c_max / 2) / MAX(rvd->vdev_children, 1); vr->vr_bytes_inflight_max = MIN(limit, MAX(1ULL << 20, zfs_rebuild_vdev_limit * vd->vdev_children)); + vr->vr_last_txg = 0; /* * Removal of vdevs from the vdev tree may eliminate the need @@ -853,7 +857,7 @@ if (zfs_range_tree_space(msp->ms_allocating[j])) { mutex_exit(&msp->ms_lock); mutex_exit(&msp->ms_sync_lock); - txg_wait_synced(dsl, 0); + txg_wait_synced(dp, 0); mutex_enter(&msp->ms_sync_lock); mutex_enter(&msp->ms_lock); break; @@ -908,8 +912,16 @@ error = vdev_rebuild_ranges(vr); zfs_range_tree_vacate(vr->vr_scan_tree, NULL, NULL); - spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); + /* + * Allow rebuilt ranges to be sync-ed before enabling metaslab + * to avoid any interfering allocations. Otherwise, we might + * see checksum errors after scrub. + */ + if (vr->vr_last_txg != 0) + txg_wait_synced(dp, vr->vr_last_txg); + metaslab_enable(msp, B_FALSE, B_FALSE); + spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); if (error != 0) break; @@ -930,9 +942,8 @@ spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); - dsl_pool_t *dp = spa_get_dsl(spa); dmu_tx_t *tx = dmu_tx_create_dd(dp->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); mutex_enter(&vd->vdev_rebuild_lock); if (error == 0) { @@ -1014,7 +1025,7 @@ * top-level vdev is currently actively rebuilding. */ void -vdev_rebuild(vdev_t *vd) +vdev_rebuild(vdev_t *vd, uint64_t txg) { vdev_rebuild_t *vr = &vd->vdev_rebuild_config; vdev_rebuild_phys_t *vrp __maybe_unused = &vr->vr_rebuild_phys; @@ -1038,7 +1049,7 @@ if (!vd->vdev_rebuild_reset_wanted) vd->vdev_rebuild_reset_wanted = B_TRUE; } else { - vdev_rebuild_initiate(vd); + vdev_rebuild_initiate(vd, txg); } mutex_exit(&vd->vdev_rebuild_lock); } @@ -1127,6 +1138,22 @@ } /* + * Return rebuild transaction groups range. It's used to populate DTLs + * of the non-writable devices during the rebuild so that they could be + * healed correctly, in case they are cleared, and not miss the data + * that was written to their spares during the rebuild. + */ +void +vdev_rebuild_txgs(vdev_t *vd, uint64_t *min_txg, uint64_t *size) +{ + vdev_rebuild_t *vr = &vd->vdev_rebuild_config; + vdev_rebuild_phys_t *vrp = &vr->vr_rebuild_phys; + + *min_txg = vrp->vrp_min_txg; + *size = vrp->vrp_max_txg - vrp->vrp_min_txg; +} + +/* * Rebuild statistics reported per top-level vdev. */ int diff -Nru zfs-linux-2.3.2/module/zfs/vdev_removal.c zfs-linux-2.3.9/module/zfs/vdev_removal.c --- zfs-linux-2.3.2/module/zfs/vdev_removal.c 2025-05-01 18:45:25.857133114 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_removal.c 2026-08-21 21:15:50.893498040 +0000 @@ -364,13 +364,15 @@ spa_vdev_removal_t *svr = kmem_zalloc(sizeof (*svr), KM_SLEEP); mutex_init(&svr->svr_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&svr->svr_cv, NULL, CV_DEFAULT, NULL); - svr->svr_allocd_segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + svr->svr_allocd_segs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "svr_allocd_segs")); svr->svr_vdev_id = vd->vdev_id; for (int i = 0; i < TXG_SIZE; i++) { - svr->svr_frees[i] = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + svr->svr_frees[i] = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "svr_frees")); list_create(&svr->svr_new_segments[i], sizeof (vdev_indirect_mapping_entry_t), offsetof(vdev_indirect_mapping_entry_t, vime_node)); @@ -1179,8 +1181,9 @@ * relative to the start of the range to be copied (i.e. relative to the * local variable "start"). */ - zfs_range_tree_t *obsolete_segs = zfs_range_tree_create(NULL, - ZFS_RANGE_SEG64, NULL, 0, 0); + zfs_range_tree_t *obsolete_segs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "obsolete_segs")); zfs_btree_index_t where; zfs_range_seg_t *rs = zfs_btree_first(&segs->rt_root, &where); @@ -1393,14 +1396,17 @@ vdev_remove_replace_with_indirect(vd, txg); /* - * We now release the locks, allowing spa_sync to run and finish the + * Release the config lock and allow spa_sync to run and finish the * removal via vdev_remove_complete_sync in syncing context. * + * Retain the namespace lock to prevent the pool from being exported + * or destroyed before completion of the device removal. + * * Note that we hold on to the vdev_t that has been replaced. Since * it isn't part of the vdev tree any longer, it can't be concurrently * manipulated, even while we don't have the config lock. */ - (void) spa_vdev_exit(spa, NULL, txg, 0); + (void) spa_vdev_config_exit(spa, NULL, txg, 0, FTAG); /* * Top ZAP should have been transferred to the indirect vdev in @@ -1413,7 +1419,8 @@ */ ASSERT0(vd->vdev_leaf_zap); - txg = spa_vdev_enter(spa); + /* Update the vdev labels and dirty the config. */ + txg = spa_vdev_config_enter(spa); (void) vdev_label_init(vd, 0, VDEV_LABEL_REMOVE); /* * Request to update the config and the config cachefile. @@ -1448,8 +1455,9 @@ * allocated segments that we are copying. We may also be copying * free segments (of up to vdev_removal_max_span bytes). */ - zfs_range_tree_t *segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + zfs_range_tree_t *segs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "spa_vdev_copy_impl:segs")); for (;;) { zfs_range_tree_t *rt = svr->svr_allocd_segs; zfs_range_seg_t *rs = zfs_range_tree_first(rt); @@ -1610,8 +1618,9 @@ vca.vca_read_error_bytes = 0; vca.vca_write_error_bytes = 0; - zfs_range_tree_t *segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + zfs_range_tree_t *segs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "spa_vdev_remove_thread:segs")); mutex_enter(&svr->svr_lock); @@ -1724,7 +1733,8 @@ dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | + DMU_TX_SUSPEND)); uint64_t txg = dmu_tx_get_txg(tx); /* @@ -1894,8 +1904,9 @@ vdev_indirect_mapping_max_offset(vim)); } - zfs_range_tree_t *segs = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + zfs_range_tree_t *segs = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, ZFS_RT_F_DYN_NAME, + vdev_rt_name(vd, "spa_vdev_remove_cancel_sync:segs")); for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) { metaslab_t *msp = vd->vdev_ms[msi]; @@ -1931,10 +1942,9 @@ * because we have not allocated mappings for it yet. */ uint64_t syncd = vdev_indirect_mapping_max_offset(vim); - uint64_t sm_end = msp->ms_sm->sm_start + - msp->ms_sm->sm_size; - if (sm_end > syncd) - zfs_range_tree_clear(segs, syncd, sm_end - syncd); + uint64_t ms_end = msp->ms_start + msp->ms_size; + if (ms_end > syncd) + zfs_range_tree_clear(segs, syncd, ms_end - syncd); zfs_range_tree_vacate(segs, free_mapped_segment_cb, vd); } @@ -2109,7 +2119,6 @@ ASSERT3P(vd->vdev_log_mg, ==, NULL); return (error); } - ASSERT0(vd->vdev_stat.vs_alloc); /* * The evacuation succeeded. Remove any remaining MOS metadata diff -Nru zfs-linux-2.3.2/module/zfs/vdev_root.c zfs-linux-2.3.9/module/zfs/vdev_root.c --- zfs-linux-2.3.2/module/zfs/vdev_root.c 2025-05-01 18:45:25.860133172 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_root.c 2026-08-21 21:15:50.902497933 +0000 @@ -83,7 +83,7 @@ static int vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, - uint64_t *ashift, uint64_t *pshift) + uint64_t *ashift, uint64_t *pshift, cred_t *cr) { spa_t *spa = vd->vdev_spa; int lasterror = 0; @@ -94,7 +94,7 @@ return (SET_ERROR(EINVAL)); } - vdev_open_children(vd); + vdev_open_children(vd, cr); for (int c = 0; c < vd->vdev_children; c++) { vdev_t *cvd = vd->vdev_child[c]; diff -Nru zfs-linux-2.3.2/module/zfs/vdev_trim.c zfs-linux-2.3.9/module/zfs/vdev_trim.c --- zfs-linux-2.3.2/module/zfs/vdev_trim.c 2025-05-01 18:45:25.864133250 +0000 +++ zfs-linux-2.3.9/module/zfs/vdev_trim.c 2026-08-21 21:15:50.897497992 +0000 @@ -342,7 +342,7 @@ vd->vdev_trim_state = new_state; dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); dsl_sync_task_nowait(spa_get_dsl(spa), vdev_trim_zap_update_sync, guid, tx); @@ -527,7 +527,7 @@ mutex_exit(&vd->vdev_trim_io_lock); dmu_tx_t *tx = dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); uint64_t txg = dmu_tx_get_txg(tx); spa_config_enter(spa, SCL_STATE_ALL, vd, RW_READER); @@ -902,7 +902,9 @@ ta.trim_vdev = vd; ta.trim_extent_bytes_max = zfs_trim_extent_bytes_max; ta.trim_extent_bytes_min = zfs_trim_extent_bytes_min; - ta.trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0); + ta.trim_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "trim_tree")); ta.trim_type = TRIM_TYPE_MANUAL; ta.trim_flags = 0; @@ -1305,8 +1307,10 @@ * Allocate an empty range tree which is swapped in * for the existing ms_trim tree while it is processed. */ - trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, - NULL, 0, 0); + trim_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, + vdev_rt_name(vd, "autotrim_tree")); zfs_range_tree_swap(&msp->ms_trim, &trim_tree); ASSERT(zfs_range_tree_is_empty(msp->ms_trim)); @@ -1360,8 +1364,10 @@ if (!cvd->vdev_ops->vdev_op_leaf) continue; - ta->trim_tree = zfs_range_tree_create(NULL, - ZFS_RANGE_SEG64, NULL, 0, 0); + ta->trim_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, + vdev_rt_name(vd, "autotrim_tree")); zfs_range_tree_walk(trim_tree, vdev_trim_range_add, ta); } @@ -1600,7 +1606,9 @@ vd->vdev_trim_secure = 0; ta.trim_vdev = vd; - ta.trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0); + ta.trim_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "trim_tree")); ta.trim_type = TRIM_TYPE_MANUAL; ta.trim_extent_bytes_max = zfs_trim_extent_bytes_max; ta.trim_extent_bytes_min = SPA_MINBLOCKSIZE; @@ -1735,7 +1743,9 @@ ASSERT(!vd->vdev_top->vdev_rz_expanding); ta.trim_vdev = vd; - ta.trim_tree = zfs_range_tree_create(NULL, ZFS_RANGE_SEG64, NULL, 0, 0); + ta.trim_tree = zfs_range_tree_create_flags( + NULL, ZFS_RANGE_SEG64, NULL, 0, 0, + ZFS_RT_F_DYN_NAME, vdev_rt_name(vd, "trim_tree")); ta.trim_type = TRIM_TYPE_SIMPLE; ta.trim_extent_bytes_max = zfs_trim_extent_bytes_max; ta.trim_extent_bytes_min = SPA_MINBLOCKSIZE; diff -Nru zfs-linux-2.3.2/module/zfs/zap_leaf.c zfs-linux-2.3.9/module/zfs/zap_leaf.c --- zfs-linux-2.3.2/module/zfs/zap_leaf.c 2025-05-01 18:45:25.870133366 +0000 +++ zfs-linux-2.3.9/module/zfs/zap_leaf.c 2026-08-21 21:15:50.919497731 +0000 @@ -249,20 +249,63 @@ return (chunk_head); } -static void -zap_leaf_array_free(zap_leaf_t *l, uint16_t *chunkp) +/* + * Non-destructively copy array between leaves. + */ +static uint16_t +zap_leaf_array_copy(zap_leaf_t *l, uint16_t chunk, zap_leaf_t *nl) { - uint16_t chunk = *chunkp; + uint16_t new_chunk; + uint16_t *nchunkp = &new_chunk; + + while (chunk != CHAIN_END) { + ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(l)); + uint16_t nchunk = zap_leaf_chunk_alloc(nl); + + struct zap_leaf_array *la = + &ZAP_LEAF_CHUNK(l, chunk).l_array; + struct zap_leaf_array *nla = + &ZAP_LEAF_CHUNK(nl, nchunk).l_array; + ASSERT3U(la->la_type, ==, ZAP_CHUNK_ARRAY); - *chunkp = CHAIN_END; + *nla = *la; /* structure assignment */ + + chunk = la->la_next; + *nchunkp = nchunk; + nchunkp = &nla->la_next; + } + *nchunkp = CHAIN_END; + return (new_chunk); +} + +/* + * Free array. Unlike trivial loop of zap_leaf_chunk_free() this does + * not reverse order of chunks in the free list, reducing fragmentation. + */ +static void +zap_leaf_array_free(zap_leaf_t *l, uint16_t chunk) +{ + struct zap_leaf_header *hdr = &zap_leaf_phys(l)->l_hdr; + uint16_t *tailp = &hdr->lh_freelist; + uint16_t oldfree = *tailp; while (chunk != CHAIN_END) { - uint_t nextchunk = ZAP_LEAF_CHUNK(l, chunk).l_array.la_next; - ASSERT3U(ZAP_LEAF_CHUNK(l, chunk).l_array.la_type, ==, - ZAP_CHUNK_ARRAY); - zap_leaf_chunk_free(l, chunk); - chunk = nextchunk; + ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(l)); + zap_leaf_chunk_t *c = &ZAP_LEAF_CHUNK(l, chunk); + ASSERT3U(c->l_array.la_type, ==, ZAP_CHUNK_ARRAY); + + *tailp = chunk; + chunk = c->l_array.la_next; + + c->l_free.lf_type = ZAP_CHUNK_FREE; + memset(c->l_free.lf_pad, 0, sizeof (c->l_free.lf_pad)); + tailp = &c->l_free.lf_next; + + ASSERT3U(hdr->lh_nfree, <, ZAP_LEAF_NUMCHUNKS(l)); + hdr->lh_nfree++; } + + *tailp = oldfree; } /* array_len and buf_len are in integers, not bytes */ @@ -516,7 +559,7 @@ if ((int)zap_leaf_phys(l)->l_hdr.lh_nfree < delta_chunks) return (SET_ERROR(EAGAIN)); - zap_leaf_array_free(l, &le->le_value_chunk); + zap_leaf_array_free(l, le->le_value_chunk); le->le_value_chunk = zap_leaf_array_create(l, buf, integer_size, num_integers); le->le_value_numints = num_integers; @@ -535,10 +578,11 @@ struct zap_leaf_entry *le = ZAP_LEAF_ENTRY(l, entry_chunk); ASSERT3U(le->le_type, ==, ZAP_CHUNK_ENTRY); - zap_leaf_array_free(l, &le->le_name_chunk); - zap_leaf_array_free(l, &le->le_value_chunk); - *zeh->zeh_chunkp = le->le_next; + + /* Free in opposite order to reduce fragmentation. */ + zap_leaf_array_free(l, le->le_value_chunk); + zap_leaf_array_free(l, le->le_name_chunk); zap_leaf_chunk_free(l, entry_chunk); zap_leaf_phys(l)->l_hdr.lh_nentries--; @@ -702,34 +746,6 @@ return (chunkp); } -static uint16_t -zap_leaf_transfer_array(zap_leaf_t *l, uint16_t chunk, zap_leaf_t *nl) -{ - uint16_t new_chunk; - uint16_t *nchunkp = &new_chunk; - - while (chunk != CHAIN_END) { - uint16_t nchunk = zap_leaf_chunk_alloc(nl); - struct zap_leaf_array *nla = - &ZAP_LEAF_CHUNK(nl, nchunk).l_array; - struct zap_leaf_array *la = - &ZAP_LEAF_CHUNK(l, chunk).l_array; - uint_t nextchunk = la->la_next; - - ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(l)); - ASSERT3U(nchunk, <, ZAP_LEAF_NUMCHUNKS(l)); - - *nla = *la; /* structure assignment */ - - zap_leaf_chunk_free(l, chunk); - chunk = nextchunk; - *nchunkp = nchunk; - nchunkp = &nla->la_next; - } - *nchunkp = CHAIN_END; - return (new_chunk); -} - static void zap_leaf_transfer_entry(zap_leaf_t *l, uint_t entry, zap_leaf_t *nl) { @@ -742,10 +758,12 @@ (void) zap_leaf_rehash_entry(nl, nle, chunk); - nle->le_name_chunk = zap_leaf_transfer_array(l, le->le_name_chunk, nl); - nle->le_value_chunk = - zap_leaf_transfer_array(l, le->le_value_chunk, nl); + nle->le_name_chunk = zap_leaf_array_copy(l, le->le_name_chunk, nl); + nle->le_value_chunk = zap_leaf_array_copy(l, le->le_value_chunk, nl); + /* Free in opposite order to reduce fragmentation. */ + zap_leaf_array_free(l, le->le_value_chunk); + zap_leaf_array_free(l, le->le_name_chunk); zap_leaf_chunk_free(l, entry); zap_leaf_phys(l)->l_hdr.lh_nentries--; diff -Nru zfs-linux-2.3.2/module/zfs/zcp.c zfs-linux-2.3.9/module/zfs/zcp.c --- zfs-linux-2.3.2/module/zfs/zcp.c 2025-05-01 18:45:25.877133501 +0000 +++ zfs-linux-2.3.9/module/zfs/zcp.c 2026-08-21 21:15:50.929497612 +0000 @@ -970,8 +970,8 @@ } /* - * This callback is called when txg_wait_synced_sig encountered a signal. - * The txg_wait_synced_sig will continue to wait for the txg to complete + * This callback is called when txg_wait_synced_flags encountered a signal. + * The txg_wait_synced_flags will continue to wait for the txg to complete * after calling this callback. */ static void @@ -1141,12 +1141,14 @@ } VERIFY3U(3, ==, lua_gettop(state)); + cred_t *cr = CRED(); + crhold(cr); + runinfo.zri_state = state; runinfo.zri_allocargs = &allocargs; runinfo.zri_outnvl = outnvl; runinfo.zri_result = 0; - runinfo.zri_cred = CRED(); - runinfo.zri_proc = curproc; + runinfo.zri_cred = cr; runinfo.zri_timed_out = B_FALSE; runinfo.zri_canceled = B_FALSE; runinfo.zri_sync = sync; @@ -1165,6 +1167,8 @@ } lua_close(state); + crfree(cr); + /* * Create device minor nodes for any new zvols. */ diff -Nru zfs-linux-2.3.2/module/zfs/zcp_get.c zfs-linux-2.3.9/module/zfs/zcp_get.c --- zfs-linux-2.3.2/module/zfs/zcp_get.c 2025-05-01 18:45:25.880133559 +0000 +++ zfs-linux-2.3.9/module/zfs/zcp_get.c 2026-08-21 21:15:50.934497553 +0000 @@ -378,14 +378,17 @@ break; } + case ZFS_PROP_ENCRYPTION: case ZFS_PROP_KEYSTATUS: case ZFS_PROP_KEYFORMAT: { /* provide defaults in case no crypto obj exists */ setpoint[0] = '\0'; - if (zfs_prop == ZFS_PROP_KEYSTATUS) - numval = ZFS_KEYSTATUS_NONE; - else + if (zfs_prop == ZFS_PROP_ENCRYPTION) + numval = ZIO_CRYPT_OFF; + else if (zfs_prop == ZFS_PROP_KEYFORMAT) numval = ZFS_KEYFORMAT_NONE; + else if (zfs_prop == ZFS_PROP_KEYSTATUS) + numval = ZFS_KEYSTATUS_NONE; nvlist_t *nvl, *propval; nvl = fnvlist_alloc(); @@ -399,6 +402,29 @@ if (nvlist_lookup_string(propval, ZPROP_SOURCE, &source) == 0) strlcpy(setpoint, source, sizeof (setpoint)); + } + nvlist_free(nvl); + break; + } + + case ZFS_PROP_ENCRYPTION_ROOT: { + setpoint[0] = '\0'; + strval[0] = '\0'; + + nvlist_t *nvl, *propval; + nvl = fnvlist_alloc(); + dsl_dataset_crypt_stats(ds, nvl); + if (nvlist_lookup_nvlist(nvl, zfs_prop_to_name(zfs_prop), + &propval) == 0) { + const char *dsname; + const char *source; + + if (nvlist_lookup_string(propval, ZPROP_VALUE, + &dsname) == 0) + strlcpy(strval, dsname, ZAP_MAXVALUELEN); + if (nvlist_lookup_string(propval, ZPROP_SOURCE, + &source) == 0) + strlcpy(setpoint, source, sizeof (setpoint)); } nvlist_free(nvl); break; diff -Nru zfs-linux-2.3.2/module/zfs/zcp_synctask.c zfs-linux-2.3.9/module/zfs/zcp_synctask.c --- zfs-linux-2.3.2/module/zfs/zcp_synctask.c 2025-05-01 18:45:25.894133830 +0000 +++ zfs-linux-2.3.9/module/zfs/zcp_synctask.c 2026-08-21 21:15:50.958497268 +0000 @@ -193,7 +193,6 @@ ddpa.ddpa_clonename = dsname; ddpa.err_ds = err_details; ddpa.cr = ri->zri_cred; - ddpa.proc = ri->zri_proc; /* * If there was a snapshot name conflict, then err_ds will be filled @@ -277,7 +276,6 @@ ddsa.ddsa_errors = NULL; ddsa.ddsa_props = NULL; ddsa.ddsa_cr = ri->zri_cred; - ddsa.ddsa_proc = ri->zri_proc; ddsa.ddsa_snaps = fnvlist_alloc(); fnvlist_add_boolean(ddsa.ddsa_snaps, dsname); diff -Nru zfs-linux-2.3.2/module/zfs/zfeature.c zfs-linux-2.3.9/module/zfs/zfeature.c --- zfs-linux-2.3.2/module/zfs/zfeature.c 2025-05-01 18:45:25.897133888 +0000 +++ zfs-linux-2.3.9/module/zfs/zfeature.c 2026-08-21 21:15:50.963497209 +0000 @@ -308,6 +308,7 @@ ASSERT(VALID_FEATURE_OR_NONE(feature->fi_feature)); uint64_t zapobj = (feature->fi_flags & ZFEATURE_FLAG_READONLY_COMPAT) ? spa->spa_feat_for_write_obj : spa->spa_feat_for_read_obj; + ASSERT(MUTEX_HELD(&spa->spa_feat_stats_lock)); VERIFY0(zap_update(spa->spa_meta_objset, zapobj, feature->fi_guid, sizeof (uint64_t), 1, &refcount, tx)); @@ -360,7 +361,9 @@ feature->fi_guid, 1, strlen(feature->fi_desc) + 1, feature->fi_desc, tx)); + mutex_enter(&spa->spa_feat_stats_lock); feature_sync(spa, feature, initial_refcount, tx); + mutex_exit(&spa->spa_feat_stats_lock); if (spa_feature_is_enabled(spa, SPA_FEATURE_ENABLED_TXG)) { uint64_t enabling_txg = dmu_tx_get_txg(tx); @@ -416,6 +419,7 @@ ASSERT(dmu_tx_is_syncing(tx)); ASSERT3U(spa_version(spa), >=, SPA_VERSION_FEATURES); + mutex_enter(&spa->spa_feat_stats_lock); VERIFY3U(feature_get_refcount(spa, feature, &refcount), !=, ENOTSUP); switch (action) { @@ -433,6 +437,7 @@ } feature_sync(spa, feature, refcount, tx); + mutex_exit(&spa->spa_feat_stats_lock); } void diff -Nru zfs-linux-2.3.2/module/zfs/zfs_chksum.c zfs-linux-2.3.9/module/zfs/zfs_chksum.c --- zfs-linux-2.3.2/module/zfs/zfs_chksum.c 2025-05-01 18:45:25.904134023 +0000 +++ zfs-linux-2.3.9/module/zfs/zfs_chksum.c 2026-08-21 21:15:50.973497090 +0000 @@ -32,9 +32,6 @@ #include #include -/* limit benchmarking to max 256KiB, when EdonR is slower then this: */ -#define LIMIT_PERF_MBS 300 - typedef struct { const char *name; const char *impl; @@ -52,9 +49,15 @@ zio_checksum_tmpl_free_t *(free); } chksum_stat_t; +#define AT_STARTUP 0 +#define AT_BENCHMARK 1 +#define AT_DONE 2 + static chksum_stat_t *chksum_stat_data = 0; -static int chksum_stat_cnt = 0; static kstat_t *chksum_kstat = NULL; +static int chksum_stat_limit = AT_STARTUP; +static int chksum_stat_cnt = 0; +static void chksum_benchmark(void); /* * Sample output on i3-1005G1 System: @@ -129,6 +132,9 @@ static void * chksum_kstat_addr(kstat_t *ksp, loff_t n) { + /* full benchmark */ + chksum_benchmark(); + if (n < chksum_stat_cnt) ksp->ks_private = (void *)(chksum_stat_data + n); else @@ -149,11 +155,11 @@ switch (round) { case 1: /* 1k */ size = 1<<10; loops = 128; break; - case 2: /* 2k */ + case 2: /* 4k */ size = 1<<12; loops = 64; break; - case 3: /* 4k */ + case 3: /* 16k */ size = 1<<14; loops = 32; break; - case 4: /* 16k */ + case 4: /* 64k */ size = 1<<16; loops = 16; break; case 5: /* 256k */ size = 1<<18; loops = 8; break; @@ -176,47 +182,37 @@ kpreempt_enable(); run_bw = size * run_count * NANOSEC; - run_bw /= run_time_ns; /* B/s */ + run_bw /= run_time_ns; /* B/s */ *result = run_bw/1024/1024; /* MiB/s */ } -#define LIMIT_INIT 0 -#define LIMIT_NEEDED 1 -#define LIMIT_NOLIMIT 2 - static void chksum_benchit(chksum_stat_t *cs) { abd_t *abd; void *ctx = 0; void *salt = &cs->salt.zcs_bytes; - static int chksum_stat_limit = LIMIT_INIT; memset(salt, 0, sizeof (cs->salt.zcs_bytes)); if (cs->init) ctx = cs->init(&cs->salt); + /* benchmarks in startup mode */ + if (chksum_stat_limit == AT_STARTUP) { + abd = abd_alloc_linear(1<<18, B_FALSE); + chksum_run(cs, abd, ctx, 5, &cs->bs256k); + goto done; + } + /* allocate test memory via abd linear interface */ abd = abd_alloc_linear(1<<20, B_FALSE); + + /* benchmarks when requested */ chksum_run(cs, abd, ctx, 1, &cs->bs1k); chksum_run(cs, abd, ctx, 2, &cs->bs4k); chksum_run(cs, abd, ctx, 3, &cs->bs16k); chksum_run(cs, abd, ctx, 4, &cs->bs64k); chksum_run(cs, abd, ctx, 5, &cs->bs256k); - - /* check if we ran on a slow cpu */ - if (chksum_stat_limit == LIMIT_INIT) { - if (cs->bs1k < LIMIT_PERF_MBS) { - chksum_stat_limit = LIMIT_NEEDED; - } else { - chksum_stat_limit = LIMIT_NOLIMIT; - } - } - - /* skip benchmarks >= 1MiB when the CPU is to slow */ - if (chksum_stat_limit == LIMIT_NEEDED) - goto abort; - chksum_run(cs, abd, ctx, 6, &cs->bs1m); abd_free(abd); @@ -225,7 +221,7 @@ chksum_run(cs, abd, ctx, 7, &cs->bs4m); chksum_run(cs, abd, ctx, 8, &cs->bs16m); -abort: +done: abd_free(abd); /* free up temp memory */ @@ -243,7 +239,6 @@ /* we need the benchmark only for the kernel module */ return; #endif - chksum_stat_t *cs; uint64_t max; uint32_t id, cbid = 0, id_save; @@ -251,13 +246,20 @@ const zfs_impl_t *sha256 = zfs_impl_get_ops("sha256"); const zfs_impl_t *sha512 = zfs_impl_get_ops("sha512"); + /* benchmarks are done */ + if (chksum_stat_limit == AT_DONE) + return; + /* count implementations */ - chksum_stat_cnt = 2; - chksum_stat_cnt += sha256->getcnt(); - chksum_stat_cnt += sha512->getcnt(); - chksum_stat_cnt += blake3->getcnt(); - chksum_stat_data = kmem_zalloc( - sizeof (chksum_stat_t) * chksum_stat_cnt, KM_SLEEP); + if (chksum_stat_limit == AT_STARTUP) { + chksum_stat_cnt = 1; /* edonr */ + chksum_stat_cnt += 1; /* skein */ + chksum_stat_cnt += sha256->getcnt(); + chksum_stat_cnt += sha512->getcnt(); + chksum_stat_cnt += blake3->getcnt(); + chksum_stat_data = kmem_zalloc( + sizeof (chksum_stat_t) * chksum_stat_cnt, KM_SLEEP); + } /* edonr - needs to be the first one here (slow CPU check) */ cs = &chksum_stat_data[cbid++]; @@ -332,6 +334,17 @@ } } blake3->setid(id_save); + + switch (chksum_stat_limit) { + case AT_STARTUP: + /* next time we want a full benchmark */ + chksum_stat_limit = AT_BENCHMARK; + break; + case AT_BENCHMARK: + /* no further benchmarks */ + chksum_stat_limit = AT_DONE; + break; + } } void @@ -341,7 +354,7 @@ blake3_per_cpu_ctx_init(); #endif - /* Benchmark supported implementations */ + /* 256KiB benchmark */ chksum_benchmark(); /* Install kstats for all implementations */ diff -Nru zfs-linux-2.3.2/module/zfs/zfs_ioctl.c zfs-linux-2.3.9/module/zfs/zfs_ioctl.c --- zfs-linux-2.3.2/module/zfs/zfs_ioctl.c 2025-05-01 18:45:25.918134294 +0000 +++ zfs-linux-2.3.9/module/zfs/zfs_ioctl.c 2026-08-21 21:15:50.991496877 +0000 @@ -922,6 +922,23 @@ ZFS_DELEG_PERM_CREATE, cr)); } +/* + * Policy for dataset set property operations. Individual properties checked by + * zfs_check_settable(), additionally require zfs_secpolicy_recv() when setting + * properties as part of a receive. + */ +static int +zfs_secpolicy_setprops(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + boolean_t received = zc->zc_cookie; + int error; + + if (received && (error = zfs_secpolicy_recv(zc, innvl, cr))) + return (error); + + return (zfs_secpolicy_read(zc, innvl, cr)); +} + int zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr) { @@ -1424,6 +1441,7 @@ * objset from the zfsvfs. */ ZFS_TEARDOWN_EXIT(*zfvp, tag); + zfs_vfs_rele(*zfvp); return (SET_ERROR(EBUSY)); } } @@ -3750,7 +3768,6 @@ zfs_ioc_log_history(const char *unused, nvlist_t *innvl, nvlist_t *outnvl) { (void) unused, (void) outnvl; - const char *message; char *poolname; spa_t *spa; int error; @@ -3771,7 +3788,7 @@ if (error != 0) return (error); - message = fnvlist_lookup_string(innvl, "message"); + const char *message = fnvlist_lookup_string(innvl, "message"); if (spa_version(spa) < SPA_VERSION_ZPOOL_HISTORY) { spa_close(spa, FTAG); @@ -6239,21 +6256,27 @@ * outputs: * zc_nvlist_dst[_size] data buffer (array of zfs_useracct_t) * zc_cookie zap cursor + * + * The zc_nvlist_dst output array is limited to 1000 entries. */ static int zfs_ioc_userspace_many(zfs_cmd_t *zc) { + const size_t batch_limit = 1000 * sizeof (zfs_useracct_t); + uint64_t bufsize = MIN(zc->zc_nvlist_dst_size, batch_limit); zfsvfs_t *zfsvfs; - int bufsize = zc->zc_nvlist_dst_size; - if (bufsize <= 0) + if (bufsize < sizeof (zfs_useracct_t)) { + zc->zc_nvlist_dst_size = sizeof (zfs_useracct_t); return (SET_ERROR(ENOMEM)); + } int error = zfsvfs_hold(zc->zc_name, FTAG, &zfsvfs, B_FALSE); if (error != 0) return (error); void *buf = vmem_alloc(bufsize, KM_SLEEP); + zc->zc_nvlist_dst_size = bufsize; error = zfs_userspace_many(zfsvfs, zc->zc_objset_type, &zc->zc_cookie, buf, &zc->zc_nvlist_dst_size); @@ -6744,7 +6767,7 @@ dsl_pool_t *dp; dsl_dataset_t *new, *old; const char *firstsnap; - uint64_t used, comp, uncomp; + uint64_t used = 0, comp = 0, uncomp = 0; firstsnap = fnvlist_lookup_string(innvl, "firstsnap"); @@ -7631,7 +7654,7 @@ zfs_ioc_send, zfs_secpolicy_send); zfs_ioctl_register_dataset_modify(ZFS_IOC_SET_PROP, zfs_ioc_set_prop, - zfs_secpolicy_none); + zfs_secpolicy_setprops); zfs_ioctl_register_dataset_modify(ZFS_IOC_DESTROY, zfs_ioc_destroy, zfs_secpolicy_destroy); zfs_ioctl_register_dataset_modify(ZFS_IOC_RENAME, zfs_ioc_rename, diff -Nru zfs-linux-2.3.2/module/zfs/zfs_log.c zfs-linux-2.3.9/module/zfs/zfs_log.c --- zfs-linux-2.3.2/module/zfs/zfs_log.c 2025-05-01 18:45:25.921134352 +0000 +++ zfs-linux-2.3.9/module/zfs/zfs_log.c 2026-08-21 21:15:50.996496817 +0000 @@ -607,7 +607,7 @@ * called as soon as the write is on stable storage (be it via a DMU sync or a * ZIL commit). */ -static int64_t zfs_immediate_write_sz = 32768; +static uint_t zfs_immediate_write_sz = 32768; void zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype, @@ -617,8 +617,7 @@ dmu_buf_impl_t *db = (dmu_buf_impl_t *)sa_get_db(zp->z_sa_hdl); uint32_t blocksize = zp->z_blksz; itx_wr_state_t write_state; - uint64_t gen = 0; - ssize_t size = resid; + uint64_t gen = 0, log_size = 0; if (zil_replaying(zilog, tx) || zp->z_unlinked || zfs_xattr_owner_unlinked(zp)) { @@ -679,6 +678,10 @@ } } + log_size += itx->itx_size; + if (wr_state == WR_NEED_COPY) + log_size += len; + itx->itx_wr_state = wr_state; lr->lr_foid = zp->z_id; lr->lr_offset = off; @@ -690,17 +693,18 @@ itx->itx_sync = (zp->z_sync_cnt != 0); itx->itx_gen = gen; - itx->itx_callback = callback; - itx->itx_callback_data = callback_data; + if (resid == len) { + itx->itx_callback = callback; + itx->itx_callback_data = callback_data; + } + zil_itx_assign(zilog, itx, tx); off += len; resid -= len; } - if (write_state == WR_COPIED || write_state == WR_NEED_COPY) { - dsl_pool_wrlog_count(zilog->zl_dmu_pool, size, tx->tx_txg); - } + dsl_pool_wrlog_count(zilog->zl_dmu_pool, log_size, tx->tx_txg); } /* @@ -934,5 +938,5 @@ } } -ZFS_MODULE_PARAM(zfs, zfs_, immediate_write_sz, S64, ZMOD_RW, +ZFS_MODULE_PARAM(zfs, zfs_, immediate_write_sz, UINT, ZMOD_RW, "Largest data block to write to zil"); diff -Nru zfs-linux-2.3.2/module/zfs/zfs_quota.c zfs-linux-2.3.9/module/zfs/zfs_quota.c --- zfs-linux-2.3.2/module/zfs/zfs_quota.c 2025-05-01 18:45:25.928134487 +0000 +++ zfs-linux-2.3.9/module/zfs/zfs_quota.c 2026-08-21 21:15:51.010496651 +0000 @@ -86,10 +86,14 @@ sa.sa_layout_info = BSWAP_16(sa.sa_layout_info); swap = B_TRUE; } - VERIFY3U(sa.sa_magic, ==, SA_MAGIC); + + if (unlikely(sa.sa_magic != SA_MAGIC)) + return (SET_ERROR(EINVAL)); int hdrsize = sa_hdrsize(&sa); - VERIFY3U(hdrsize, >=, sizeof (sa_hdr_phys_t)); + + if (unlikely(hdrsize < sizeof (sa_hdr_phys_t))) + return (SET_ERROR(EINVAL)); uintptr_t data_after_hdr = (uintptr_t)data + hdrsize; zoi->zfi_user = *((uint64_t *)(data_after_hdr + SA_UID_OFFSET)); diff -Nru zfs-linux-2.3.2/module/zfs/zfs_vnops.c zfs-linux-2.3.9/module/zfs/zfs_vnops.c --- zfs-linux-2.3.2/module/zfs/zfs_vnops.c 2025-05-01 18:45:25.945134816 +0000 +++ zfs-linux-2.3.9/module/zfs/zfs_vnops.c 2026-08-21 21:15:51.048496201 +0000 @@ -67,13 +67,14 @@ int zfs_bclone_enabled = 1; /* - * When set zfs_clone_range() waits for dirty data to be written to disk. - * This allows the clone operation to reliably succeed when a file is modified - * and then immediately cloned. For small files this may be slower than making - * a copy of the file and is therefore not the default. However, in certain - * scenarios this behavior may be desirable so a tunable is provided. + * When set to 1 the FICLONE and FICLONERANGE ioctls will wait for any dirty + * data to be written to disk before proceeding. This ensures that the clone + * operation reliably succeeds, even if a file is modified and then immediately + * cloned. Note that for small files this may be slower than simply copying + * the file. When set to 0 the clone operation will immediately fail if it + * encounters any dirty blocks. By default waiting is enabled. */ -int zfs_bclone_wait_dirty = 0; +int zfs_bclone_wait_dirty = 1; /* * Enable Direct I/O. If this setting is 0, then all I/O requests will be @@ -93,7 +94,11 @@ /* * Maximum bytes to read per chunk in zfs_read(). */ +#ifdef _ILP32 static uint64_t zfs_vnops_read_chunk_size = 1024 * 1024; +#else +static uint64_t zfs_vnops_read_chunk_size = DMU_MAX_ACCESS / 2; +#endif int zfs_fsync(znode_t *zp, int syncflag, cred_t *cr) @@ -104,9 +109,7 @@ if (zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED) { if ((error = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0) return (error); - atomic_inc_32(&zp->z_sync_writes_cnt); zil_commit(zfsvfs->z_log, zp->z_id); - atomic_dec_32(&zp->z_sync_writes_cnt); zfs_exit(zfsvfs, FTAG); } return (error); @@ -387,7 +390,8 @@ #if defined(__linux__) ssize_t start_offset = zfs_uio_offset(uio); #endif - ssize_t chunk_size = zfs_vnops_read_chunk_size; + uint_t blksz = zp->z_blksz; + ssize_t chunk_size; ssize_t n = MIN(zfs_uio_resid(uio), zp->z_size - zfs_uio_offset(uio)); ssize_t start_resid = n; ssize_t dio_remaining_resid = 0; @@ -414,11 +418,14 @@ dio_remaining_resid = n - P2ALIGN_TYPED(n, PAGE_SIZE, ssize_t); if (dio_remaining_resid != 0) n -= dio_remaining_resid; + } else { + chunk_size = MIN(MAX(zfs_vnops_read_chunk_size, blksz), + DMU_MAX_ACCESS / 2); } while (n > 0) { ssize_t nbytes = MIN(n, chunk_size - - P2PHASE(zfs_uio_offset(uio), chunk_size)); + P2PHASE(zfs_uio_offset(uio), blksz)); #ifdef UIO_NOCOPY if (zfs_uio_segflg(uio) == UIO_NOCOPY) error = mappedread_sf(zp, nbytes, uio); @@ -879,7 +886,15 @@ * error, and we may break the loop early. */ n -= tx_bytes - zfs_uio_resid(uio); - pfbytes -= tx_bytes - zfs_uio_resid(uio); + /* + * The prefaulted pages still faulted, so force + * a re-prefault on the next pass. If they can + * no longer be faulted in (e.g. the calling + * process is exiting), zfs_uio_prefaultpages() + * fails and the loop breaks with EFAULT instead + * of spinning on them forever. + */ + pfbytes = 0; continue; } #endif @@ -1050,6 +1065,143 @@ return (0); } +/* + * Rewrite a range of file as-is without modification. + * + * IN: zp - znode of file to be rewritten. + * off - Offset of the range to rewrite. + * len - Length of the range to rewrite. + * flags - Random rewrite parameters. + * arg - flags-specific argument. + * + * RETURN: 0 if success + * error code if failure + */ +int +zfs_rewrite(znode_t *zp, uint64_t off, uint64_t len, uint64_t flags, + uint64_t arg) +{ + int error; + + if (flags != 0 || arg != 0) + return (SET_ERROR(EINVAL)); + + zfsvfs_t *zfsvfs = ZTOZSB(zp); + if ((error = zfs_enter_verify_zp(zfsvfs, zp, FTAG)) != 0) + return (error); + + if (zfs_is_readonly(zfsvfs)) { + zfs_exit(zfsvfs, FTAG); + return (SET_ERROR(EROFS)); + } + + if (off >= zp->z_size) { + zfs_exit(zfsvfs, FTAG); + return (0); + } + if (len == 0 || len > zp->z_size - off) + len = zp->z_size - off; + + /* Flush any mmap()'d data to disk */ + if (zn_has_cached_data(zp, off, off + len - 1)) + zn_flush_cached_data(zp, B_TRUE); + + zfs_locked_range_t *lr; + lr = zfs_rangelock_enter(&zp->z_rangelock, off, len, RL_WRITER); + + const uint64_t uid = KUID_TO_SUID(ZTOUID(zp)); + const uint64_t gid = KGID_TO_SGID(ZTOGID(zp)); + const uint64_t projid = zp->z_projid; + + dmu_buf_impl_t *db = (dmu_buf_impl_t *)sa_get_db(zp->z_sa_hdl); + DB_DNODE_ENTER(db); + dnode_t *dn = DB_DNODE(db); + + uint64_t n, noff = off, nr = 0, nw = 0; + while (len > 0) { + /* + * Rewrite only actual data, skipping any holes. This might + * be inaccurate for dirty files, but we don't really care. + */ + if (noff == off) { + /* Find next data in the file. */ + error = dnode_next_offset(dn, 0, &noff, 1, 1, 0); + if (error || noff >= off + len) { + if (error == ESRCH) /* No more data. */ + error = 0; + break; + } + ASSERT3U(noff, >=, off); + len -= noff - off; + off = noff; + + /* Find where the data end. */ + error = dnode_next_offset(dn, DNODE_FIND_HOLE, &noff, + 1, 1, 0); + if (error != 0) + noff = off + len; + } + ASSERT3U(noff, >, off); + + if (zfs_id_overblockquota(zfsvfs, DMU_USERUSED_OBJECT, uid) || + zfs_id_overblockquota(zfsvfs, DMU_GROUPUSED_OBJECT, gid) || + (projid != ZFS_DEFAULT_PROJID && + zfs_id_overblockquota(zfsvfs, DMU_PROJECTUSED_OBJECT, + projid))) { + error = SET_ERROR(EDQUOT); + break; + } + + n = MIN(MIN(len, noff - off), + DMU_MAX_ACCESS / 2 - P2PHASE(off, zp->z_blksz)); + + dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os); + dmu_tx_hold_write_by_dnode(tx, dn, off, n); + error = dmu_tx_assign(tx, DMU_TX_WAIT); + if (error) { + dmu_tx_abort(tx); + break; + } + + /* Mark all dbufs within range as dirty to trigger rewrite. */ + dmu_buf_t **dbp; + int numbufs; + error = dmu_buf_hold_array_by_dnode(dn, off, n, TRUE, FTAG, + &numbufs, &dbp, DMU_READ_PREFETCH); + if (error) { + dmu_tx_commit(tx); + break; + } + for (int i = 0; i < numbufs; i++) { + nr += dbp[i]->db_size; + if (dmu_buf_is_dirty(dbp[i], tx)) + continue; + nw += dbp[i]->db_size; + dmu_buf_will_dirty(dbp[i], tx); + } + dmu_buf_rele_array(dbp, numbufs, FTAG); + + dmu_tx_commit(tx); + + len -= n; + off += n; + + if (issig()) { + error = SET_ERROR(EINTR); + break; + } + } + + DB_DNODE_EXIT(db); + + dataset_kstats_update_read_kstats(&zfsvfs->z_kstat, nr); + dataset_kstats_update_write_kstats(&zfsvfs->z_kstat, nw); + + zfs_rangelock_exit(lr); + zfs_exit(zfsvfs, FTAG); + return (error); +} + int zfs_getsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr) { @@ -1657,7 +1809,8 @@ dmu_tx_hold_sa(tx, outzp->z_sa_hdl, B_FALSE); db = (dmu_buf_impl_t *)sa_get_db(outzp->z_sa_hdl); DB_DNODE_ENTER(db); - dmu_tx_hold_clone_by_dnode(tx, DB_DNODE(db), outoff, size); + dmu_tx_hold_clone_by_dnode(tx, DB_DNODE(db), outoff, size, + inblksz); DB_DNODE_EXIT(db); zfs_sa_upgrade_txholds(tx, outzp); error = dmu_tx_assign(tx, DMU_TX_WAIT); @@ -1677,11 +1830,11 @@ /* * Block growth may fail for many reasons we can not - * predict here. If it happen the cloning is doomed. + * predict here. If it happens, the cloning is doomed. */ if (inblksz != outzp->z_blksz) { error = SET_ERROR(EINVAL); - dmu_tx_abort(tx); + dmu_tx_commit(tx); break; } @@ -1824,7 +1977,7 @@ dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_FALSE); db = (dmu_buf_impl_t *)sa_get_db(zp->z_sa_hdl); DB_DNODE_ENTER(db); - dmu_tx_hold_clone_by_dnode(tx, DB_DNODE(db), off, len); + dmu_tx_hold_clone_by_dnode(tx, DB_DNODE(db), off, len, blksz); DB_DNODE_EXIT(db); zfs_sa_upgrade_txholds(tx, zp); error = dmu_tx_assign(tx, DMU_TX_WAIT); @@ -1837,7 +1990,19 @@ if (zp->z_blksz < blksz) zfs_grow_blocksize(zp, blksz, tx); - dmu_brt_clone(zfsvfs->z_os, zp->z_id, off, len, tx, bps, nbps); + if (blksz != zp->z_blksz) { + error = SET_ERROR(EINVAL); + dmu_tx_commit(tx); + zfs_exit(zfsvfs, FTAG); + return (error); + } + + error = dmu_brt_clone(zfsvfs->z_os, zp->z_id, off, len, tx, bps, nbps); + if (error != 0) { + dmu_tx_commit(tx); + zfs_exit(zfsvfs, FTAG); + return (error); + } zfs_tstamp_update_setup(zp, CONTENT_MODIFIED, mtime, ctime); diff -Nru zfs-linux-2.3.2/module/zfs/zil.c zfs-linux-2.3.9/module/zfs/zil.c --- zfs-linux-2.3.2/module/zfs/zil.c 2025-05-01 18:45:25.951134932 +0000 +++ zfs-linux-2.3.9/module/zfs/zil.c 2026-08-21 21:15:51.069495952 +0000 @@ -493,7 +493,7 @@ for (blk = zh->zh_log; !BP_IS_HOLE(&blk); blk = next_blk) { uint64_t blk_seq = blk.blk_cksum.zc_word[ZIL_ZC_SEQ]; int reclen; - char *lrp, *end; + char *lrp = NULL, *end = NULL; arc_buf_t *abuf = NULL; if (blk_seq > claim_blk_seq) @@ -957,7 +957,7 @@ dmu_objset_type(zilog->zl_os) != DMU_OST_ZVOL && !dsl_dataset_feature_is_active(ds, SPA_FEATURE_ZILSAXATTR)) { tx = dmu_tx_create(zilog->zl_os); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); dsl_dataset_dirty(ds, tx); txg = dmu_tx_get_txg(tx); @@ -1003,7 +1003,7 @@ */ if (BP_IS_HOLE(&blk) || BP_SHOULD_BYTESWAP(&blk)) { tx = dmu_tx_create(zilog->zl_os); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); txg = dmu_tx_get_txg(tx); @@ -1089,11 +1089,11 @@ zilog->zl_old_header = *zh; /* debugging aid */ - if (BP_IS_HOLE(&zh->zh_log)) + if (BP_IS_HOLE(&zh->zh_log) && zh->zh_flags == 0) return (B_FALSE); tx = dmu_tx_create(zilog->zl_os); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT)); + VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_SUSPEND)); dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); txg = dmu_tx_get_txg(tx); @@ -1159,6 +1159,15 @@ zilog = dmu_objset_zil(os); zh = zil_header_in_syncing_context(zilog); ASSERT3U(tx->tx_txg, ==, spa_first_txg(zilog->zl_spa)); + + /* + * If the log is empty, then there is nothing to do here. + */ + if (BP_IS_HOLE(&zh->zh_log)) { + dmu_objset_disown(os, B_FALSE, FTAG); + return (0); + } + first_txg = spa_min_claim_txg(zilog->zl_spa); /* @@ -1191,11 +1200,14 @@ if (spa_get_log_state(zilog->zl_spa) == SPA_LOG_CLEAR || (zilog->zl_spa->spa_uberblock.ub_checkpoint_txg != 0 && zh->zh_claim_txg == 0)) { - if (!BP_IS_HOLE(&zh->zh_log)) { + if (zilog->zl_spa->spa_uberblock.ub_checkpoint_txg != 0 && + BP_GET_BIRTH(&zh->zh_log) < first_txg) { (void) zil_parse(zilog, zil_clear_log_block, zil_noop_log_record, tx, first_txg, B_FALSE); + } else { + zio_free(zilog->zl_spa, first_txg, &zh->zh_log); } - BP_ZERO(&zh->zh_log); + memset(zh, 0, sizeof (zil_header_t)); if (os->os_encrypted) os->os_next_write_raw[tx->tx_txg & TXG_MASK] = B_TRUE; dsl_dataset_dirty(dmu_objset_ds(os), tx); @@ -1217,7 +1229,7 @@ * or destroy beyond the last block we successfully claimed. */ ASSERT3U(zh->zh_claim_txg, <=, first_txg); - if (zh->zh_claim_txg == 0 && !BP_IS_HOLE(&zh->zh_log)) { + if (zh->zh_claim_txg == 0) { (void) zil_parse(zilog, zil_claim_log_block, zil_claim_log_record, tx, first_txg, B_FALSE); zh->zh_claim_txg = first_txg; @@ -1691,7 +1703,7 @@ * If the previous lwb's write hasn't already completed, we also want * to order the completion of the lwb write zios (above, we only order * the completion of the lwb root zios). This is required because of - * how we can defer the flush commands for each lwb. + * how we can defer the flush commands for any lwb without waiters. * * When the flush commands are deferred, the previous lwb will rely on * this lwb to flush the vdevs written to by that previous lwb. Thus, @@ -1708,7 +1720,10 @@ */ if (prev_lwb->lwb_state == LWB_STATE_ISSUED) { ASSERT3P(prev_lwb->lwb_write_zio, !=, NULL); - zio_add_child(lwb->lwb_write_zio, prev_lwb->lwb_write_zio); + if (list_is_empty(&prev_lwb->lwb_waiters)) { + zio_add_child(lwb->lwb_write_zio, + prev_lwb->lwb_write_zio); + } } else { ASSERT3S(prev_lwb->lwb_state, ==, LWB_STATE_WRITE_DONE); } @@ -1977,7 +1992,8 @@ * Open transaction to allocate the next block pointer. */ dmu_tx_t *tx = dmu_tx_create(zilog->zl_os); - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_NOTHROTTLE)); + VERIFY0(dmu_tx_assign(tx, + DMU_TX_WAIT | DMU_TX_NOTHROTTLE | DMU_TX_SUSPEND)); dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); uint64_t txg = dmu_tx_get_txg(tx); @@ -2898,19 +2914,14 @@ ASSERT(MUTEX_HELD(&zilog->zl_issuer_lock)); - /* - * Return if there's nothing to commit before we dirty the fs by - * calling zil_create(). - */ - if (list_is_empty(&zilog->zl_itx_commit_list)) - return; - - list_create(&nolwb_itxs, sizeof (itx_t), offsetof(itx_t, itx_node)); - list_create(&nolwb_waiters, sizeof (zil_commit_waiter_t), - offsetof(zil_commit_waiter_t, zcw_node)); - lwb = list_tail(&zilog->zl_lwb_list); if (lwb == NULL) { + /* + * Return if there's nothing to commit before we dirty the fs. + */ + if (list_is_empty(&zilog->zl_itx_commit_list)) + return; + lwb = zil_create(zilog); } else { /* @@ -2938,6 +2949,10 @@ } } + list_create(&nolwb_itxs, sizeof (itx_t), offsetof(itx_t, itx_node)); + list_create(&nolwb_waiters, sizeof (zil_commit_waiter_t), + offsetof(zil_commit_waiter_t, zcw_node)); + while ((itx = list_remove_head(&zilog->zl_itx_commit_list)) != NULL) { lr_t *lrc = &itx->itx_lr; uint64_t txg = lrc->lrc_txg; @@ -3107,7 +3122,8 @@ * possible, without significantly impacting the latency * of each individual itx. */ - if (lwb->lwb_state == LWB_STATE_OPENED && !zilog->zl_parallel) { + if (lwb->lwb_state == LWB_STATE_OPENED && + (!zilog->zl_parallel || zilog->zl_suspend > 0)) { zil_burst_done(zilog); list_insert_tail(ilwbs, lwb); lwb = zil_lwb_write_close(zilog, lwb, LWB_STATE_NEW); @@ -3456,7 +3472,8 @@ * should not be subject to the dirty data based delays. We * use DMU_TX_NOTHROTTLE to bypass the delay mechanism. */ - VERIFY0(dmu_tx_assign(tx, DMU_TX_WAIT | DMU_TX_NOTHROTTLE)); + VERIFY0(dmu_tx_assign(tx, + DMU_TX_WAIT | DMU_TX_NOTHROTTLE | DMU_TX_SUSPEND)); itx_t *itx = zil_itx_create(TX_COMMIT, sizeof (lr_t)); itx->itx_sync = B_TRUE; diff -Nru zfs-linux-2.3.2/module/zfs/zio.c zfs-linux-2.3.9/module/zfs/zio.c --- zfs-linux-2.3.2/module/zfs/zio.c 2025-05-01 18:45:25.955135009 +0000 +++ zfs-linux-2.3.9/module/zfs/zio.c 2026-08-21 21:15:51.074495892 +0000 @@ -1415,8 +1415,8 @@ } void -zio_write_override(zio_t *zio, blkptr_t *bp, int copies, boolean_t nopwrite, - boolean_t brtwrite) +zio_write_override(zio_t *zio, blkptr_t *bp, int copies, int gang_copies, + boolean_t nopwrite, boolean_t brtwrite) { ASSERT(zio->io_type == ZIO_TYPE_WRITE); ASSERT(zio->io_child_type == ZIO_CHILD_LOGICAL); @@ -1433,6 +1433,7 @@ zio->io_prop.zp_nopwrite = nopwrite; zio->io_prop.zp_brtwrite = brtwrite; zio->io_prop.zp_copies = copies; + zio->io_prop.zp_gang_copies = gang_copies; zio->io_bp_override = bp; } @@ -1687,9 +1688,11 @@ /* * If we've decided to do a repair, the write is not speculative -- - * even if the original read was. + * even if the original read was. Rebuild is an exception since we + * cannot always ensure its data integrity. */ - if (flags & ZIO_FLAG_IO_REPAIR) + if ((flags & ZIO_FLAG_IO_REPAIR) && + pio->io_priority != ZIO_PRIORITY_REBUILD) flags &= ~ZIO_FLAG_SPECULATIVE; /* @@ -1753,6 +1756,15 @@ return; if (vd->vdev_children == 0) { + /* + * A non-concrete vdev (a hole or indirect vdev left behind + * by removing a log or data device) has no leaf device to + * flush. Skip it; issuing a flush to an indirect vdev would + * trip the ZIO_TYPE_WRITE assertion in + * vdev_indirect_io_start(). + */ + if (!vdev_is_concrete(vd)) + return; zio_nowait(zio_create(pio, vd->vdev_spa, 0, NULL, NULL, 0, 0, NULL, NULL, ZIO_TYPE_FLUSH, ZIO_PRIORITY_NOW, flags, vd, 0, NULL, ZIO_STAGE_OPEN, ZIO_FLUSH_PIPELINE)); @@ -2006,8 +2018,7 @@ compress = ZIO_COMPRESS_OFF; if (cabd != NULL) abd_free(cabd); - } else if (!zp->zp_dedup && !zp->zp_encrypt && - psize <= BPE_PAYLOAD_SIZE && + } else if (psize <= BPE_PAYLOAD_SIZE && !zp->zp_encrypt && zp->zp_level == 0 && !DMU_OT_HAS_FILL(zp->zp_type) && spa_feature_is_enabled(spa, SPA_FEATURE_EMBEDDED_DATA)) { void *cbuf = abd_borrow_buf_copy(cabd, lsize); @@ -2303,12 +2314,12 @@ zio_t *cio, *cio_next; zio_link_t *zl = NULL; vdev_t *vd = pio->io_vd; + uint64_t failmode = spa_get_deadman_failmode(pio->io_spa); if (zio_deadman_log_all || (vd != NULL && vd->vdev_ops->vdev_op_leaf)) { vdev_queue_t *vq = vd ? &vd->vdev_queue : NULL; zbookmark_phys_t *zb = &pio->io_bookmark; uint64_t delta = gethrtime() - pio->io_timestamp; - uint64_t failmode = spa_get_deadman_failmode(pio->io_spa); zfs_dbgmsg("slow zio[%d]: zio=%px timestamp=%llu " "delta=%llu queued=%llu io=%llu " @@ -2332,11 +2343,15 @@ pio->io_error); (void) zfs_ereport_post(FM_EREPORT_ZFS_DEADMAN, pio->io_spa, vd, zb, pio, 0); + } - if (failmode == ZIO_FAILURE_MODE_CONTINUE && - taskq_empty_ent(&pio->io_tqent)) { - zio_interrupt(pio); - } + if (vd != NULL && vd->vdev_ops->vdev_op_leaf && + list_is_empty(&pio->io_child_list) && + failmode == ZIO_FAILURE_MODE_CONTINUE && + taskq_empty_ent(&pio->io_tqent) && + pio->io_queue_state == ZIO_QS_ACTIVE) { + pio->io_error = EINTR; + zio_interrupt(pio); } mutex_enter(&pio->io_lock); @@ -2710,6 +2725,8 @@ } mutex_exit(&spa->spa_suspend_lock); + + txg_wait_kick(spa->spa_dsl_pool); } int @@ -3141,15 +3158,13 @@ boolean_t has_data = !(pio->io_flags & ZIO_FLAG_NODATA); /* - * If one copy was requested, store 2 copies of the GBH, so that we - * can still traverse all the data (e.g. to free or scrub) even if a - * block is damaged. Note that we can't store 3 copies of the GBH in - * all cases, e.g. with encryption, which uses DVA[2] for the IV+salt. - */ - int gbh_copies = copies; - if (gbh_copies == 1) { - gbh_copies = MIN(2, spa_max_replication(spa)); - } + * Store multiple copies of the GBH, so that we can still traverse + * all the data (e.g. to free or scrub) even if a block is damaged. + * This value respects the redundant_metadata property. + */ + int gbh_copies = gio->io_prop.zp_gang_copies; + ASSERT3S(gbh_copies, >, 0); + ASSERT3S(gbh_copies, <=, SPA_DVAS_PER_BP); ASSERT(ZIO_HAS_ALLOCATOR(pio)); int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER; @@ -3169,6 +3184,7 @@ * since metaslab_class_throttle_reserve() always allows * additional reservations for gang blocks. */ + ASSERT3U(gbh_copies, >=, copies); VERIFY(metaslab_class_throttle_reserve(mc, gbh_copies - copies, pio->io_allocator, pio, flags)); } @@ -3231,6 +3247,7 @@ zp.zp_type = zp.zp_storage_type = DMU_OT_NONE; zp.zp_level = 0; zp.zp_copies = gio->io_prop.zp_copies; + zp.zp_gang_copies = gio->io_prop.zp_gang_copies; zp.zp_dedup = B_FALSE; zp.zp_dedup_verify = B_FALSE; zp.zp_nopwrite = B_FALSE; @@ -3951,7 +3968,7 @@ * grow the DDT entry by to satisfy the request. */ zio_prop_t czp = *zp; - czp.zp_copies = need_dvas; + czp.zp_copies = czp.zp_gang_copies = need_dvas; zio_t *cio = zio_write(zio, spa, txg, bp, zio->io_orig_abd, zio->io_orig_size, zio->io_orig_size, &czp, zio_ddt_child_write_ready, NULL, @@ -4006,17 +4023,35 @@ ddt_phys_variant_t v = ddt_phys_select(ddt, dde, bp); if (v != DDT_PHYS_NONE) ddt_phys_decref(dde->dde_phys, v); + else + /* + * If the entry was found but the phys was not, then + * this block must have been pruned from the dedup + * table, and the entry refers to a later version of + * this data. Therefore, the caller is trying to delete + * the only stored instance of this block, and so we + * need to do a normal (not dedup) free. Clear dde so + * we fall into the block below. + */ + dde = NULL; } ddt_exit(ddt); - /* - * When no entry was found, it must have been pruned, - * so we can free it now instead of decrementing the - * refcount in the DDT. - */ - if (!dde) { + if (dde) { + /* + * DDT entry found and the refcount has been decremented. + * Stop the pipeline — there is nothing more to do right now. + */ + zio->io_pipeline = ZIO_INTERLOCK_PIPELINE; + } else { + /* + * No DDT entry; the block must have been pruned from the + * table. Clear the DEDUP bit so it is treated as a normal + * block from here on. BRT_FREE and DVA_FREE follow in the + * pipeline and will handle any cloned references and the + * actual block free respectively. + */ BP_SET_DEDUP(bp, 0); - zio->io_pipeline |= ZIO_STAGE_DVA_FREE; } return (zio); @@ -5072,16 +5107,18 @@ */ zio->io_error = SET_ERROR(EIO); /* - * Report dio_verify_wr ZED event. + * Report dio_verify_wr ZED event, rate limited. */ - (void) zfs_ereport_post(FM_EREPORT_ZFS_DIO_VERIFY_WR, - zio->io_spa, zio->io_vd, &zio->io_bookmark, zio, 0); + if (zfs_ratelimit(&zio->io_vd->vdev_dio_verify_rl)) + (void) zfs_ereport_post(FM_EREPORT_ZFS_DIO_VERIFY_WR, + zio->io_spa, zio->io_vd, &zio->io_bookmark, zio, 0); } else { /* - * Report dio_verify_rd ZED event. + * Report dio_verify_rd ZED event, rate limited. */ - (void) zfs_ereport_post(FM_EREPORT_ZFS_DIO_VERIFY_RD, - zio->io_spa, zio->io_vd, &zio->io_bookmark, zio, 0); + if (zfs_ratelimit(&zio->io_vd->vdev_dio_verify_rl)) + (void) zfs_ereport_post(FM_EREPORT_ZFS_DIO_VERIFY_RD, + zio->io_spa, zio->io_vd, &zio->io_bookmark, zio, 0); } } @@ -5646,11 +5683,11 @@ zio_encrypt, zio_checksum_generate, zio_nop_write, - zio_brt_free, zio_ddt_read_start, zio_ddt_read_done, zio_ddt_write, zio_ddt_free, + zio_brt_free, zio_gang_assemble, zio_gang_issue, zio_dva_throttle, @@ -5710,6 +5747,67 @@ zb1->zb_blkid == zb2->zb_blkid) return (0); + if (zb1->zb_level < 0 || zb2->zb_level < 0) { + /* + * "Negative" levels are ZB_ROOT_LEVEL, ZB_ZIL_LEVEL or + * ZB_DNODE_LEVEL, and represent some sort of auxiliary dataset + * block or object. In this case, we're usually being called + * from dsl_scan or dmu_traverse. + * + * These "levels" are more like a "type" signal, not directly + * comparable, but we have to do something. So we order them in + * the order we would see them during a typical scan or + * traverse: + * + * - ZB_ROOT_LEVEL: the "top" block carrying the dataset head + * - ZB_ZIL_LEVEL: the head ZIL block attached to the dataset + * - ZB_DNODE_LEVEL: "virtual" position representing an + * entire object. Sorts ahead of the true + * data blocks for the object. + * - level >= 0: data blocks + * + * We work through these cases from top to bottom, with + * appropriate tiebreaks for each kind. + */ + + /* + * Root level wins. It shouldn't be possible for both to be the + * root level in this per-dataset tree, and there's no obvious + * tiebreaker, but we handle it as a defensive measure. + */ + if (zb1->zb_level == ZB_ROOT_LEVEL && + zb2->zb_level == ZB_ROOT_LEVEL) + return (TREE_PCMP(zb1, zb2)); + if (zb1->zb_level == ZB_ROOT_LEVEL) + return (-1); + if (zb2->zb_level == ZB_ROOT_LEVEL) + return (1); + + /* ZIL bookmarks have valid blkid, so the earlier one wins. */ + if (zb1->zb_level == ZB_ZIL_LEVEL && + zb2->zb_level == ZB_ZIL_LEVEL) + return (TREE_CMP(zb1->zb_blkid, zb2->zb_blkid)); + if (zb1->zb_level == ZB_ZIL_LEVEL) + return (-1); + if (zb2->zb_level == ZB_ZIL_LEVEL) + return (1); + + /* + * If we get this far, then at least one is ZB_DNODE_LEVEL, and + * the other is either ZB_DNODE_LEVEL or a data block. + * Regardless, the one with the lower-numbered object wins - + * earler ZB_DNODE_LEVEL beats later, but data block on earlier + * objects beats the virtual marker on later objects. + */ + int cmp = TREE_CMP(zb1->zb_object, zb2->zb_object); + if (cmp != 0) + return (cmp); + + if (zb1->zb_level == ZB_DNODE_LEVEL) + return (-1); + return (1); + } + IMPLY(zb1->zb_level > 0, ibs1 >= SPA_MINBLOCKSHIFT); IMPLY(zb2->zb_level > 0, ibs2 >= SPA_MINBLOCKSHIFT); diff -Nru zfs-linux-2.3.2/module/zfs/zio_compress.c zfs-linux-2.3.9/module/zfs/zio_compress.c --- zfs-linux-2.3.2/module/zfs/zio_compress.c 2025-05-01 18:45:25.962135145 +0000 +++ zfs-linux-2.3.9/module/zfs/zio_compress.c 2026-08-21 21:15:51.079495833 +0000 @@ -128,7 +128,7 @@ uint8_t complevel; zio_compress_info_t *ci = &zio_compress_table[c]; - ASSERT3U(ci->ci_compress, !=, NULL); + ASSERT3P(ci->ci_compress, !=, NULL); ASSERT3U(s_len, >, 0); complevel = ci->ci_level; diff -Nru zfs-linux-2.3.2/module/zfs/zvol.c zfs-linux-2.3.9/module/zfs/zvol.c --- zfs-linux-2.3.2/module/zfs/zvol.c 2025-05-01 18:45:25.978135454 +0000 +++ zfs-linux-2.3.9/module/zfs/zvol.c 2026-08-21 21:15:51.107495501 +0000 @@ -556,7 +556,7 @@ if (error != 0 || !zv->zv_dn) return (error); tx = dmu_tx_create(os); - dmu_tx_hold_clone_by_dnode(tx, zv->zv_dn, off, len); + dmu_tx_hold_clone_by_dnode(tx, zv->zv_dn, off, len, blksz); error = dmu_tx_assign(tx, DMU_TX_WAIT); if (error != 0) { dmu_tx_abort(tx); @@ -625,10 +625,26 @@ error = EXDEV; goto out; } + + /* + * Block cloning from an unencrypted dataset into an encrypted + * dataset and vice versa is not supported. + */ if (inos->os_encrypted != outos->os_encrypted) { error = EXDEV; goto out; } + + /* + * Cloning across encrypted datasets is possible only if they + * share the same master key. + */ + if (inos != outos && inos->os_encrypted && + !dmu_objset_crypto_key_equal(inos, outos)) { + error = SET_ERROR(EXDEV); + goto out; + } + if (zv_src->zv_volblocksize != zv_dst->zv_volblocksize) { error = EINVAL; goto out; @@ -721,7 +737,8 @@ } tx = dmu_tx_create(zv_dst->zv_objset); - dmu_tx_hold_clone_by_dnode(tx, zv_dst->zv_dn, outoff, size); + dmu_tx_hold_clone_by_dnode(tx, zv_dst->zv_dn, outoff, size, + zv_src->zv_volblocksize); error = dmu_tx_assign(tx, DMU_TX_WAIT); if (error != 0) { dmu_tx_abort(tx); @@ -851,7 +868,7 @@ uint32_t blocksize = zv->zv_volblocksize; zilog_t *zilog = zv->zv_zilog; itx_wr_state_t write_state; - uint64_t sz = size; + uint64_t log_size = 0; if (zil_replaying(zilog, tx)) return; @@ -888,6 +905,10 @@ wr_state = WR_NEED_COPY; } + log_size += itx->itx_size; + if (wr_state == WR_NEED_COPY) + log_size += len; + itx->itx_wr_state = wr_state; lr->lr_foid = ZVOL_OBJ; lr->lr_offset = offset; @@ -903,9 +924,7 @@ size -= len; } - if (write_state == WR_COPIED || write_state == WR_NEED_COPY) { - dsl_pool_wrlog_count(zilog->zl_dmu_pool, sz, tx->tx_txg); - } + dsl_pool_wrlog_count(zilog->zl_dmu_pool, log_size, tx->tx_txg); } /* diff -Nru zfs-linux-2.3.2/module/zstd/include/aarch64_compat.h zfs-linux-2.3.9/module/zstd/include/aarch64_compat.h --- zfs-linux-2.3.2/module/zstd/include/aarch64_compat.h 2025-05-01 18:45:25.982135532 +0000 +++ zfs-linux-2.3.9/module/zstd/include/aarch64_compat.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -/* - * BSD 3-Clause New License (https://spdx.org/licenses/BSD-3-Clause.html) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Copyright (c) 2018-2020, Sebastian Gottschall - */ - -#ifdef _KERNEL -#undef __aarch64__ -#endif diff -Nru zfs-linux-2.3.2/module/zstd/lib/common/compiler.h zfs-linux-2.3.9/module/zstd/lib/common/compiler.h --- zfs-linux-2.3.2/module/zstd/lib/common/compiler.h 2025-05-01 18:45:26.015136170 +0000 +++ zfs-linux-2.3.9/module/zstd/lib/common/compiler.h 2026-08-21 21:15:51.207494314 +0000 @@ -115,9 +115,6 @@ # include /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */ # define PREFETCH_L1(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0) # define PREFETCH_L2(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T1) -# elif defined(__aarch64__) -# define PREFETCH_L1(ptr) __asm__ __volatile__("prfm pldl1keep, %0" ::"Q"(*(ptr))) -# define PREFETCH_L2(ptr) __asm__ __volatile__("prfm pldl2keep, %0" ::"Q"(*(ptr))) # elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) ) # define PREFETCH_L1(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */) # define PREFETCH_L2(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 2 /* locality */) diff -Nru zfs-linux-2.3.2/module/zstd/lib/common/zstd_internal.h zfs-linux-2.3.9/module/zstd/lib/common/zstd_internal.h --- zfs-linux-2.3.2/module/zstd/lib/common/zstd_internal.h 2025-05-01 18:45:26.071137253 +0000 +++ zfs-linux-2.3.9/module/zstd/lib/common/zstd_internal.h 2026-08-21 21:15:51.246493852 +0000 @@ -12,6 +12,15 @@ #ifndef ZSTD_CCOMMON_H_MODULE #define ZSTD_CCOMMON_H_MODULE +/* + * Disable the aarch64 NEON SIMD intrinsics for kernel builds. Safely + * using them in the kernel context requires saving/restoring the FPU + * registers which is not currently done. + */ +#ifdef _KERNEL +#define ZSTD_NO_INTRINSICS +#endif + /* this module contains definitions which must be identical * across compression, decompression and dictBuilder. * It also contains a few functions useful to at least 2 of them diff -Nru zfs-linux-2.3.2/module/zstd/zfs_zstd.c zfs-linux-2.3.9/module/zstd/zfs_zstd.c --- zfs-linux-2.3.2/module/zstd/zfs_zstd.c 2025-05-01 18:45:26.179139341 +0000 +++ zfs-linux-2.3.9/module/zstd/zfs_zstd.c 2026-08-21 21:15:51.323492938 +0000 @@ -669,6 +669,15 @@ return (1); } + /* + * An OpenZFS compressed block must expand to exactly d_len bytes. + * ZSTD_decompressDCtx returns the decompressed size on success. + */ + if (result != d_len) { + ZSTDSTAT_BUMP(zstd_stat_dec_fail); + return (1); + } + if (level) { *level = curlevel; } @@ -796,9 +805,9 @@ zstd_mempool_init(void) { zstd_mempool_cctx = - kmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP); + vmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP); zstd_mempool_dctx = - kmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP); + vmem_zalloc(ZSTD_POOL_MAX * sizeof (struct zstd_pool), KM_SLEEP); for (int i = 0; i < ZSTD_POOL_MAX; i++) { mutex_init(&zstd_mempool_cctx[i].barrier, NULL, @@ -844,8 +853,8 @@ release_pool(&zstd_mempool_dctx[i]); } - kmem_free(zstd_mempool_dctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool)); - kmem_free(zstd_mempool_cctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool)); + vmem_free(zstd_mempool_dctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool)); + vmem_free(zstd_mempool_cctx, ZSTD_POOL_MAX * sizeof (struct zstd_pool)); zstd_mempool_dctx = NULL; zstd_mempool_cctx = NULL; } diff -Nru zfs-linux-2.3.2/rpm/Makefile.am zfs-linux-2.3.9/rpm/Makefile.am --- zfs-linux-2.3.2/rpm/Makefile.am 2025-05-01 18:23:23.838216211 +0000 +++ zfs-linux-2.3.9/rpm/Makefile.am 2026-08-21 20:57:12.392926009 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 dist_noinst_DATA += \ %D%/generic/zfs-dkms.spec.in \ %D%/generic/zfs-kmod.spec.in \ diff -Nru zfs-linux-2.3.2/rpm/generic/zfs.spec.in zfs-linux-2.3.9/rpm/generic/zfs.spec.in --- zfs-linux-2.3.2/rpm/generic/zfs.spec.in 2025-05-01 18:23:23.838216211 +0000 +++ zfs-linux-2.3.9/rpm/generic/zfs.spec.in 2026-08-21 20:57:12.393008867 +0000 @@ -87,7 +87,19 @@ %define __python %{__use_python} %define __python_pkg_version %{__use_python_pkg_version} %endif -%define __python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())" 2>/dev/null || %{__python} -Esc "import sysconfig; print(sysconfig.get_path('purelib'))") +%define __python_sitelib %(%{__python} -Esc " +import sysconfig; +if hasattr(sysconfig, 'get_default_scheme'): + scheme = sysconfig.get_default_scheme() +else: + scheme = sysconfig._get_default_scheme() +if scheme == 'posix_local': + scheme = 'posix_prefix' +prefix = '%{_prefix}' +if prefix == 'NONE': + prefix = '%{ac_default_prefix}' +sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix}) +print(sitedir);" 2>/dev/null || %{__python} -Esc "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0))") Name: @PACKAGE@ Version: @VERSION@ @@ -275,7 +287,7 @@ %package dracut Summary: Dracut module Group: System Environment/Kernel -BuildArch: noarch +BuildArch: noarch Requires: %{name} >= %{version} Requires: dracut Requires: /usr/bin/awk @@ -376,7 +388,7 @@ %if 0%{?_systemd} %define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --with-systemdmodulesloaddir=%{_modulesloaddir} --with-systemdgeneratordir=%{_systemdgeneratordir} --disable-sysvinit - %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target + %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-mount@.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target %else %define systemd --enable-sysvinit --disable-systemd %endif @@ -494,7 +506,6 @@ # Core utilities %{_sbindir}/* %{_bindir}/raidz_test -%{_sbindir}/zgenhostid %{_bindir}/zvol_wait # Optional Python 3 scripts %{_bindir}/arc_summary @@ -532,7 +543,6 @@ %config(noreplace) %{_sysconfdir}/%{name}/zed.d/* %config(noreplace) %{_sysconfdir}/%{name}/zpool.d/* %config(noreplace) %{_sysconfdir}/%{name}/vdev_id.conf.*.example -%attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/* %config(noreplace) %{_bashcompletiondir}/zfs %config(noreplace) %{_bashcompletiondir}/zpool diff -Nru zfs-linux-2.3.2/rpm/redhat/zfs.spec.in zfs-linux-2.3.9/rpm/redhat/zfs.spec.in --- zfs-linux-2.3.2/rpm/redhat/zfs.spec.in 2025-05-01 18:23:23.838216211 +0000 +++ zfs-linux-2.3.9/rpm/redhat/zfs.spec.in 2026-08-21 20:57:12.393008867 +0000 @@ -87,7 +87,19 @@ %define __python %{__use_python} %define __python_pkg_version %{__use_python_pkg_version} %endif -%define __python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())" 2>/dev/null || %{__python} -Esc "import sysconfig; print(sysconfig.get_path('purelib'))") +%define __python_sitelib %(%{__python} -Esc " +import sysconfig; +if hasattr(sysconfig, 'get_default_scheme'): + scheme = sysconfig.get_default_scheme() +else: + scheme = sysconfig._get_default_scheme() +if scheme == 'posix_local': + scheme = 'posix_prefix' +prefix = '%{_prefix}' +if prefix == 'NONE': + prefix = '%{ac_default_prefix}' +sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix}) +print(sitedir);" 2>/dev/null || %{__python} -Esc "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0))") Name: @PACKAGE@ Version: @VERSION@ @@ -275,7 +287,7 @@ %package dracut Summary: Dracut module Group: System Environment/Kernel -BuildArch: noarch +BuildArch: noarch Requires: %{name} >= %{version} Requires: dracut Requires: /usr/bin/awk @@ -376,7 +388,7 @@ %if 0%{?_systemd} %define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --with-systemdmodulesloaddir=%{_modulesloaddir} --with-systemdgeneratordir=%{_systemdgeneratordir} --disable-sysvinit - %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target + %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-mount@.service zfs-share.service zfs-zed.service zfs.target zfs-import.target zfs-volume-wait.service zfs-volumes.target %else %define systemd --enable-sysvinit --disable-systemd %endif @@ -494,7 +506,6 @@ # Core utilities %{_sbindir}/* %{_bindir}/raidz_test -%{_sbindir}/zgenhostid %{_bindir}/zvol_wait # Optional Python 3 scripts %{_bindir}/arc_summary @@ -532,7 +543,6 @@ %config(noreplace) %{_sysconfdir}/%{name}/zed.d/* %config(noreplace) %{_sysconfdir}/%{name}/zpool.d/* %config(noreplace) %{_sysconfdir}/%{name}/vdev_id.conf.*.example -%attr(440, root, root) %config(noreplace) %{_sysconfdir}/sudoers.d/* %config(noreplace) %{_bashcompletiondir}/zfs %config(noreplace) %{_bashcompletiondir}/zpool diff -Nru zfs-linux-2.3.2/scripts/Makefile.am zfs-linux-2.3.9/scripts/Makefile.am --- zfs-linux-2.3.2/scripts/Makefile.am 2025-05-01 18:23:23.839216225 +0000 +++ zfs-linux-2.3.9/scripts/Makefile.am 2026-08-21 20:57:12.393266773 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 scriptsdir = $(datadir)/$(PACKAGE) dist_noinst_SCRIPTS = \ %D%/commitcheck.sh \ diff -Nru zfs-linux-2.3.2/scripts/commitcheck.sh zfs-linux-2.3.9/scripts/commitcheck.sh --- zfs-linux-2.3.2/scripts/commitcheck.sh 2025-05-01 18:23:23.839216225 +0000 +++ zfs-linux-2.3.9/scripts/commitcheck.sh 2026-08-21 20:57:12.393266773 +0000 @@ -7,7 +7,9 @@ test_commit_bodylength() { length="72" - body=$(git log --no-show-signature -n 1 --pretty=%b "$REF" | grep -Ev "http(s)*://" | grep -E -m 1 ".{$((length + 1))}") + body=$(git log --no-show-signature -n 1 --pretty=%b "$REF" | + grep -Evi -e "http(s)*://" -e "signed-off-by:" -e "reviewed-by:" | + grep -E -m 1 ".{$((length + 1))}") if [ -n "$body" ]; then echo "error: commit message body contains line over ${length} characters" return 1 diff -Nru zfs-linux-2.3.2/scripts/cstyle.pl zfs-linux-2.3.9/scripts/cstyle.pl --- zfs-linux-2.3.2/scripts/cstyle.pl 2025-05-01 18:23:23.839216225 +0000 +++ zfs-linux-2.3.9/scripts/cstyle.pl 2026-08-21 20:57:12.393266773 +0000 @@ -97,6 +97,9 @@ my $typename = '(int|char|short|long|unsigned|float|double' . '|\w+_t|struct\s+\w+|union\s+\w+|FILE)'; +# cast or compound-literal type, e.g. "(foo_t *)" +my $cast = qr/\($typename(?: \*+)?\)/; + # mapping of old types to POSIX compatible types my %old2posix = ( 'unchar' => 'uchar_t', @@ -683,12 +686,14 @@ } if ($picky) { # try to detect spaces after casts, but allow (e.g.) - # "sizeof (int) + 1", "void (*funcptr)(int) = foo;", and - # "int foo(int) __NORETURN;" - if ((/^\($typename( \*+)?\)\s/o || - /\W\($typename( \*+)?\)\s/o) && - !/sizeof\s*\($typename( \*)?\)\s/o && - !/\($typename( \*+)?\)\s+=[^=]/o) { + # "sizeof (int) + 1", "void (*funcptr)(int) = foo;", + # "int foo(int) __NORETURN;", and "(foo_t) { ... }" + # + # sizeof (type) is not a cast; remove it so it can't mask + # a real cast elsewhere on the line. + my $tmp = $_; + $tmp =~ s/\bsizeof\s*$cast/sizeof/g; + if ($tmp =~ /(?:^|\W)$cast(?>\s+)(?!\{|=[^=])/) { err("space after cast"); } if (/\b$typename\s*\*\s/o && @@ -801,12 +806,18 @@ my $case = 'case\b[^:]*$'; # skip over enumerations, array definitions, initializers, etc. - if ($cont_off <= 0 && !/^\s*$special/ && - (/(?:(?:\b(?:enum|struct|union)\s*[^\{]*)|(?:\s+=\s*))\{/ || - (/^\s*\{/ && $prev =~ /=\s*(?:\/\*.*\*\/\s*)*$/))) { - $cont_in = 0; - $cont_off = tr/{/{/ - tr/}/}/; - return; + if ($cont_off <= 0 && !/^\s*$special/) { + my $aggregate = /\b(?:enum|struct|union)\s*[^{]*\{/; + my $initializer = /\s+=\s*(?:$cast\s*)?\{/; + # "= {" split across lines, "=" possibly trailed by comments + my $split_init = /^\s*\{/ && + $prev =~ /=\s*(?:$cast\s*)?(?:\/\*.*\*\/\s*)?$/; + + if ($aggregate || $initializer || $split_init) { + $cont_in = 0; + $cont_off = tr/{/{/ - tr/}/}/; + return; + } } if ($cont_off) { $cont_off += tr/{/{/ - tr/}/}/; diff -Nru zfs-linux-2.3.2/scripts/objtool-wrapper.in zfs-linux-2.3.9/scripts/objtool-wrapper.in --- zfs-linux-2.3.2/scripts/objtool-wrapper.in 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/scripts/objtool-wrapper.in 2026-08-21 20:57:12.393266773 +0000 @@ -0,0 +1,36 @@ +#!/bin/sh + +# SPDX-License-Identifier: MIT +# +# Copyright (c) 2025 Attila Fülöp +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# Filter out objtools '--Werror or --werror' flag. + +objtool="@abs_objtool_binary@" +args=$(echo "$*" | sed 's/--Werror\|--werror//') + +if [ -z "$objtool" ]; then + echo "$(basename "$0"): No objtool binary configured" 1>&2 + exit 1; +fi + +# shellcheck disable=SC2086 +exec "$objtool" $args diff -Nru zfs-linux-2.3.2/scripts/update_authors.pl zfs-linux-2.3.9/scripts/update_authors.pl --- zfs-linux-2.3.2/scripts/update_authors.pl 2025-05-01 18:23:23.839216225 +0000 +++ zfs-linux-2.3.9/scripts/update_authors.pl 2026-08-21 20:57:12.393266773 +0000 @@ -59,6 +59,17 @@ # the display version. We use this slug to update two maps, one of email->name, # the other of name->email. # +# Where possible, we also consider Signed-off-by: trailers in the commit +# message, and if they match the commit author, enter them into the maps also. +# Because a commit can contain multiple signoffs, we only track one if either +# the name or the email address match the commit author (by slug). This is +# mostly aimed at letting an explicit signoff override a generated name or +# email on the same commit (usually a Github noreply), while avoiding every +# signoff ever being treated as a possible canonical ident for some other +# committer. (Also note that this behaviour only works for signoffs that can be +# extracted with git-interpret-trailers, which misses many seen in the OpenZFS +# git history, for various reasons). +# # Once collected, we then walk all the emails we've seen and get all the names # associated with every instance. Then for each of those names, we get all the # emails associated, and so on until we've seen all the connected names and @@ -118,31 +129,52 @@ } } -# Next, we load all the commit authors. and form name<->email mappings, keyed -# on slug. Note that this format is getting the .mailmap-converted form. This -# lets us control the input to some extent by making changes there. -my %git_names; -my %git_emails; +# Next, we load all the commit authors and signoff pairs, and form name<->email +# mappings, keyed on slug. Note that this format is getting the +# .mailmap-converted form. This lets us control the input to some extent by +# making changes there. +my %seen_names; +my %seen_emails; + +# The true email address from commits, by slug. We do this so we can generate +# mailmap entries, which will only match the exact address from the commit, +# not anything "prettified". This lets us remember the prefix part of Github +# noreply addresses, while not including it in AUTHORS if that is truly the +# best option we have. +my %commit_email; -for my $line (reverse qx(git log --pretty=tformat:'%aN:::%aE')) { +for my $line (reverse qx(git log --pretty=tformat:'%aN:::%aE:::%(trailers:key=signed-off-by,valueonly,separator=:::)')) { chomp $line; - my ($name, $email) = $line =~ m/^(.*):::(.*)/; + my ($name, $email, @signoffs) = split ':::', $line; next unless $name && $email; my $semail = email_slug($email); my $sname = name_slug($name); - $git_names{$semail}{$sname} = 1; - $git_emails{$sname}{$semail} = 1; - - # Update the "best looking" display value, but only if we don't already - # have something from the AUTHORS file. If we do, we must not change it. - if (!$authors_name{email_slug($email)}) { - update_display_email($email); - } - - if (!$authors_email{name_slug($name)}) { - update_display_name($name); + # Track the committer name and email. + $seen_names{$semail}{$sname} = 1; + $seen_emails{$sname}{$semail} = 1; + + # Keep the original commit address. + $commit_email{$semail} = $email; + + # Consider if these are the best we've ever seen. + update_display_name($name); + update_display_email($email); + + # Check signoffs. any that have a matching name or email as the + # committer (by slug), also track them. + for my $signoff (@signoffs) { + my ($soname, $soemail) = $signoff =~ m/^([^<]+)\s+<(.+)>$/; + next unless $soname && $soemail; + my $ssoname = name_slug($soname); + my $ssoemail = email_slug($soemail); + if (($semail eq $ssoemail) ^ ($sname eq $ssoname)) { + $seen_names{$ssoemail}{$ssoname} = 1; + $seen_emails{$ssoname}{$ssoemail} = 1; + update_display_name($soname); + update_display_email($soemail); + } } } @@ -150,9 +182,9 @@ # We start with emails and resolve all possible names, then we resolve the # emails for those names, and round and round until there's nothing left. my @committers; -for my $start_email (sort keys %git_names) { +for my $start_email (sort keys %seen_names) { # it might have been deleted already through a cross-reference - next unless $git_names{$start_email}; + next unless $seen_names{$start_email}; my %emails; my %names; @@ -163,12 +195,12 @@ while (my $email = shift @check_emails) { next if $emails{$email}++; push @check_names, - sort keys %{delete $git_names{$email}}; + sort keys %{delete $seen_names{$email}}; } while (my $name = shift @check_names) { next if $names{$name}++; push @check_emails, - sort keys %{delete $git_emails{$name}}; + sort keys %{delete $seen_emails{$name}}; } } @@ -190,11 +222,24 @@ $authors_email{$name} = $email; $authors_name{$email} = $name; + + # We've now selected our canonical name going forward. If there + # were other options from commit authors only (not signoffs), + # emit mailmap lines for the user to past into .mailmap + my $cemail = $display_email{email_slug($authors_email{$name})}; + for my $alias (@$emails) { + next if $alias eq $email; + + my $calias = $commit_email{$alias}; + next unless $calias; + + my $cname = $display_name{$name}; + say "$cname <$cemail> <$calias>"; + } } # Now output the new AUTHORS file open my $fh, '>', 'AUTHORS' or die "E: couldn't open AUTHORS for write: $!\n"; -#my $fh = \*STDOUT; say $fh join("\n", @authors_header, ""); for my $name (sort keys %authors_email) { my $cname = $display_name{$name}; @@ -233,9 +278,18 @@ return lc $email; } +# As we accumulate new names and addresses, record the "best looking" version +# of each. Once we decide to add a committer to AUTHORS, we'll take the best +# version of their name and address from here. +# +# Note that we don't record them if they're already in AUTHORS (that is, in +# %authors_name or %authors_email) because that file already contains the +# "best" version, by definition. So we return immediately if we've seen it +# there already. sub update_display_name { my ($name) = @_; my $sname = name_slug($name); + return if $authors_email{$sname}; # For names, "more specific" means "has more non-lower-case characters" # (in ASCII), guessing that if a person has gone to some effort to @@ -252,9 +306,11 @@ sub update_display_email { my ($email) = @_; my $semail = email_slug($email); + return if $authors_name{$semail}; # Like names, we prefer uppercase when possible. We also remove any # leading "plus address" for Github noreply addresses. + $email =~ s/^[^\+]*\+//g if $email =~ m/\.noreply\.github\.com$/; my $cemail = $display_email{$semail}; diff -Nru zfs-linux-2.3.2/scripts/zfs-tests.sh zfs-linux-2.3.9/scripts/zfs-tests.sh --- zfs-linux-2.3.2/scripts/zfs-tests.sh 2025-05-01 18:23:23.840216239 +0000 +++ zfs-linux-2.3.9/scripts/zfs-tests.sh 2026-08-21 20:57:12.393266773 +0000 @@ -38,6 +38,7 @@ CLEANUP="yes" CLEANUPALL="no" KMSG="" +TIMEOUT_DEBUG="" LOOPBACK="yes" STACK_TRACER="no" FILESIZE="4G" @@ -293,6 +294,16 @@ SYSTEM_DIRS="/usr/local/bin /usr/local/sbin" SYSTEM_DIRS="$SYSTEM_DIRS /usr/bin /usr/sbin /bin /sbin $LIBEXEC_DIR" + SYSTEM_FILES="$SYSTEM_FILES_COMMON" + ZFSTEST_FILES="$ZFSTEST_FILES_COMMON" + if [ "$UNAME" = "FreeBSD" ] ; then + SYSTEM_FILES="$SYSTEM_FILES $SYSTEM_FILES_FREEBSD" + ZFSTEST_FILES="$ZFSTEST_FILES $ZFSTEST_FILES_FREEBSD" + else + SYSTEM_FILES="$SYSTEM_FILES $SYSTEM_FILES_LINUX" + ZFSTEST_FILES="$ZFSTEST_FILES $ZFSTEST_FILES_LINUX" + fi + if [ "$INTREE" = "yes" ]; then # Constrained path set to $(top_builddir)/tests/zfs-tests/bin STF_PATH="$BIN_DIR" @@ -325,12 +336,6 @@ fi # Standard system utilities - SYSTEM_FILES="$SYSTEM_FILES_COMMON" - if [ "$UNAME" = "FreeBSD" ] ; then - SYSTEM_FILES="$SYSTEM_FILES $SYSTEM_FILES_FREEBSD" - else - SYSTEM_FILES="$SYSTEM_FILES $SYSTEM_FILES_LINUX" - fi create_links "$SYSTEM_DIRS" "$SYSTEM_FILES" # Exceptions @@ -364,6 +369,7 @@ -k Disable cleanup after test failure -K Log test names to /dev/kmsg -f Use files only, disables block device tests + -O Dump debugging info to /dev/kmsg on test timeout -S Enable stack tracer (negative performance impact) -c Only create and populate constrained path -R Automatically rerun failing tests @@ -402,7 +408,7 @@ EOF } -while getopts 'hvqxkKfScRmn:d:Ds:r:?t:T:u:I:' OPTION; do +while getopts 'hvqxkKfScRmOn:d:Ds:r:?t:T:u:I:' OPTION; do case $OPTION in h) usage @@ -445,6 +451,9 @@ export NFS=1 . "$nfsfile" ;; + O) + TIMEOUT_DEBUG="yes" + ;; d) FILEDIR="$OPTARG" ;; @@ -773,6 +782,7 @@ "${DEBUG:+-D}" \ "${KMEMLEAK:+-m}" \ "${KMSG:+-K}" \ + "${TIMEOUT_DEBUG:+-O}" \ "-c \"${RUNFILES}\"" \ "-T \"${TAGS}\"" \ "-i \"${STF_SUITE}\"" \ @@ -783,6 +793,7 @@ ${DEBUG:+-D} \ ${KMEMLEAK:+-m} \ ${KMSG:+-K} \ + ${TIMEOUT_DEBUG:+-O} \ -c "${RUNFILES}" \ -T "${TAGS}" \ -i "${STF_SUITE}" \ diff -Nru zfs-linux-2.3.2/tests/Makefile.am zfs-linux-2.3.9/tests/Makefile.am --- zfs-linux-2.3.2/tests/Makefile.am 2025-05-01 18:23:23.840216239 +0000 +++ zfs-linux-2.3.9/tests/Makefile.am 2026-08-21 20:57:12.394004549 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 include $(srcdir)/%D%/zfs-tests/Makefile.am diff -Nru zfs-linux-2.3.2/tests/runfiles/common.run zfs-linux-2.3.9/tests/runfiles/common.run --- zfs-linux-2.3.2/tests/runfiles/common.run 2025-05-01 18:23:23.840216239 +0000 +++ zfs-linux-2.3.9/tests/runfiles/common.run 2026-08-21 20:57:12.394633057 +0000 @@ -82,7 +82,9 @@ 'block_cloning_copyfilerange_fallback_same_txg', 'block_cloning_replay', 'block_cloning_replay_encrypted', 'block_cloning_lwb_buffer_overflow', 'block_cloning_clone_mmap_write', - 'block_cloning_rlimit_fsize', 'block_cloning_large_offset'] + 'block_cloning_rlimit_fsize', 'block_cloning_large_offset', + 'block_cloning_after_device_removal', + 'block_cloning_after_trunc'] tags = ['functional', 'block_cloning'] [tests/functional/bootfs] @@ -119,7 +121,7 @@ tags = ['functional', 'casenorm'] [tests/functional/channel_program/lua_core] -tests = ['tst.args_to_lua', 'tst.divide_by_zero', 'tst.exists', +tests = ['tst.args_to_lua', 'tst.divide_by_zero', 'tst.exists', 'tst.encryption', 'tst.integer_illegal', 'tst.integer_overflow', 'tst.language_functions_neg', 'tst.language_functions_pos', 'tst.large_prog', 'tst.libraries', 'tst.memory_limit', 'tst.nested_neg', 'tst.nested_pos', 'tst.nvlist_to_lua', @@ -249,6 +251,10 @@ 'zfs_inherit_mountpoint'] tags = ['functional', 'cli_root', 'zfs_inherit'] +[tests/functional/cli_root/zfs_list] +tests = ['zfs_list_009_pos'] +tags = ['functional', 'cli_root', 'zfs_list'] + [tests/functional/cli_root/zfs_load-key] tests = ['zfs_load-key', 'zfs_load-key_all', 'zfs_load-key_file', 'zfs_load-key_https', 'zfs_load-key_location', 'zfs_load-key_noop', @@ -289,6 +295,7 @@ 'zfs_receive_from_encrypted', 'zfs_receive_to_encrypted', 'zfs_receive_raw', 'zfs_receive_raw_incremental', 'zfs_receive_-e', 'zfs_receive_raw_-d', 'zfs_receive_from_zstd', 'zfs_receive_new_props', + 'zfs_receive-x_props_alternation', 'zfs_receive_-wR-encrypted-mix', 'zfs_receive_corrective', 'zfs_receive_compressed_corrective', 'zfs_receive_large_block_corrective'] tags = ['functional', 'cli_root', 'zfs_receive'] @@ -306,6 +313,10 @@ tests = ['zfs_reservation_001_pos', 'zfs_reservation_002_pos'] tags = ['functional', 'cli_root', 'zfs_reservation'] +[tests/functional/cli_root/zfs_rewrite] +tests = ['zfs_rewrite'] +tags = ['functional', 'cli_root', 'zfs_rewrite'] + [tests/functional/cli_root/zfs_rollback] tests = ['zfs_rollback_001_pos', 'zfs_rollback_002_pos', 'zfs_rollback_003_neg', 'zfs_rollback_004_neg'] @@ -374,7 +385,7 @@ [tests/functional/cli_root/zhack] tests = ['zhack_label_repair_001', 'zhack_label_repair_002', - 'zhack_label_repair_003', 'zhack_label_repair_004'] + 'zhack_label_repair_003', 'zhack_label_repair_004', 'zhack_metaslab_leak'] pre = post = tags = ['functional', 'cli_root', 'zhack'] @@ -386,8 +397,9 @@ [tests/functional/cli_root/zpool_add] tests = ['zpool_add_001_pos', 'zpool_add_002_pos', 'zpool_add_003_pos', 'zpool_add_004_pos', 'zpool_add_006_pos', 'zpool_add_007_neg', - 'zpool_add_008_neg', 'zpool_add_009_neg', 'zpool_add_010_pos', - 'add-o_ashift', 'add_prop_ashift', 'zpool_add_dryrun_output'] + 'zpool_add_008_neg', 'zpool_add_009_neg', 'zpool_add_warn_create', + 'zpool_add_warn_degraded', 'zpool_add_warn_removal', 'add-o_ashift', + 'add_prop_ashift', 'zpool_add_dryrun_output'] tags = ['functional', 'cli_root', 'zpool_add'] [tests/functional/cli_root/zpool_attach] @@ -444,7 +456,8 @@ [tests/functional/cli_root/zpool_get] tests = ['zpool_get_001_pos', 'zpool_get_002_pos', 'zpool_get_003_pos', - 'zpool_get_004_neg', 'zpool_get_005_pos', 'vdev_get_001_pos'] + 'zpool_get_004_neg', 'zpool_get_005_pos', 'vdev_get_001_pos', + 'vdev_get_all'] tags = ['functional', 'cli_root', 'zpool_get'] [tests/functional/cli_root/zpool_history] @@ -559,6 +572,7 @@ 'zpool_status_003_pos', 'zpool_status_004_pos', 'zpool_status_005_pos', 'zpool_status_006_pos', 'zpool_status_007_pos', 'zpool_status_008_pos', + 'zpool_status_009_pos', 'zpool_status_features_001_pos'] tags = ['functional', 'cli_root', 'zpool_status'] @@ -682,9 +696,10 @@ tags = ['functional', 'deadman'] [tests/functional/dedup] -tests = ['dedup_fdt_create', 'dedup_fdt_import', 'dedup_legacy_create', - 'dedup_legacy_import', 'dedup_legacy_fdt_upgrade', - 'dedup_legacy_fdt_mixed', 'dedup_quota', 'dedup_prune', 'dedup_zap_shrink'] +tests = ['dedup_bclone_pruned', 'dedup_fdt_create', 'dedup_fdt_import', + 'dedup_fdt_pacing', 'dedup_legacy_create', 'dedup_legacy_import', + 'dedup_legacy_fdt_upgrade', 'dedup_legacy_fdt_mixed', 'dedup_quota', + 'dedup_prune', 'dedup_prune_leak', 'dedup_zap_shrink'] pre = post = tags = ['functional', 'dedup'] @@ -724,6 +739,10 @@ 'large_dnode_005_pos', 'large_dnode_007_neg', 'large_dnode_009_pos'] tags = ['functional', 'features', 'large_dnode'] +[tests/functional/gang_blocks] +tests = ['gang_blocks_redundant'] +tags = ['functional', 'gang_blocks'] + [tests/functional/grow] pre = post = @@ -779,7 +798,7 @@ [tests/functional/mmap] tests = ['mmap_mixed', 'mmap_read_001_pos', 'mmap_seek_001_pos', - 'mmap_sync_001_pos', 'mmap_write_001_pos'] + 'mmap_sync_001_pos', 'mmap_write_001_pos', 'mmap_ftruncate'] tags = ['functional', 'mmap'] [tests/functional/mount] @@ -845,7 +864,8 @@ [tests/functional/redacted_send] tests = ['redacted_compressed', 'redacted_contents', 'redacted_deleted', 'redacted_disabled_feature', 'redacted_embedded', 'redacted_holes', - 'redacted_incrementals', 'redacted_largeblocks', 'redacted_many_clones', + 'redacted_incrementals', 'redacted_largeblocks', 'redacted_max_blkid', + 'redacted_many_clones', 'redacted_mixed_recsize', 'redacted_mounts', 'redacted_negative', 'redacted_origin', 'redacted_panic', 'redacted_props', 'redacted_resume', 'redacted_size', 'redacted_volume'] @@ -862,8 +882,10 @@ [tests/functional/redundancy] tests = ['redundancy_draid', 'redundancy_draid1', 'redundancy_draid2', 'redundancy_draid3', 'redundancy_draid_damaged1', - 'redundancy_draid_damaged2', 'redundancy_draid_spare1', - 'redundancy_draid_spare2', 'redundancy_draid_spare3', 'redundancy_mirror', + 'redundancy_draid_damaged2', 'redundancy_draid_degraded1', + 'redundancy_draid_degraded2', + 'redundancy_draid_spare1', 'redundancy_draid_spare2', + 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz', 'redundancy_raidz1', 'redundancy_raidz2', 'redundancy_raidz3', 'redundancy_stripe'] tags = ['functional', 'redundancy'] @@ -895,7 +917,7 @@ 'removal_with_write', 'removal_with_zdb', 'remove_expanded', 'remove_mirror', 'remove_mirror_sanity', 'remove_raidz', 'remove_indirect', 'remove_attach_mirror', 'removal_reservation', - 'removal_with_hole'] + 'removal_with_hole', 'removal_with_missing_log'] tags = ['functional', 'removal'] [tests/functional/rename_dirs] @@ -946,7 +968,7 @@ 'send_spill_block', 'send_holds', 'send_hole_birth', 'send_mixed_raw', 'send-wR_encrypted_zvol', 'send_partial_dataset', 'send_invalid', 'send_doall', 'send_raw_spill_block', 'send_raw_ashift', - 'send_raw_large_blocks'] + 'send_raw_large_blocks', 'send_leak_keymaps'] tags = ['functional', 'rsend'] [tests/functional/scrub_mirror] diff -Nru zfs-linux-2.3.2/tests/runfiles/linux.run zfs-linux-2.3.9/tests/runfiles/linux.run --- zfs-linux-2.3.2/tests/runfiles/linux.run 2025-05-01 18:23:23.840216239 +0000 +++ zfs-linux-2.3.9/tests/runfiles/linux.run 2026-08-21 20:57:12.394633057 +0000 @@ -23,7 +23,8 @@ tags = ['functional'] [tests/functional/acl/posix:Linux] -tests = ['posix_001_pos', 'posix_002_pos', 'posix_003_pos', 'posix_004_pos'] +tests = ['posix_001_pos', 'posix_002_pos', 'posix_003_pos', + 'posix_004_pos', 'posix_005_pos'] tags = ['functional', 'acl', 'posix'] [tests/functional/acl/posix-sa:Linux] @@ -74,7 +75,8 @@ [tests/functional/cli_root/zpool_expand:Linux] tests = ['zpool_expand_001_pos', 'zpool_expand_002_pos', - 'zpool_expand_003_neg', 'zpool_expand_004_pos', 'zpool_expand_005_pos'] + 'zpool_expand_003_neg', 'zpool_expand_004_pos', 'zpool_expand_005_pos', + 'zpool_expand_006_pos'] tags = ['functional', 'cli_root', 'zpool_expand'] [tests/functional/cli_root/zpool_import:Linux] @@ -98,6 +100,11 @@ tests = ['compress_004_pos'] tags = ['functional', 'compression'] +[tests/functional/device_access:Linux] +tests = ['device_access_create', 'device_access_attach', 'device_access_add', + 'device_access_import'] +tags = ['functional', 'device_access'] + [tests/functional/devices:Linux] tests = ['devices_001_pos', 'devices_002_neg', 'devices_003_pos'] tags = ['functional', 'devices'] @@ -117,16 +124,16 @@ tags = ['functional', 'fadvise'] [tests/functional/fallocate:Linux] -tests = ['fallocate_prealloc', 'fallocate_zero-range'] +tests = ['fallocate_extend_timestamps', 'fallocate_prealloc', 'fallocate_zero-range'] tags = ['functional', 'fallocate'] [tests/functional/fault:Linux] tests = ['auto_offline_001_pos', 'auto_online_001_pos', 'auto_online_002_pos', 'auto_replace_001_pos', 'auto_replace_002_pos', 'auto_spare_001_pos', - 'auto_spare_002_pos', 'auto_spare_multiple', 'auto_spare_ashift', - 'auto_spare_shared', 'decrypt_fault', 'decompress_fault', - 'fault_limits', 'scrub_after_resilver', 'suspend_on_probe_errors', - 'suspend_resume_single', 'zpool_status_-s'] + 'auto_spare_002_pos', 'auto_spare_double', 'auto_spare_multiple', + 'auto_spare_ashift', 'auto_spare_shared', 'decrypt_fault', + 'decompress_fault', 'fault_limits', 'scrub_after_resilver', + 'suspend_on_probe_errors', 'suspend_resume_single', 'zpool_status_-s'] tags = ['functional', 'fault'] [tests/functional/features/large_dnode:Linux] @@ -143,6 +150,10 @@ post = tags = ['functional', 'largest_pool'] +[tests/functional/lease:Linux] +tests = ['lease_setlease'] +tags = ['functional', 'lease'] + [tests/functional/longname:Linux] tests = ['longname_001_pos', 'longname_002_pos', 'longname_003_pos'] tags = ['functional', 'longname'] @@ -160,12 +171,15 @@ [tests/functional/mmp:Linux] tests = ['mmp_on_thread', 'mmp_on_uberblocks', 'mmp_on_off', 'mmp_interval', 'mmp_active_import', 'mmp_inactive_import', 'mmp_exported_import', + 'mmp_degraded_import', 'mmp_zhack_reclaim', 'mmp_write_uberblocks', 'mmp_reset_interval', 'multihost_history', - 'mmp_on_zdb', 'mmp_write_distribution', 'mmp_hostid', 'mmp_write_slow_disk'] + 'mmp_on_zdb', 'mmp_write_distribution', 'mmp_hostid', 'mmp_write_slow_disk', + 'mmp_concurrent_import'] tags = ['functional', 'mmp'] +timeout = 1200 [tests/functional/mount:Linux] -tests = ['umount_unlinked_drain'] +tests = ['umount_unlinked_drain', 'mount_loopback'] tags = ['functional', 'mount'] [tests/functional/pam:Linux] @@ -210,6 +224,12 @@ tests = ['snapshot_015_pos', 'snapshot_016_pos'] tags = ['functional', 'snapshot'] +[tests/functional/syncfs:Linux] +tests = ['syncfs_suspend'] +tags = ['functional', 'syncfs'] +pre = +post = + [tests/functional/tmpfile:Linux] tests = ['tmpfile_001_pos', 'tmpfile_002_pos', 'tmpfile_003_pos', 'tmpfile_stat_mode'] @@ -221,7 +241,8 @@ [tests/functional/user_namespace:Linux] tests = ['user_namespace_001', 'user_namespace_002', 'user_namespace_003', - 'user_namespace_004'] + 'user_namespace_004', 'user_namespace_secpolicy_sys_config', + 'user_namespace_secpolicy_zinject'] tags = ['functional', 'user_namespace'] [tests/functional/userquota:Linux] diff -Nru zfs-linux-2.3.2/tests/runfiles/sanity.run zfs-linux-2.3.9/tests/runfiles/sanity.run --- zfs-linux-2.3.2/tests/runfiles/sanity.run 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/runfiles/sanity.run 2026-08-21 20:57:12.394633057 +0000 @@ -64,7 +64,7 @@ tags = ['functional', 'casenorm'] [tests/functional/channel_program/lua_core] -tests = ['tst.args_to_lua', 'tst.divide_by_zero', 'tst.exists', +tests = ['tst.args_to_lua', 'tst.divide_by_zero', 'tst.exists', 'tst.encryption', 'tst.integer_illegal', 'tst.integer_overflow', 'tst.language_functions_neg', 'tst.language_functions_pos', 'tst.large_prog', 'tst.libraries', 'tst.memory_limit', 'tst.nested_neg', 'tst.nested_pos', 'tst.nvlist_to_lua', @@ -194,6 +194,10 @@ tests = ['zfs_reservation_001_pos', 'zfs_reservation_002_pos'] tags = ['functional', 'cli_root', 'zfs_reservation'] +[tests/functional/cli_root/zfs_rewrite] +tests = ['zfs_rewrite'] +tags = ['functional', 'cli_root', 'zfs_rewrite'] + [tests/functional/cli_root/zfs_rollback] tests = ['zfs_rollback_003_neg', 'zfs_rollback_004_neg'] tags = ['functional', 'cli_root', 'zfs_rollback'] diff -Nru zfs-linux-2.3.2/tests/test-runner/bin/test-runner.py.in zfs-linux-2.3.9/tests/test-runner/bin/test-runner.py.in --- zfs-linux-2.3.2/tests/test-runner/bin/test-runner.py.in 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/test-runner/bin/test-runner.py.in 2026-08-21 20:57:12.395045652 +0000 @@ -15,6 +15,7 @@ # # Copyright (c) 2012, 2018 by Delphix. All rights reserved. # Copyright (c) 2019 Datto Inc. +# Copyright (c) 2025, Klara, Inc. # # This script must remain compatible with Python 3.6+. # @@ -33,6 +34,7 @@ from subprocess import PIPE from subprocess import Popen from subprocess import check_output +from subprocess import run from threading import Timer from time import time, CLOCK_MONOTONIC from os.path import exists @@ -186,6 +188,63 @@ ''' % (self.pathname, self.identifier, self.outputdir, self.timeout, self.user) def kill_cmd(self, proc, options, kmemleak, keyboard_interrupt=False): + + """ + We're about to kill a command due to a timeout. + If we're running with the -O option, then dump debug info about the + process with the highest CPU usage to /dev/kmsg (Linux only). This can + help debug the timeout. + + Debug info includes: + - 30 lines from 'top' + - /proc//stack output of process with highest CPU usage + - Last lines strace-ing process with highest CPU usage + """ + if exists("/dev/kmsg"): + c = """ +TOP_OUT="$(COLUMNS=160 top -b -n 1 | head -n 30)" +read -r PID CMD <<< $(echo "$TOP_OUT" | /usr/bin/awk \ +"/COMMAND/{ + print_next=1 + next +} +{ + if (print_next == 1) { + print \\$1\\" \\"\\$12 + exit + } +}") +echo "##### ZTS timeout debug #####" +echo "----- top -----" +echo "$TOP_OUT" +echo "----- /proc/$PID/stack ($CMD)) -----" +cat /proc/$PID/stack +echo "----- strace ($CMD) -----" +TMPFILE="$(mktemp --suffix=ZTS)" +/usr/bin/strace -k --stack-traces -p $PID &> "$TMPFILE" & +sleep 0.1 +killall strace +tail -n 30 $TMPFILE +rm "$TMPFILE" +echo "##### /proc/sysrq-trigger stack #####" +""" + c = "sudo bash -c '" + c + "'" + data = run(c, capture_output=True, shell=True, text=True) + out = data.stdout + try: + kp = Popen([SUDO, "sh", "-c", + "echo '" + out + "' > /dev/kmsg"]) + kp.wait() + + """ + Trigger kernel stack traces + """ + kp = Popen([SUDO, "sh", "-c", + "echo l > /proc/sysrq-trigger"]) + kp.wait() + except Exception: + pass + """ Kill a running command due to timeout, or ^C from the keyboard. If sudo is required, this user was verified previously. @@ -372,6 +431,8 @@ stdout/stderr/merged in its own file. """ + timeprefix = datetime.now().strftime('[%FT%T.%f] ') + logname = getpwuid(os.getuid()).pw_name rer = '' if self.reran is True: @@ -383,7 +444,7 @@ msga = 'Test: %s%s ' % (self.pathname, user) msgb = '[%s] [%s]%s\n' % (self.result.runtime, self.result.result, rer) pad = ' ' * (80 - (len(msga) + len(msgb))) - result_line = msga + pad + msgb + result_line = timeprefix + msga + pad + msgb # The result line is always written to the log file. If -q was # specified only failures are written to the console, otherwise @@ -858,9 +919,10 @@ def complete_outputdirs(self): """ - Collect all the pathnames for Tests, and TestGroups. Work - backwards one pathname component at a time, to create a unique - directory name in which to deposit test output. Tests will be able + Collect all the pathnames for Tests, and TestGroups. Strip off all + common leading path components, and append what remains to the top + "output" dir, to create a tree of output directories that match + the test and group names in structure. Tests will be able to write output files directly in the newly modified outputdir. TestGroups will be able to create one subdirectory per test in the outputdir, and are guaranteed uniqueness because a group can only @@ -869,24 +931,30 @@ question for their output. Failsafe scripts will create a directory rooted at the outputdir of each Test for their output. """ - done = False - components = 0 - tmp_dict = dict(list(self.tests.items()) + + + alltests = dict(list(self.tests.items()) + list(self.testgroups.items())) - total = len(tmp_dict) - base = self.outputdir + base = os.path.join(self.outputdir, 'output') - while not done: - paths = [] - components -= 1 - for testfile in list(tmp_dict.keys()): - uniq = '/'.join(testfile.split('/')[components:]).lstrip('/') - if uniq not in paths: - paths.append(uniq) - tmp_dict[testfile].outputdir = os.path.join(base, uniq) - else: - break - done = total == len(paths) + seen = [] + + for path in list(alltests.keys()): + frag = path.split('/') + for i in range(0, len(frag)): + if len(seen) == i: + seen.append({}) + seen[i][frag[i]] = 1 + + cut = 0 + for i in range(0, len(seen)): + if len(list(seen[i].keys())) == 1: + cut += 1 + else: + break + + for path in list(alltests.keys()): + uniq = path.split('/', cut)[-1] + alltests[path].outputdir = os.path.join(base, uniq) def setup_logging(self, options): """ @@ -1119,6 +1187,9 @@ parser.add_option('-o', action='callback', callback=options_cb, default=BASEDIR, dest='outputdir', type='string', metavar='outputdir', help='Specify an output directory.') + parser.add_option('-O', action='store_true', default=False, + dest='timeout_debug', + help='Dump debugging info to /dev/kmsg on test timeout') parser.add_option('-i', action='callback', callback=options_cb, default=TESTDIR, dest='testdir', type='string', metavar='testdir', help='Specify a test directory.') diff -Nru zfs-linux-2.3.2/tests/test-runner/bin/zts-report.py.in zfs-linux-2.3.9/tests/test-runner/bin/zts-report.py.in --- zfs-linux-2.3.2/tests/test-runner/bin/zts-report.py.in 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/test-runner/bin/zts-report.py.in 2026-08-21 20:57:12.395045652 +0000 @@ -15,6 +15,7 @@ # # Copyright (c) 2017 by Delphix. All rights reserved. # Copyright (c) 2018 by Lawrence Livermore National Security, LLC. +# Copyright (c) 2025, Klara, Inc. # # This script must remain compatible with Python 3.6+. # @@ -225,6 +226,7 @@ ['FAIL', 11948], 'cli_root/zpool_initialize/zpool_initialize_suspend_resume': ['FAIL', known_reason], + 'cli_root/zpool_iostat/zpool_iostat_interval_all': ['FAIL', 18273], 'cli_root/zpool_labelclear/zpool_labelclear_removed': ['FAIL', known_reason], 'cli_root/zpool_trim/setup': ['SKIP', trim_reason], @@ -243,17 +245,15 @@ 'history/history_010_pos': ['SKIP', exec_reason], 'io/mmap': ['SKIP', fio_reason], 'l2arc/l2arc_l2miss_pos': ['FAIL', known_reason], + 'l2arc/l2arc_multidev_throughput_pos': ['FAIL', 18272], 'l2arc/persist_l2arc_005_pos': ['FAIL', known_reason], 'largest_pool/largest_pool_001_pos': ['FAIL', known_reason], 'mmap/mmap_sync_001_pos': ['FAIL', known_reason], - 'mmp/mmp_on_uberblocks': ['FAIL', known_reason], 'pam/setup': ['SKIP', "pamtester might be not available"], 'pool_checkpoint/checkpoint_discard_busy': ['FAIL', 11946], 'projectquota/setup': ['SKIP', exec_reason], 'raidz/raidz_002_pos': ['FAIL', known_reason], 'raidz/raidz_expand_001_pos': ['FAIL', 16421], - 'redundancy/redundancy_draid_spare1': ['FAIL', known_reason], - 'redundancy/redundancy_draid_spare3': ['FAIL', known_reason], 'removal/removal_condense_export': ['FAIL', known_reason], 'renameat2/setup': ['SKIP', renameat2_reason], 'reservation/reservation_008_pos': ['FAIL', 7741], @@ -321,6 +321,7 @@ 'bclone/bclone_samefs_data': ['SKIP', cfr_reason], 'bclone/bclone_samefs_embedded': ['SKIP', cfr_reason], 'bclone/bclone_samefs_hole': ['SKIP', cfr_reason], + 'block_cloning/block_cloning_after_trunc': ['SKIP', cfr_reason], 'block_cloning/block_cloning_clone_mmap_cached': ['SKIP', cfr_reason], 'block_cloning/block_cloning_clone_mmap_write': ['SKIP', cfr_reason], @@ -351,6 +352,7 @@ 'cli_root/zfs_rename/zfs_rename_002_pos': ['FAIL', known_reason], 'cli_root/zpool_reopen/zpool_reopen_003_pos': ['FAIL', known_reason], 'cp_files/cp_files_002_pos': ['SKIP', cfr_reason], + 'events/events_002_pos': ['FAIL', 18271], 'fault/auto_online_002_pos': ['FAIL', 11889], 'fault/auto_replace_001_pos': ['FAIL', 14851], 'fault/auto_spare_002_pos': ['FAIL', 11889], @@ -365,9 +367,6 @@ 'io/io_uring': ['SKIP', 'io_uring support required'], 'limits/filesystem_limit': ['SKIP', known_reason], 'limits/snapshot_limit': ['SKIP', known_reason], - 'mmp/mmp_active_import': ['FAIL', known_reason], - 'mmp/mmp_exported_import': ['FAIL', known_reason], - 'mmp/mmp_inactive_import': ['FAIL', known_reason], 'stat/statx_dioalign': ['SKIP', 'statx_reason'], }) @@ -381,7 +380,8 @@ prefix = '/zfs-tests/tests/(?:functional|perf/regression)/' pattern = \ - r'^Test(?:\s+\(\S+\))?:' + \ + r'^(?:\[[0-9\-T:\.]+\]\s+)?' + \ + r'Test(?:\s+\(\S+\))?:' + \ rf'\s*\S*{prefix}(\S+)' + \ r'\s*\(run as (\S+)\)\s*\[(\S+)\]\s*\[(\S+)\]' pattern_log = r'^\s*Log directory:\s*(\S*)' diff -Nru zfs-linux-2.3.2/tests/test-runner/include/logapi.shlib zfs-linux-2.3.9/tests/test-runner/include/logapi.shlib --- zfs-linux-2.3.2/tests/test-runner/include/logapi.shlib 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/test-runner/include/logapi.shlib 2026-08-21 20:57:12.395045652 +0000 @@ -25,6 +25,7 @@ # Use is subject to license terms. # # Copyright (c) 2012, 2020 by Delphix. All rights reserved. +# Copyright (c) 2025, Klara, Inc. # STF_PASS=0 @@ -208,12 +209,24 @@ "$@" 2>$logfile typeset status=$? + # + # A command which printed what was expected of it plainly ran, so + # its exit status is its own to interpret. Some commands report a + # count there: fio exits with the number of jobs which failed, and + # a run of 127 failing jobs is indistinguishable from a missing + # binary by status alone. + # + typeset expect_missing=1 + if [[ -n $expect ]] && grep -qi "$expect" $logfile; then + expect_missing=0 + fi + # unexpected status if (( $status == EXIT_SUCCESS )); then cat $logfile >&2 _printerror "$@" "unexpectedly exited $status" # missing binary - elif (( $status == EXIT_NOTFOUND )); then + elif (( $status == EXIT_NOTFOUND && expect_missing )); then cat $logfile >&2 _printerror "$@" "unexpectedly exited $status (File not found)" # bus error - core dump @@ -465,7 +478,11 @@ function _printline { - echo "$@" + if [[ -n "$ZTS_LOG_SUPPRESS_TIMESTAMP" ]] ; then + printf '[%(%FT%T.%6N)T] %s\n' now "$*" + else + echo "$@" + fi } # Output an error message diff -Nru zfs-linux-2.3.2/tests/zfs-tests/Makefile.am zfs-linux-2.3.9/tests/zfs-tests/Makefile.am --- zfs-linux-2.3.2/tests/zfs-tests/Makefile.am 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/Makefile.am 2026-08-21 20:57:12.395425486 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 SUBDIRS += %D%/tests include $(srcdir)/%D%/cmd/Makefile.am diff -Nru zfs-linux-2.3.2/tests/zfs-tests/callbacks/zfs_dbgmsg.ksh zfs-linux-2.3.9/tests/zfs-tests/callbacks/zfs_dbgmsg.ksh --- zfs-linux-2.3.2/tests/zfs-tests/callbacks/zfs_dbgmsg.ksh 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/callbacks/zfs_dbgmsg.ksh 2026-08-21 20:57:12.395425486 +0000 @@ -26,7 +26,7 @@ sudo tail -n $lines /proc/spl/kstat/zfs/dbgmsg # reset dbgmsg -sudo bash -c "echo > /proc/spl/kstat/zfs/dbgmsg" +sudo sh -c "echo > /proc/spl/kstat/zfs/dbgmsg" echo "=================================================================" echo " End of zfs_dbgmsg log" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/callbacks/zfs_dmesg.ksh zfs-linux-2.3.9/tests/zfs-tests/callbacks/zfs_dmesg.ksh --- zfs-linux-2.3.2/tests/zfs-tests/callbacks/zfs_dmesg.ksh 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/callbacks/zfs_dmesg.ksh 2026-08-21 20:57:12.395496522 +0000 @@ -15,6 +15,7 @@ # # Copyright (c) 2016 by Delphix. All rights reserved. # Copyright (c) 2017 Lawrence Livermore National Security, LLC. +# Copyright (c) 2025, Klara, Inc. # # $1: number of lines to output (default: 200) @@ -25,7 +26,11 @@ echo "=================================================================" # report and reset afterwards -sudo dmesg -c | tail -n $lines +dmesg_args="-c" +if [[ $(uname) = "Linux" ]] ; then + dmesg_args="$dmesg_args --time-format=iso" +fi +sudo dmesg $dmesg_args | tail -n $lines echo "=================================================================" echo " End of dmesg log" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/callbacks/zfs_mmp.ksh zfs-linux-2.3.9/tests/zfs-tests/callbacks/zfs_mmp.ksh --- zfs-linux-2.3.2/tests/zfs-tests/callbacks/zfs_mmp.ksh 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/callbacks/zfs_mmp.ksh 2026-08-21 20:57:12.395496522 +0000 @@ -31,7 +31,7 @@ echo "=================================================================" sudo tail -n $lines $f - sudo bash -c "echo > $f" + sudo sh -c "echo > $f" done echo "=================================================================" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/Makefile.am zfs-linux-2.3.9/tests/zfs-tests/cmd/Makefile.am --- zfs-linux-2.3.2/tests/zfs-tests/cmd/Makefile.am 2025-05-01 18:23:23.841216253 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/Makefile.am 2026-08-21 20:57:12.395578958 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 scripts_zfs_tests_bindir = $(datadir)/$(PACKAGE)/zfs-tests/bin @@ -34,6 +35,8 @@ %C%_crypto_test_SOURCES = %D%/crypto_test.c %C%_crypto_test_LDADD = libzpool.la +scripts_zfs_tests_bin_PROGRAMS += %D%/clone_after_trunc +%C%_clone_after_trunc_LDADD = -lpthread if WANT_DEVNAME2DEVID scripts_zfs_tests_bin_PROGRAMS += %D%/devname2devid @@ -72,7 +75,9 @@ %C%_mkfile_LDADD = $(LTLIBINTL) -scripts_zfs_tests_bin_PROGRAMS += %D%/mmap_exec %D%/mmap_seek %D%/mmap_sync %D%/mmapwrite %D%/readmmap +scripts_zfs_tests_bin_PROGRAMS += \ + %D%/mmap_exec %D%/mmap_ftruncate %D%/mmap_seek \ + %D%/mmap_sync %D%/mmapwrite %D%/readmmap %C%_mmapwrite_LDADD = -lpthread if WANT_MMAP_LIBAIO @@ -130,6 +135,7 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/xattrtest scripts_zfs_tests_bin_PROGRAMS += %D%/zed_fd_spill-zedlet scripts_zfs_tests_bin_PROGRAMS += %D%/idmap_util +scripts_zfs_tests_bin_PROGRAMS += %D%/setlease %C%_idmap_util_LDADD = libspl.la diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/clone_after_trunc.c zfs-linux-2.3.9/tests/zfs-tests/cmd/clone_after_trunc.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/clone_after_trunc.c 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/clone_after_trunc.c 2026-08-21 20:57:12.395917071 +0000 @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: CDDL-1.0 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_GNU_SOURCE) && defined(__linux__) +_Static_assert(sizeof (loff_t) == sizeof (off_t), + "loff_t and off_t must be the same size"); +#endif + +ssize_t +copy_file_range(int, off_t *, int, off_t *, size_t, unsigned int) + __attribute__((weak)); + +#define FILE_SIZE (1024 * 1024) +#define RECORD_SIZE (128 * 1024) +#define NUM_THREADS 64 + +const char *dir; +volatile int failed; + +static void * +run_test(void *arg) +{ + int thread_id = (int)(long)arg; + + char src_path[PATH_MAX], dst_path[PATH_MAX]; + snprintf(src_path, PATH_MAX, "%s/src-%d", dir, thread_id); + snprintf(dst_path, PATH_MAX, "%s/dst-%d", dir, thread_id); + + unsigned char *write_buf = malloc(FILE_SIZE); + unsigned char *read_buf = malloc(FILE_SIZE); + + // Write out expected data. + memset(write_buf, 0xAA, FILE_SIZE); + int src = open(src_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (write(src, write_buf, FILE_SIZE) != FILE_SIZE) + perror("write"); + close(src); + + // Create destination file so we exercise O_TRUNC. + int dst = open(dst_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (write(dst, write_buf, FILE_SIZE) != FILE_SIZE) + perror("write"); + fsync(dst); + close(dst); + + // Open file with O_TRUNC and perform copy. + src = open(src_path, O_RDONLY); + dst = open(dst_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + + off_t off_in = 0, off_out = 0; + ssize_t ret = + copy_file_range(src, &off_in, dst, &off_out, FILE_SIZE, 0); + if (ret != FILE_SIZE) + perror("copy_file_range"); + close(src); + close(dst); + + // Read back + dst = open(dst_path, O_RDONLY); + if (read(dst, read_buf, FILE_SIZE) != FILE_SIZE) + perror("read"); + close(dst); + + // Bug check + if (memcmp(write_buf, read_buf, FILE_SIZE) != 0) { + failed = 1; + fprintf(stderr, "[%d]: FAIL\n", thread_id); + + int all_zeros = 1; + for (int i = 0; i < RECORD_SIZE; i++) { + if (read_buf[i] != 0) { + all_zeros = 0; + break; + } + } + + if (all_zeros) { + fprintf(stderr, "[%d]: ALL ZERO\n", thread_id); + } + } + + unlink(src_path); + unlink(dst_path); + free(write_buf); + free(read_buf); + return (NULL); +} + +int +main(int argc, const char **argv) +{ + if (argc < 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + return (1); + } + dir = argv[1]; + + pthread_t threads[NUM_THREADS]; + + for (int i = 0; i < NUM_THREADS; i++) { + pthread_create(&threads[i], NULL, run_test, (void *)(long)i); + } + for (int i = 0; i < NUM_THREADS; i++) { + pthread_join(threads[i], NULL); + } + + return (failed); +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/ctime.c zfs-linux-2.3.9/tests/zfs-tests/cmd/ctime.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/ctime.c 2025-05-01 18:23:23.842216268 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/ctime.c 2026-08-21 20:57:12.396004521 +0000 @@ -369,7 +369,7 @@ * a little slack in case of scheduling delays or similar. */ long delta = (long)t2 - (long)t1; - if (delta < 2 || delta > 4) { + if (delta < 2 || delta > 10) { (void) fprintf(stderr, "%s: BAD time change: t1(%ld), t2(%ld)\n", timetest_table[i].name, (long)t1, (long)t2); diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/draid.c zfs-linux-2.3.9/tests/zfs-tests/cmd/draid.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/draid.c 2025-05-01 18:23:23.843216282 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/draid.c 2026-08-21 20:57:12.396004521 +0000 @@ -204,7 +204,7 @@ error = errno; free(buf); free(tmpname); - return (errno); + return (error); } ssize_t rc, bytes = 0; diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/libzfs_input_check.c zfs-linux-2.3.9/tests/zfs-tests/cmd/libzfs_input_check.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/libzfs_input_check.c 2025-05-01 18:23:23.843216282 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/libzfs_input_check.c 2026-08-21 20:57:12.396813758 +0000 @@ -85,7 +85,6 @@ ZFS_IOC_DSOBJ_TO_DSNAME, ZFS_IOC_OBJ_TO_PATH, ZFS_IOC_POOL_SET_PROPS, - ZFS_IOC_POOL_GET_PROPS, ZFS_IOC_SET_FSACL, ZFS_IOC_GET_FSACL, ZFS_IOC_SHARE, @@ -125,11 +124,136 @@ lzc_ioctl_test(ioc, name, req, opt, err, wild); \ } while (0) +#define IOC_INPUT_TEST_INJECT(ioc, name, innvl) \ + do { \ + active_test = __func__ + 5; \ + lzc_ioctl_run_impl(ioc, name, innvl, 0, B_TRUE); \ + } while (0) + +/* + * Given a zfs_cmd_t containing an already packed nvlist in zc->zc_nvlist_src, + * and its original innvl, look in innvl for the last string nvpair, or last + * string array nvpair, and remove the string terminator. The idea is to + * corrupt the nvlist string value so that anyone doing a strlen() on it will + * read past the end of the packed nvlist buffer and trigger a crash. + */ +static void +do_bad_string(zfs_cmd_t *zc, nvlist_t *innvl) +{ + nvpair_t *elem = NULL; + nvpair_t *lastseen = NULL; + const char *str = NULL; + const char **arr; + uint_t n; + char *off; + char *packed; + uint64_t size, off_size; + + while ((elem = nvlist_next_nvpair(innvl, elem)) != NULL) { + if ((nvpair_type(elem) == DATA_TYPE_STRING) || + (nvpair_type(elem) == DATA_TYPE_STRING_ARRAY)) + lastseen = elem; + } + + if (lastseen == NULL) + return; /* No strings */ + + /* + * Lookup either the last string, or the last string in the last + * string array in the nvlist. We will use this to corrupt from the + * string to the end of the nvlist buffer. Any attempts to strlen this + * string should run pass the end of the packed buffer. + */ + if (nvpair_value_string(lastseen, &str) != 0) { + if (nvpair_value_string_array(lastseen, &arr, &n) == 0) + str = arr[n-1]; + } + + /* + * We now have the last string. Corrupt everything from the NULL + * terminator byte for the last string to the end of the packed nvlist + * buffer. + */ + packed = (char *)zc->zc_nvlist_src; + size = zc->zc_nvlist_src_size; + + off = memmem(packed, size, str, strlen(str)); + off_size = strlen(str); + + memset(&off[off_size - 1], '!', (packed + size) - + (&off[off_size - 1])); + +} + +/* + * For each byte in the packed nvlist list in zc, corrupt a single byte, then + * try doing the ioctl. This tests how well the kernel handles fuzzed nvlists. + * + * NOTE - make sure you are doing this with a "safe" ioctl! You don't want to + * run this on an ioctl that can potentially corrupt data (like a zpool create). + */ +static void +do_fuzz(int zfs_fd, zfs_ioc_t ioc, zfs_cmd_t *zc) +{ + uint64_t size; + uint64_t i; + unsigned char old = 0; + unsigned char *pos; + zfs_cmd_t orig_zc = *zc; + + pos = (unsigned char *) zc->zc_nvlist_src; + size = zc->zc_nvlist_src_size; + + /* + * Fuzz each byte in the packed nvlist, one byte at a time, and do the + * ioctl. If the kernel doesn't crash, then the test passed. + */ + for (i = 0; i < size; i++) { + /* Restore the previously corrupted byte */ + if (i > 0) + pos[i-1] = old; + + old = pos[i]; + + /* Corrupt the new byte */ + pos[i]++; + + /* + * Do the ioctl and ignore the return code. We just want to + * see if the kernel panics. + */ + lzc_ioctl_fd(zfs_fd, ioc, zc); + + /* + * Restore 'zc' with original fields since the ioctl may + * have modified them. + */ + *zc = orig_zc; + } + /* Restore last byte */ + if (i > 0) + pos[i - 1] = old; + + /* + * Try fuzzing the packed nvlist size field. Test it with one byte + * bigger and one byte smaller than the current value. + */ + zc->zc_nvlist_src_size--; + lzc_ioctl_fd(zfs_fd, ioc, zc); + + zc->zc_nvlist_src_size += 2; + lzc_ioctl_fd(zfs_fd, ioc, zc); + + /* Restore to normal */ + zc->zc_nvlist_src_size -= 1; +} + /* * run a zfs ioctl command, verify expected results and log failures */ static void -lzc_ioctl_run(zfs_ioc_t ioc, const char *name, nvlist_t *innvl, int expected) +lzc_ioctl_run_impl(zfs_ioc_t ioc, const char *name, nvlist_t *innvl, + int expected, boolean_t do_corrupt) { zfs_cmd_t zc = {"\0"}; char *packed = NULL; @@ -160,10 +284,30 @@ zc.zc_nvlist_dst_size = MAX(size * 2, 128 * 1024); zc.zc_nvlist_dst = (uint64_t)(uintptr_t)malloc(zc.zc_nvlist_dst_size); + if (do_corrupt) { + /* + * Try changing bytes in the packed nvlist to see if it will + * panic the kernel when you do the ioctl. + */ + do_fuzz(zfs_fd, ioc, &zc); + + /* + * Corrupt the last string in the packed nvlist so it has no + * NULL terminator. + */ + do_bad_string(&zc, innvl); + + } + if (lzc_ioctl_fd(zfs_fd, ioc, &zc) != 0) error = errno; - if (error != expected) { + /* + * If we're corrupting the nvlist we don't care about the specific + * error code that gets returned, as it could be one of many. We only + * care if it panics the kernel. + */ + if (!do_corrupt && error != expected) { unexpected_failures = B_TRUE; (void) fprintf(stderr, "%s: Unexpected result with %s, " "error %d (expecting %d)\n", @@ -174,6 +318,12 @@ free((void *)(uintptr_t)zc.zc_nvlist_dst); } +static void +lzc_ioctl_run(zfs_ioc_t ioc, const char *name, nvlist_t *innvl, int expected) +{ + return (lzc_ioctl_run_impl(ioc, name, innvl, expected, B_FALSE)); +} + /* * Test each ioc for the following ioctl input errors: * ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel @@ -310,6 +460,7 @@ fnvlist_add_string(required, "message", "input check"); IOC_INPUT_TEST(ZFS_IOC_LOG_HISTORY, pool, required, NULL, 0); + IOC_INPUT_TEST_INJECT(ZFS_IOC_LOG_HISTORY, pool, required); nvlist_free(required); } @@ -792,6 +943,20 @@ } static void +test_zpool_get(const char *pool) +{ + const char *strs[] = {ZPOOL_DEDUPCACHED_PROP_NAME}; + nvlist_t *optional = fnvlist_alloc(); + + fnvlist_add_string_array(optional, ZPOOL_GET_PROPS_NAMES, strs, 1); + + IOC_INPUT_TEST(ZFS_IOC_POOL_GET_PROPS, pool, NULL, optional, 0); + IOC_INPUT_TEST_INJECT(ZFS_IOC_POOL_GET_PROPS, pool, optional); + + nvlist_free(optional); +} + +static void zfs_ioc_input_tests(const char *pool) { char filepath[] = "/tmp/ioc_test_file_XXXXXX"; @@ -885,6 +1050,7 @@ test_scrub(pool); + test_zpool_get(pool); /* * cleanup */ diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/mmap_ftruncate.c zfs-linux-2.3.9/tests/zfs-tests/cmd/mmap_ftruncate.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/mmap_ftruncate.c 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/mmap_ftruncate.c 2026-08-21 20:57:12.397391689 +0000 @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2025, Klara, Inc. + */ + +/* + * Tests async writeback behaviour. Creates a file, maps it into memory, and + * dirties every page within it. Then, calls ftruncate() to collapse the file + * back down to 0. This causes the kernel to begin writeback on the dirty + * pages so they can be freed, before it can complete the ftruncate() call. + * None of these are sync operations, so they should avoid the various "force + * flush" codepaths. + */ + +#include +#include +#include +#include +#include +#include + +#define _pdfail(f, l, s) \ + do { perror("[" f "#" #l "] " s); exit(2); } while (0) +#define pdfail(str) _pdfail(__FILE__, __LINE__, str) + +int +main(int argc, char **argv) { + if (argc != 3) { + printf("usage: mmap_ftruncate \n"); + exit(2); + } + + const char *file = argv[1]; + + char *end; + off_t sz = strtoull(argv[2], &end, 0); + if (end == argv[2] || *end != '\0' || sz == 0) { + fprintf(stderr, "E: invalid size"); + exit(2); + } + + int fd = open(file, O_CREAT|O_TRUNC|O_RDWR, S_IRUSR|S_IWUSR); + if (fd < 0) + pdfail("open"); + + if (ftruncate(fd, sz) < 0) + pdfail("ftruncate"); + + char *p = mmap(NULL, sz, PROT_WRITE, MAP_SHARED, fd, 0); + if (p == MAP_FAILED) + pdfail("mmap"); + + for (off_t off = 0; off < sz; off += 4096) + p[off] = 1; + + if (ftruncate(fd, 0) < 0) + pdfail("ftruncate"); + + if (munmap(p, sz) < 0) + pdfail("munmap"); + + close(fd); + return (0); +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/setlease.c zfs-linux-2.3.9/tests/zfs-tests/cmd/setlease.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/setlease.c 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/setlease.c 2026-08-21 20:57:12.397391689 +0000 @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: CDDL-1.0 +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or https://opensource.org/licenses/CDDL-1.0. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2026, TrueNAS. + */ + +/* + * This is a sanity check test for the F_SETLEASE and F_GETLEASE fcntl() calls. + * We use the generic kernel implementation, but we want to be alerted if it + * ever breaks. + * + * This is not a comprehensive test. It would be nice if it could be! + */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include + +static int +get_lease(int fd) { + int r = fcntl(fd, F_GETLEASE); + if (r < 0) { + perror("fcntl(GETLEASE)"); + exit(2); + } + return (r); +} + +static int +set_lease(int fd, int lease) { + return (fcntl(fd, F_SETLEASE, lease) < 0 ? errno : 0); +} + +static const char *lease_str[] = { + [F_RDLCK] = "RDLCK", + [F_WRLCK] = "WRLCK", + [F_UNLCK] = "UNLCK", +}; + +static void +assert_lease(int fd, int expect) { + int got = get_lease(fd); + if (got != expect) { + fprintf(stderr, "ASSERT_LEASE: expected %s [%d], got %s [%d]\n", + lease_str[expect], expect, lease_str[got], got); + abort(); + } + printf("ok: lease is %s\n", lease_str[got]); +} + +static void +assert_set_lease(int fd, int lease) { + int err = set_lease(fd, lease); + if (err != 0) { + fprintf(stderr, "ASSERT_SET_LEASE: tried %s [%d], error: %s\n", + lease_str[lease], lease, strerror(err)); + abort(); + } + printf("ok: set lease to %s\n", lease_str[lease]); +} + +int +main(int argc, char **argv) +{ + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + exit(1); + } + + /* create and open file, read+write */ + int fd = open(argv[1], O_CREAT|O_RDONLY, S_IRWXU|S_IRWXG|S_IRWXO); + if (fd < 0) { + perror("open"); + exit(2); + } + printf("ok: opened file RDONLY\n"); + + /* fd starts with no lease */ + assert_lease(fd, F_UNLCK); + + /* fd is readonly, so can take read lease */ + assert_set_lease(fd, F_RDLCK); + /* confirm read lease */ + assert_lease(fd, F_RDLCK); + + /* no other openers, so can take write lease */ + assert_set_lease(fd, F_WRLCK); + /* confirm write lease */ + assert_lease(fd, F_WRLCK); + + /* release lease */ + assert_set_lease(fd, F_UNLCK); + /* confirm lease released */ + assert_lease(fd, F_UNLCK); + + close(fd); + + return (0); +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/statx.c zfs-linux-2.3.9/tests/zfs-tests/cmd/statx.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/statx.c 2025-05-01 18:23:23.844216296 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/statx.c 2026-08-21 20:57:12.397391689 +0000 @@ -109,6 +109,9 @@ #ifndef STATX_DIOALIGN #define STATX_DIOALIGN (1<<13) #endif +#ifndef S_IFMT +#define S_IFMT 0170000 +#endif typedef struct { int64_t tv_sec; diff -Nru zfs-linux-2.3.2/tests/zfs-tests/cmd/threadsappend.c zfs-linux-2.3.9/tests/zfs-tests/cmd/threadsappend.c --- zfs-linux-2.3.2/tests/zfs-tests/cmd/threadsappend.c 2025-05-01 18:23:23.844216296 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/cmd/threadsappend.c 2026-08-21 20:57:12.397391689 +0000 @@ -87,7 +87,7 @@ int main(int argc, char **argv) { - pthread_t tid; + pthread_t tid[2]; int ret = 0; long ncpus = 0; int i; @@ -120,7 +120,7 @@ } for (i = 0; i < 2; i++) { - ret = pthread_create(&tid, NULL, go, (void *)&i); + ret = pthread_create(&tid[i], NULL, go, (void *)&i); if (ret != 0) { (void) fprintf(stderr, "zfs_threadsappend: thr_create(#%d) " @@ -129,8 +129,8 @@ } } - while (pthread_join(tid, NULL) == 0) - continue; + for (i = 0; i < 2; i++) + (void) pthread_join(tid[i], NULL); return (0); } diff -Nru zfs-linux-2.3.2/tests/zfs-tests/include/commands.cfg zfs-linux-2.3.9/tests/zfs-tests/include/commands.cfg --- zfs-linux-2.3.2/tests/zfs-tests/include/commands.cfg 2025-05-01 18:23:23.845216309 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/include/commands.cfg 2026-08-21 20:57:12.398004493 +0000 @@ -14,6 +14,7 @@ bunzip2 bzcat cat + capsh chgrp chmod chown @@ -100,6 +101,7 @@ uniq vmstat wc + which xargs xxh128sum' @@ -146,6 +148,7 @@ lscpu lsmod lsscsi + mkfs.xfs mkswap modprobe mountpoint @@ -180,10 +183,11 @@ zfs_ids_to_path zpool_influxdb' -export ZFSTEST_FILES='badsend +export ZFSTEST_FILES_COMMON='badsend btree_test chg_usr_exec clonefile + clone_after_trunc clone_mmap_cached clone_mmap_write crypto_test @@ -205,6 +209,7 @@ mkfiles mktree mmap_exec + mmap_ftruncate mmap_libaio mmap_seek mmap_sync @@ -237,3 +242,6 @@ zfs_diff-socket dosmode_readonly_write idmap_util' + +export ZFSTEST_FILES_LINUX=' + setlease' diff -Nru zfs-linux-2.3.2/tests/zfs-tests/include/libtest.shlib zfs-linux-2.3.9/tests/zfs-tests/include/libtest.shlib --- zfs-linux-2.3.2/tests/zfs-tests/include/libtest.shlib 2025-05-01 18:23:23.845216309 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/include/libtest.shlib 2026-08-21 20:57:12.398004493 +0000 @@ -559,7 +559,7 @@ # Here, we loop through the pools we're allowed to # destroy, only destroying them if it's safe to do # so. - while [ ! -z ${ALL_POOLS} ] + while [ -n "${ALL_POOLS}" ] do for pool in ${ALL_POOLS} do @@ -2884,7 +2884,9 @@ typeset out=$TEST_BASE_DIR/out typeset err=$TEST_BASE_DIR/err - sudo -Eu $user env PATH="$PATH" ksh <<<"$*" >$out 2>$err + sudo -Eu $user \ + env PATH="$PATH" ZTS_LOG_SUPPRESS_TIMESTAMP=1 \ + ksh <<<"$*" >$out 2>$err typeset res=$? log_note "out: $(<$out)" log_note "err: $(<$err)" @@ -3083,6 +3085,21 @@ done } +# Wait for a pool to be resilvered +# +# $1 pool name +# $2 timeout +# +function wait_resilvered #pool timeout +{ + typeset timeout=${2:-300} + typeset pool=${1:-$TESTPOOL} + for (( timer = 0; timer < $timeout; timer++ )); do + is_pool_resilvered $pool && break; + sleep 1; + done +} + # Backup the zed.rc in our test directory so that we can edit it for our test. # # Returns: Backup file name. You will need to pass this to zed_rc_restore(). @@ -3801,8 +3818,6 @@ # do not match there is a "c" entry in one of the columns). if rsync --version | grep -q "[, ] crtimes"; then args+=("--crtimes") - else - log_note "This rsync package does not support --crtimes (-N)." fi # If we are testing a ZIL replay, we need to ignore timestamp changes. diff -Nru zfs-linux-2.3.2/tests/zfs-tests/include/tunables.cfg zfs-linux-2.3.9/tests/zfs-tests/include/tunables.cfg --- zfs-linux-2.3.2/tests/zfs-tests/include/tunables.cfg 2025-05-01 18:23:23.846216324 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/include/tunables.cfg 2026-08-21 20:57:12.398004493 +0000 @@ -32,11 +32,14 @@ DDT_ZAP_DEFAULT_IBS dedup.ddt_zap_default_ibs ddt_zap_default_ibs DDT_DATA_IS_SPECIAL ddt_data_is_special zfs_ddt_data_is_special DEDUP_LOG_TXG_MAX dedup.log_txg_max zfs_dedup_log_txg_max +DEDUP_LOG_FLUSH_ENTRIES_MAX dedup.log_flush_entries_max zfs_dedup_log_flush_entries_max +DEDUP_LOG_FLUSH_ENTRIES_MIN dedup.log_flush_entries_min zfs_dedup_log_flush_entries_min DEADMAN_CHECKTIME_MS deadman.checktime_ms zfs_deadman_checktime_ms DEADMAN_EVENTS_PER_SECOND deadman_events_per_second zfs_deadman_events_per_second DEADMAN_FAILMODE deadman.failmode zfs_deadman_failmode DEADMAN_SYNCTIME_MS deadman.synctime_ms zfs_deadman_synctime_ms DEADMAN_ZIOTIME_MS deadman.ziotime_ms zfs_deadman_ziotime_ms +DIO_WRITE_VERIFY_EVENTS_PER_SECOND dio_write_verify_events_per_second zfs_dio_write_verify_events_per_second DISABLE_IVSET_GUID_CHECK disable_ivset_guid_check zfs_disable_ivset_guid_check DMU_OFFSET_NEXT_SYNC dmu_offset_next_sync zfs_dmu_offset_next_sync EMBEDDED_SLOG_MIN_MS embedded_slog_min_ms zfs_embedded_slog_min_ms @@ -62,6 +65,7 @@ MAX_MISSING_TVDS max_missing_tvds zfs_max_missing_tvds METASLAB_DEBUG_LOAD metaslab.debug_load metaslab_debug_load METASLAB_FORCE_GANGING metaslab.force_ganging metaslab_force_ganging +METASLAB_FORCE_GANGING_PCT metaslab.force_ganging_pct metaslab_force_ganging_pct MULTIHOST_FAIL_INTERVALS multihost.fail_intervals zfs_multihost_fail_intervals MULTIHOST_HISTORY multihost.history zfs_multihost_history MULTIHOST_IMPORT_INTERVALS multihost.import_intervals zfs_multihost_import_intervals diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/Makefile.am zfs-linux-2.3.9/tests/zfs-tests/tests/Makefile.am --- zfs-linux-2.3.2/tests/zfs-tests/tests/Makefile.am 2025-05-01 18:23:23.846216324 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/Makefile.am 2026-08-21 20:57:12.399004479 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 CLEANFILES = dist_noinst_DATA = include $(top_srcdir)/config/Substfiles.am @@ -106,6 +107,7 @@ functional/channel_program/lua_core/tst.args_to_lua.zcp \ functional/channel_program/lua_core/tst.divide_by_zero.err \ functional/channel_program/lua_core/tst.divide_by_zero.zcp \ + functional/channel_program/lua_core/tst.encryption.zcp \ functional/channel_program/lua_core/tst.exists.zcp \ functional/channel_program/lua_core/tst.large_prog.out \ functional/channel_program/lua_core/tst.large_prog.zcp \ @@ -268,6 +270,7 @@ functional/deadman/deadman.cfg \ functional/delegate/delegate.cfg \ functional/delegate/delegate_common.kshlib \ + functional/device_access/device_access.kshlib \ functional/devices/devices.cfg \ functional/devices/devices_common.kshlib \ functional/direct/dio.cfg \ @@ -275,6 +278,7 @@ functional/events/events.cfg \ functional/events/events_common.kshlib \ functional/fault/fault.cfg \ + functional/gang_blocks/gang_blocks.kshlib \ functional/grow/grow.cfg \ functional/history/history.cfg \ functional/history/history_common.kshlib \ @@ -406,6 +410,7 @@ functional/acl/posix/posix_002_pos.ksh \ functional/acl/posix/posix_003_pos.ksh \ functional/acl/posix/posix_004_pos.ksh \ + functional/acl/posix/posix_005_pos.ksh \ functional/acl/posix-sa/cleanup.ksh \ functional/acl/posix-sa/posix_001_pos.ksh \ functional/acl/posix-sa/posix_002_pos.ksh \ @@ -487,6 +492,8 @@ functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh \ functional/block_cloning/block_cloning_rlimit_fsize.ksh \ functional/block_cloning/block_cloning_large_offset.ksh \ + functional/block_cloning/block_cloning_after_device_removal.ksh \ + functional/block_cloning/block_cloning_after_trunc.ksh \ functional/bootfs/bootfs_001_pos.ksh \ functional/bootfs/bootfs_002_neg.ksh \ functional/bootfs/bootfs_003_pos.ksh \ @@ -542,6 +549,7 @@ functional/channel_program/lua_core/setup.ksh \ functional/channel_program/lua_core/tst.args_to_lua.ksh \ functional/channel_program/lua_core/tst.divide_by_zero.ksh \ + functional/channel_program/lua_core/tst.encryption.ksh \ functional/channel_program/lua_core/tst.exists.ksh \ functional/channel_program/lua_core/tst.integer_illegal.ksh \ functional/channel_program/lua_core/tst.integer_overflow.ksh \ @@ -754,6 +762,9 @@ functional/cli_root/zfs_jail/cleanup.ksh \ functional/cli_root/zfs_jail/setup.ksh \ functional/cli_root/zfs_jail/zfs_jail_001_pos.ksh \ + functional/cli_root/zfs_list/cleanup.ksh \ + functional/cli_root/zfs_list/setup.ksh \ + functional/cli_root/zfs_list/zfs_list_009_pos.ksh \ functional/cli_root/zfs_load-key/cleanup.ksh \ functional/cli_root/zfs_load-key/setup.ksh \ functional/cli_root/zfs_load-key/zfs_load-key_all.ksh \ @@ -827,6 +838,7 @@ functional/cli_root/zfs_receive/zfs_receive_-e.ksh \ functional/cli_root/zfs_receive/zfs_receive_from_encrypted.ksh \ functional/cli_root/zfs_receive/zfs_receive_from_zstd.ksh \ + functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh \ functional/cli_root/zfs_receive/zfs_receive_new_props.ksh \ functional/cli_root/zfs_receive/zfs_receive_raw_-d.ksh \ functional/cli_root/zfs_receive/zfs_receive_raw_incremental.ksh \ @@ -860,6 +872,9 @@ functional/cli_root/zfs_reservation/setup.ksh \ functional/cli_root/zfs_reservation/zfs_reservation_001_pos.ksh \ functional/cli_root/zfs_reservation/zfs_reservation_002_pos.ksh \ + functional/cli_root/zfs_rewrite/cleanup.ksh \ + functional/cli_root/zfs_rewrite/setup.ksh \ + functional/cli_root/zfs_rewrite/zfs_rewrite.ksh \ functional/cli_root/zfs_rollback/cleanup.ksh \ functional/cli_root/zfs_rollback/setup.ksh \ functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh \ @@ -998,6 +1013,7 @@ functional/cli_root/zhack/zhack_label_repair_002.ksh \ functional/cli_root/zhack/zhack_label_repair_003.ksh \ functional/cli_root/zhack/zhack_label_repair_004.ksh \ + functional/cli_root/zhack/zhack_metaslab_leak.ksh \ functional/cli_root/zpool_add/add_nested_replacing_spare.ksh \ functional/cli_root/zpool_add/add-o_ashift.ksh \ functional/cli_root/zpool_add/add_prop_ashift.ksh \ @@ -1012,7 +1028,9 @@ functional/cli_root/zpool_add/zpool_add_007_neg.ksh \ functional/cli_root/zpool_add/zpool_add_008_neg.ksh \ functional/cli_root/zpool_add/zpool_add_009_neg.ksh \ - functional/cli_root/zpool_add/zpool_add_010_pos.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_create.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_removal.ksh \ functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh \ functional/cli_root/zpool_attach/attach-o_ashift.ksh \ functional/cli_root/zpool_attach/cleanup.ksh \ @@ -1083,6 +1101,7 @@ functional/cli_root/zpool_events/zpool_events_errors.ksh \ functional/cli_root/zpool_events/zpool_events_follow.ksh \ functional/cli_root/zpool_events/zpool_events_poolname.ksh \ + functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh \ functional/cli_root/zpool_expand/cleanup.ksh \ functional/cli_root/zpool_expand/setup.ksh \ functional/cli_root/zpool_expand/zpool_expand_001_pos.ksh \ @@ -1090,6 +1109,7 @@ functional/cli_root/zpool_expand/zpool_expand_003_neg.ksh \ functional/cli_root/zpool_expand/zpool_expand_004_pos.ksh \ functional/cli_root/zpool_expand/zpool_expand_005_pos.ksh \ + functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh \ functional/cli_root/zpool_export/cleanup.ksh \ functional/cli_root/zpool_export/setup.ksh \ functional/cli_root/zpool_export/zpool_export_001_pos.ksh \ @@ -1101,6 +1121,7 @@ functional/cli_root/zpool_get/cleanup.ksh \ functional/cli_root/zpool_get/setup.ksh \ functional/cli_root/zpool_get/vdev_get_001_pos.ksh \ + functional/cli_root/zpool_get/vdev_get_all.ksh \ functional/cli_root/zpool_get/zpool_get_001_pos.ksh \ functional/cli_root/zpool_get/zpool_get_002_pos.ksh \ functional/cli_root/zpool_get/zpool_get_003_pos.ksh \ @@ -1269,6 +1290,7 @@ functional/cli_root/zpool_status/zpool_status_006_pos.ksh \ functional/cli_root/zpool_status/zpool_status_007_pos.ksh \ functional/cli_root/zpool_status/zpool_status_008_pos.ksh \ + functional/cli_root/zpool_status/zpool_status_009_pos.ksh \ functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh \ functional/cli_root/zpool_sync/cleanup.ksh \ functional/cli_root/zpool_sync/setup.ksh \ @@ -1432,18 +1454,24 @@ functional/crtime/setup.ksh \ functional/crypto/icp_aes_ccm.ksh \ functional/crypto/icp_aes_gcm.ksh \ + functional/ctime/cleanup.ksh \ + functional/ctime/ctime_001_pos.ksh \ + functional/ctime/setup.ksh \ functional/deadman/deadman_ratelimit.ksh \ functional/deadman/deadman_sync.ksh \ functional/deadman/deadman_zio.ksh \ functional/dedup/cleanup.ksh \ functional/dedup/setup.ksh \ + functional/dedup/dedup_bclone_pruned.ksh \ functional/dedup/dedup_fdt_create.ksh \ functional/dedup/dedup_fdt_import.ksh \ + functional/dedup/dedup_fdt_pacing.ksh \ functional/dedup/dedup_legacy_create.ksh \ functional/dedup/dedup_legacy_import.ksh \ functional/dedup/dedup_legacy_fdt_upgrade.ksh \ functional/dedup/dedup_legacy_fdt_mixed.ksh \ functional/dedup/dedup_prune.ksh \ + functional/dedup/dedup_prune_leak.ksh \ functional/dedup/dedup_quota.ksh \ functional/dedup/dedup_zap_shrink.ksh \ functional/delegate/cleanup.ksh \ @@ -1468,6 +1496,12 @@ functional/delegate/zfs_unallow_006_pos.ksh \ functional/delegate/zfs_unallow_007_neg.ksh \ functional/delegate/zfs_unallow_008_neg.ksh \ + functional/device_access/cleanup.ksh \ + functional/device_access/setup.ksh \ + functional/device_access/device_access_create.ksh \ + functional/device_access/device_access_attach.ksh \ + functional/device_access/device_access_add.ksh \ + functional/device_access/device_access_import.ksh \ functional/devices/cleanup.ksh \ functional/devices/devices_001_pos.ksh \ functional/devices/devices_002_neg.ksh \ @@ -1519,6 +1553,7 @@ functional/fadvise/fadvise_sequential.ksh \ functional/fadvise/setup.ksh \ functional/fallocate/cleanup.ksh \ + functional/fallocate/fallocate_extend_timestamps.ksh \ functional/fallocate/fallocate_prealloc.ksh \ functional/fallocate/fallocate_punch-hole.ksh \ functional/fallocate/fallocate_zero-range.ksh \ @@ -1531,6 +1566,7 @@ functional/fault/auto_spare_001_pos.ksh \ functional/fault/auto_spare_002_pos.ksh \ functional/fault/auto_spare_ashift.ksh \ + functional/fault/auto_spare_double.ksh \ functional/fault/auto_spare_multiple.ksh \ functional/fault/auto_spare_shared.ksh \ functional/fault/cleanup.ksh \ @@ -1556,6 +1592,9 @@ functional/features/large_dnode/large_dnode_008_pos.ksh \ functional/features/large_dnode/large_dnode_009_pos.ksh \ functional/features/large_dnode/setup.ksh \ + functional/gang_blocks/cleanup.ksh \ + functional/gang_blocks/gang_blocks_redundant.ksh \ + functional/gang_blocks/setup.ksh \ functional/grow/grow_pool_001_pos.ksh \ functional/grow/grow_replicas_001_pos.ksh \ functional/history/cleanup.ksh \ @@ -1589,6 +1628,9 @@ functional/io/psync.ksh \ functional/io/setup.ksh \ functional/io/sync.ksh \ + functional/lease/cleanup.ksh \ + functional/lease/lease_setlease.ksh \ + functional/lease/setup.ksh \ functional/l2arc/cleanup.ksh \ functional/l2arc/l2arc_arcstats_pos.ksh \ functional/l2arc/l2arc_l2miss_pos.ksh \ @@ -1644,9 +1686,12 @@ functional/mmap/mmap_seek_001_pos.ksh \ functional/mmap/mmap_sync_001_pos.ksh \ functional/mmap/mmap_write_001_pos.ksh \ + functional/mmap/mmap_ftruncate.ksh \ functional/mmap/setup.ksh \ functional/mmp/cleanup.ksh \ functional/mmp/mmp_active_import.ksh \ + functional/mmp/mmp_concurrent_import.ksh \ + functional/mmp/mmp_degraded_import.ksh \ functional/mmp/mmp_exported_import.ksh \ functional/mmp/mmp_hostid.ksh \ functional/mmp/mmp_inactive_import.ksh \ @@ -1659,10 +1704,12 @@ functional/mmp/mmp_write_distribution.ksh \ functional/mmp/mmp_write_slow_disk.ksh \ functional/mmp/mmp_write_uberblocks.ksh \ + functional/mmp/mmp_zhack_reclaim.ksh \ functional/mmp/multihost_history.ksh \ functional/mmp/setup.ksh \ functional/mount/cleanup.ksh \ functional/mount/setup.ksh \ + functional/mount/mount_loopback.ksh \ functional/mount/umount_001.ksh \ functional/mount/umountall_001.ksh \ functional/mount/umount_unlinked_drain.ksh \ @@ -1792,6 +1839,7 @@ functional/redacted_send/redacted_holes.ksh \ functional/redacted_send/redacted_incrementals.ksh \ functional/redacted_send/redacted_largeblocks.ksh \ + functional/redacted_send/redacted_max_blkid.ksh \ functional/redacted_send/redacted_many_clones.ksh \ functional/redacted_send/redacted_mixed_recsize.ksh \ functional/redacted_send/redacted_mounts.ksh \ @@ -1809,6 +1857,8 @@ functional/redundancy/redundancy_draid3.ksh \ functional/redundancy/redundancy_draid_damaged1.ksh \ functional/redundancy/redundancy_draid_damaged2.ksh \ + functional/redundancy/redundancy_draid_degraded1.ksh \ + functional/redundancy/redundancy_draid_degraded2.ksh \ functional/redundancy/redundancy_draid.ksh \ functional/redundancy/redundancy_draid_spare1.ksh \ functional/redundancy/redundancy_draid_spare2.ksh \ @@ -1858,6 +1908,7 @@ functional/removal/removal_with_faulted.ksh \ functional/removal/removal_with_ganging.ksh \ functional/removal/removal_with_hole.ksh \ + functional/removal/removal_with_missing_log.ksh \ functional/removal/removal_with_indirect.ksh \ functional/removal/removal_with_remove.ksh \ functional/removal/removal_with_scrub.ksh \ @@ -1982,6 +2033,7 @@ functional/rsend/send_holds.ksh \ functional/rsend/send_hole_birth.ksh \ functional/rsend/send_invalid.ksh \ + functional/rsend/send_leak_keymaps.ksh \ functional/rsend/send-L_toggle.ksh \ functional/rsend/send_mixed_raw.ksh \ functional/rsend/send_partial_dataset.ksh \ @@ -2059,6 +2111,7 @@ functional/stat/setup.ksh \ functional/stat/stat_001_pos.ksh \ functional/stat/statx_dioalign.ksh \ + functional/syncfs/syncfs_suspend.ksh \ functional/suid/cleanup.ksh \ functional/suid/setup.ksh \ functional/suid/suid_write_to_none.ksh \ @@ -2091,6 +2144,8 @@ functional/user_namespace/user_namespace_002.ksh \ functional/user_namespace/user_namespace_003.ksh \ functional/user_namespace/user_namespace_004.ksh \ + functional/user_namespace/user_namespace_secpolicy_sys_config.ksh \ + functional/user_namespace/user_namespace_secpolicy_zinject.ksh \ functional/userquota/cleanup.ksh \ functional/userquota/groupspace_001_pos.ksh \ functional/userquota/groupspace_002_pos.ksh \ diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/Makefile.in zfs-linux-2.3.9/tests/zfs-tests/tests/Makefile.in --- zfs-linux-2.3.2/tests/zfs-tests/tests/Makefile.in 2025-05-01 18:45:11.142848581 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/Makefile.in 2026-08-21 21:15:40.108625985 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -129,17 +129,22 @@ $(top_srcdir)/config/kernel-block-device-operations.m4 \ $(top_srcdir)/config/kernel-commit-metadata.m4 \ $(top_srcdir)/config/kernel-config-defined.m4 \ - $(top_srcdir)/config/kernel-copy-from-user-inatomic.m4 \ $(top_srcdir)/config/kernel-cpu_has_feature.m4 \ $(top_srcdir)/config/kernel-declare-event-class.m4 \ + $(top_srcdir)/config/kernel-dentry-alias.m4 \ + $(top_srcdir)/config/kernel-dentry-operations.m4 \ $(top_srcdir)/config/kernel-discard-granularity.m4 \ + $(top_srcdir)/config/kernel-drop-inode.m4 \ $(top_srcdir)/config/kernel-file.m4 \ + $(top_srcdir)/config/kernel-filelock.m4 \ $(top_srcdir)/config/kernel-filemap-splice-read.m4 \ $(top_srcdir)/config/kernel-flush_dcache_page.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ - $(top_srcdir)/config/kernel-follow-down-one.m4 \ + $(top_srcdir)/config/kernel-follow-down.m4 \ $(top_srcdir)/config/kernel-fpu.m4 \ - $(top_srcdir)/config/kernel-fst-mount.m4 \ + $(top_srcdir)/config/kernel-free-inode.m4 \ + $(top_srcdir)/config/kernel-fs-context.m4 \ + $(top_srcdir)/config/kernel-fs-parse.m4 \ $(top_srcdir)/config/kernel-fsync-bdev.m4 \ $(top_srcdir)/config/kernel-generic_fadvise.m4 \ $(top_srcdir)/config/kernel-generic_fillattr.m4 \ @@ -147,15 +152,18 @@ $(top_srcdir)/config/kernel-genhd-flags.m4 \ $(top_srcdir)/config/kernel-get-disk-ro.m4 \ $(top_srcdir)/config/kernel-iattr-vfsid.m4 \ + $(top_srcdir)/config/kernel-idmap.m4 \ $(top_srcdir)/config/kernel-idmap_mnt_api.m4 \ $(top_srcdir)/config/kernel-inode-create.m4 \ $(top_srcdir)/config/kernel-inode-getattr.m4 \ $(top_srcdir)/config/kernel-inode-lookup.m4 \ $(top_srcdir)/config/kernel-inode-permission.m4 \ $(top_srcdir)/config/kernel-inode-setattr.m4 \ + $(top_srcdir)/config/kernel-inode-state.m4 \ $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-insert-inode-locked.m4 \ $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \ + $(top_srcdir)/config/kernel-kasan-enabled.m4 \ $(top_srcdir)/config/kernel-kmap-atomic-args.m4 \ $(top_srcdir)/config/kernel-kmap-local-page.m4 \ $(top_srcdir)/config/kernel-kmem.m4 \ @@ -168,23 +176,24 @@ $(top_srcdir)/config/kernel-mknod.m4 \ $(top_srcdir)/config/kernel-mm-page-flags.m4 \ $(top_srcdir)/config/kernel-mm-pagemap.m4 \ + $(top_srcdir)/config/kernel-namespace.m4 \ $(top_srcdir)/config/kernel-objtool.m4 \ $(top_srcdir)/config/kernel-pagemap-folio_wait_bit.m4 \ + $(top_srcdir)/config/kernel-pagemap-readahead-page.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ $(top_srcdir)/config/kernel-percpu.m4 \ $(top_srcdir)/config/kernel-pin-user-pages.m4 \ $(top_srcdir)/config/kernel-proc-operations.m4 \ - $(top_srcdir)/config/kernel-readpages.m4 \ $(top_srcdir)/config/kernel-reclaim_state.m4 \ $(top_srcdir)/config/kernel-register_sysctl_table.m4 \ $(top_srcdir)/config/kernel-rename.m4 \ $(top_srcdir)/config/kernel-revalidate-disk-size.m4 \ $(top_srcdir)/config/kernel-sb-dying.m4 \ + $(top_srcdir)/config/kernel-sb-wb-err.m4 \ $(top_srcdir)/config/kernel-sched.m4 \ $(top_srcdir)/config/kernel-security-inode-init.m4 \ $(top_srcdir)/config/kernel-set-nlink.m4 \ $(top_srcdir)/config/kernel-setattr-prepare.m4 \ - $(top_srcdir)/config/kernel-sget-args.m4 \ $(top_srcdir)/config/kernel-show-options.m4 \ $(top_srcdir)/config/kernel-shrink.m4 \ $(top_srcdir)/config/kernel-siginfo.m4 \ @@ -192,6 +201,7 @@ $(top_srcdir)/config/kernel-strlcpy.m4 \ $(top_srcdir)/config/kernel-symlink.m4 \ $(top_srcdir)/config/kernel-sysfs.m4 \ + $(top_srcdir)/config/kernel-timer.m4 \ $(top_srcdir)/config/kernel-tmpfile.m4 \ $(top_srcdir)/config/kernel-totalhigh_pages.m4 \ $(top_srcdir)/config/kernel-totalram-pages-func.m4 \ @@ -205,8 +215,11 @@ $(top_srcdir)/config/kernel-vfs-migrate_folio.m4 \ $(top_srcdir)/config/kernel-vfs-migratepage.m4 \ $(top_srcdir)/config/kernel-vfs-read_folio.m4 \ + $(top_srcdir)/config/kernel-vfs-readpages.m4 \ $(top_srcdir)/config/kernel-vfs-set_page_dirty.m4 \ - $(top_srcdir)/config/kernel-writepage_t.m4 \ + $(top_srcdir)/config/kernel-vfs-writepage.m4 \ + $(top_srcdir)/config/kernel-workqueue.m4 \ + $(top_srcdir)/config/kernel-writeback.m4 \ $(top_srcdir)/config/kernel-xattr-handler.m4 \ $(top_srcdir)/config/kernel-zero_page.m4 \ $(top_srcdir)/config/kernel.m4 $(top_srcdir)/config/lib-ld.m4 \ @@ -220,6 +233,7 @@ $(top_srcdir)/config/mount-helper.m4 \ $(top_srcdir)/config/nls.m4 $(top_srcdir)/config/pkg.m4 \ $(top_srcdir)/config/po.m4 $(top_srcdir)/config/progtest.m4 \ + $(top_srcdir)/config/toolchain-cfi.m4 \ $(top_srcdir)/config/toolchain-simd.m4 \ $(top_srcdir)/config/user-aio.h.m4 \ $(top_srcdir)/config/user-backtrace.m4 \ @@ -237,8 +251,10 @@ $(top_srcdir)/config/user-libunwind.m4 \ $(top_srcdir)/config/user-libuuid.m4 \ $(top_srcdir)/config/user-makedev.m4 \ + $(top_srcdir)/config/user-mount-setattr.m4 \ $(top_srcdir)/config/user-pam.m4 \ $(top_srcdir)/config/user-runstatedir.m4 \ + $(top_srcdir)/config/user-statx.m4 \ $(top_srcdir)/config/user-systemd.m4 \ $(top_srcdir)/config/user-sysvinit.m4 \ $(top_srcdir)/config/user-udev.m4 \ @@ -277,6 +293,7 @@ functional/acl/posix/posix_002_pos.ksh \ functional/acl/posix/posix_003_pos.ksh \ functional/acl/posix/posix_004_pos.ksh \ + functional/acl/posix/posix_005_pos.ksh \ functional/acl/posix-sa/cleanup.ksh \ functional/acl/posix-sa/posix_001_pos.ksh \ functional/acl/posix-sa/posix_002_pos.ksh \ @@ -355,6 +372,8 @@ functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh \ functional/block_cloning/block_cloning_rlimit_fsize.ksh \ functional/block_cloning/block_cloning_large_offset.ksh \ + functional/block_cloning/block_cloning_after_device_removal.ksh \ + functional/block_cloning/block_cloning_after_trunc.ksh \ functional/bootfs/bootfs_001_pos.ksh \ functional/bootfs/bootfs_002_neg.ksh \ functional/bootfs/bootfs_003_pos.ksh \ @@ -408,6 +427,7 @@ functional/channel_program/lua_core/setup.ksh \ functional/channel_program/lua_core/tst.args_to_lua.ksh \ functional/channel_program/lua_core/tst.divide_by_zero.ksh \ + functional/channel_program/lua_core/tst.encryption.ksh \ functional/channel_program/lua_core/tst.exists.ksh \ functional/channel_program/lua_core/tst.integer_illegal.ksh \ functional/channel_program/lua_core/tst.integer_overflow.ksh \ @@ -619,6 +639,9 @@ functional/cli_root/zfs_jail/cleanup.ksh \ functional/cli_root/zfs_jail/setup.ksh \ functional/cli_root/zfs_jail/zfs_jail_001_pos.ksh \ + functional/cli_root/zfs_list/cleanup.ksh \ + functional/cli_root/zfs_list/setup.ksh \ + functional/cli_root/zfs_list/zfs_list_009_pos.ksh \ functional/cli_root/zfs_load-key/cleanup.ksh \ functional/cli_root/zfs_load-key/setup.ksh \ functional/cli_root/zfs_load-key/zfs_load-key_all.ksh \ @@ -692,6 +715,7 @@ functional/cli_root/zfs_receive/zfs_receive_-e.ksh \ functional/cli_root/zfs_receive/zfs_receive_from_encrypted.ksh \ functional/cli_root/zfs_receive/zfs_receive_from_zstd.ksh \ + functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh \ functional/cli_root/zfs_receive/zfs_receive_new_props.ksh \ functional/cli_root/zfs_receive/zfs_receive_raw_-d.ksh \ functional/cli_root/zfs_receive/zfs_receive_raw_incremental.ksh \ @@ -725,6 +749,9 @@ functional/cli_root/zfs_reservation/setup.ksh \ functional/cli_root/zfs_reservation/zfs_reservation_001_pos.ksh \ functional/cli_root/zfs_reservation/zfs_reservation_002_pos.ksh \ + functional/cli_root/zfs_rewrite/cleanup.ksh \ + functional/cli_root/zfs_rewrite/setup.ksh \ + functional/cli_root/zfs_rewrite/zfs_rewrite.ksh \ functional/cli_root/zfs_rollback/cleanup.ksh \ functional/cli_root/zfs_rollback/setup.ksh \ functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh \ @@ -863,6 +890,7 @@ functional/cli_root/zhack/zhack_label_repair_002.ksh \ functional/cli_root/zhack/zhack_label_repair_003.ksh \ functional/cli_root/zhack/zhack_label_repair_004.ksh \ + functional/cli_root/zhack/zhack_metaslab_leak.ksh \ functional/cli_root/zpool_add/add_nested_replacing_spare.ksh \ functional/cli_root/zpool_add/add-o_ashift.ksh \ functional/cli_root/zpool_add/add_prop_ashift.ksh \ @@ -877,7 +905,9 @@ functional/cli_root/zpool_add/zpool_add_007_neg.ksh \ functional/cli_root/zpool_add/zpool_add_008_neg.ksh \ functional/cli_root/zpool_add/zpool_add_009_neg.ksh \ - functional/cli_root/zpool_add/zpool_add_010_pos.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_create.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_removal.ksh \ functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh \ functional/cli_root/zpool_attach/attach-o_ashift.ksh \ functional/cli_root/zpool_attach/cleanup.ksh \ @@ -948,6 +978,7 @@ functional/cli_root/zpool_events/zpool_events_errors.ksh \ functional/cli_root/zpool_events/zpool_events_follow.ksh \ functional/cli_root/zpool_events/zpool_events_poolname.ksh \ + functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh \ functional/cli_root/zpool_expand/cleanup.ksh \ functional/cli_root/zpool_expand/setup.ksh \ functional/cli_root/zpool_expand/zpool_expand_001_pos.ksh \ @@ -955,6 +986,7 @@ functional/cli_root/zpool_expand/zpool_expand_003_neg.ksh \ functional/cli_root/zpool_expand/zpool_expand_004_pos.ksh \ functional/cli_root/zpool_expand/zpool_expand_005_pos.ksh \ + functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh \ functional/cli_root/zpool_export/cleanup.ksh \ functional/cli_root/zpool_export/setup.ksh \ functional/cli_root/zpool_export/zpool_export_001_pos.ksh \ @@ -966,6 +998,7 @@ functional/cli_root/zpool_get/cleanup.ksh \ functional/cli_root/zpool_get/setup.ksh \ functional/cli_root/zpool_get/vdev_get_001_pos.ksh \ + functional/cli_root/zpool_get/vdev_get_all.ksh \ functional/cli_root/zpool_get/zpool_get_001_pos.ksh \ functional/cli_root/zpool_get/zpool_get_002_pos.ksh \ functional/cli_root/zpool_get/zpool_get_003_pos.ksh \ @@ -1134,6 +1167,7 @@ functional/cli_root/zpool_status/zpool_status_006_pos.ksh \ functional/cli_root/zpool_status/zpool_status_007_pos.ksh \ functional/cli_root/zpool_status/zpool_status_008_pos.ksh \ + functional/cli_root/zpool_status/zpool_status_009_pos.ksh \ functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh \ functional/cli_root/zpool_sync/cleanup.ksh \ functional/cli_root/zpool_sync/setup.ksh \ @@ -1294,18 +1328,22 @@ functional/cp_files/setup.ksh functional/crtime/cleanup.ksh \ functional/crtime/crtime_001_pos.ksh \ functional/crtime/setup.ksh functional/crypto/icp_aes_ccm.ksh \ - functional/crypto/icp_aes_gcm.ksh \ + functional/crypto/icp_aes_gcm.ksh functional/ctime/cleanup.ksh \ + functional/ctime/ctime_001_pos.ksh functional/ctime/setup.ksh \ functional/deadman/deadman_ratelimit.ksh \ functional/deadman/deadman_sync.ksh \ functional/deadman/deadman_zio.ksh \ functional/dedup/cleanup.ksh functional/dedup/setup.ksh \ + functional/dedup/dedup_bclone_pruned.ksh \ functional/dedup/dedup_fdt_create.ksh \ functional/dedup/dedup_fdt_import.ksh \ + functional/dedup/dedup_fdt_pacing.ksh \ functional/dedup/dedup_legacy_create.ksh \ functional/dedup/dedup_legacy_import.ksh \ functional/dedup/dedup_legacy_fdt_upgrade.ksh \ functional/dedup/dedup_legacy_fdt_mixed.ksh \ functional/dedup/dedup_prune.ksh \ + functional/dedup/dedup_prune_leak.ksh \ functional/dedup/dedup_quota.ksh \ functional/dedup/dedup_zap_shrink.ksh \ functional/delegate/cleanup.ksh functional/delegate/setup.ksh \ @@ -1329,6 +1367,12 @@ functional/delegate/zfs_unallow_006_pos.ksh \ functional/delegate/zfs_unallow_007_neg.ksh \ functional/delegate/zfs_unallow_008_neg.ksh \ + functional/device_access/cleanup.ksh \ + functional/device_access/setup.ksh \ + functional/device_access/device_access_create.ksh \ + functional/device_access/device_access_attach.ksh \ + functional/device_access/device_access_add.ksh \ + functional/device_access/device_access_import.ksh \ functional/devices/cleanup.ksh \ functional/devices/devices_001_pos.ksh \ functional/devices/devices_002_neg.ksh \ @@ -1375,6 +1419,7 @@ functional/fadvise/cleanup.ksh \ functional/fadvise/fadvise_sequential.ksh \ functional/fadvise/setup.ksh functional/fallocate/cleanup.ksh \ + functional/fallocate/fallocate_extend_timestamps.ksh \ functional/fallocate/fallocate_prealloc.ksh \ functional/fallocate/fallocate_punch-hole.ksh \ functional/fallocate/fallocate_zero-range.ksh \ @@ -1387,6 +1432,7 @@ functional/fault/auto_spare_001_pos.ksh \ functional/fault/auto_spare_002_pos.ksh \ functional/fault/auto_spare_ashift.ksh \ + functional/fault/auto_spare_double.ksh \ functional/fault/auto_spare_multiple.ksh \ functional/fault/auto_spare_shared.ksh \ functional/fault/cleanup.ksh \ @@ -1412,6 +1458,9 @@ functional/features/large_dnode/large_dnode_008_pos.ksh \ functional/features/large_dnode/large_dnode_009_pos.ksh \ functional/features/large_dnode/setup.ksh \ + functional/gang_blocks/cleanup.ksh \ + functional/gang_blocks/gang_blocks_redundant.ksh \ + functional/gang_blocks/setup.ksh \ functional/grow/grow_pool_001_pos.ksh \ functional/grow/grow_replicas_001_pos.ksh \ functional/history/cleanup.ksh \ @@ -1440,6 +1489,8 @@ functional/io/libaio.ksh functional/io/mmap.ksh \ functional/io/posixaio.ksh functional/io/psync.ksh \ functional/io/setup.ksh functional/io/sync.ksh \ + functional/lease/cleanup.ksh \ + functional/lease/lease_setlease.ksh functional/lease/setup.ksh \ functional/l2arc/cleanup.ksh \ functional/l2arc/l2arc_arcstats_pos.ksh \ functional/l2arc/l2arc_l2miss_pos.ksh \ @@ -1492,8 +1543,11 @@ functional/mmap/mmap_seek_001_pos.ksh \ functional/mmap/mmap_sync_001_pos.ksh \ functional/mmap/mmap_write_001_pos.ksh \ - functional/mmap/setup.ksh functional/mmp/cleanup.ksh \ + functional/mmap/mmap_ftruncate.ksh functional/mmap/setup.ksh \ + functional/mmp/cleanup.ksh \ functional/mmp/mmp_active_import.ksh \ + functional/mmp/mmp_concurrent_import.ksh \ + functional/mmp/mmp_degraded_import.ksh \ functional/mmp/mmp_exported_import.ksh \ functional/mmp/mmp_hostid.ksh \ functional/mmp/mmp_inactive_import.ksh \ @@ -1505,8 +1559,10 @@ functional/mmp/mmp_write_distribution.ksh \ functional/mmp/mmp_write_slow_disk.ksh \ functional/mmp/mmp_write_uberblocks.ksh \ + functional/mmp/mmp_zhack_reclaim.ksh \ functional/mmp/multihost_history.ksh functional/mmp/setup.ksh \ functional/mount/cleanup.ksh functional/mount/setup.ksh \ + functional/mount/mount_loopback.ksh \ functional/mount/umount_001.ksh \ functional/mount/umountall_001.ksh \ functional/mount/umount_unlinked_drain.ksh \ @@ -1628,6 +1684,7 @@ functional/redacted_send/redacted_holes.ksh \ functional/redacted_send/redacted_incrementals.ksh \ functional/redacted_send/redacted_largeblocks.ksh \ + functional/redacted_send/redacted_max_blkid.ksh \ functional/redacted_send/redacted_many_clones.ksh \ functional/redacted_send/redacted_mixed_recsize.ksh \ functional/redacted_send/redacted_mounts.ksh \ @@ -1645,6 +1702,8 @@ functional/redundancy/redundancy_draid3.ksh \ functional/redundancy/redundancy_draid_damaged1.ksh \ functional/redundancy/redundancy_draid_damaged2.ksh \ + functional/redundancy/redundancy_draid_degraded1.ksh \ + functional/redundancy/redundancy_draid_degraded2.ksh \ functional/redundancy/redundancy_draid.ksh \ functional/redundancy/redundancy_draid_spare1.ksh \ functional/redundancy/redundancy_draid_spare2.ksh \ @@ -1692,6 +1751,7 @@ functional/removal/removal_with_faulted.ksh \ functional/removal/removal_with_ganging.ksh \ functional/removal/removal_with_hole.ksh \ + functional/removal/removal_with_missing_log.ksh \ functional/removal/removal_with_indirect.ksh \ functional/removal/removal_with_remove.ksh \ functional/removal/removal_with_scrub.ksh \ @@ -1815,6 +1875,7 @@ functional/rsend/send_holds.ksh \ functional/rsend/send_hole_birth.ksh \ functional/rsend/send_invalid.ksh \ + functional/rsend/send_leak_keymaps.ksh \ functional/rsend/send-L_toggle.ksh \ functional/rsend/send_mixed_raw.ksh \ functional/rsend/send_partial_dataset.ksh \ @@ -1885,8 +1946,9 @@ functional/sparse/sparse_001_pos.ksh \ functional/stat/cleanup.ksh functional/stat/setup.ksh \ functional/stat/stat_001_pos.ksh \ - functional/stat/statx_dioalign.ksh functional/suid/cleanup.ksh \ - functional/suid/setup.ksh \ + functional/stat/statx_dioalign.ksh \ + functional/syncfs/syncfs_suspend.ksh \ + functional/suid/cleanup.ksh functional/suid/setup.ksh \ functional/suid/suid_write_to_none.ksh \ functional/suid/suid_write_to_sgid.ksh \ functional/suid/suid_write_to_suid.ksh \ @@ -1914,6 +1976,8 @@ functional/user_namespace/user_namespace_002.ksh \ functional/user_namespace/user_namespace_003.ksh \ functional/user_namespace/user_namespace_004.ksh \ + functional/user_namespace/user_namespace_secpolicy_sys_config.ksh \ + functional/user_namespace/user_namespace_secpolicy_zinject.ksh \ functional/userquota/cleanup.ksh \ functional/userquota/groupspace_001_pos.ksh \ functional/userquota/groupspace_002_pos.ksh \ @@ -2106,11 +2170,10 @@ CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ +CPP = @CPP@ CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPU_COUNT = @CPU_COUNT@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEBUGINFO_ZFS = @DEBUGINFO_ZFS@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ @@ -2140,10 +2203,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ FORMAT_OVERFLOW = @FORMAT_OVERFLOW@ FRAME_LARGER_THAN = @FRAME_LARGER_THAN@ GCOV = @GCOV@ @@ -2165,6 +2226,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ IS_SYSV_RC = @IS_SYSV_RC@ KERNEL_ARCH = @KERNEL_ARCH@ KERNEL_CC = @KERNEL_CC@ @@ -2237,6 +2299,7 @@ NO_OMIT_FRAME_POINTER = @NO_OMIT_FRAME_POINTER@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OBJTOOL_DISABLE_WERROR = @OBJTOOL_DISABLE_WERROR@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -2320,6 +2383,7 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_PC = @ZLIB_PC@ abs_builddir = @abs_builddir@ +abs_objtool_binary = @abs_objtool_binary@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ @@ -2399,8 +2463,12 @@ udevdir = @udevdir@ udevruledir = @udevruledir@ zfsexecdir = @zfsexecdir@ + +# SPDX-License-Identifier: CDDL-1.0 CLEANFILES = $(SUBSTFILES) dist_noinst_DATA = $(SUBSTFILES:=.in) + +# SPDX-License-Identifier: CDDL-1.0 subst_sed_cmd = \ -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ @@ -2458,6 +2526,7 @@ functional/channel_program/lua_core/tst.args_to_lua.zcp \ functional/channel_program/lua_core/tst.divide_by_zero.err \ functional/channel_program/lua_core/tst.divide_by_zero.zcp \ + functional/channel_program/lua_core/tst.encryption.zcp \ functional/channel_program/lua_core/tst.exists.zcp \ functional/channel_program/lua_core/tst.large_prog.out \ functional/channel_program/lua_core/tst.large_prog.zcp \ @@ -2620,13 +2689,15 @@ functional/deadman/deadman.cfg \ functional/delegate/delegate.cfg \ functional/delegate/delegate_common.kshlib \ + functional/device_access/device_access.kshlib \ functional/devices/devices.cfg \ functional/devices/devices_common.kshlib \ functional/direct/dio.cfg functional/direct/dio.kshlib \ functional/events/events.cfg \ functional/events/events_common.kshlib \ - functional/fault/fault.cfg functional/grow/grow.cfg \ - functional/history/history.cfg \ + functional/fault/fault.cfg \ + functional/gang_blocks/gang_blocks.kshlib \ + functional/grow/grow.cfg functional/history/history.cfg \ functional/history/history_common.kshlib \ functional/history/i386.migratedpool.DAT.Z \ functional/history/i386.orig_history.txt \ @@ -2754,6 +2825,7 @@ functional/acl/posix/posix_002_pos.ksh \ functional/acl/posix/posix_003_pos.ksh \ functional/acl/posix/posix_004_pos.ksh \ + functional/acl/posix/posix_005_pos.ksh \ functional/acl/posix-sa/cleanup.ksh \ functional/acl/posix-sa/posix_001_pos.ksh \ functional/acl/posix-sa/posix_002_pos.ksh \ @@ -2832,6 +2904,8 @@ functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh \ functional/block_cloning/block_cloning_rlimit_fsize.ksh \ functional/block_cloning/block_cloning_large_offset.ksh \ + functional/block_cloning/block_cloning_after_device_removal.ksh \ + functional/block_cloning/block_cloning_after_trunc.ksh \ functional/bootfs/bootfs_001_pos.ksh \ functional/bootfs/bootfs_002_neg.ksh \ functional/bootfs/bootfs_003_pos.ksh \ @@ -2885,6 +2959,7 @@ functional/channel_program/lua_core/setup.ksh \ functional/channel_program/lua_core/tst.args_to_lua.ksh \ functional/channel_program/lua_core/tst.divide_by_zero.ksh \ + functional/channel_program/lua_core/tst.encryption.ksh \ functional/channel_program/lua_core/tst.exists.ksh \ functional/channel_program/lua_core/tst.integer_illegal.ksh \ functional/channel_program/lua_core/tst.integer_overflow.ksh \ @@ -3096,6 +3171,9 @@ functional/cli_root/zfs_jail/cleanup.ksh \ functional/cli_root/zfs_jail/setup.ksh \ functional/cli_root/zfs_jail/zfs_jail_001_pos.ksh \ + functional/cli_root/zfs_list/cleanup.ksh \ + functional/cli_root/zfs_list/setup.ksh \ + functional/cli_root/zfs_list/zfs_list_009_pos.ksh \ functional/cli_root/zfs_load-key/cleanup.ksh \ functional/cli_root/zfs_load-key/setup.ksh \ functional/cli_root/zfs_load-key/zfs_load-key_all.ksh \ @@ -3169,6 +3247,7 @@ functional/cli_root/zfs_receive/zfs_receive_-e.ksh \ functional/cli_root/zfs_receive/zfs_receive_from_encrypted.ksh \ functional/cli_root/zfs_receive/zfs_receive_from_zstd.ksh \ + functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh \ functional/cli_root/zfs_receive/zfs_receive_new_props.ksh \ functional/cli_root/zfs_receive/zfs_receive_raw_-d.ksh \ functional/cli_root/zfs_receive/zfs_receive_raw_incremental.ksh \ @@ -3202,6 +3281,9 @@ functional/cli_root/zfs_reservation/setup.ksh \ functional/cli_root/zfs_reservation/zfs_reservation_001_pos.ksh \ functional/cli_root/zfs_reservation/zfs_reservation_002_pos.ksh \ + functional/cli_root/zfs_rewrite/cleanup.ksh \ + functional/cli_root/zfs_rewrite/setup.ksh \ + functional/cli_root/zfs_rewrite/zfs_rewrite.ksh \ functional/cli_root/zfs_rollback/cleanup.ksh \ functional/cli_root/zfs_rollback/setup.ksh \ functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh \ @@ -3340,6 +3422,7 @@ functional/cli_root/zhack/zhack_label_repair_002.ksh \ functional/cli_root/zhack/zhack_label_repair_003.ksh \ functional/cli_root/zhack/zhack_label_repair_004.ksh \ + functional/cli_root/zhack/zhack_metaslab_leak.ksh \ functional/cli_root/zpool_add/add_nested_replacing_spare.ksh \ functional/cli_root/zpool_add/add-o_ashift.ksh \ functional/cli_root/zpool_add/add_prop_ashift.ksh \ @@ -3354,7 +3437,9 @@ functional/cli_root/zpool_add/zpool_add_007_neg.ksh \ functional/cli_root/zpool_add/zpool_add_008_neg.ksh \ functional/cli_root/zpool_add/zpool_add_009_neg.ksh \ - functional/cli_root/zpool_add/zpool_add_010_pos.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_create.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh \ + functional/cli_root/zpool_add/zpool_add_warn_removal.ksh \ functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh \ functional/cli_root/zpool_attach/attach-o_ashift.ksh \ functional/cli_root/zpool_attach/cleanup.ksh \ @@ -3425,6 +3510,7 @@ functional/cli_root/zpool_events/zpool_events_errors.ksh \ functional/cli_root/zpool_events/zpool_events_follow.ksh \ functional/cli_root/zpool_events/zpool_events_poolname.ksh \ + functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh \ functional/cli_root/zpool_expand/cleanup.ksh \ functional/cli_root/zpool_expand/setup.ksh \ functional/cli_root/zpool_expand/zpool_expand_001_pos.ksh \ @@ -3432,6 +3518,7 @@ functional/cli_root/zpool_expand/zpool_expand_003_neg.ksh \ functional/cli_root/zpool_expand/zpool_expand_004_pos.ksh \ functional/cli_root/zpool_expand/zpool_expand_005_pos.ksh \ + functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh \ functional/cli_root/zpool_export/cleanup.ksh \ functional/cli_root/zpool_export/setup.ksh \ functional/cli_root/zpool_export/zpool_export_001_pos.ksh \ @@ -3443,6 +3530,7 @@ functional/cli_root/zpool_get/cleanup.ksh \ functional/cli_root/zpool_get/setup.ksh \ functional/cli_root/zpool_get/vdev_get_001_pos.ksh \ + functional/cli_root/zpool_get/vdev_get_all.ksh \ functional/cli_root/zpool_get/zpool_get_001_pos.ksh \ functional/cli_root/zpool_get/zpool_get_002_pos.ksh \ functional/cli_root/zpool_get/zpool_get_003_pos.ksh \ @@ -3611,6 +3699,7 @@ functional/cli_root/zpool_status/zpool_status_006_pos.ksh \ functional/cli_root/zpool_status/zpool_status_007_pos.ksh \ functional/cli_root/zpool_status/zpool_status_008_pos.ksh \ + functional/cli_root/zpool_status/zpool_status_009_pos.ksh \ functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh \ functional/cli_root/zpool_sync/cleanup.ksh \ functional/cli_root/zpool_sync/setup.ksh \ @@ -3771,18 +3860,22 @@ functional/cp_files/setup.ksh functional/crtime/cleanup.ksh \ functional/crtime/crtime_001_pos.ksh \ functional/crtime/setup.ksh functional/crypto/icp_aes_ccm.ksh \ - functional/crypto/icp_aes_gcm.ksh \ + functional/crypto/icp_aes_gcm.ksh functional/ctime/cleanup.ksh \ + functional/ctime/ctime_001_pos.ksh functional/ctime/setup.ksh \ functional/deadman/deadman_ratelimit.ksh \ functional/deadman/deadman_sync.ksh \ functional/deadman/deadman_zio.ksh \ functional/dedup/cleanup.ksh functional/dedup/setup.ksh \ + functional/dedup/dedup_bclone_pruned.ksh \ functional/dedup/dedup_fdt_create.ksh \ functional/dedup/dedup_fdt_import.ksh \ + functional/dedup/dedup_fdt_pacing.ksh \ functional/dedup/dedup_legacy_create.ksh \ functional/dedup/dedup_legacy_import.ksh \ functional/dedup/dedup_legacy_fdt_upgrade.ksh \ functional/dedup/dedup_legacy_fdt_mixed.ksh \ functional/dedup/dedup_prune.ksh \ + functional/dedup/dedup_prune_leak.ksh \ functional/dedup/dedup_quota.ksh \ functional/dedup/dedup_zap_shrink.ksh \ functional/delegate/cleanup.ksh functional/delegate/setup.ksh \ @@ -3806,6 +3899,12 @@ functional/delegate/zfs_unallow_006_pos.ksh \ functional/delegate/zfs_unallow_007_neg.ksh \ functional/delegate/zfs_unallow_008_neg.ksh \ + functional/device_access/cleanup.ksh \ + functional/device_access/setup.ksh \ + functional/device_access/device_access_create.ksh \ + functional/device_access/device_access_attach.ksh \ + functional/device_access/device_access_add.ksh \ + functional/device_access/device_access_import.ksh \ functional/devices/cleanup.ksh \ functional/devices/devices_001_pos.ksh \ functional/devices/devices_002_neg.ksh \ @@ -3852,6 +3951,7 @@ functional/fadvise/cleanup.ksh \ functional/fadvise/fadvise_sequential.ksh \ functional/fadvise/setup.ksh functional/fallocate/cleanup.ksh \ + functional/fallocate/fallocate_extend_timestamps.ksh \ functional/fallocate/fallocate_prealloc.ksh \ functional/fallocate/fallocate_punch-hole.ksh \ functional/fallocate/fallocate_zero-range.ksh \ @@ -3864,6 +3964,7 @@ functional/fault/auto_spare_001_pos.ksh \ functional/fault/auto_spare_002_pos.ksh \ functional/fault/auto_spare_ashift.ksh \ + functional/fault/auto_spare_double.ksh \ functional/fault/auto_spare_multiple.ksh \ functional/fault/auto_spare_shared.ksh \ functional/fault/cleanup.ksh \ @@ -3889,6 +3990,9 @@ functional/features/large_dnode/large_dnode_008_pos.ksh \ functional/features/large_dnode/large_dnode_009_pos.ksh \ functional/features/large_dnode/setup.ksh \ + functional/gang_blocks/cleanup.ksh \ + functional/gang_blocks/gang_blocks_redundant.ksh \ + functional/gang_blocks/setup.ksh \ functional/grow/grow_pool_001_pos.ksh \ functional/grow/grow_replicas_001_pos.ksh \ functional/history/cleanup.ksh \ @@ -3917,6 +4021,8 @@ functional/io/libaio.ksh functional/io/mmap.ksh \ functional/io/posixaio.ksh functional/io/psync.ksh \ functional/io/setup.ksh functional/io/sync.ksh \ + functional/lease/cleanup.ksh \ + functional/lease/lease_setlease.ksh functional/lease/setup.ksh \ functional/l2arc/cleanup.ksh \ functional/l2arc/l2arc_arcstats_pos.ksh \ functional/l2arc/l2arc_l2miss_pos.ksh \ @@ -3969,8 +4075,11 @@ functional/mmap/mmap_seek_001_pos.ksh \ functional/mmap/mmap_sync_001_pos.ksh \ functional/mmap/mmap_write_001_pos.ksh \ - functional/mmap/setup.ksh functional/mmp/cleanup.ksh \ + functional/mmap/mmap_ftruncate.ksh functional/mmap/setup.ksh \ + functional/mmp/cleanup.ksh \ functional/mmp/mmp_active_import.ksh \ + functional/mmp/mmp_concurrent_import.ksh \ + functional/mmp/mmp_degraded_import.ksh \ functional/mmp/mmp_exported_import.ksh \ functional/mmp/mmp_hostid.ksh \ functional/mmp/mmp_inactive_import.ksh \ @@ -3982,8 +4091,10 @@ functional/mmp/mmp_write_distribution.ksh \ functional/mmp/mmp_write_slow_disk.ksh \ functional/mmp/mmp_write_uberblocks.ksh \ + functional/mmp/mmp_zhack_reclaim.ksh \ functional/mmp/multihost_history.ksh functional/mmp/setup.ksh \ functional/mount/cleanup.ksh functional/mount/setup.ksh \ + functional/mount/mount_loopback.ksh \ functional/mount/umount_001.ksh \ functional/mount/umountall_001.ksh \ functional/mount/umount_unlinked_drain.ksh \ @@ -4105,6 +4216,7 @@ functional/redacted_send/redacted_holes.ksh \ functional/redacted_send/redacted_incrementals.ksh \ functional/redacted_send/redacted_largeblocks.ksh \ + functional/redacted_send/redacted_max_blkid.ksh \ functional/redacted_send/redacted_many_clones.ksh \ functional/redacted_send/redacted_mixed_recsize.ksh \ functional/redacted_send/redacted_mounts.ksh \ @@ -4122,6 +4234,8 @@ functional/redundancy/redundancy_draid3.ksh \ functional/redundancy/redundancy_draid_damaged1.ksh \ functional/redundancy/redundancy_draid_damaged2.ksh \ + functional/redundancy/redundancy_draid_degraded1.ksh \ + functional/redundancy/redundancy_draid_degraded2.ksh \ functional/redundancy/redundancy_draid.ksh \ functional/redundancy/redundancy_draid_spare1.ksh \ functional/redundancy/redundancy_draid_spare2.ksh \ @@ -4169,6 +4283,7 @@ functional/removal/removal_with_faulted.ksh \ functional/removal/removal_with_ganging.ksh \ functional/removal/removal_with_hole.ksh \ + functional/removal/removal_with_missing_log.ksh \ functional/removal/removal_with_indirect.ksh \ functional/removal/removal_with_remove.ksh \ functional/removal/removal_with_scrub.ksh \ @@ -4292,6 +4407,7 @@ functional/rsend/send_holds.ksh \ functional/rsend/send_hole_birth.ksh \ functional/rsend/send_invalid.ksh \ + functional/rsend/send_leak_keymaps.ksh \ functional/rsend/send-L_toggle.ksh \ functional/rsend/send_mixed_raw.ksh \ functional/rsend/send_partial_dataset.ksh \ @@ -4362,8 +4478,9 @@ functional/sparse/sparse_001_pos.ksh \ functional/stat/cleanup.ksh functional/stat/setup.ksh \ functional/stat/stat_001_pos.ksh \ - functional/stat/statx_dioalign.ksh functional/suid/cleanup.ksh \ - functional/suid/setup.ksh \ + functional/stat/statx_dioalign.ksh \ + functional/syncfs/syncfs_suspend.ksh \ + functional/suid/cleanup.ksh functional/suid/setup.ksh \ functional/suid/suid_write_to_none.ksh \ functional/suid/suid_write_to_sgid.ksh \ functional/suid/suid_write_to_suid.ksh \ @@ -4391,6 +4508,8 @@ functional/user_namespace/user_namespace_002.ksh \ functional/user_namespace/user_namespace_003.ksh \ functional/user_namespace/user_namespace_004.ksh \ + functional/user_namespace/user_namespace_secpolicy_sys_config.ksh \ + functional/user_namespace/user_namespace_secpolicy_zinject.ksh \ functional/userquota/cleanup.ksh \ functional/userquota/groupspace_001_pos.ksh \ functional/userquota/groupspace_002_pos.ksh \ @@ -4687,6 +4806,7 @@ cscope cscopelist: + distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/acl_common.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/acl_common.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/acl_common.kshlib 2025-05-01 18:23:23.846216324 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/acl_common.kshlib 2026-08-21 20:57:12.399578628 +0000 @@ -165,6 +165,7 @@ if [[ -d $TESTDIR ]]; then cd $TESTDIR rm -rf $TESTDIR/* + log_must setfacl -b $TESTDIR fi } diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh 2025-05-01 18:23:23.847216338 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh 2026-08-21 20:57:12.399860998 +0000 @@ -41,6 +41,7 @@ verify_runnable "both" log_assert "Verify chown works with POSIX ACLs" +log_onexit cleanup log_must setfacl -d -m u:$ZFS_ACL_STAFF1:rwx $TESTDIR log_must setfacl -b $TESTDIR diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/posix/posix_005_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/posix/posix_005_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/posix/posix_005_pos.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/posix/posix_005_pos.ksh 2026-08-21 20:57:12.399860998 +0000 @@ -0,0 +1,71 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the License at usr/src/OPENSOLARIS.LICENSE. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# +# CDDL HEADER END +# +# +# DESCRIPTION: +# Verify that online rollback invalidates cached POSIX ACLs. +# +# STRATEGY: +# 1. Snapshot a file whose group mode bit requires an ACL check, but where +# the test user has no access. +# 2. Grant the test user read access so the VFS caches the newer ACL. +# 3. Keep the inode active over rollback, then verify the test user cannot +# read the recovered file without dropping inode or page caches. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/acl/acl_common.kshlib + +verify_runnable "both" +log_assert "Online rollback invalidates cached POSIX ACLs" + +typeset file=$TESTDIR/posix-acl-rollback +typeset snap=$TESTPOOL/$TESTFS@posix-acl-rollback +typeset user=$ZFS_ACL_STAFF1 + +function cleanup +{ + snapexists $snap && destroy_dataset $snap -f + rm -f $file +} + +log_onexit cleanup + +log_must touch $file +# Keep a group read bit so generic_permission() consults a cached POSIX ACL. +# The test user is not in root's group, so this still denies the initial read. +log_must chmod 640 $file +log_mustnot user_run $user cat $file +log_must zfs snapshot $snap + +# setfacl updates the VFS ACL cache before rollback. +log_must setfacl -m u:$user:r-- $file +log_must user_run $user cat $file + +# Online rollback shrinks the dcache. Hold the inode alive so the following +# pathname lookup reuses its VFS ACL cache instead of allocating a new inode. +log_must eval "exec 9< $file" +log_must zfs rollback $snap +log_mustnot user_run $user cat $file +log_must eval "exec 9>&-" + +log_pass "Online rollback invalidates cached POSIX ACLs" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh 2025-05-01 18:23:23.847216338 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/acl/posix-sa/posix_004_pos.ksh 2026-08-21 20:57:12.399860998 +0000 @@ -41,6 +41,7 @@ verify_runnable "both" log_assert "Verify chown works with POSIX ACLs" +log_onexit cleanup log_must setfacl -d -m u:$ZFS_ACL_STAFF1:rwx $TESTDIR log_must setfacl -b $TESTDIR diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_common.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_common.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_common.kshlib 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_common.kshlib 2026-08-21 20:57:12.401171438 +0000 @@ -31,13 +31,6 @@ MINBLKSIZE1=512 MINBLKSIZE2=1024 -function verify_block_cloning -{ - if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" - fi -} - function verify_crossfs_block_cloning { if is_linux && [[ $(linux_version) -lt $(linux_version "5.3") ]]; then diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,7 +30,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify various corner cases in block cloning across datasets" @@ -43,4 +42,7 @@ bclone_corner_cases_test $TESTSRCDIR $TESTDSTDIR +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases_limited.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases_limited.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases_limited.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_corner_cases_limited.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,7 +30,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify various corner cases in block cloning across datasets" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_data.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_data.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_data.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_data.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,7 +30,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning properly clones regular files across datasets" @@ -44,4 +43,7 @@ bclone_test random $filesize false $TESTSRCDIR $TESTDSTDIR done +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_embedded.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_embedded.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_embedded.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_embedded.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,7 +30,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning properly clones small files (with embedded blocks) across datasets" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_hole.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_hole.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_hole.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_crossfs_hole.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,7 +30,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning properly clones sparse files (files with holes) across datasets" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_all.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_all.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_all.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_all.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -31,7 +31,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning across datasets with different properties" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_checksum.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_checksum.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_checksum.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_checksum.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -32,7 +32,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning across datasets with different checksum properties" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_compress.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_compress.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_compress.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_compress.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -32,7 +32,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning across datasets with different compression properties" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_copies.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_copies.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_copies.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_copies.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -32,7 +32,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning across datasets with different copies properties" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_recordsize.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_recordsize.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_recordsize.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_diffprops_recordsize.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -32,7 +32,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning across datasets with different recordsize properties" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_prop_sync.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_prop_sync.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_prop_sync.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_prop_sync.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -32,7 +32,6 @@ verify_runnable "both" -verify_block_cloning verify_crossfs_block_cloning log_assert "Verify block cloning with all sync property settings" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,8 +30,6 @@ verify_runnable "both" -verify_block_cloning - log_assert "Verify various corner cases in block cloning within the same dataset" # Disable compression to make sure we won't use embedded blocks. @@ -40,4 +38,7 @@ bclone_corner_cases_test $TESTSRCDIR $TESTSRCDIR +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases_limited.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases_limited.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases_limited.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_corner_cases_limited.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,8 +30,6 @@ verify_runnable "both" -verify_block_cloning - log_assert "Verify various corner cases in block cloning within the same dataset" # Disable compression to make sure we won't use embedded blocks. diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_data.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_data.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_data.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_data.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,8 +30,6 @@ verify_runnable "both" -verify_block_cloning - log_assert "Verify block cloning properly clones regular files within the same dataset" # Disable compression to make sure we won't use embedded blocks. @@ -42,4 +40,7 @@ bclone_test random $filesize false $TESTSRCDIR $TESTSRCDIR done +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_embedded.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_embedded.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_embedded.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_embedded.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,8 +30,6 @@ verify_runnable "both" -verify_block_cloning - log_assert "Verify block cloning properly clones small files (with embedded blocks) within the same dataset" # Enable ZLE compression to make sure what is the maximum amount of data we diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_hole.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_hole.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/bclone/bclone_samefs_hole.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/bclone/bclone_samefs_hole.ksh 2026-08-21 20:57:12.401171438 +0000 @@ -30,8 +30,6 @@ verify_runnable "both" -verify_block_cloning - log_assert "Verify block cloning properly clones sparse files (files with holes) within the same dataset" # Compression doesn't matter here. diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_device_removal.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_device_removal.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_device_removal.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_device_removal.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -0,0 +1,65 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/block_cloning/block_cloning.kshlib + +# +# DESCRIPTION: +# Verify that when modifying and freeing cloned blocks after a top-level +# vdev removal, there is no panic. This is a regression test for #17180. +# + +verify_runnable "global" + +export VDIR=$TEST_BASE_DIR/disk-bclone +export VDEV="$VDIR/0 $VDIR/1" +log_must rm -rf $VDIR +log_must mkdir -p $VDIR +log_must truncate -s $MINVDEVSIZE $VDEV + +claim="No panic when destroying dataset with cloned blocks after top-level vdev removal" + +log_assert $claim + +function cleanup +{ + datasetexists $TESTPOOL && destroy_pool $TESTPOOL + rm -rf $TESTDIR $VDIR +} + +log_onexit cleanup + +log_must zpool create -o feature@block_cloning=enabled $TESTPOOL $VDEV +log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=16M count=2 +log_must zpool remove -w $TESTPOOL $VDIR/1 +log_must zfs create $TESTPOOL/$TESTFS +log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/$TESTFS/file +log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=16M count=2 +log_must zfs destroy -r $TESTPOOL/$TESTFS +wait_freeing $TESTPOOL +sync_pool $TESTPOOL + +log_must zdb -b $TESTPOOL + +log_pass $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_trunc.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_trunc.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_trunc.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_after_trunc.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -0,0 +1,31 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/block_cloning/block_cloning.kshlib + +# +# DESCRIPTION: +# When a block is truncated and then cloned to, a read data corruption can occur. +# This is a regression test for #18412. +# + +verify_runnable "global" + +claim="No read data corruption when cloning blocks after a truncate" + +function cleanup +{ + datasetexists $TESTPOOL && destroy_pool $TESTPOOL +} + +log_onexit cleanup + +log_must zpool create -o feature@block_cloning=enabled $TESTPOOL $DISKS + +# Run for a few times to increase the likelihood of bug triggering. +for i in {0..50}; do + log_must clone_after_trunc /$TESTPOOL/ +done + +log_pass $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_cached.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_cached.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_cached.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_cached.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -40,10 +40,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - VDIR=$TEST_BASE_DIR/disk-bclone VDEV="$VDIR/a" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_write.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_write.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_write.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_clone_mmap_write.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -41,10 +41,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - VDIR=$TEST_BASE_DIR/disk-bclone VDEV="$VDIR/a" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange.ksh 2025-05-01 18:23:23.849216366 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -30,10 +30,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - claim="The copy_file_range syscall can clone whole files." log_assert $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -31,10 +31,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - claim="copy_file_range will fall back to copy when cloning not possible." log_assert $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_fallback_same_txg.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -31,10 +31,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - claim="copy_file_range will fall back to copy when cloning on same txg" log_assert $claim @@ -45,16 +41,22 @@ { datasetexists $TESTPOOL && destroy_pool $TESTPOOL set_tunable64 TXG_TIMEOUT $timeout + log_must restore_tunable BCLONE_WAIT_DIRTY } log_onexit cleanup +log_must save_tunable BCLONE_WAIT_DIRTY + log_must set_tunable64 TXG_TIMEOUT 5000 log_must zpool create -o feature@block_cloning=enabled $TESTPOOL $DISKS log_must sync_pool $TESTPOOL true +# Verify fallback to copy when there are dirty blocks +log_must set_tunable32 BCLONE_WAIT_DIRTY 0 + log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=128K count=4 log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/clone 0 0 524288 @@ -65,5 +67,20 @@ typeset blocks=$(get_same_blocks $TESTPOOL file $TESTPOOL clone) log_must [ "$blocks" = "" ] +log_must rm /$TESTPOOL/file /$TESTPOOL/clone + +# Verify blocks are cloned even when there are dirty blocks +log_must set_tunable32 BCLONE_WAIT_DIRTY 1 + +log_must dd if=/dev/urandom of=/$TESTPOOL/file bs=128K count=4 +log_must clonefile -f /$TESTPOOL/file /$TESTPOOL/clone 0 0 524288 + +log_must sync_pool $TESTPOOL + +log_must have_same_content /$TESTPOOL/file /$TESTPOOL/clone + +typeset blocks=$(get_same_blocks $TESTPOOL file $TESTPOOL clone) +log_must [ "$blocks" = "0 1 2 3" ] + log_pass $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_partial.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_partial.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_partial.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_copyfilerange_partial.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -30,10 +30,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - claim="The copy_file_range syscall can clone parts of a file." log_assert $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_disabled_copyfilerange.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_disabled_copyfilerange.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_disabled_copyfilerange.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_disabled_copyfilerange.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -30,10 +30,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - claim="The copy_file_range syscall copies files when block cloning is disabled." log_assert $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_large_offset.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_large_offset.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_large_offset.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_large_offset.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -37,10 +37,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - claim="The first clone at a large offset is functional" log_assert $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_lwb_buffer_overflow.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -46,10 +46,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - VDIR=$TEST_BASE_DIR/disk-bclone VDEV="$VDIR/a $VDIR/b $VDIR/c" LDEV="$VDIR/e $VDIR/f" @@ -87,5 +83,8 @@ # FreeBSD's seq(1) leaves a trailing space, remove it with sed(1). log_must [ "$blocks" = "$(seq -s " " 0 1021 | sed 's/ $//')" ] +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass "LWB buffer overflow is not triggered with multiple VDEVs ZIL" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -43,10 +43,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - export VDIR=$TEST_BASE_DIR/disk-bclone export VDEV="$VDIR/a $VDIR/b $VDIR/c" export LDEV="$VDIR/e $VDIR/f" @@ -130,4 +126,7 @@ # FreeBSD's seq(1) leaves a trailing space, remove it with sed(1). log_must [ "$blocks" = "$(seq -s " " 0 2047 | sed 's/ $//')" ] +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh 2025-05-01 18:23:23.850216380 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/block_cloning/block_cloning_replay_encrypted.ksh 2026-08-21 20:57:12.401786810 +0000 @@ -43,10 +43,6 @@ verify_runnable "global" -if is_linux && [[ $(linux_version) -lt $(linux_version "4.5") ]]; then - log_unsupported "copy_file_range not available before Linux 4.5" -fi - export VDIR=$TEST_BASE_DIR/disk-bclone export VDEV="$VDIR/a $VDIR/b $VDIR/c" export LDEV="$VDIR/e $VDIR/f" @@ -132,4 +128,7 @@ # FreeBSD's seq(1) leaves a trailing space, remove it with sed(1). log_must [ "$blocks" = "$(seq -s " " 0 2047 | sed 's/ $//')" ] +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + log_pass $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.ksh 2026-08-21 20:57:12.403885723 +0000 @@ -0,0 +1,43 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2021 by Determinate Systems. All rights reserved. +# + +. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib + +# +# DESCRIPTION: +# zfs.exists should accurately report whether a dataset exists, and +# report an error if a dataset is in another pool. + +verify_runnable "global" + +function cleanup +{ + datasetexists $TESTPOOL/$TESTDATASET && \ + log_must zfs destroy -R $TESTPOOL/$TESTDATASET +} +log_onexit cleanup + +TESTDATASET="channelprogramencryption" + +passphrase="password" +log_must eval "echo "$passphrase" | zfs create -o encryption=aes-256-ccm " \ + "-o keyformat=passphrase $TESTPOOL/$TESTDATASET" + +log_must_program $TESTPOOL $ZCP_ROOT/lua_core/tst.encryption.zcp \ + $TESTPOOL/$TESTDATASET + +log_pass "zfs.get_prop(dataset, ...) on \"encryption\" and \"encryptionroot\" gives correct results" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.zcp zfs-linux-2.3.9/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.zcp --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.zcp 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.encryption.zcp 2026-08-21 20:57:12.403885723 +0000 @@ -0,0 +1,23 @@ +-- SPDX-License-Identifier: CDDL-1.0 +-- +-- This file and its contents are supplied under the terms of the +-- Common Development and Distribution License ("CDDL"), version 1.0. +-- You may only use this file in accordance with the terms of version +-- 1.0 of the CDDL. +-- +-- A full copy of the text of the CDDL should have accompanied this +-- source. A copy of the CDDL is also available via the Internet at +-- http://www.illumos.org/license/CDDL. +-- + +-- +-- Copyright (c) 2021 by Determinate Systems. All rights reserved. +-- + +-- ensure zfs.get_prop returns the correct values for "encryption" +-- and "encryptionroot" + +args = ... +argv = args['argv'] +assert(zfs.get_prop(argv[1], "encryption") == "aes-256-ccm") +assert(zfs.get_prop(argv[1], "encryptionroot") == argv[1]) diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh 2025-05-01 18:23:23.853216422 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/channel_program/lua_core/tst.exists.ksh 2026-08-21 20:57:12.403885723 +0000 @@ -24,15 +24,16 @@ verify_runnable "global" -# create $TESTSNAP and $TESTCLONE -create_snapshot -create_clone - function cleanup { datasetexists $TESTPOOL/$TESTFS@$TESTSNAP && \ destroy_dataset $TESTPOOL/$TESTFS@$TESTSNAP -R } +log_onexit cleanup + +# create $TESTSNAP and $TESTCLONE +create_snapshot +create_clone log_must_program $TESTPOOL $ZCP_ROOT/lua_core/tst.exists.zcp \ $TESTPOOL $TESTPOOL/$TESTFS $TESTPOOL/$TESTFS@$TESTSNAP \ diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_list/cleanup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_list/cleanup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_list/cleanup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_list/cleanup.ksh 2026-08-21 20:57:12.411103318 +0000 @@ -0,0 +1,30 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +default_cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_list/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_list/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_list/setup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_list/setup.ksh 2026-08-21 20:57:12.411207839 +0000 @@ -0,0 +1,32 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +verify_runnable "global" + +default_setup $DISKS diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_list/zfs_list_009_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_list/zfs_list_009_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_list/zfs_list_009_pos.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_list/zfs_list_009_pos.ksh 2026-08-21 20:57:12.411207839 +0000 @@ -0,0 +1,69 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# 'zfs list -Ho name ' follows symlinks when resolving the path to +# a dataset name. A symlink that crosses a mount boundary must resolve to +# the dataset owning the symlink's target, not the dataset containing the +# symlink itself. +# +# STRATEGY: +# 1. Create two child datasets: ds1 and ds2. +# 2. Place a symlink inside ds1 that points into ds2. +# 3. Verify that 'zfs list -Ho name ' returns ds2. +# + +verify_runnable "global" + +DS1="$TESTPOOL/$TESTFS/ds1" +DS2="$TESTPOOL/$TESTFS/ds2" +LINK="$TESTDIR/ds1/link_to_ds2" + +function cleanup +{ + rm -f "$LINK" + datasetexists "$DS1" && log_must zfs destroy "$DS1" + datasetexists "$DS2" && log_must zfs destroy "$DS2" +} + +log_onexit cleanup + +log_assert "'zfs list -Ho name' follows symlinks when resolving a path." + +log_must zfs create "$DS1" +log_must zfs create "$DS2" +log_must ln -s "$TESTDIR/ds2" "$LINK" + +result=$(zfs list -Ho name "$LINK") +if [[ "$result" != "$DS2" ]]; then + log_fail "'zfs list -Ho name $LINK' returned '$result', expected '$DS2'" +fi + +log_pass "'zfs list -Ho name' correctly follows a symlink crossing a mount boundary." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive-x_props_alternation.ksh 2026-08-21 20:57:12.413006782 +0000 @@ -0,0 +1,80 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by . All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/cli_root/zfs_set/zfs_set_common.kshlib + +# +# DESCRIPTION: +# Verify 'zfs receive -x' consistently excludes a property across +# incremental sends with -p, and does not alternate. +# +# STRATEGY: +# 1. Create source and destination datasets. +# 2. Set a native property (refquota) on source. +# 3. Full send with -p, receive with -x refquota. +# 4. Verify refquota is not set on destination. +# 5. Loop several incremental sends/receives with -p/-x. +# 6. Each iteration verify refquota stays consistently excluded. +# + +verify_runnable "global" + +function cleanup +{ + destroy_dataset "$orig" "-rf" + destroy_dataset "$dest" "-rf" +} + +log_assert "'zfs receive -x' consistently excludes properties" \ + "across incremental sends." +log_onexit cleanup + +orig=$TESTPOOL/$TESTFS1 +dest=$TESTPOOL/$TESTFS2 + +# setup source and destination +log_must zfs create $orig +log_must zfs create $dest + +# set a native property on source +log_must zfs set refquota=64M $orig +log_must check_prop_source $orig refquota 67108864 local + +# full send with -p, receive with -x +log_must zfs snapshot $orig@snap1 +log_must eval "zfs send -p $orig@snap1 | zfs receive -e -x refquota $dest" + +# destination should NOT have refquota from the stream +log_must [ "$(get_prop refquota $dest/$TESTFS1)" = "0" ] + +# incremental sends: the excluded property must never appear on dest +typeset -i i=2 +while (( i <= 4 )); do + log_must zfs snapshot $orig@snap$i + log_must eval "zfs send -p -i $orig@snap$((i-1)) $orig@snap$i \ + | zfs receive -e -F -x refquota $dest" + log_must [ "$(get_prop refquota $dest/$TESTFS1)" = "0" ] + (( i = i + 1 )) +done + +log_pass "'zfs receive -x' consistently excludes properties" \ + "across incremental sends." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/cleanup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/cleanup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/cleanup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/cleanup.ksh 2026-08-21 20:57:12.414640756 +0000 @@ -0,0 +1,26 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +. $STF_SUITE/include/libtest.shlib + +default_cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/setup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/setup.ksh 2026-08-21 20:57:12.414729113 +0000 @@ -0,0 +1,28 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +. $STF_SUITE/include/libtest.shlib + +DISK=${DISKS%% *} + +default_setup $DISK diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zfs_rewrite/zfs_rewrite.ksh 2026-08-21 20:57:12.414729113 +0000 @@ -0,0 +1,104 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025, iXsystems, Inc. +# + +# DESCRIPTION: +# Verify zfs rewrite rewrites specified files blocks. +# +# STRATEGY: +# 1. Create two files, one of which is in a directory. +# 2. Save the checksums and block pointers. +# 3. Rewrite part of the files. +# 4. Verify checksums are the same. +# 5. Verify block pointers of the rewritten part have changed. +# 6. Rewrite all the files. +# 7. Verify checksums are the same. +# 8. Verify all block pointers have changed. + +. $STF_SUITE/include/libtest.shlib + +typeset tmp=$(mktemp) +typeset bps=$(mktemp) +typeset bps1=$(mktemp) +typeset bps2=$(mktemp) + +function cleanup +{ + rm -rf $tmp $bps $bps1 $bps2 $TESTDIR/* +} + +log_assert "zfs rewrite rewrites specified files blocks" + +log_onexit cleanup + +log_must zfs set recordsize=128k $TESTPOOL/$TESTFS + +log_must mkdir $TESTDIR/dir +log_must dd if=/dev/urandom of=$TESTDIR/file1 bs=128k count=8 +log_must dd if=$TESTDIR/file1 of=$TESTDIR/dir/file2 bs=128k +log_must sync_pool $TESTPOOL +typeset orig_hash1=$(xxh128digest $TESTDIR/file1) +typeset orig_hash2=$(xxh128digest $TESTDIR/dir/file2) + +log_must [ "$orig_hash1" = "$orig_hash2" ] +log_must eval "zdb -Ovv $TESTPOOL/$TESTFS file1 > $tmp" +log_must eval "awk '/ L0 / { print l++ \" \" \$3 }' < $tmp > $bps1" +log_must eval "zdb -Ovv $TESTPOOL/$TESTFS dir/file2 > $tmp" +log_must eval "awk '/ L0 / { print l++ \" \" \$3 }' < $tmp > $bps2" + +log_must zfs rewrite -o 327680 -l 262144 -r -x $TESTDIR/file1 $TESTDIR/dir/file2 +log_must sync_pool $TESTPOOL +typeset new_hash1=$(xxh128digest $TESTDIR/file1) +typeset new_hash2=$(xxh128digest $TESTDIR/dir/file2) +log_must [ "$orig_hash1" = "$new_hash1" ] +log_must [ "$orig_hash2" = "$new_hash2" ] + +log_must eval "zdb -Ovv $TESTPOOL/$TESTFS file1 > $tmp" +log_must eval "awk '/ L0 / { print l++ \" \" \$3 }' < $tmp > $bps" +typeset same=$(echo $(sort -n $bps $bps1 | uniq -d | cut -f1 -d' ')) +log_must [ "$same" = "0 1 5 6 7" ] +log_must eval "zdb -Ovv $TESTPOOL/$TESTFS dir/file2 > $tmp" +log_must eval "awk '/ L0 / { print l++ \" \" \$3 }' < $tmp > $bps" +typeset same=$(echo $(sort -n $bps $bps2 | uniq -d | cut -f1 -d' ')) +log_must [ "$same" = "0 1 5 6 7" ] + +log_must zfs rewrite -r $TESTDIR/file1 $TESTDIR/dir/file2 +log_must sync_pool $TESTPOOL +typeset new_hash1=$(xxh128digest $TESTDIR/file1) +typeset new_hash2=$(xxh128digest $TESTDIR/dir/file2) +log_must [ "$orig_hash1" = "$new_hash1" ] +log_must [ "$orig_hash2" = "$new_hash2" ] + +log_must eval "zdb -Ovv $TESTPOOL/$TESTFS file1 > $tmp" +log_must eval "awk '/ L0 / { print l++ \" \" \$3 }' < $tmp > $bps" +typeset same=$(echo $(sort -n $bps $bps1 | uniq -d | cut -f1 -d' ')) +log_must [ -z "$same" ] +log_must eval "zdb -Ovv $TESTPOOL/$TESTFS dir/file2 > $tmp" +log_must eval "awk '/ L0 / { print l++ \" \" \$3 }' < $tmp > $bps" +typeset same=$(echo $(sort -n $bps $bps2 | uniq -d | cut -f1 -d' ')) +log_must [ -z "$same" ] + +log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_metaslab_leak.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_metaslab_leak.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_metaslab_leak.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zhack/zhack_metaslab_leak.ksh 2026-08-21 20:57:12.418601501 +0000 @@ -0,0 +1,70 @@ +#!/bin/ksh +# SPDX-License-Identifier: CDDL-1.0 + +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# + +# +# Description: +# +# Test whether zhack metaslab leak functions correctly +# +# Strategy: +# +# 1. Create pool on a loopback device with some test data +# 2. Gather pool capacity stats +# 3. Generate fragmentation data with zdb +# 4. Destroy the pool +# 5. Create a new pool with the same configuration +# 6. Export the pool +# 7. Apply the fragmentation information with zhack metaslab leak +# 8. Import the pool +# 9. Verify that pool capacity stats match + +. "$STF_SUITE"/include/libtest.shlib + +verify_runnable "global" + +function cleanup +{ + zpool destroy $TESTPOOL + rm $tmp +} + +log_onexit cleanup +log_assert "zhack metaslab leak leaks the right amount of space" + +typeset tmp=$(mktemp) + +log_must zpool create $TESTPOOL $DISKS +for i in `seq 1 16`; do + log_must dd if=/dev/urandom of=/$TESTPOOL/f$i bs=1M count=16 + log_must zpool sync $TESTPOOL +done +for i in `seq 2 2 16`; do + log_must rm /$TESTPOOL/f$i +done +for i in `seq 1 16`; do + log_must touch /$TESTPOOL/g$i + log_must zpool sync $TESTPOOL +done + +alloc=$(zpool get -Hpo value alloc $TESTPOOL) +log_must eval "zdb -m --allocated-map $TESTPOOL > $tmp" +log_must zpool destroy $TESTPOOL + +log_must zpool create $TESTPOOL $DISKS +log_must zpool export $TESTPOOL +log_must eval "zhack metaslab leak $TESTPOOL < $tmp" +log_must zpool import $TESTPOOL + +alloc2=$(zpool get -Hpo value alloc $TESTPOOL) + +[[ $((alloc * 1.05)) -gt $alloc2 ]] && [[ $alloc -lt $alloc2 ]] || \ + log_fail "space usage changed too much: $alloc to $alloc2" + +log_pass "zhack metaslab leak behaved correctly" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib 2025-05-01 18:23:23.876216744 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib 2026-08-21 20:57:12.419006635 +0000 @@ -27,6 +27,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2025 by Lawrence Livermore National Security, LLC. # . $STF_SUITE/include/libtest.shlib @@ -89,3 +90,44 @@ fi echo $dumpdev } + +function zpool_create_add_setup +{ + typeset -i i=0 + + while ((i < 10)); do + log_must truncate -s $MINVDEVSIZE $TEST_BASE_DIR/vdev$i + + eval vdev$i=$TEST_BASE_DIR/vdev$i + ((i += 1)) + done + + if is_linux; then + vdev_lo="$(losetup -f "$vdev4" --show)" + elif is_freebsd; then + vdev_lo=/dev/"$(mdconfig -a -t vnode -f "$vdev4")" + else + vdev_lo="$(lofiadm -a "$vdev4")" + fi +} + +function zpool_create_add_cleanup +{ + datasetexists $TESTPOOL1 && destroy_pool $TESTPOOL1 + + if [[ -e $vdev_lo ]]; then + if is_linux; then + log_must losetup -d "$vdev_lo" + elif is_freebsd; then + log_must mdconfig -d -u "$vdev_lo" + else + log_must lofiadm -d "$vdev_lo" + fi + fi + + typeset -i i=0 + while ((i < 10)); do + rm -f $TEST_BASE_DIR/vdev$i + ((i += 1)) + done +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_010_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_010_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_010_pos.ksh 2025-05-01 18:23:23.876216744 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_010_pos.ksh 1970-01-01 00:00:00.000000000 +0000 @@ -1,211 +0,0 @@ -#!/bin/ksh -p -# SPDX-License-Identifier: CDDL-1.0 -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or https://opensource.org/licenses/CDDL-1.0. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2012, 2016 by Delphix. All rights reserved. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/cli_root/zpool_create/zpool_create.shlib - -# -# DESCRIPTION: -# Verify zpool add succeed when adding vdevs with matching redundancy. -# -# STRATEGY: -# 1. Create several files == $MINVDEVSIZE. -# 2. Verify 'zpool add' succeeds with matching redundancy. -# 3. Verify 'zpool add' warns with differing redundancy. -# 4. Verify 'zpool add' warns with differing redundancy after removal. -# - -verify_runnable "global" - -function cleanup -{ - datasetexists $TESTPOOL1 && destroy_pool $TESTPOOL1 - - typeset -i i=0 - while ((i < 10)); do - rm -f $TEST_BASE_DIR/vdev$i - ((i += 1)) - done -} - - -log_assert "Verify 'zpool add' succeed with keywords combination." -log_onexit cleanup - -# 1. Create several files == $MINVDEVSIZE. -typeset -i i=0 -while ((i < 10)); do - log_must truncate -s $MINVDEVSIZE $TEST_BASE_DIR/vdev$i - - eval vdev$i=$TEST_BASE_DIR/vdev$i - ((i += 1)) -done - -set -A redundancy0_create_args \ - "$vdev0" - -set -A redundancy1_create_args \ - "mirror $vdev0 $vdev1" \ - "raidz1 $vdev0 $vdev1" - -set -A redundancy2_create_args \ - "mirror $vdev0 $vdev1 $vdev2" \ - "raidz2 $vdev0 $vdev1 $vdev2" - -set -A redundancy3_create_args \ - "mirror $vdev0 $vdev1 $vdev2 $vdev3" \ - "raidz3 $vdev0 $vdev1 $vdev2 $vdev3" - -set -A redundancy0_add_args \ - "$vdev5" \ - "$vdev5 $vdev6" - -set -A redundancy1_add_args \ - "mirror $vdev5 $vdev6" \ - "raidz1 $vdev5 $vdev6" \ - "raidz1 $vdev5 $vdev6 mirror $vdev7 $vdev8" \ - "mirror $vdev5 $vdev6 raidz1 $vdev7 $vdev8" - -set -A redundancy2_add_args \ - "mirror $vdev5 $vdev6 $vdev7" \ - "raidz2 $vdev5 $vdev6 $vdev7" - -set -A redundancy3_add_args \ - "mirror $vdev5 $vdev6 $vdev7 $vdev8" \ - "raidz3 $vdev5 $vdev6 $vdev7 $vdev8" - -set -A log_args "log" "$vdev4" -set -A cache_args "cache" "$vdev4" -set -A spare_args "spare" "$vdev4" - -typeset -i j=0 - -function zpool_create_add -{ - typeset -n create_args=$1 - typeset -n add_args=$2 - - i=0 - while ((i < ${#create_args[@]})); do - j=0 - while ((j < ${#add_args[@]})); do - log_must zpool create $TESTPOOL1 ${create_args[$i]} - log_must zpool add $TESTPOOL1 ${add_args[$j]} - log_must zpool destroy -f $TESTPOOL1 - - ((j += 1)) - done - ((i += 1)) - done -} - -function zpool_create_forced_add -{ - typeset -n create_args=$1 - typeset -n add_args=$2 - - i=0 - while ((i < ${#create_args[@]})); do - j=0 - while ((j < ${#add_args[@]})); do - log_must zpool create $TESTPOOL1 ${create_args[$i]} - log_mustnot zpool add $TESTPOOL1 ${add_args[$j]} - log_must zpool add --allow-replication-mismatch $TESTPOOL1 ${add_args[$j]} - log_must zpool destroy -f $TESTPOOL1 - - ((j += 1)) - done - ((i += 1)) - done -} - -function zpool_create_rm_add -{ - typeset -n create_args=$1 - typeset -n add_args=$2 - typeset -n rm_args=$3 - - i=0 - while ((i < ${#create_args[@]})); do - j=0 - while ((j < ${#add_args[@]})); do - log_must zpool create $TESTPOOL1 ${create_args[$i]} - log_must zpool add $TESTPOOL1 ${rm_args[0]} ${rm_args[1]} - log_must zpool add $TESTPOOL1 ${add_args[$j]} - log_must zpool remove $TESTPOOL1 ${rm_args[1]} - log_mustnot zpool add $TESTPOOL1 ${rm_args[1]} - log_must zpool add $TESTPOOL1 ${rm_args[0]} ${rm_args[1]} - log_must zpool destroy -f $TESTPOOL1 - - ((j += 1)) - done - ((i += 1)) - done -} - -# 2. Verify 'zpool add' succeeds with matching redundancy. -zpool_create_add redundancy0_create_args redundancy0_add_args -zpool_create_add redundancy1_create_args redundancy1_add_args -zpool_create_add redundancy2_create_args redundancy2_add_args -zpool_create_add redundancy3_create_args redundancy3_add_args - -# 3. Verify 'zpool add' warns with differing redundancy. -zpool_create_forced_add redundancy0_create_args redundancy1_add_args -zpool_create_forced_add redundancy0_create_args redundancy2_add_args -zpool_create_forced_add redundancy0_create_args redundancy3_add_args - -zpool_create_forced_add redundancy1_create_args redundancy0_add_args -zpool_create_forced_add redundancy1_create_args redundancy2_add_args -zpool_create_forced_add redundancy1_create_args redundancy3_add_args - -zpool_create_forced_add redundancy2_create_args redundancy0_add_args -zpool_create_forced_add redundancy2_create_args redundancy1_add_args -zpool_create_forced_add redundancy2_create_args redundancy3_add_args - -zpool_create_forced_add redundancy3_create_args redundancy0_add_args -zpool_create_forced_add redundancy3_create_args redundancy1_add_args -zpool_create_forced_add redundancy3_create_args redundancy2_add_args - -# 4. Verify 'zpool add' warns with differing redundancy after removal. -zpool_create_rm_add redundancy1_create_args redundancy1_add_args log_args -zpool_create_rm_add redundancy2_create_args redundancy2_add_args log_args -zpool_create_rm_add redundancy3_create_args redundancy3_add_args log_args - -zpool_create_rm_add redundancy1_create_args redundancy1_add_args cache_args -zpool_create_rm_add redundancy2_create_args redundancy2_add_args cache_args -zpool_create_rm_add redundancy3_create_args redundancy3_add_args cache_args - -zpool_create_rm_add redundancy1_create_args redundancy1_add_args spare_args -zpool_create_rm_add redundancy2_create_args redundancy2_add_args spare_args -zpool_create_rm_add redundancy3_create_args redundancy3_add_args spare_args - -log_pass "'zpool add' succeed with keywords combination." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_create.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_create.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_create.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_create.ksh 2026-08-21 20:57:12.419006635 +0000 @@ -0,0 +1,143 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Copyright 2012, 2016 by Delphix. All rights reserved. +# Copyright 2025 by Lawrence Livermore National Security, LLC. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/cli_root/zpool_add/zpool_add.kshlib + +# +# DESCRIPTION: +# Verify zpool add succeeds when adding vdevs with matching redundancy +# and warns with differing redundancy for a healthy pool. +# +# STRATEGY: +# 1. Create several files == $MINVDEVSIZE. +# 2. Verify 'zpool add' succeeds with matching redundancy. +# 3. Verify 'zpool add' warns with differing redundancy. +# + +verify_runnable "global" + +log_assert "Verify 'zpool add' warns for differing redundancy." +log_onexit zpool_create_add_cleanup + +zpool_create_add_setup + +typeset -i i=0 +typeset -i j=0 + +set -A redundancy0_create_args \ + "$vdev0" + +set -A redundancy1_create_args \ + "mirror $vdev0 $vdev1" + +set -A redundancy2_create_args \ + "mirror $vdev0 $vdev1 $vdev2" + +set -A redundancy3_create_args \ + "mirror $vdev0 $vdev1 $vdev2 $vdev3" + +set -A redundancy0_add_args \ + "$vdev5" \ + "$vdev5 $vdev6" + +set -A redundancy1_add_args \ + "mirror $vdev5 $vdev6" \ + "raidz1 $vdev5 $vdev6" \ + "raidz1 $vdev5 $vdev6 mirror $vdev7 $vdev8" + +set -A redundancy2_add_args \ + "mirror $vdev5 $vdev6 $vdev7" + +set -A redundancy3_add_args \ + "mirror $vdev5 $vdev6 $vdev7 $vdev8" + +function zpool_create_add +{ + typeset -n create_args=$1 + typeset -n add_args=$2 + + i=0 + while ((i < ${#create_args[@]})); do + j=0 + while ((j < ${#add_args[@]})); do + log_must zpool create $TESTPOOL1 ${create_args[$i]} + log_must zpool add $TESTPOOL1 ${add_args[$j]} + log_must zpool destroy -f $TESTPOOL1 + + ((j += 1)) + done + ((i += 1)) + done +} + +function zpool_create_forced_add +{ + typeset -n create_args=$1 + typeset -n add_args=$2 + + i=0 + while ((i < ${#create_args[@]})); do + j=0 + while ((j < ${#add_args[@]})); do + log_must zpool create $TESTPOOL1 ${create_args[$i]} + log_mustnot zpool add $TESTPOOL1 ${add_args[$j]} + log_must zpool add --allow-replication-mismatch $TESTPOOL1 ${add_args[$j]} + log_must zpool destroy -f $TESTPOOL1 + + ((j += 1)) + done + ((i += 1)) + done +} + +# 2. Verify 'zpool add' succeeds with matching redundancy. +zpool_create_add redundancy0_create_args redundancy0_add_args +zpool_create_add redundancy1_create_args redundancy1_add_args +zpool_create_add redundancy2_create_args redundancy2_add_args +zpool_create_add redundancy3_create_args redundancy3_add_args + +# 3. Verify 'zpool add' warns with differing redundancy. +zpool_create_forced_add redundancy0_create_args redundancy1_add_args +zpool_create_forced_add redundancy0_create_args redundancy2_add_args +zpool_create_forced_add redundancy0_create_args redundancy3_add_args + +zpool_create_forced_add redundancy1_create_args redundancy0_add_args +zpool_create_forced_add redundancy1_create_args redundancy2_add_args +zpool_create_forced_add redundancy1_create_args redundancy3_add_args + +zpool_create_forced_add redundancy2_create_args redundancy0_add_args +zpool_create_forced_add redundancy2_create_args redundancy1_add_args +zpool_create_forced_add redundancy2_create_args redundancy3_add_args + +zpool_create_forced_add redundancy3_create_args redundancy0_add_args +zpool_create_forced_add redundancy3_create_args redundancy1_add_args +zpool_create_forced_add redundancy3_create_args redundancy2_add_args + +log_pass "Verify 'zpool add' warns for differing redundancy." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh 2026-08-21 20:57:12.419006635 +0000 @@ -0,0 +1,195 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Copyright 2012, 2016 by Delphix. All rights reserved. +# Copyright 2025 by Lawrence Livermore National Security, LLC. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/cli_root/zpool_add/zpool_add.kshlib + +# +# DESCRIPTION: +# Verify zpool add succeeds when adding vdevs with matching redundancy +# and warns with differing redundancy for a degraded pool. +# +# STRATEGY: +# 1. Create several files == $MINVDEVSIZE. +# 2. Verify 'zpool add' succeeds with matching redundancy +# 3. Verify 'zpool add' warns with differing redundancy when +# a. Degraded pool with replaced mismatch vdev (file vs disk) +# b. Degraded pool dRAID distributed spare active +# c. Degraded pool hot spare active +# + +verify_runnable "global" + +log_assert "Verify 'zpool add' warns for differing redundancy." +log_onexit zpool_create_add_cleanup + +zpool_create_add_setup + +set -A redundancy1_create_args \ + "mirror $vdev0 $vdev1" \ + "raidz1 $vdev0 $vdev1" \ + "draid1:1s $vdev0 $vdev1 $vdev9" + +set -A redundancy2_create_args \ + "mirror $vdev0 $vdev1 $vdev2" \ + "raidz2 $vdev0 $vdev1 $vdev2" \ + "draid2:1s $vdev0 $vdev1 $vdev2 $vdev9" + +set -A redundancy3_create_args \ + "mirror $vdev0 $vdev1 $vdev2 $vdev3" \ + "raidz3 $vdev0 $vdev1 $vdev2 $vdev3" \ + "draid3:1s $vdev0 $vdev1 $vdev2 $vdev3 $vdev9" + +set -A redundancy1_add_args \ + "mirror $vdev5 $vdev6" + +set -A redundancy2_add_args \ + "mirror $vdev5 $vdev6 $vdev7" + +set -A redundancy3_add_args \ + "mirror $vdev5 $vdev6 $vdev7 $vdev8" + +set -A redundancy1_create_draid_args \ + "draid1:1s $vdev0 $vdev1 $vdev2" + +set -A redundancy2_create_draid_args \ + "draid2:1s $vdev0 $vdev1 $vdev2 $vdev3" + +set -A redundancy3_create_draid_args \ + "draid3:1s $vdev0 $vdev1 $vdev2 $vdev3 $vdev9" + +set -A redundancy1_create_spare_args \ + "mirror $vdev0 $vdev1 spare $vdev_lo" \ + "raidz1 $vdev0 $vdev1 spare $vdev_lo" \ + "draid1 $vdev0 $vdev1 spare $vdev_lo" + +set -A redundancy2_create_spare_args \ + "mirror $vdev0 $vdev1 $vdev2 spare $vdev_lo" \ + "raidz2 $vdev0 $vdev1 $vdev2 spare $vdev_lo" \ + "draid2 $vdev0 $vdev1 $vdev2 spare $vdev_lo" + +set -A redundancy3_create_spare_args \ + "mirror $vdev0 $vdev1 $vdev2 $vdev3 spare $vdev_lo" \ + "raidz3 $vdev0 $vdev1 $vdev2 $vdev3 spare $vdev_lo" \ + "draid3 $vdev0 $vdev1 $vdev2 $vdev3 spare $vdev_lo" + +set -A replace_args "$vdev1" "$vdev_lo" +set -A draid1_args "$vdev1" "draid1-0-0" +set -A draid2_args "$vdev1" "draid2-0-0" +set -A draid3_args "$vdev1" "draid3-0-0" + +typeset -i i=0 +typeset -i j=0 + +function zpool_create_degraded_add +{ + typeset -n create_args=$1 + typeset -n add_args=$2 + typeset -n rm_args=$3 + + i=0 + while ((i < ${#create_args[@]})); do + j=0 + while ((j < ${#add_args[@]})); do + log_must zpool create $TESTPOOL1 ${create_args[$i]} + log_must zpool offline -f $TESTPOOL1 ${rm_args[0]} + log_must zpool replace -w $TESTPOOL1 ${rm_args[0]} ${rm_args[1]} + log_must zpool add $TESTPOOL1 ${add_args[$j]} + log_must zpool destroy -f $TESTPOOL1 + log_must zpool labelclear -f ${rm_args[0]} + + ((j += 1)) + done + ((i += 1)) + done +} + +function zpool_create_forced_degraded_add +{ + typeset -n create_args=$1 + typeset -n add_args=$2 + typeset -n rm_args=$3 + + i=0 + while ((i < ${#create_args[@]})); do + j=0 + while ((j < ${#add_args[@]})); do + log_must zpool create $TESTPOOL1 ${create_args[$i]} + log_must zpool offline -f $TESTPOOL1 ${rm_args[0]} + log_must zpool replace -w $TESTPOOL1 ${rm_args[0]} ${rm_args[1]} + log_mustnot zpool add $TESTPOOL1 ${add_args[$j]} + log_must zpool add --allow-replication-mismatch $TESTPOOL1 ${add_args[$j]} + log_must zpool destroy -f $TESTPOOL1 + log_must zpool labelclear -f ${rm_args[0]} + + ((j += 1)) + done + ((i += 1)) + done +} + +# 2. Verify 'zpool add' succeeds with matching redundancy and a degraded pool. +zpool_create_degraded_add redundancy1_create_args redundancy1_add_args replace_args +zpool_create_degraded_add redundancy2_create_args redundancy2_add_args replace_args +zpool_create_degraded_add redundancy3_create_args redundancy3_add_args replace_args + +# 3. Verify 'zpool add' warns with differing redundancy and a degraded pool. +# +# a. Degraded pool with replaced mismatch vdev (file vs disk) +zpool_create_forced_degraded_add redundancy1_create_args redundancy2_add_args replace_args +zpool_create_forced_degraded_add redundancy1_create_args redundancy3_add_args replace_args + +zpool_create_forced_degraded_add redundancy2_create_args redundancy1_add_args replace_args +zpool_create_forced_degraded_add redundancy2_create_args redundancy3_add_args replace_args + +zpool_create_forced_degraded_add redundancy3_create_args redundancy1_add_args replace_args +zpool_create_forced_degraded_add redundancy3_create_args redundancy2_add_args replace_args + +# b. Degraded pool dRAID distributed spare active + +zpool_create_forced_degraded_add redundancy1_create_draid_args redundancy2_add_args draid1_args +zpool_create_forced_degraded_add redundancy1_create_draid_args redundancy3_add_args draid1_args + +zpool_create_forced_degraded_add redundancy2_create_draid_args redundancy1_add_args draid2_args +zpool_create_forced_degraded_add redundancy2_create_draid_args redundancy3_add_args draid2_args + +zpool_create_forced_degraded_add redundancy3_create_draid_args redundancy1_add_args draid3_args +zpool_create_forced_degraded_add redundancy3_create_draid_args redundancy2_add_args draid3_args + +# c. Degraded pool hot spare active +zpool_create_forced_degraded_add redundancy1_create_spare_args redundancy2_add_args replace_args +zpool_create_forced_degraded_add redundancy1_create_spare_args redundancy3_add_args replace_args + +zpool_create_forced_degraded_add redundancy2_create_spare_args redundancy1_add_args replace_args +zpool_create_forced_degraded_add redundancy2_create_spare_args redundancy3_add_args replace_args + +zpool_create_forced_degraded_add redundancy3_create_spare_args redundancy1_add_args replace_args +zpool_create_forced_degraded_add redundancy3_create_spare_args redundancy2_add_args replace_args + +log_pass "Verify 'zpool add' warns for differing redundancy." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh 2026-08-21 20:57:12.419006635 +0000 @@ -0,0 +1,117 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Copyright 2012, 2016 by Delphix. All rights reserved. +# Copyright 2025 by Lawrence Livermore National Security, LLC. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/cli_root/zpool_add/zpool_add.kshlib + +# +# DESCRIPTION: +# Verify zpool add succeeds when adding vdevs with matching redundancy +# and warns with differing redundancy after removal. +# +# STRATEGY: +# 1. Create several files == $MINVDEVSIZE. +# 2. Verify 'zpool add' warns with differing redundancy after removal. +# + +verify_runnable "global" + +log_assert "Verify 'zpool add' warns for differing redundancy." +log_onexit zpool_create_add_cleanup + +zpool_create_add_setup + +typeset -i i=0 +typeset -i j=0 + +set -A redundancy1_create_args \ + "mirror $vdev0 $vdev1" \ + "raidz1 $vdev0 $vdev1" \ + "draid1:1s $vdev0 $vdev1 $vdev9" + +set -A redundancy2_create_args \ + "mirror $vdev0 $vdev1 $vdev2" \ + "raidz2 $vdev0 $vdev1 $vdev2" \ + "draid2:1s $vdev0 $vdev1 $vdev2 $vdev9" + +set -A redundancy3_create_args \ + "mirror $vdev0 $vdev1 $vdev2 $vdev3" \ + "raidz3 $vdev0 $vdev1 $vdev2 $vdev3" \ + "draid3:1s $vdev0 $vdev1 $vdev2 $vdev3 $vdev9" + +set -A redundancy1_add_args \ + "mirror $vdev5 $vdev6" + +set -A redundancy2_add_args \ + "mirror $vdev5 $vdev6 $vdev7" + +set -A redundancy3_add_args \ + "mirror $vdev5 $vdev6 $vdev7 $vdev8" + +set -A log_args "log" "$vdev_lo" +set -A cache_args "cache" "$vdev_lo" +set -A spare_args "spare" "$vdev_lo" + + +function zpool_create_rm_add +{ + typeset -n create_args=$1 + typeset -n add_args=$2 + typeset -n rm_args=$3 + + i=0 + while ((i < ${#create_args[@]})); do + j=0 + while ((j < ${#add_args[@]})); do + log_must zpool create $TESTPOOL1 ${create_args[$i]} + log_must zpool add $TESTPOOL1 ${rm_args[0]} ${rm_args[1]} + log_must zpool add $TESTPOOL1 ${add_args[$j]} + log_must zpool remove $TESTPOOL1 ${rm_args[1]} + log_mustnot zpool add $TESTPOOL1 ${rm_args[1]} + log_must zpool add $TESTPOOL1 ${rm_args[0]} ${rm_args[1]} + log_must zpool destroy -f $TESTPOOL1 + + ((j += 1)) + done + ((i += 1)) + done +} + +# 2. Verify 'zpool add' warns with differing redundancy after removal. +zpool_create_rm_add redundancy1_create_args redundancy1_add_args log_args +zpool_create_rm_add redundancy2_create_args redundancy2_add_args log_args +zpool_create_rm_add redundancy3_create_args redundancy3_add_args log_args + +zpool_create_rm_add redundancy1_create_args redundancy1_add_args cache_args +zpool_create_rm_add redundancy2_create_args redundancy2_add_args cache_args +zpool_create_rm_add redundancy3_create_args redundancy3_add_args cache_args + +zpool_create_rm_add redundancy1_create_args redundancy1_add_args spare_args +zpool_create_rm_add redundancy2_create_args redundancy2_add_args spare_args +zpool_create_rm_add redundancy3_create_args redundancy3_add_args spare_args diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_scrub_txg_continue_from_last.ksh 2026-08-21 20:57:12.552195987 +0000 @@ -0,0 +1,71 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# Copyright (c) 2025, Klara Inc. +# +# This software was developed by +# Mariusz Zaborski +# under sponsorship from Wasabi Technology, Inc. and Klara Inc. + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/cli_root/zpool_events/zpool_events.kshlib + +# +# DESCRIPTION: +# Verify that using “zpool scrub -C” correctly generates events. +# +# STRATEGY: +# 1. Run an initial “zpool scrub” on the test pool to generate a txg. +# 2. Clear existing pool events. +# 3. Run “zpool scrub -C” to scrub from the last txg. +# 4. Capture the event log and confirm it contains both “scrub_start” and +# “scrub_finish” entries. +# + +verify_runnable "global" + +function cleanup +{ + rm -f $EVENTS_FILE +} + +EVENTS_FILE="$TESTDIR/zpool_events.$$" +log_onexit cleanup + +log_assert "Verify scrub -C events." + +# Run an initial “zpool scrub” +log_must zpool scrub -w $TESTPOOL + +# Clear existing pool events. +log_must zpool events -c + +# Generate new scrub events. +log_must zpool scrub -Cw $TESTPOOL + +# Verify events. +log_must eval "zpool events -H > $EVENTS_FILE" +log_must grep "scrub_start" $EVENTS_FILE +log_must grep "scrub_finish" $EVENTS_FILE + +log_pass "Verified scrub -C generate correct events." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_006_pos.ksh 2026-08-21 20:57:12.552522306 +0000 @@ -0,0 +1,103 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Andrew Mochalskyi. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/cli_root/zpool_expand/zpool_expand.cfg + +# +# DESCRIPTION: +# A pool on a whole-disk vdev autoexpands from the kernel's own +# capacity change event alone (issue #12505). +# +# STRATEGY: +# 1) Create a pool with autoexpand=on on a single scsi_debug device, +# so zfs owns the whole disk and puts a partition table on it +# 2) Grow the disk and let the SCSI layer pick up the new capacity +# 3) Wait for the pool to expand +# +# The kernel reports a resize with a single change event on the disk; +# nothing is generated for the partitions. zpool_expand_001_pos +# passes this point on an unpatched zed only because +# block_device_wait runs a bare udevadm trigger, which resends change +# events for the zfs_member partitions and hands zed the vdev guid +# the resize never delivered. For the same reason the udev events +# left over from pool creation must be drained before growing the +# disk: only udevadm settle may be used after that point, so that zed +# sees the resize event and nothing else, just like with a disk grown +# in production. +# + +verify_runnable "global" + +function cleanup +{ + poolexists $TESTPOOL1 && destroy_pool $TESTPOOL1 + unload_scsi_debug +} + +# Wait for the pool size to grow past $1. +function wait_for_autoexpand +{ + typeset prev_size=$1 + typeset -i i + + for (( i = 0; i < 60; i++ )); do + typeset new_size=$(get_pool_prop size $TESTPOOL1) + if [[ $new_size -gt $prev_size ]]; then + return + fi + sleep 1 + done + log_fail "$TESTPOOL1 never grew past $prev_size (still $new_size)" +} + +log_onexit cleanup + +log_assert "whole-disk pool autoexpands from the disk's own resize event" + +MINVDEVSIZE_MB=$((MINVDEVSIZE / 1048576)) +load_scsi_debug $MINVDEVSIZE_MB 1 1 1 '512b' +block_device_wait +DEV=$(get_debug_device) + +log_must zpool create -o autoexpand=on $TESTPOOL1 $DEV + +# Let the udev fallout of the pool creation (partition table writes, +# device node closes) fully play out before the resize, so the only +# event left for zed to see below is the resize itself. +udevadm settle +sleep 2 +udevadm settle + +typeset prev_size=$(get_pool_prop size $TESTPOOL1) + +# Grow the device and have the SCSI disk driver re-read the capacity. +# This makes the kernel emit a change event with RESIZE=1 for the +# disk, and nothing for its partitions. +echo "2" > /sys/bus/pseudo/drivers/scsi_debug/virtual_gb +echo "1" > /sys/class/block/$DEV/device/rescan +udevadm settle + +wait_for_autoexpand $prev_size + +log_note "$TESTPOOL1 grew from $prev_size to $(get_pool_prop size $TESTPOOL1)" + +log_pass "whole-disk pool autoexpanded from the disk's own resize event" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_get/vdev_get_all.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_get/vdev_get_all.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_get/vdev_get_all.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_get/vdev_get_all.ksh 2026-08-21 20:57:12.553074509 +0000 @@ -0,0 +1,92 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025, Klara, Inc. +# + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# +# zpool get name all-vdevs works as expected +# +# STRATEGY: +# +# 1. create various kinds of pools +# 2. get all vdev names +# 3. make sure we get all the names back and they look correct +# + +verify_runnable "global" + +function cleanup { + zpool destroy -f $TESTPOOL1 + [[ -e $TESTDIR ]] && rm -rf $TESTDIR/* +} +log_onexit cleanup + +log_assert "zpool get all-vdevs works as expected" + +# map of vdev spec -> summary form +# +# left side is normal args to zpool create; single number will be replaced +# with that number test file +# +# right side is a summary of the vdev tree, one char per vdev +# ! root +# 0-9 file number +# m mirror +# r raidz +# d draid +typeset -A specs=( + ["{0..9}"]="!0123456789" + ["mirror {0..9}"]="!m0123456789" + ["mirror 0 1 mirror 2 3 mirror 4 5 mirror 6 7"]="!m01m23m45m67" + ["raidz1 {0..9}"]="!r0123456789" + ["raidz1 {0..4} raidz1 {5..9}"]="!r01234r56789" + ["raidz2 {0..9}"]="!r0123456789" + ["raidz2 {0..4} raidz2 {5..9}"]="!r01234r56789" + ["raidz3 {0..9}"]="!r0123456789" + ["raidz3 {0..4} raidz3 {5..9}"]="!r01234r56789" + ["draid1 {0..9}"]="!d0123456789" + ["draid2 {0..9}"]="!d0123456789" + ["draid3 {0..9}"]="!d0123456789" +) + +for spec in "${!specs[@]}" ; do + log_must truncate -s 100M $TESTDIR/$TESTFILE1.{0..9} + log_must zpool create -f $TESTPOOL1 \ + $(echo $spec | sed -E "s#(^| )([0-9])#\1$TESTDIR/$TESTFILE1.\2#g") + typeset desc=$( zpool get -Ho name name $TESTPOOL1 all-vdevs | awk ' + /^\// { t = t substr($1,length($1)) ; next } + /^root/ { t = t "!" last ; next } + /^[a-z]/ { t = t substr($1,0,1) last ; next } + END { print t } + ') + log_must test "${specs[$spec]}" == "$desc" + cleanup +done + +log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh 2025-05-01 18:23:23.983218245 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh 2026-08-21 20:57:12.555002292 +0000 @@ -114,7 +114,7 @@ parallel_time=$SECONDS log_note "asyncronously imported 4 pools in $parallel_time seconds" -log_must test $parallel_time -lt $(($sequential_time / 2)) +log_must test $parallel_time -lt $(($sequential_time * 3 / 4)) # # export pools with import delay injectors @@ -133,6 +133,6 @@ parallel_time=$SECONDS log_note "asyncronously imported 4 pools in $parallel_time seconds" -log_must test $parallel_time -lt $(($sequential_time / 2)) +log_must test $parallel_time -lt $(($sequential_time * 3 / 4)) log_pass "Pool imports occur in parallel" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh 2025-05-01 18:23:23.985218273 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_prefetch/zpool_prefetch_001_pos.ksh 2026-08-21 20:57:12.556993730 +0000 @@ -76,7 +76,7 @@ # to generate a reasonable size DDT for testing purposes. DATASET=$TESTPOOL/ddt -log_must zfs create -o dedup=on $DATASET +log_must zfs create -o compression=off -o dedup=on $DATASET MNTPOINT=$(get_prop mountpoint $TESTPOOL/ddt) log_note "Generating dataset ..." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_003_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_003_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_003_pos.ksh 2025-05-01 18:23:23.988218315 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_003_pos.ksh 2026-08-21 20:57:12.559048011 +0000 @@ -59,7 +59,7 @@ log_must zinject -t data -e checksum -f 100 -am /$TESTPOOL2/10m_file # Try to read the 2nd megabyte of 10m_file -dd if=/$TESTPOOL2/10m_file bs=1M || true +dd if=/$TESTPOOL2/10m_file bs=1M of=/dev/null || true log_must zfs snapshot $TESTPOOL2@snap log_must zfs clone $TESTPOOL2@snap $TESTPOOL2/clone diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_004_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_004_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_004_pos.ksh 2025-05-01 18:23:23.988218315 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_004_pos.ksh 2026-08-21 20:57:12.559048011 +0000 @@ -63,7 +63,7 @@ log_must zinject -t data -e checksum -f 100 -am /$TESTPOOL2/10m_file # Try to read the file -dd if=/$TESTPOOL2/10m_file bs=1M || true +dd if=/$TESTPOOL2/10m_file bs=1M of=/dev/null || true log_must zfs snapshot $TESTPOOL2@snap log_must zfs clone $TESTPOOL2@snap $TESTPOOL2/clone diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_009_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_009_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_009_pos.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_009_pos.ksh 2026-08-21 20:57:12.559048011 +0000 @@ -0,0 +1,89 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 + +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Michael Heller. +# + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# Verify 'zpool status -L' does not truncate a long vdev path. +# +# STRATEGY: +# 1. Create a pool on a file vdev whose path is longer than the buffer the +# resolved path used to be copied into. +# 2. Verify 'zpool status -L' reports the whole path. +# 3. Verify 'zpool status' without -L reports it too, which it always did. +# + +verify_runnable "global" + +function cleanup +{ + poolexists $TESTPOOL2 && destroy_pool $TESTPOOL2 + log_must rm -rf $longdir +} + +log_assert "'zpool status -L' does not truncate a long vdev path" + +log_onexit cleanup + +# +# The resolved path has to exceed 63 bytes to reach the case this covers, so +# the name is padded out and the length checked rather than assumed. +# +longdir=$TESTDIR/$(printf 'd%.0s' {1..40}) +longvdev=$longdir/$(printf 'v%.0s' {1..40}) + +typeset -i pathlen=${#longvdev} +if (( pathlen <= 63 )); then + log_fail "vdev path is only $pathlen bytes, too short to truncate" +fi +log_note "vdev path is $pathlen bytes" + +log_must mkdir -p $longdir +log_must truncate -s $MINVDEVSIZE $longvdev +log_must zpool create -f $TESTPOOL2 $longvdev + +# +# -L resolves symlinks in the path. A file vdev resolves to itself, so the +# whole path must come back unchanged. Report whatever name was printed +# rather than only whether it matched, so a failure shows how far it was cut. +# +function vdev_name_from_status # args +{ + zpool status "$@" $TESTPOOL2 | + awk -v d="$TESTDIR" 'index($1, d) == 1 {print $1; exit}' +} + +typeset name +name=$(vdev_name_from_status -L) +if [[ "$name" != "$longvdev" ]]; then + log_fail "'zpool status -L' reported a ${#name} byte name," \ + "expected $pathlen bytes: '$name'" +fi + +name=$(vdev_name_from_status) +if [[ "$name" != "$longvdev" ]]; then + log_fail "'zpool status' reported a ${#name} byte name," \ + "expected $pathlen bytes: '$name'" +fi + +log_pass "'zpool status -L' does not truncate a long vdev path" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh 2025-05-01 18:23:24.002218511 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/cp_files/cp_files_002_pos.ksh 2026-08-21 20:57:12.569668057 +0000 @@ -47,7 +47,6 @@ # verify_runnable "global" -verify_block_cloning if ! is_linux; then log_unsupported "cp --reflink is a GNU coreutils option" @@ -57,7 +56,7 @@ { datasetexists $TESTPOOL/cp-reflink && \ destroy_dataset $$TESTPOOL/cp-reflink -f - log_must set_tunable32 BCLONE_WAIT_DIRTY 0 + log_must restore_tunable BCLONE_WAIT_DIRTY } function verify_copy @@ -82,6 +81,8 @@ # A smaller recordsize is used merely to speed up the test. RECORDSIZE=4096 +log_must save_tunable BCLONE_WAIT_DIRTY + log_must zfs create -o recordsize=$RECORDSIZE $TESTPOOL/cp-reflink CP_TESTDIR=$(get_prop mountpoint $TESTPOOL/cp-reflink) diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/ctime/cleanup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/ctime/cleanup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/ctime/cleanup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/ctime/cleanup.ksh 2026-08-21 20:57:12.573002039 +0000 @@ -0,0 +1,35 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2013 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +default_cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh 2026-08-21 20:57:12.573624147 +0000 @@ -0,0 +1,45 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +. $STF_SUITE/include/libtest.shlib +# . $STF_SUITE/tests/functional/xattr/xattr_common.kshlib + +# +# DESCRIPTION: +# +# Verify [acm]time is modified appropriately with xattr=on|sa + +set -A args "sa" "on" + +log_note "Verify [acm]time is modified appropriately." + +for arg in ${args[*]}; do + log_note "Testing with xattr set to $arg" + log_must zfs set xattr=$arg $TESTPOOL + log_must ctime +done + +log_pass "PASS" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/ctime/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/ctime/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/ctime/setup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/ctime/setup.ksh 2026-08-21 20:57:12.573624147 +0000 @@ -0,0 +1,36 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2013 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib + +DISK=${DISKS%% *} +default_setup $DISK diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_bclone_pruned.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_bclone_pruned.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_bclone_pruned.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_bclone_pruned.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -0,0 +1,152 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026, TrueNAS. +# + +# +# DESCRIPTION: +# Verify that block cloning works correctly when the DDT entry for a +# dedup block has been pruned. When a block has the DEDUP bit set but +# no DDT entry (because it was pruned), cloning it must create a BRT +# entry to track the extra reference. Freeing the original must +# consult the BRT rather than proceeding directly to a DVA free, +# otherwise the block is freed while the clone still references it. +# +# STRATEGY: +# 1. Create a pool with both dedup and block_cloning enabled +# 2. Write a file with dedup=on so blocks get DEDUP bit set in their BPs +# 3. Prune the DDT to remove those entries (blocks remain, DEDUP bit +# stays set in block pointers) +# 4. Clone the file - brt_pending_apply_vdev() must fall back to BRT +# since ddt_addref() returns B_FALSE for pruned entries +# 5. Write a second copy via dd - same hash, new physical blocks, new +# DDT entries at different DVAs from the BRT-tracked blocks +# 6. Delete the clone first - must go through BRT, not DDT, even though +# a matching DDT entry now exists for the same hash +# 7. Delete the dd copy - DDT entries freed normally +# 8. Delete the original - no DDT entry, no BRT entry, DVA freed +# 9. Verify reference counts with zdb -b at each step +# + +. $STF_SUITE/include/libtest.shlib + +verify_runnable "global" + +log_assert "Block cloning of dedup blocks with pruned DDT entries uses BRT" + +# Flush DDT log every TXG so entries appear in the ZAP immediately, +# making ddtprune effective and test behavior predictable. +log_must save_tunable DEDUP_LOG_TXG_MAX +log_must set_tunable32 DEDUP_LOG_TXG_MAX 1 +log_must save_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MIN 100000 + +function cleanup +{ + if poolexists $TESTPOOL ; then + destroy_pool $TESTPOOL + fi + log_must restore_tunable DEDUP_LOG_TXG_MAX + log_must restore_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +} + +log_onexit cleanup + +log_must zpool create -f -o feature@block_cloning=enabled $TESTPOOL $DISKS + +log_must zfs create -o dedup=sha256 -o recordsize=128k $TESTPOOL/$TESTFS +typeset mountpoint=$(get_prop mountpoint $TESTPOOL/$TESTFS) + +# Write unique data: each block gets a DDT entry with refcnt=1. +log_must dd if=/dev/urandom of=$mountpoint/file1 bs=128k count=8 + +sync_pool $TESTPOOL + +# Verify DDT has entries before pruning. +typeset entries=$(zpool status -D $TESTPOOL | \ + grep "dedup: DDT entries" | awk '{print $4}') +log_must test "$entries" -eq 8 + +# Sleep 1s so the DDT entries are at least 1 second old. ddtprune uses +# an age-based cutoff and will silently skip entries that are too fresh. +sleep 1 + +# Prune all unique (refcnt=1) entries. The blocks remain on disk and the +# block pointers in file1 still have the DEDUP bit set, but there is no +# longer a DDT entry for them. +log_must zpool ddtprune -p 100 $TESTPOOL +sync_pool $TESTPOOL + +# Confirm the prune actually removed all entries. +entries=$(zpool status -D $TESTPOOL | \ + grep "dedup: DDT entries" | awk '{print $4}') +[[ -z "$entries" || "$entries" -eq 0 ]] || \ + log_fail "DDT entries not pruned: $entries remain" + +# Clone file1. brt_pending_apply_vdev() will see the DEDUP bit, call +# ddt_addref(), receive B_FALSE (no DDT entry), and fall through to +# create BRT entries instead. +log_must clonefile -f $mountpoint/file1 $mountpoint/clone1 +sync_pool $TESTPOOL + +# BRT entries exist; reference counts must be consistent. +log_must zdb -b $TESTPOOL + +# Write a second copy via dd. Since the DDT was pruned, dedup can't find +# an existing entry and writes new physical blocks at new DVAs, creating +# fresh DDT entries with refcnt=1. The BRT-tracked blocks (file1/clone1) +# are at the old DVAs and are unaffected. +log_must dd if=$mountpoint/file1 of=$mountpoint/file2 bs=128k +sync_pool $TESTPOOL + +# Eight new unique DDT entries (file2's blocks); BRT still holds refs for +# file1/clone1's old blocks. +typeset entries=$(zpool status -D $TESTPOOL | \ + grep "dedup: DDT entries" | awk '{print $4}') +log_must test "$entries" -eq 8 +log_must zdb -b $TESTPOOL + +# Delete the clone first. Its blocks carry the DEDUP bit and the same +# hash as file2's DDT entries, but the DVAs differ — the free must go +# through BRT, not DDT, leaving file2's DDT entries intact. +log_must rm $mountpoint/clone1 +sync_pool $TESTPOOL + +entries=$(zpool status -D $TESTPOOL | \ + grep "dedup: DDT entries" | awk '{print $4}') +log_must test "$entries" -eq 8 +log_must zdb -b $TESTPOOL + +# Delete file2. DDT entries freed; file1's BRT-tracked blocks unaffected. +log_must rm $mountpoint/file2 +sync_pool $TESTPOOL +log_must eval "zdb -D $TESTPOOL | grep -q 'All DDTs are empty'" +log_must zdb -b $TESTPOOL + +# Delete the original. No DDT entry, no BRT entry; DVA freed directly. +log_must rm $mountpoint/file1 +sync_pool $TESTPOOL +log_must zdb -b $TESTPOOL + +log_pass "Block cloning of dedup blocks with pruned DDT entries uses BRT" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_fdt_create.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -104,4 +104,6 @@ # logical table now destroyed; containing object destroyed log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256 | wc -l) -eq 0 +log_must zdb -b $TESTPOOL + log_pass "basic dedup (FDT) operations work" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_fdt_import.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -117,4 +117,6 @@ # with only one ZAP inside log_must test $(zdb -dddd $TESTPOOL $obj | grep DDT-sha256-zap- | wc -l) -eq 1 +log_must zdb -b $TESTPOOL + log_pass "dedup (FDT) retains version after import" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_fdt_pacing.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_fdt_pacing.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_fdt_pacing.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_fdt_pacing.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -0,0 +1,112 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025 Klara, Inc. +# + +# Ensure dedup log flushes are appropriately paced + +. $STF_SUITE/include/libtest.shlib + +log_assert "dedup (FDT) paces out log entries appropriately" + +function get_ddt_log_entries +{ + zdb -D $TESTPOOL | grep -- "-log-sha256-" | sed 's/.*entries=//' | \ + awk '{sum += $1} END {print sum}' +} + +function cleanup +{ + if poolexists $TESTPOOL; then + destroy_pool $TESTPOOL + fi + log_must restore_tunable DEDUP_LOG_FLUSH_ENTRIES_MAX +} + +log_onexit cleanup + +# Create a pool with fast dedup enabled. We disable block cloning to ensure +# it doesn't get in the way of dedup. +log_must zpool create -f \ + -o feature@fast_dedup=enabled \ + -o feature@block_cloning=disabled \ + $TESTPOOL $DISKS + +# Create a filesystem with a small recordsize so that we get more DDT entries, +# disable compression so our writes create predictable results on disk, and +# use 'xattr=sa' to prevent selinux xattrs influencing our accounting +log_must zfs create \ + -o dedup=on \ + -o compression=off \ + -o xattr=sa \ + -o checksum=sha256 \ + -o recordsize=4k $TESTPOOL/fs + +# Set the dedup log to only flush a single entry per txg. +# It's hard to guarantee that exactly one flush will happen per txg, or that +# we don't miss a txg due to weird latency or anything, so we build some +# wiggle room into subsequent checks. + +log_must save_tunable DEDUP_LOG_FLUSH_ENTRIES_MAX +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MAX 1 + +# Create a file. This is 256 full blocks, so will produce 256 entries in the +# dedup log. +log_must dd if=/dev/urandom of=/$TESTPOOL/fs/file1 bs=128k count=8 +sync_pool + +# Verify there are at least 240 entries in the dedup log. +log_entries=$(get_ddt_log_entries) +[[ "$log_entries" -gt 240 ]] || \ + log_fail "Fewer than 240 entries in dedup log: $log_entries" + +# Wait for 5 TXGs to sync. +for i in `seq 1 5`; do + sync_pool +done + +# Verify there are at least 220 entries in the dedup log. +log_entries2=$(get_ddt_log_entries) +[[ $((log_entries - log_entries2)) -lt 20 ]] || \ + log_fail "Too many entries pruned from dedup log: " \ + "from $log_entries to $log_entries2" +[[ $((log_entries - log_entries2)) -gt 5 ]] || \ + log_fail "Too few entries pruned from dedup log: " \ + "from $log_entries to $log_entries2" + +# Set the log flush rate high enough to clear the whole list. +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MAX 1024 +sync_pool + +# Verify there are 0 entries in the dedup log. +log_entries3=$(get_ddt_log_entries) +[[ "$log_entries3" -eq 0 ]] || \ + log_fail "Entries still present in dedup log: $log_entries3" + +# Verify there are 256 entries in the unique table. +log_must eval "zdb -D $TESTPOOL | grep -q 'DDT-sha256-zap-unique:.*entries=256'" + +log_must zdb -b $TESTPOOL + +log_pass "dedup (FDT) paces out log entries appropriately" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_create.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -93,4 +93,6 @@ # logical table now destroyed; all DDT ZAPs removed log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 0 +log_must zdb -b $TESTPOOL + log_pass "basic dedup (legacy) operations work" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_mixed.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -102,4 +102,6 @@ obj=$(zdb -dddd $TESTPOOL 1 | grep DDT-blake3 | awk '{ print $NF }') log_must test $(zdb -dddd $TESTPOOL $obj | grep DDT-.*-zap- | wc -l) -eq 1 +log_must zdb -b $TESTPOOL + log_pass "legacy and FDT dedup tables on the same pool can happily coexist" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_fdt_upgrade.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -127,4 +127,6 @@ # with one ZAP inside log_must test $(zdb -dddd $TESTPOOL $obj | grep DDT-sha256-zap- | wc -l) -eq 1 +log_must zdb -b $TESTPOOL + log_pass "legacy dedup tables work after upgrade; new dedup tables created as FDT" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_legacy_import.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -102,4 +102,6 @@ # should be just one DDT ZAP in the MOS log_must test $(zdb -dddd $TESTPOOL 1 | grep DDT-sha256-zap- | wc -l) -eq 1 +log_must zdb -b $TESTPOOL + log_pass "dedup (legacy) retains version after import" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_prune.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_prune.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_prune.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_prune.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -48,13 +48,15 @@ # entries appear in the DDT ZAP log_must save_tunable DEDUP_LOG_TXG_MAX log_must set_tunable32 DEDUP_LOG_TXG_MAX 1 - +log_must save_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MIN 100000 function cleanup { if poolexists $TESTPOOL ; then destroy_pool $TESTPOOL fi log_must restore_tunable DEDUP_LOG_TXG_MAX + log_must restore_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN } function ddt_entries @@ -93,5 +95,6 @@ [[ "$((entries / 4))" -eq "$new_entries" ]] || \ log_fail "DDT entries did not shrink enough: $entries -> $new_entries" +log_must zdb -b $TESTPOOL log_pass "DDT pruning correctly removes non-duplicate entries" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_prune_leak.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -0,0 +1,86 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025, Klara Inc. +# Copyright (c) 2025, Nutanix Inc. +# + +# DESCRIPTION: +# Verify that zpool ddtprune successfully reduces the number of entries +# in the DDT. +# +# STRATEGY: +# 1. Create a pool with dedup=on +# 2. Add non-duplicate entries to the DDT +# 3. ddtprune all entries +# 4. Remove the file +# 5. Verify there's no space leak +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/events/events_common.kshlib + +verify_runnable "both" + +log_assert "Verify DDT pruning does not cause space leak" + +# We set the dedup log txg interval to 1, to get a log flush every txg, +# effectively disabling the log. Without this it's hard to predict when +# entries appear in the DDT ZAP +log_must save_tunable DEDUP_LOG_TXG_MAX +log_must set_tunable32 DEDUP_LOG_TXG_MAX 1 +log_must save_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MIN 100000 +function cleanup +{ + if poolexists $TESTPOOL ; then + destroy_pool $TESTPOOL + fi + log_must restore_tunable DEDUP_LOG_TXG_MAX + log_must restore_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +} + +log_onexit cleanup + +log_must zpool create -f $TESTPOOL $DISKS + +log_must zfs create -o dedup=on $TESTPOOL/$TESTFS +typeset mountpoint=$(get_prop mountpoint $TESTPOOL/$TESTFS) +log_must dd if=/dev/urandom of=$mountpoint/f1 bs=1M count=16 +# We seems to need some amount of txg sync here to make it more consistently +# reproducible +for i in $(seq 50); do + zpool sync $TESTPOOL +done + +log_must zpool ddtprune -p 100 $TESTPOOL +log_must rm $mountpoint/f1 +sync_pool $TESTPOOL + +zdb_out=$(zdb -bcc $TESTPOOL) +echo "$zdb_out" +if echo "$zdb_out" | grep -q "leaked space"; then + log_fail "DDT pruning causes space leak" +fi + +log_pass "DDT pruning does not cause space leak" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_quota.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -50,13 +50,13 @@ VDEV_DEDUP="$TEST_BASE_DIR/vdevfile.dedup.$$" POOL="dedup_pool" -save_tunable TXG_TIMEOUT - # we set the dedup log txg interval to 1, to get a log flush every txg, # effectively disabling the log. without this it's hard to predict when and # where things appear on-disk log_must save_tunable DEDUP_LOG_TXG_MAX log_must set_tunable32 DEDUP_LOG_TXG_MAX 1 +log_must save_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MIN 100000 function cleanup { @@ -64,8 +64,8 @@ destroy_pool $POOL fi log_must rm -fd $VDEV_GENERAL $VDEV_DEDUP $MOUNTDIR - log_must restore_tunable TXG_TIMEOUT log_must restore_tunable DEDUP_LOG_TXG_MAX + log_must restore_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN } @@ -79,9 +79,8 @@ { log_must truncate -s 5G $VDEV_GENERAL # Use 'xattr=sa' to prevent selinux xattrs influencing our accounting - log_must zpool create -o ashift=12 -f -O xattr=sa -m $MOUNTDIR $POOL $VDEV_GENERAL - log_must zfs set dedup=on $POOL - log_must set_tunable32 TXG_TIMEOUT 600 + log_must zpool create -f -O xattr=sa -m $MOUNTDIR $POOL $VDEV_GENERAL + log_must zfs set compression=off dedup=on $POOL } function dedup_table_size @@ -190,31 +189,30 @@ # add a dedicated dedup/special VDEV and enable an automatic quota if (( RANDOM % 2 == 0 )) ; then class="special" + size="200M" else class="dedup" + size="100M" fi - log_must truncate -s 200M $VDEV_DEDUP + log_must truncate -s $size $VDEV_DEDUP log_must zpool add $POOL $class $VDEV_DEDUP log_must zpool set dedup_table_quota=auto $POOL log_must zfs set recordsize=1K $POOL - log_must zfs set compression=zstd $POOL # Generate a working set to fill up the dedup/special allocation class - log_must fio --directory=$MOUNTDIR --name=dedup-filler-1 \ - --rw=read --bs=1m --numjobs=2 --iodepth=8 \ - --size=512M --end_fsync=1 --ioengine=posixaio --runtime=1 \ - --group_reporting --fallocate=none --output-format=terse \ - --dedupe_percentage=0 - log_must sync_pool $POOL + for i in {0..63}; do + log_must dd if=/dev/urandom of=$MOUNTDIR/file${i} bs=1M count=16 + log_must sync_pool $POOL + done zpool status -D $POOL zpool list -v $POOL echo DDT size $(dedup_table_size), with $(ddt_entries) entries # - # With no DDT quota in place, the above workload will produce over - # 800,000 entries by using space in the normal class. With a quota, it + # With no DDT quota in place, the above workload will produce up to + # 1M of entries by using space in the normal class. With a quota, it # should be well under 500,000. However, logged entries are hard to # account for because they can appear on both logs, and can also # represent an eventual removal. This isn't easily visible from diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_zap_shrink.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_zap_shrink.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/dedup/dedup_zap_shrink.ksh 2025-05-01 18:23:24.006218568 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/dedup/dedup_zap_shrink.ksh 2026-08-21 20:57:12.573855750 +0000 @@ -44,6 +44,8 @@ # entries appear in the DDT ZAP log_must save_tunable DEDUP_LOG_TXG_MAX log_must set_tunable32 DEDUP_LOG_TXG_MAX 1 +log_must save_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN +log_must set_tunable32 DEDUP_LOG_FLUSH_ENTRIES_MIN 100000 function cleanup { @@ -51,6 +53,7 @@ destroy_pool $TESTPOOL fi log_must restore_tunable DEDUP_LOG_TXG_MAX + log_must restore_tunable DEDUP_LOG_FLUSH_ENTRIES_MIN } log_onexit cleanup @@ -80,4 +83,6 @@ nleafs=$(zdb -dddd $TESTPOOL "$zap_obj" | grep "Leaf blocks:" | awk -F\: '{print($2);}') log_must test $nleafs -lt $nleafs_old +log_must zdb -b $TESTPOOL + log_pass "ZAP object shrank after removing entries." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/cleanup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/cleanup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/cleanup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/cleanup.ksh 2026-08-21 20:57:12.574258094 +0000 @@ -0,0 +1,21 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/device_access/device_access.kshlib + +log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access.kshlib 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access.kshlib 2026-08-21 20:57:12.575037539 +0000 @@ -0,0 +1,68 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib + +typeset -a _disks=($DISKS) +typeset -r DEV1=/dev/${_disks[0]} +typeset -r DEV2=/dev/${_disks[1]} +typeset -r DEV3=/dev/${_disks[2]} + +typeset -A _saved_perms + +function save_perms { # path + typeset path="$1" + _saved_perms[$path]=$(stat -c '%a' "$path") +} + +function restore_perms { #path + typeset path="$1" + if [[ -z ${_saved_perms[$path]} ]] ; then + log_fail "restore_perms($path): must call save_perms first" + fi + chmod ${_saved_perms[$path]} "$path" +} + +function check_vdevs { #pool, vdevs... + typeset pool="$1" + typeset want=$(echo "${@:2}" | xargs -n 1 | sort | xargs) + typeset have=$(zpool list -HvLP -o name | grep -Eo '/dev/[a-z0-9]+' | sort | xargs) + log_must test "$want" == "$have" +} + +function without_cap { #capability name, cmd... + typeset capname="$1" + capsh --drop=$capname -- -c "${*:2}" +} + +function has_cap { #capability name + typeset capname="$1" + typeset capeff=$(grep ^CapEff /proc/self/status) + capsh --decode="${capeff##*:}" | grep -q $capname +} + +function check_cap_support { + if ! command -v capsh > /dev/null ; then + log_unsupported "capsh program required to test device access" + fi + if ! has_cap cap_sys_admin ; then + log_unsupported "test user requires CAP_SYS_ADMIN capability" + fi + if ! has_cap cap_dac_override ; then + log_unsupported "test user requires CAP_DAC_OVERRIDE capability" + fi +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_add.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_add.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_add.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_add.ksh 2026-08-21 20:57:12.575037539 +0000 @@ -0,0 +1,63 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/device_access/device_access.kshlib + +check_cap_support + +save_perms $DEV1 +save_perms $DEV2 + +function cleanup +{ + poolexists $TESTPOOL && destroy_pool $TESTPOOL + restore_perms $DEV1 + restore_perms $DEV2 +} +log_onexit cleanup + +log_assert 'device permissions are properly checked for zpool add' + +# make device accessible to everyone, ensure pool can be created and devices +# added. +log_must chmod 666 $DEV1 $DEV2 +log_must zpool create $TESTPOOL $DEV1 +log_must zpool add $TESTPOOL spare $DEV2 +check_vdevs $TESTPOOL $DEV1 $DEV2 +log_must zpool destroy $TESTPOOL + +# remove perms from devices, check pool can be created and device added. this +# is relying on the running user having CAP_DAC_OVERRIDE to bypass the +# permission check +log_must chmod 000 $DEV1 $DEV2 +log_must zpool create $TESTPOOL $DEV1 +log_must zpool add $TESTPOOL spare $DEV2 +check_vdevs $TESTPOOL $DEV1 $DEV2 +log_must zpool destroy $TESTPOOL + +# recreate the pool, then try to add it without CAP_DAC_OVERRIDE. this should +# fail, as the user has no direct permission and has no override capability. +log_must zpool create $TESTPOOL $DEV1 +log_mustnot without_cap cap_dac_override zpool add $TESTPOOL spare $DEV2 + +# confirm that the device was really not added, not just that the call failed +check_vdevs $TESTPOOL $DEV1 + +log_must zpool destroy $TESTPOOL + +log_pass 'device permissions are properly checked for zpool add' diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_attach.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_attach.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_attach.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_attach.ksh 2026-08-21 20:57:12.575037539 +0000 @@ -0,0 +1,63 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/device_access/device_access.kshlib + +check_cap_support + +save_perms $DEV1 +save_perms $DEV2 + +function cleanup +{ + poolexists $TESTPOOL && destroy_pool $TESTPOOL + restore_perms $DEV1 + restore_perms $DEV2 +} +log_onexit cleanup + +log_assert 'device permissions are properly checked for zpool attach' + +# make device accessible to everyone, ensure pool can be created and devices +# attached. +log_must chmod 666 $DEV1 $DEV2 +log_must zpool create $TESTPOOL $DEV1 +log_must zpool attach $TESTPOOL $DEV1 $DEV2 +check_vdevs $TESTPOOL $DEV1 $DEV2 +log_must zpool destroy $TESTPOOL + +# remove perms from devices, check pool can be created and device attached. +# this is relying on the running user having CAP_DAC_OVERRIDE to bypass the +# permission check +log_must chmod 000 $DEV1 $DEV2 +log_must zpool create $TESTPOOL $DEV1 +log_must zpool attach $TESTPOOL $DEV1 $DEV2 +check_vdevs $TESTPOOL $DEV1 $DEV2 +log_must zpool destroy $TESTPOOL + +# recreate the pool, then try to attach without CAP_DAC_OVERRIDE. this should +# fail, as the user has no direct permission and has no override capability. +log_must zpool create $TESTPOOL $DEV1 +log_mustnot without_cap cap_dac_override zpool attach $TESTPOOL $DEV1 $DEV2 + +# confirm that the device was really not attached, not just that the call failed +check_vdevs $TESTPOOL $DEV1 + +log_must zpool destroy $TESTPOOL + +log_pass 'device permissions are properly checked for zpool attach' diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_create.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_create.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_create.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_create.ksh 2026-08-21 20:57:12.575037539 +0000 @@ -0,0 +1,62 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/device_access/device_access.kshlib + +check_cap_support + +save_perms $DEV1 +save_perms $DEV2 + +function cleanup +{ + poolexists $TESTPOOL && destroy_pool $TESTPOOL + restore_perms $DEV1 + restore_perms $DEV2 +} +log_onexit cleanup + +log_assert 'device permissions are properly checked for zpool create' + +# make device accessible to everyone, ensure pool can be created +log_must chmod 666 $DEV1 +log_must zpool create $TESTPOOL $DEV1 +check_vdevs $TESTPOOL $DEV1 +log_must zpool destroy $TESTPOOL + +# remove perms from device, check pool can be created. this is relying +# on the running user having CAP_DAC_OVERRIDE to bypass the permission check +log_must chmod 000 $DEV1 +log_must zpool create $TESTPOOL $DEV1 +check_vdevs $TESTPOOL $DEV1 +log_must zpool destroy $TESTPOOL + +# now remove CAP_DAC_OVERRIDE and try again. this should fail, as the user +# has no direct permission and has no override capability. +log_mustnot without_cap cap_dac_override zpool create $TESTPOOL $DEV1 + +# confirm the pool was really not created, not just that the call failed +log_mustnot poolexists $TESTPOOL + +# create a pool with two devs, only one unavailable. ensure that the entire +# entire pool fails to be created, not just rejecting the inaccessible devices +log_must chmod 666 $DEV2 +log_mustnot without_cap cap_dac_override zpool create $TESTPOOL $DEV1 $DEV2 +log_mustnot poolexists $TESTPOOL + +log_pass 'device permissions are properly checked for zpool create' diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/device_access_import.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/device_access_import.ksh 2026-08-21 20:57:12.575037539 +0000 @@ -0,0 +1,69 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/device_access/device_access.kshlib + +check_cap_support + +save_perms $DEV1 +save_perms $DEV2 + +typeset tmpcache=$(mktemp) + +function cleanup +{ + poolexists $TESTPOOL && destroy_pool $TESTPOOL + restore_perms $DEV1 + restore_perms $DEV2 + rm -f $tmpcache +} +log_onexit cleanup + +log_assert 'device permissions are properly checked for zpool import' + +# create a pool with two devices, capture the cache file, and export it +log_must chmod 666 $DEV1 $DEV2 +log_must zpool create $TESTPOOL $DEV1 $DEV2 +check_vdevs $TESTPOOL $DEV1 $DEV2 +cp /etc/zfs/zpool.cache $tmpcache +log_must zpool export $TESTPOOL + +# remove perms from devices, check pool can be imported. this is relying on the +# running user having CAP_DAC_OVERRIDE to bypass the permission check +log_must chmod 000 $DEV1 $DEV2 +log_must zpool import $TESTPOOL +check_vdevs $TESTPOOL $DEV1 $DEV2 +log_must zpool export $TESTPOOL + +# try to import the pool without CAP_DAC_OVERRIDE. this should fail, as the +# user has no direct permission and has no override capability. +log_mustnot without_cap cap_dac_override zpool import $TESTPOOL +log_mustnot poolexists $TESTPOOL + +# make one device accessible, and try to import again. should fail, because +# the userspace device scan can't access all the devices +log_must chmod 666 $DEV1 +log_mustnot without_cap cap_dac_override zpool import $TESTPOOL +log_mustnot poolexists $TESTPOOL + +# try to import using the cachefile. should fail, because one of the devices +# listed in the cachefile is not accessible to the user +log_mustnot without_cap cap_dac_override zpool import -c $tmpcache $TESTPOOL +log_mustnot poolexists $TESTPOOL + +log_pass 'device permissions are properly checked for zpool import' diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/device_access/setup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/device_access/setup.ksh 2026-08-21 20:57:12.575037539 +0000 @@ -0,0 +1,23 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/device_access/device_access.kshlib + +verify_runnable "global" + +log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/devices/devices_common.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/devices/devices_common.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/devices/devices_common.kshlib 2025-05-01 18:23:24.008218595 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/devices/devices_common.kshlib 2026-08-21 20:57:12.575169769 +0000 @@ -54,9 +54,9 @@ # %t - major device type in hex # %T - minor device type in hex # - major=$(stat --dereference --format="%t" "$devstr") - minor=$(stat --dereference --format="%T" "$devstr") - log_must mknod $filename b "0x${major}" "0x${minor}" + major=$(printf '%d' 0x$(stat -L -c "%t" "$devstr")) + minor=$(printf '%d' 0x$(stat -L -c "%T" "$devstr")) + log_must mknod $filename b "${major}" "${minor}" ;; *) # @@ -83,9 +83,9 @@ # %t - major device type in hex # %T - minor device type in hex # - major=$(stat --format="%t" /dev/null) - minor=$(stat --format="%T" /dev/null) - log_must mknod $filename c "0x${major}" "0x${minor}" + major=$(printf '%d' 0x$(stat -c "%t" /dev/null)) + minor=$(printf '%d' 0x$(stat -c "%T" /dev/null)) + log_must mknod $filename c "${major}" "${minor}" ;; FreeBSD) # diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh 2025-05-01 18:23:24.008218595 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/direct/dio_async_fio_ioengines.ksh 2026-08-21 20:57:12.575315437 +0000 @@ -65,26 +65,11 @@ if is_linux; then fio_async_ioengines+=" libaio" if $(grep -q "CONFIG_IO_URING=y" /boot/config-$(uname -r)); then - if [ -e /etc/os-release ] ; then - source /etc/os-release - if [ $PLATFORM_ID = "platform:el9" ] ; then - log_note "io_uring disabled on RHEL 9 " \ - "variants: fails with " \ - "'Operation not permitted'" - elif $(check_fio_ioengine -eq 0); then - fio_async_ioengines+=" io_uring" - else - log_note "io_uring not supported by fio and " \ - "will not be tested" - fi - else - if $(check_fio_ioengine); then - fio_async_ioengines+=" io_uring" - - else - log_note "io_uring not supported by fio and " \ - "will not be tested" - fi + if $(check_fio_ioengine); then + fio_async_ioengines+=" io_uring" + else + log_note "io_uring not supported by fio and " \ + "will not be tested" fi else log_note "io_uring not supported by kernel will not " \ diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/direct/dio_write_verify.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/direct/dio_write_verify.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/direct/dio_write_verify.ksh 2025-05-01 18:23:24.009218610 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/direct/dio_write_verify.ksh 2026-08-21 20:57:12.575315437 +0000 @@ -60,6 +60,8 @@ # Clearing out dio_verify from event logs log_must zpool events -c log_must set_tunable32 VDEV_DIRECT_WR_VERIFY $DIO_WR_VERIFY_TUNABLE + log_must set_tunable32 DIO_WRITE_VERIFY_EVENTS_PER_SECOND \ + $DIO_WR_EVENTS_TUNABLE } log_assert "Verify checksum verify works for Direct I/O writes." @@ -75,6 +77,16 @@ BS=$((128 * 1024)) # 128k mntpnt=$(get_prop mountpoint $TESTPOOL/$TESTFS) typeset DIO_WR_VERIFY_TUNABLE=$(get_tunable VDEV_DIRECT_WR_VERIFY) +typeset DIO_WR_EVENTS_TUNABLE=$(get_tunable DIO_WRITE_VERIFY_EVENTS_PER_SECOND) + +# +# Each iteration below generates Direct I/O write verify failures and checks +# that dio_verify_wr zevents were posted. Those zevents are rate limited by +# zfs_dio_write_verify_events_per_second and the limiter state persists across +# iterations, so raise the limit while the test runs to avoid dropping the +# events being counted. The original value is restored in cleanup. +# +log_must set_tunable32 DIO_WRITE_VERIFY_EVENTS_PER_SECOND 1000000 # Get a list of vdevs in our pool set -A array $(get_disklist_fullpath $TESTPOOL) diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/events/events_common.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/events/events_common.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/events/events_common.kshlib 2025-05-01 18:23:24.009218610 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/events/events_common.kshlib 2026-08-21 20:57:12.576090375 +0000 @@ -40,7 +40,7 @@ SECONDS=0 - until grep -q "^ZEVENT_CLASS=$event" $ZED_DEBUG_LOG ; do + until grep -q "^ZEVENT_CLASS=$event" "$file" ; do if [[ $SECONDS -gt $timeout ]]; then echo file_wait_event exceeded $SECONDS seconds return 1 diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/events/zed_cksum_reported.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/events/zed_cksum_reported.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/events/zed_cksum_reported.ksh 2025-05-01 18:23:24.009218610 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/events/zed_cksum_reported.ksh 2026-08-21 20:57:12.576090375 +0000 @@ -55,7 +55,7 @@ if poolexists $POOL ; then destroy_pool $POOL fi - log_must rm -fd $VDEV $MOUNTDIR + log_must rm -fd $VDEV $VDEV1 $MOUNTDIR } log_onexit cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/fallocate/fallocate_extend_timestamps.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/fallocate/fallocate_extend_timestamps.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/fallocate/fallocate_extend_timestamps.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/fallocate/fallocate_extend_timestamps.ksh 2026-08-21 20:57:12.576726814 +0000 @@ -0,0 +1,77 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2026 by iXsystems, Inc. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/include/math.shlib + +# +# DESCRIPTION: +# A fallocate(2) that extends a file past EOF must update mtime/ctime; a +# FALLOC_FL_KEEP_SIZE preallocation must not change the size or timestamps. +# +# STRATEGY: +# 1. Create a small file and record its mtime/ctime +# 2. fallocate -l to a larger size (extend) and verify the size grew and both +# mtime and ctime advanced +# 3. fallocate --keep-size to a larger length and verify the size and both +# timestamps are unchanged +# + +verify_runnable "global" + +FILE=$TESTDIR/$TESTFILE0 +STARTSIZE=$((128 * 1024)) + +function cleanup +{ + [[ -f $FILE ]] && rm -f $FILE +} + +# extend past EOF: size must grow and mtime/ctime must advance +function verify_extend # +{ + typeset -i size="$1" + + log_must mkfile $STARTSIZE $FILE + typeset -i tm="$(stat -c %Y $FILE)" + typeset -i tc="$(stat -c %Z $FILE)" + log_must sleep 1 + log_must fallocate -l $size $FILE + verify_eq $size "$(stat_size $FILE)" "size" + verify_ne $tm "$(stat -c %Y $FILE)" "mtime" + verify_ne $tc "$(stat -c %Z $FILE)" "ctime" + log_must rm -f $FILE +} + +log_assert "Ensure fallocate extend updates mtime/ctime and --keep-size does not" +log_onexit cleanup + +verify_extend $((256 * 1024)) +verify_extend $((1024 * 1024)) + +# --keep-size preallocation must not change size or timestamps +log_must mkfile $STARTSIZE $FILE +typeset -i tm="$(stat -c %Y $FILE)" +typeset -i tc="$(stat -c %Z $FILE)" +log_must sleep 1 +log_must fallocate --keep-size -l $((1024 * 1024)) $FILE +verify_eq $STARTSIZE "$(stat_size $FILE)" "size" +verify_eq $tm "$(stat -c %Y $FILE)" "mtime" +verify_eq $tc "$(stat -c %Z $FILE)" "ctime" +log_must rm -f $FILE + +log_pass "fallocate extend correctly updates timestamps" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/fault/auto_spare_double.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/fault/auto_spare_double.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/fault/auto_spare_double.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/fault/auto_spare_double.ksh 2026-08-21 20:57:12.576883511 +0000 @@ -0,0 +1,122 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025 by Lawrence Livermore National Security, LLC. +# + +# DESCRIPTION: +# Try do induce a double spare condition and verify we're prevented from doing +# it. +# +# STRATEGY: +# 1. Fail a drive +# 2. Kick in first spare +# 3. Bring new drive back online and start resilvering to it +# 4. Immediately after the resilver starts, fail the new drive. +# 5. Try to kick in the second spare for the new drive (which is now failed) +# 6. Verify that we can't kick in the second spare +# +# Repeat this test for both traditional spares and dRAID spares. +# +. $STF_SUITE/include/libtest.shlib + +LAST_VDEV=3 +SIZE_MB=300 + +ZED_PID="$(zed_check)" + +function cleanup +{ + destroy_pool $TESTPOOL + for i in {0..$LAST_VDEV} ; do + log_must rm -f $TEST_BASE_DIR/file$i + done + + # Restore ZED if it was running before this test + if [ -n $ZED_PID ] ; then + log_must zed_start + fi +} + +log_assert "Cannot attach two spares to same failed vdev" +log_onexit cleanup + +# Stop ZED if it's running +if [ -n $ZED_PID ] ; then + log_must zed_stop +fi + +log_must truncate -s ${SIZE_MB}M $TEST_BASE_DIR/file{0..$LAST_VDEV} + +ZFS_DBGMSG=/proc/spl/kstat/zfs/dbgmsg + +# Run the test - we assume the pool is already created. +# $1: disk to fail +# $2: 1st spare name +# $3: 2nd spare name +function do_test { + FAIL_DRIVE=$1 + SPARE0=$2 + SPARE1=$3 + echo 0 > $ZFS_DBGMSG + log_must zpool status + + log_note "Kicking in first spare ($SPARE0)" + log_must zpool offline -f $TESTPOOL $FAIL_DRIVE + log_must zpool replace $TESTPOOL $FAIL_DRIVE $SPARE0 + + # Fill the pool with data to make the resilver take a little + # time. + dd if=/dev/zero of=/$TESTPOOL/testfile bs=1M || true + + # Zero our failed disk. It will appear as a blank. + rm -f $FAIL_DRIVE + truncate -s ${SIZE_MB}M $FAIL_DRIVE + + # Attempt to replace our failed disk, then immediately fault it. + log_must zpool replace $TESTPOOL $FAIL_DRIVE + log_must zpool offline -f $TESTPOOL $FAIL_DRIVE + log_must check_state $TESTPOOL $FAIL_DRIVE "faulted" + + log_note "Kicking in second spare ($SPARE0)... This should not work..." + log_mustnot zpool replace $TESTPOOL $FAIL_DRIVE $SPARE1 + # Verify the debug line in dbgmsg + log_must grep 'disk would create double spares' $ZFS_DBGMSG + + # Disk should still be faulted + log_must check_state $TESTPOOL $FAIL_DRIVE "faulted" +} + +# Test with traditional spares +log_must zpool create -O compression=off -O recordsize=4k -O primarycache=none \ + $TESTPOOL mirror $TEST_BASE_DIR/file{0,1} spare $TEST_BASE_DIR/file{2,3} +do_test $TEST_BASE_DIR/file1 $TEST_BASE_DIR/file2 $TEST_BASE_DIR/file3 +destroy_pool $TESTPOOL + +# Clear vdev files for next test +for i in {0..$LAST_VDEV} ; do + log_must rm -f $TEST_BASE_DIR/file$i +done +log_must truncate -s ${SIZE_MB}M $TEST_BASE_DIR/file{0..$LAST_VDEV} + +# Test with dRAID spares +log_must zpool create -O compression=off -O recordsize=4k -O primarycache=none \ + $TESTPOOL draid1:1d:4c:2s $TEST_BASE_DIR/file{0..3} +do_test $TEST_BASE_DIR/file1 draid1-0-0 draid1-0-1 + +log_pass "Verified we cannot attach two spares to same failed vdev" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/cleanup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/cleanup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/cleanup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/cleanup.ksh 2026-08-21 20:57:12.577582001 +0000 @@ -0,0 +1,32 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025 by Klara Inc. +# + +. $STF_SUITE/include/libtest.shlib + +restore_tunable METASLAB_FORCE_GANGING +restore_tunable METASLAB_FORCE_GANGING_PCT +default_cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks.kshlib 2026-08-21 20:57:12.577912039 +0000 @@ -0,0 +1,121 @@ +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025 By Klara Inc. +# + +. $STF_SUITE/include/libtest.shlib + +# +# Get 0th DVA of first L0 block of file +# +# $1 filesystem +# $2 object number +# +function get_object_info +{ + typeset fs=$1 + typeset obj=$2 + + zdb -dddddd $fs $obj +} + +# +# $1 filesystem +# $2 path to file +# $3 block filter +# +function get_blocks_filter +{ + typeset fs=$1 + typeset path=$2 + + typeset full_path="$(get_prop mountpoint $fs)/$path" + typeset obj="$(ls -i $full_path | awk '{print $1}')" + + get_object_info $fs $obj | grep $3 | grep -v Dataset +} + +function get_first_block +{ + get_blocks_filter $1 $2 L0 | head -n 1 +} + +function get_first_block_dva +{ + get_first_block $1 $2 | sed 's/.*L0 \([^ ]*\).*/\1/' +} + +# Takes a zdb compressed blkptr line on stdin +function get_num_dvas +{ + sed 's/.*L[0-9] \(.*\) [a-f0-9]*L.*/\1/' | awk '{print NF}' +} + +function check_gang_dva +{ + typeset last_byte="$(echo -n $1 | tail -c 1)" + [[ "$last_byte" == "G" ]] || return 1 + return 0 +} + +function check_is_gang_dva +{ + check_gang_dva $1 || log_fail "Not a gang DVA: \"$1\"" +} + +function check_not_gang_dva +{ + check_gang_dva $1 && log_fail "Gang DVA: \"$1\"" +} + +# +# Get the gang header contents of the given dva in the given pool +# +# $1 pool +# $2 dva +# $3 size (in hexidecimal) +# +function read_gang_header +{ + typeset pool=$1 + typeset dva=$2 + typeset size=$3 + + check_is_gang_dva $dva + + zdb -R $pool "${dva%:*}:$size:g" 2>&1 | grep -v "Found vdev:" +} + +function preamble +{ + save_tunable METASLAB_FORCE_GANGING + save_tunable METASLAB_FORCE_GANGING_PCT +} + +function cleanup +{ + destroy_pool $TESTPOOL + restore_tunable METASLAB_FORCE_GANGING + restore_tunable METASLAB_FORCE_GANGING_PCT +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_redundant.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_redundant.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_redundant.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/gang_blocks_redundant.ksh 2026-08-21 20:57:12.577912039 +0000 @@ -0,0 +1,89 @@ +#!/bin/ksh +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2025 by Klara Inc. +# + +# +# Description: +# Verify that the redundant_metadata setting is respected by gang headers +# +# Strategy: +# 1. Create a filesystem with redundant_metadata={all,most,some,none} +# 2. Verify that gang blocks at different levels have the right amount of redundancy +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/gang_blocks/gang_blocks.kshlib + +log_assert "Verify that gang blocks at different levels have the right amount of redundancy." + +function cleanup2 +{ + for red in all most some none; do zfs destroy $TESTPOOL/$TESTFS-$red; done + cleanup +} + +preamble +log_onexit cleanup2 + +log_must zpool create -f -o ashift=9 $TESTPOOL $DISKS +set_tunable64 METASLAB_FORCE_GANGING 1500 +set_tunable32 METASLAB_FORCE_GANGING_PCT 100 +for red in all most some none; do + log_must zfs create -o redundant_metadata=$red -o recordsize=512 \ + $TESTPOOL/$TESTFS-$red + if [[ "$red" == "all" ]]; then + log_must zfs set recordsize=8k $TESTPOOL/$TESTFS-$red + fi + mountpoint=$(get_prop mountpoint $TESTPOOL/$TESTFS-$red) + + path="${mountpoint}/file" + log_must dd if=/dev/urandom of=$path bs=1M count=1 + log_must zpool sync $TESTPOOL + num_l0_dvas=$(get_first_block $TESTPOOL/$TESTFS-$red file | get_num_dvas) + if [[ "$red" == "all" ]]; then + [[ "$num_l0_dvas" -eq 2 ]] || \ + log_fail "wrong number of DVAs for L0 in $red: $num_l0_dvas" + else + [[ "$num_l0_dvas" -eq 1 ]] || \ + log_fail "wrong number of DVAs for L0 in $red: $num_l0_dvas" + fi + + num_l1_dvas=$(get_blocks_filter $TESTPOOL/$TESTFS-$red file L1 | head -n 1 | get_num_dvas) + if [[ "$red" == "all" || "$red" == "most" ]]; then + [[ "$num_l1_dvas" -eq 2 ]] || \ + log_fail "wrong number of DVAs for L1 in $red: $num_l1_dvas" + else + [[ "$num_l1_dvas" -eq 1 ]] || \ + log_fail "wrong number of DVAs for L1 in $red: $num_l1_dvas" + fi + + for i in `seq 1 80`; do + dd if=/dev/urandom of=/$mountpoint/f$i bs=512 count=1 2>/dev/null || log_fail "dd failed" + done + log_must zpool sync $TESTPOOL + obj_0_gangs=$(get_object_info $TESTPOOL/$TESTFS-$red 0 L0 | grep G) + num_obj_0_dvas=$(echo "$obj_0_gangs" | head -n 1 | get_num_dvas) + if [[ "$red" != "none" ]]; then + [[ "$num_obj_0_dvas" -eq 2 ]] || \ + log_fail "wrong number of DVAs for obj 0 in $red: $num_obj_0_dvas" + else + [[ "$num_obj_0_dvas" -eq 1 ]] || \ + log_fail "wrong number of DVAs for obj 0 in $red: $num_obj_0_dvas" + fi + log_note "Level $red passed" +done + +log_pass "Gang blocks at different levels have the right amount of redundancy." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/gang_blocks/setup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/gang_blocks/setup.ksh 2026-08-21 20:57:12.577912039 +0000 @@ -0,0 +1,31 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025 by Klara Inc. +# + +. $STF_SUITE/include/libtest.shlib + +set_tunable64 METASLAB_FORCE_GANGING 16777217 +set_tunable32 METASLAB_FORCE_GANGING_PCT 0 diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/io/io_uring.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/io/io_uring.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/io/io_uring.ksh 2025-05-01 18:23:24.017218722 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/io/io_uring.ksh 2026-08-21 20:57:12.582954697 +0000 @@ -45,13 +45,6 @@ log_unsupported "Requires io_uring support within Kernel" fi -if [ -e /etc/os-release ] ; then - source /etc/os-release - if [ $PLATFORM_ID = "platform:el9" ]; then - log_unsupported "Disabled on RHEL 9 variants: fails with 'Operation not permitted'" - fi -fi - fio --ioengine=io_uring --parse-only || log_unsupported "fio io_uring support required" function cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/lease/cleanup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/lease/cleanup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/lease/cleanup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/lease/cleanup.ksh 2026-08-21 20:57:12.583651328 +0000 @@ -0,0 +1,26 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +. $STF_SUITE/include/libtest.shlib + +default_cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/lease/lease_setlease.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/lease/lease_setlease.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/lease/lease_setlease.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/lease/lease_setlease.ksh 2026-08-21 20:57:12.583727967 +0000 @@ -0,0 +1,44 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib + +verify_runnable "both" + +leasefile=/$TESTPOOL/leasefile + +function cleanup +{ + rm -f $leasefile +} + +log_assert "F_SETLEASE is supported" +log_onexit cleanup + +log_must setlease $leasefile + +log_pass "F_SETLEASE is supported" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/lease/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/lease/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/lease/setup.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/lease/setup.ksh 2026-08-21 20:57:12.583727967 +0000 @@ -0,0 +1,27 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +. $STF_SUITE/include/libtest.shlib + +DISK=${DISKS%% *} +default_setup $DISK diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/migration/setup.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/migration/setup.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/migration/setup.ksh 2025-05-01 18:23:24.019218750 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/migration/setup.ksh 2026-08-21 20:57:12.584432051 +0000 @@ -58,9 +58,29 @@ rm -rf $NONZFS_TESTDIR || log_unresolved Could not remove $NONZFS_TESTDIR mkdir -p $NONZFS_TESTDIR || log_unresolved Could not create $NONZFS_TESTDIR +# +# $NONZFS_DISK may still carry a zfs_member label from a pool used by an +# earlier test. 'zpool destroy' leaves the vdev labels in place and new_fs +# only overwrites the front of the device, so the trailing labels can +# survive. libblkid then probes the device as ambiguous (both the new +# filesystem and zfs_member) and the auto-detecting mount below fails +# intermittently. Wipe any residual signatures first so the new filesystem +# is unambiguous. Skip the single-disk case, where $NONZFS_DISK is the same +# device the test pool was just created on. +# +if is_linux && [[ "$NONZFS_DISK" != "$ZFS_DISK" ]]; then + log_must wipefs -a ${DEV_DSKDIR}/$NONZFS_DISK +fi + new_fs ${DEV_DSKDIR}/$NONZFS_DISK || log_untested "Unable to setup a $NEWFS_DEFAULT_FS file system" +# +# Let udev settle so the device node reflects the new filesystem before the +# auto-detecting mount consults it. +# +block_device_wait ${DEV_DSKDIR}/$NONZFS_DISK + log_must mount ${DEV_DSKDIR}/$NONZFS_DISK $NONZFS_TESTDIR log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmap/mmap_ftruncate.ksh 2026-08-21 20:57:12.584779748 +0000 @@ -0,0 +1,80 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025, Klara, Inc. +# + +. $STF_SUITE/include/libtest.shlib + +# +# This verifies that async writeback of dirty mmap()'d pages completes quickly. +# ftruncate() is an operation that will trigger async writeback, but is not +# itself a syncing operation, making it a useful proxy for any way the kernel +# might trigger async writeback. +# +# The guts of this test is in the mmap_ftruncate program. This driver sets a +# larger zfs_txg_timeout. Test failure occurs ftruncate() blocks waiting for +# the writeback until the txg timeout is reached and the changes are forcibly +# written out. Success means the DMU has accepted the changes and cleared the +# page dirty flags. +# + +TIMEOUT=180 +TESTFILE=/$TESTPOOL/truncfile +TESTSIZE=$((2*1024*1024*1024)) # 2G + +verify_runnable "global" + +typeset claim="async writeback of dirty mmap()'d pages completes quickly" + +log_assert $claim + +log_must save_tunable TXG_TIMEOUT + +function cleanup +{ + log_must restore_tunable TXG_TIMEOUT + rm -f $TESTFILE +} +log_onexit cleanup + +log_must set_tunable32 TXG_TIMEOUT $TIMEOUT +log_must zpool sync -f + +# run mmap_ftruncate and record the run time +typeset -i start=$(date +%s) +log_must mmap_ftruncate $TESTFILE $TESTSIZE +typeset -i end=$(date +%s) +typeset -i delta=$((end - start)) + +# in practice, mmap_ftruncate needs a few seconds to dirty all the pages, and +# when this test passes, the ftruncate() call itself should be near-instant. +# when it fails, then its only the txg sync that allows ftruncate() to +# complete, in that case, the run time will be extremely close to the timeout, +# so to avoid any confusion at the edges, we require that it complets within +# half the transaction time. for any timeout higher than ~30s that should be a +# very bright line down the middle. +log_must test $delta -lt $((TIMEOUT / 2)) + +log_pass $claim diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp.cfg zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp.cfg --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp.cfg 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp.cfg 2026-08-21 20:57:12.585053569 +0000 @@ -25,6 +25,8 @@ export HOSTID_FILE="/etc/hostid" export HOSTID1=01234567 export HOSTID2=89abcdef +export HOSTID3=aaaabbbb +export HOSTID4=ccccdddd export TXG_TIMEOUT_LONG=5000 export TXG_TIMEOUT_DEFAULT=5 @@ -32,7 +34,7 @@ export MMP_POOL=mmppool export MMP_DIR=$TEST_BASE_DIR/mmp export MMP_CACHE=$MMP_DIR/zpool.cache -export MMP_ZTEST_LOG=$MMP_DIR/ztest.log +export MMP_ZHACK_LOG=$MMP_DIR/zhack.log export MMP_HISTORY=100 export MMP_HISTORY_OFF=0 @@ -43,5 +45,3 @@ export MMP_IMPORT_INTERVALS=20 export MMP_FAIL_INTERVALS_DEFAULT=10 export MMP_FAIL_INTERVALS_MIN=2 - -export MMP_TEST_DURATION_DEFAULT=$((MMP_IMPORT_INTERVALS*MMP_INTERVAL_DEFAULT/1000)) diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp.kshlib 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp.kshlib 2026-08-21 20:57:12.585053569 +0000 @@ -83,10 +83,11 @@ rm -f $HOSTID_FILE } -function mmp_pool_create_simple # pool dir +function mmp_pool_create_simple # pool dir enriched { typeset pool=${1:-$MMP_POOL} typeset dir=${2:-$MMP_DIR} + typeset enriched=${3:-""} log_must mkdir -p $dir log_must rm -f $dir/* @@ -96,14 +97,36 @@ log_must mmp_set_hostid $HOSTID1 log_must zpool create -f -o cachefile=$MMP_CACHE $pool \ mirror $dir/vdev1 $dir/vdev2 + + if [[ -n "$enriched" ]]; then + # + # Add then remove a data vdev to leave an indirect vdev, and + # add then remove a log to leave a hole vdev, so the pool + # exercises the non-writeable top-level vdev types skipped by + # the MMP claim check. Round it out with a log, a cache, and + # a spare vdev. + # + log_must truncate -s $MINVDEVSIZE $dir/vdev3 $dir/vdev4 \ + $dir/vdev5 $dir/vdev6 $dir/vdev7 + log_must zpool add -f $pool $dir/vdev3 + log_must zpool remove $pool $dir/vdev3 + log_must zpool wait -t remove $pool + log_must sync_pool $pool + log_must zpool add -f $pool log $dir/vdev4 + log_must zpool remove $pool $dir/vdev4 + log_must zpool add -f $pool log $dir/vdev5 + log_must zpool add -f $pool cache $dir/vdev6 + log_must zpool add -f $pool spare $dir/vdev7 + fi + log_must zpool set multihost=on $pool } -function mmp_pool_create # pool dir +function mmp_pool_create_zhack # pool dir { typeset pool=${1:-$MMP_POOL} typeset dir=${2:-$MMP_DIR} - typeset opts="-VVVVV -T120 -M -k0 -f $dir -E -p $pool" + typeset opts="-d $dir action idle -t120 $pool" mmp_pool_create_simple $pool $dir @@ -112,11 +135,11 @@ log_must mmp_clear_hostid log_must mmp_set_hostid $HOSTID2 - log_note "Starting ztest in the background as hostid $HOSTID1" - log_must eval "ZFS_HOSTID=$HOSTID1 ztest $opts >$MMP_ZTEST_LOG 2>&1 &" + log_note "Starting zhack in the background as hostid $HOSTID1" + log_must eval "ZFS_HOSTID=$HOSTID1 zhack $opts >$MMP_ZHACK_LOG 2>&1 &" while ! is_pool_imported "$pool" "-d $dir"; do - log_must pgrep ztest + log_must pgrep -x zhack log_must sleep 5 done } @@ -126,10 +149,17 @@ typeset pool=${1:-$MMP_POOL} typeset dir=${2:-$MMP_DIR} - ZTESTPID=$(pgrep ztest) - if [ -n "$ZTESTPID" ]; then - log_must kill $ZTESTPID - wait $ZTESTPID + # + # -x matches the process name exactly. Without it any process whose + # name merely contains "zhack" is matched, which includes a test script + # named after the tool: a ksh script mmp_zhack_reclaim.ksh has comm + # "mmp_zhack_recla", so the bare form found the running test and killed + # it, leaving the harness with a dead test and nothing logged. + # + ZHACKPID=$(pgrep -x zhack) + if [ -n "$ZHACKPID" ]; then + log_must kill $ZHACKPID + wait $ZHACKPID fi if poolexists $pool; then @@ -148,7 +178,7 @@ log_must mmp_clear_hostid log_must mmp_set_hostid $hostid log_must zpool export $pool - log_must zpool import $pool + log_must zpool import -d $MMP_DIR $pool return 0 } @@ -158,33 +188,34 @@ typeset pool=$1 typeset opts=$2 - typeset max_duration=$((MMP_TEST_DURATION_DEFAULT-1)) - - SECONDS=0 - zpool import $opts $pool + RESULT=$(ZFS_LOAD_INFO_DEBUG=1 zpool import $opts $pool) typeset rc=$? - if [[ $SECONDS -gt $max_duration ]]; then - log_fail "ERROR: import_no_activity_check unexpected activity \ -check (${SECONDS}s gt $max_duration)" + # mmp_result: 3 (ESRCH) no activity check was run not required + # mmp_result: 6 (ENXIO) no activity check was run hostid not set + if ! echo "$RESULT" | grep -q "mmp_result: 3" && + ! echo "$RESULT" | grep -q "mmp_result: 6"; then + log_note "ERROR: $RESULT" + log_fail "ERROR: import_no_activity_check unexpected activity check" fi return $rc } -function import_activity_check # pool opts act_test_duration +function import_activity_check # pool opts { typeset pool=$1 typeset opts=$2 - typeset min_duration=${3:-$MMP_TEST_DURATION_DEFAULT} - SECONDS=0 - zpool import $opts $pool + RESULT=$(ZFS_LOAD_INFO_DEBUG=1 zpool import $opts $pool) typeset rc=$? - if [[ $SECONDS -le $min_duration ]]; then - log_fail "ERROR: import_activity_check expected activity check \ -(${SECONDS}s le min_duration $min_duration)" + # mmp_result: 0 (Success) check was run no activity detected + # mmp_result: 121 (EREMOTEIO) check was run activity detected + # mmp_result: 4 (EINTR) check was run but interrupted by user + if ! echo "$RESULT" | grep -q "mmp_result: 0"; then + log_note "ERROR: $RESULT" + log_fail "ERROR: import_activity_check expected activity check" fi return $rc diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -24,10 +24,10 @@ # with one hostid be importable by a host with a different hostid. # # STRATEGY: -# 1. Simulate an active pool on another host with ztest. +# 1. Simulate an active pool on another host with zhack. # 2. Verify 'zpool import' reports an active pool. # 3. Verify 'zpool import [-f] $MMP_POOL' cannot import the pool. -# 4. Kill ztest to make pool eligible for import. +# 4. Kill zhack to make pool eligible for import. # 5. Verify 'zpool import' fails with the expected error message. # 6. Verify 'zpool import $MMP_POOL' fails with the expected message. # 7. Verify 'zpool import -f $MMP_POOL' can now import the pool. @@ -44,16 +44,16 @@ { mmp_pool_destroy $MMP_POOL $MMP_DIR log_must mmp_clear_hostid - ZTESTPID=$(pgrep ztest) - if [ -n "$ZTESTPID" ]; then - for pid in $ZTESTPID; do + ZHACKPID=$(pgrep zhack) + if [ -n "$ZHACKPID" ]; then + for pid in $ZHACKPID; do log_must kill -9 $pid done else - # if ztest not running and log present, ztest crashed - if [ -f $MMP_ZTEST_LOG ]; then - log_note "ztest appears to have crashed. Tail of log:" - tail -n 50 $MMP_ZTEST_LOG + # if zhack is not running and log present, zhack crashed + if [ -f $MMP_ZHACK_LOG ]; then + log_note "zhack appears to have crashed. Tail of log:" + tail -n 50 $MMP_ZHACK_LOG fi fi } @@ -61,15 +61,18 @@ log_assert "multihost=on|off active pool activity checks" log_onexit cleanup -# 1. Simulate an active pool on another host with ztest. +# 1. Simulate an active pool on another host with zhack. +log_note "Simulate an active pool on another host with zhack" mmp_pool_destroy $MMP_POOL $MMP_DIR -mmp_pool_create $MMP_POOL $MMP_DIR +mmp_pool_create_zhack $MMP_POOL $MMP_DIR # 2. Verify 'zpool import' reports an active pool. +log_note "Verify 'zpool import' reports an active pool" log_must mmp_set_hostid $HOSTID2 log_must is_pool_imported $MMP_POOL "-d $MMP_DIR" # 3. Verify 'zpool import [-f] $MMP_POOL' cannot import the pool. +log_note "Verify 'zpool import [-f] $MMP_POOL' cannot import the pool" MMP_IMPORTED_MSG="Cannot import '$MMP_POOL': pool is imported" log_must try_pool_import $MMP_POOL "-d $MMP_DIR" "$MMP_IMPORTED_MSG" @@ -84,14 +87,15 @@ "$MMP_IMPORTED_MSG" done -# 4. Kill ztest to make pool eligible for import. Poll with 'zpool status'. -ZTESTPID=$(pgrep ztest) -if [ -n "$ZTESTPID" ]; then - log_must kill -9 $ZTESTPID +# 4. Kill zhack to make pool eligible for import. Poll with 'zpool status'. +log_note "Kill zhack to make pool eligible for import. Poll with 'zpool status'" +ZHACKPID=$(pgrep zhack) +if [ -n "$ZHACKPID" ]; then + log_must kill -9 $ZHACKPID fi log_must wait_pool_imported $MMP_POOL "-d $MMP_DIR" -if [ -f $MMP_ZTEST_LOG ]; then - log_must rm $MMP_ZTEST_LOG +if [ -f $MMP_ZHACK_LOG ]; then + log_must rm $MMP_ZHACK_LOG fi # 5. Verify 'zpool import' fails with the expected error message, when @@ -99,6 +103,7 @@ # - hostid=matches - safe to import the pool # - hostid=different - previously imported on a different system # +log_note "Verify 'zpool import' fails with the expected error message" log_must mmp_clear_hostid MMP_IMPORTED_MSG="Set a unique system hostid" log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "action" "$MMP_IMPORTED_MSG" @@ -113,13 +118,16 @@ log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "status" "$MMP_IMPORTED_MSG" # 6. Verify 'zpool import $MMP_POOL' fails with the expected message. +log_note "Verify 'zpool import $MMP_POOL' fails with the expected message" MMP_IMPORTED_MSG="pool was previously in use from another system." log_must try_pool_import $MMP_POOL "-d $MMP_DIR" "$MMP_IMPORTED_MSG" # 7. Verify 'zpool import -f $MMP_POOL' can now import the pool. +log_note "Verify 'zpool import -f $MMP_POOL' can now import the pool" log_must import_activity_check $MMP_POOL "-f -d $MMP_DIR" # 8 Verify pool may be exported/imported without -f argument. +log_note "Verify pool may be exported/imported without -f argument" log_must zpool export $MMP_POOL log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_concurrent_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_concurrent_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_concurrent_import.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_concurrent_import.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -0,0 +1,133 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Lawrence Livermore National Security, LLC. +# + +# DESCRIPTION: +# Verify that even when importing a shared pool simultaneously +# on systems with different host ids at most one will succeed. +# +# STRATEGY: +# 1. Create an multihost enabled pool +# 2. zhack imports: $HOSTID1 (matching) and $HOSTID1 (matching) +# 3. zhack imports: $HOSTID1 (matching) and $HOSTID2 (different) +# 4. zhack imports: $HOSTID3 (different) and $HOSTID4 (different) +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/mmp/mmp.cfg +. $STF_SUITE/tests/functional/mmp/mmp.kshlib + +verify_runnable "both" + +function cleanup +{ + ZHACKPIDS=$(pgrep zhack) + if [ -n "$ZHACKPIDS" ]; then + for pid in $ZHACKPIDS; do + log_must kill -9 $pid + done + fi + + log_must rm -f $MMP_ZHACK_LOG.1 $MMP_ZHACK_LOG.2 + + mmp_pool_destroy $MMP_POOL $MMP_DIR + log_must mmp_clear_hostid +} + +# Verify that pool was imported by at most one of the zhack processes. +# Check both the return code and expected import message. +function verify_zhack +{ + IMPORT_COUNT=0 + IMPORT_MSGS=0 + + ZHACKPIDS=$(pgrep zhack) + for pid in $ZHACKPIDS; do + wait $pid + STATUS=$? + if [[ $STATUS -eq 0 ]]; then + (( IMPORT_COUNT++ )) + fi + log_note "PID $pid exited with status $STATUS" + done + + grep -H "Imported pool $MMP_POOL" $MMP_ZHACK_LOG.1 && (( IMPORT_MSGS++ )) + grep -H "Imported pool $MMP_POOL" $MMP_ZHACK_LOG.2 && (( IMPORT_MSGS++ )) + + if [[ $IMPORT_MSGS -gt 1 ]]; then + cat $MMP_ZHACK_LOG.* + log_fail "Multiple import success messages" + fi + + if [[ $IMPORT_COUNT -gt 1 ]]; then + cat $MMP_ZHACK_LOG.* + log_fail "Multiple import success return codes" + fi + + if [[ $IMPORT_MSGS -ne $IMPORT_COUNT ]]; then + cat $MMP_ZHACK_LOG.* + log_fail "Messages ($IMPORT_MSGS) differs from count ($IMPORT_COUNT)" + fi +} + +OPTS="-d $MMP_DIR action idle -t5 $MMP_POOL" + +log_assert "multihost=on concurrent imports" +log_onexit cleanup + +# 1. Create a multihost enabled pool with HOSTID1 +mmp_pool_create_simple $MMP_POOL $MMP_DIR enriched +log_must zpool export -F $MMP_POOL + +# 2. zhack imports: $HOSTID1 (matching) and $HOSTID1 (matching) +# Activity check required because the pool was exported with -F above, the +# claim phase will detect the double import despite matching hostids. +log_note "zhack import with $HOSTID1 (matching) and $HOSTID1 (matching)" +log_must eval "ZFS_HOSTID=$HOSTID1 zhack $OPTS >$MMP_ZHACK_LOG.1 2>&1 &" +log_must eval "ZFS_HOSTID=$HOSTID1 zhack $OPTS >$MMP_ZHACK_LOG.2 2>&1 &" +log_must verify_zhack + +mmp_clear_hostid +mmp_set_hostid $HOSTID1 +log_must import_activity_check $MMP_POOL "-d $MMP_DIR" +log_must zpool export $MMP_POOL + +# 3. zhack imports: $HOSTID1 (matching) and $HOSTID2 (different) +# Activity check skipped for HOSTID1 it is expected to import successfully. +# zhack with HOSTID2 will run the activity check and detect the active pool. +log_note "zhack import with $HOSTID1 (matching) and $HOSTID2 (different)" +log_must eval "ZFS_HOSTID=$HOSTID1 zhack $OPTS >$MMP_ZHACK_LOG.1 2>&1 &" +log_must eval "ZFS_HOSTID=$HOSTID2 zhack $OPTS >$MMP_ZHACK_LOG.2 2>&1 &" +log_must verify_zhack + +mmp_clear_hostid +mmp_set_hostid $HOSTID3 +log_must import_activity_check $MMP_POOL "-d $MMP_DIR" +log_must zpool export $MMP_POOL + +# 4. zhack imports: $HOSTID1 (different) and $HOSTID2 (different) +# Both zhacks will run the activity checks, depending on the exact timing +# one may succeed and the other fail, or both may fail. +log_note "zhack import with $HOSTID1 (different) and $HOSTID2 (different)" +log_must eval "ZFS_HOSTID=$HOSTID1 zhack $OPTS >$MMP_ZHACK_LOG.1 2>&1 &" +log_must eval "ZFS_HOSTID=$HOSTID2 zhack $OPTS >$MMP_ZHACK_LOG.2 2>&1 &" +log_must verify_zhack + +log_pass "multihost=on concurrent imports" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_degraded_import.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -0,0 +1,159 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# DESCRIPTION: +# Verify the MMP uberblock claim requires a write only to those mirror +# legs the pool configuration still expects to be present. +# +# STRATEGY: +# 1. Create a mirrored pool with multihost=on and export it without +# updating the labels, so it still appears imported and the next +# import runs an activity check and an uberblock claim. +# 2. A healthy mirror is claimed and imported. +# 3. A mirror with an offlined leg is claimed and imported degraded. +# The offline state is recorded in the configuration, so that leg +# is not required and a degraded pool can still fail over. +# 4. A mirror with a leg this host cannot open, and which the +# configuration does not mark absent, is refused. Requiring that +# leg is what prevents two hosts which each see one leg from +# importing the same pool. +# 5. The same two cases on a three-way mirror, where the number of legs +# the configuration expects and the number this host can reach come +# apart. A claim which stopped at two writes would accept the last +# case, since two of the three legs are readable. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/mmp/mmp.cfg +. $STF_SUITE/tests/functional/mmp/mmp.kshlib + +verify_runnable "both" + +# +# A leg moved out of the search directory entirely. Renaming it in place +# would not do: the devices are matched by the labels they carry rather than by +# name, so a renamed leg is still found and opened. +# +typeset HIDDEN_LEG=$TEST_BASE_DIR/mmp_degraded_hidden_leg + +function cleanup +{ + mmp_pool_destroy $MMP_POOL $MMP_DIR + log_must rm -f $HIDDEN_LEG + log_must mmp_clear_hostid +} + +log_assert "mmp claim requires only the mirror legs the config expects" +log_onexit cleanup + +# +# Leave the pool looking imported by exporting it without updating the +# labels, then take on a different identity. The next import therefore +# runs an activity check and an uberblock claim, as it would after the +# original host failed. +# +function crash_export_as_other_host +{ + log_must zpool export -F $MMP_POOL + log_must mmp_clear_hostid + log_must mmp_set_hostid $HOSTID2 +} + +# 1. A healthy mirror is claimed and imported +log_note "Verify a healthy mirror is claimed and imported" +mmp_pool_create_simple $MMP_POOL $MMP_DIR +crash_export_as_other_host +log_must zpool import -d $MMP_DIR -f $MMP_POOL +log_must check_state $MMP_POOL "" "ONLINE" +mmp_pool_destroy $MMP_POOL $MMP_DIR + +# 2. A mirror with an offlined leg is claimed and imported degraded +log_note "Verify a mirror with an offlined leg is claimed and imported" +mmp_pool_create_simple $MMP_POOL $MMP_DIR +log_must zpool offline $MMP_POOL $MMP_DIR/vdev2 +log_must check_state $MMP_POOL $MMP_DIR/vdev2 "OFFLINE" +crash_export_as_other_host +log_must zpool import -d $MMP_DIR -f $MMP_POOL +log_must check_state $MMP_POOL "" "DEGRADED" +log_must check_state $MMP_POOL $MMP_DIR/vdev2 "OFFLINE" +mmp_pool_destroy $MMP_POOL $MMP_DIR + +# 3. A mirror with a leg which is unreadable, and not marked absent by +# the configuration, is refused +log_note "Verify a mirror with an unreachable leg is refused" +mmp_pool_create_simple $MMP_POOL $MMP_DIR +crash_export_as_other_host +log_must mv $MMP_DIR/vdev2 $HIDDEN_LEG + +typeset out +if out=$(zpool import -d $MMP_DIR -f $MMP_POOL 2>&1); then + log_fail "Imported a mirror while a required leg was unreadable" +fi +if ! echo "$out" | grep -q "could not be written to a device"; then + log_fail "Import refused for an unexpected reason: $out" +fi + +# +# The cases above use a two-way mirror, where "every present leg" and "two +# legs" are the same number. A three-way mirror separates them. +# +function mmp_pool_create_3way +{ + log_must mkdir -p $MMP_DIR + log_must rm -f $MMP_DIR/* + log_must truncate -s $MINVDEVSIZE $MMP_DIR/vdev1 $MMP_DIR/vdev2 \ + $MMP_DIR/vdev3 + log_must mmp_clear_hostid + log_must mmp_set_hostid $HOSTID1 + log_must zpool create -f -o cachefile=$MMP_CACHE $MMP_POOL \ + mirror $MMP_DIR/vdev1 $MMP_DIR/vdev2 $MMP_DIR/vdev3 + log_must zpool set multihost=on $MMP_POOL +} + +log_must rm -f $HIDDEN_LEG + +# 4. A three-way mirror with an offlined leg is claimed and imported degraded +log_note "Verify a three-way mirror with an offlined leg is claimed" +mmp_pool_create_3way +log_must zpool offline $MMP_POOL $MMP_DIR/vdev3 +log_must check_state $MMP_POOL $MMP_DIR/vdev3 "OFFLINE" +crash_export_as_other_host +log_must zpool import -d $MMP_DIR -f $MMP_POOL +log_must check_state $MMP_POOL "" "DEGRADED" +log_must check_state $MMP_POOL $MMP_DIR/vdev3 "OFFLINE" +mmp_pool_destroy $MMP_POOL $MMP_DIR + +# +# 5. A three-way mirror with one leg this host cannot open, and which the +# configuration does not mark absent, is refused. Two of the three legs +# are readable here, so a claim which required only two writes would let +# this import while another host holding the third leg could do the same. +# +log_note "Verify a three-way mirror with an unreachable leg is refused" +mmp_pool_create_3way +crash_export_as_other_host +log_must mv $MMP_DIR/vdev3 $HIDDEN_LEG + +if out=$(zpool import -d $MMP_DIR -f $MMP_POOL 2>&1); then + log_fail "Imported a three-way mirror while a required leg was" \ + "unreadable" +fi +if ! echo "$out" | grep -q "could not be written to a device"; then + log_fail "Import refused for an unexpected reason: $out" +fi + +log_pass "mmp claim requires only the mirror legs the config expects" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -28,7 +28,7 @@ # 3. Verify multihost=off and hostids differ (no activity check) # 4. Verify multihost=off and hostid zero allowed (no activity check) # 5. Verify multihost=on and hostids match (no activity check) -# 6. Verify multihost=on and hostids differ (no activity check) +# 6. Verify multihost=on and hostids differ (activity check) # 7. Verify multihost=on and hostid zero fails (no activity check) # @@ -40,68 +40,74 @@ function cleanup { - default_cleanup_noexit + mmp_pool_destroy $MMP_POOL $MMP_DIR log_must mmp_clear_hostid } log_assert "multihost=on|off activity checks exported pool" log_onexit cleanup -# 1. Create a zpool -log_must mmp_set_hostid $HOSTID1 -default_setup_noexit $DISK +# 1. Create an enriched zpool (hole, indirect, log, cache, and spare +# vdevs) so the activity checks exercise the non-writeable types. +mmp_pool_create_simple $MMP_POOL $MMP_DIR enriched # 2. Verify multihost=off and hostids match (no activity check) -log_must zpool set multihost=off $TESTPOOL +log_note "Verify multihost=off and hostids match (no activity check)" +log_must zpool set multihost=off $MMP_POOL for opt in "" "-f"; do - log_must zpool export $TESTPOOL - log_must import_no_activity_check $TESTPOOL $opt + log_must zpool export $MMP_POOL + log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR $opt" done # 3. Verify multihost=off and hostids differ (no activity check) +log_note "Verify multihost=off and hostids differ (no activity check)" for opt in "" "-f"; do - log_must mmp_pool_set_hostid $TESTPOOL $HOSTID1 - log_must zpool export $TESTPOOL + log_must mmp_pool_set_hostid $MMP_POOL $HOSTID1 + log_must zpool export $MMP_POOL log_must mmp_clear_hostid log_must mmp_set_hostid $HOSTID2 - log_must import_no_activity_check $TESTPOOL $opt + log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR $opt" done # 4. Verify multihost=off and hostid zero allowed (no activity check) +log_note "Verify multihost=off and hostid zero allowed (no activity check)" log_must mmp_clear_hostid for opt in "" "-f"; do - log_must zpool export $TESTPOOL - log_must import_no_activity_check $TESTPOOL $opt + log_must zpool export $MMP_POOL + log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR $opt" done # 5. Verify multihost=on and hostids match (no activity check) -log_must mmp_pool_set_hostid $TESTPOOL $HOSTID1 -log_must zpool set multihost=on $TESTPOOL +log_note "Verify multihost=on and hostids match (no activity check)" +log_must mmp_pool_set_hostid $MMP_POOL $HOSTID1 +log_must zpool set multihost=on $MMP_POOL for opt in "" "-f"; do - log_must zpool export $TESTPOOL - log_must import_no_activity_check $TESTPOOL $opt + log_must zpool export $MMP_POOL + log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR $opt" done -# 6. Verify multihost=on and hostids differ (no activity check) +# 6. Verify multihost=on and hostids differ (activity check) +log_note "Verify multihost=on and hostids differ (activity check)" for opt in "" "-f"; do - log_must mmp_pool_set_hostid $TESTPOOL $HOSTID1 - log_must zpool export $TESTPOOL + log_must mmp_pool_set_hostid $MMP_POOL $HOSTID1 + log_must zpool export $MMP_POOL log_must mmp_clear_hostid log_must mmp_set_hostid $HOSTID2 - log_must import_no_activity_check $TESTPOOL $opt + log_must import_activity_check $MMP_POOL "-d $MMP_DIR $opt" done # 7. Verify multihost=on and hostid zero fails (no activity check) -log_must zpool export $TESTPOOL +log_note "Verify multihost=on and hostid zero fails (no activity check)" +log_must zpool export $MMP_POOL log_must mmp_clear_hostid for opt in "" "-f"; do MMP_IMPORTED_MSG="Set a unique system hostid" - log_must check_pool_import $TESTPOOL "" "action" "$MMP_IMPORTED_MSG" - log_mustnot import_no_activity_check $TESTPOOL $opt + log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "action" "$MMP_IMPORTED_MSG" + log_mustnot import_no_activity_check $MMP_POOL "-d $MMP_DIR $opt" done log_pass "multihost=on|off exported pool activity checks passed" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -40,7 +40,7 @@ function cleanup { - default_cleanup_noexit + datasetexists $MMP_POOL && destroy_pool $MMP_POOL log_must rm $MMP_DIR/file.{0,1,2,3,4,5} log_must rmdir $MMP_DIR log_must mmp_clear_hostid @@ -56,7 +56,7 @@ log_must truncate -s $MINVDEVSIZE $MMP_DIR/file.{0,1,2,3,4,5} # 1. Create a non-redundant pool -log_must zpool create $MMP_POOL $MMP_DIR/file.0 +log_must zpool create -f $MMP_POOL $MMP_DIR/file.0 # 2. Create an 'etc' dataset containing a valid hostid file; caching is # disabled on the dataset to force the hostid to be read from disk. @@ -71,16 +71,19 @@ log_must mkfile 1M $mntpnt_fs/file # 4. Verify multihost cannot be enabled until the /etc/hostid is linked +log_note "Verify multihost cannot be enabled until the /etc/hostid is linked" log_mustnot zpool set multihost=on $MMP_POOL log_mustnot ls -l $HOSTID_FILE log_must ln -s $mntpnt_etc/hostid $HOSTID_FILE log_must zpool set multihost=on $MMP_POOL # 5. Verify vdevs may be attached and detached +log_note "Verify vdevs may be attached and detached" log_must zpool attach $MMP_POOL $MMP_DIR/file.0 $MMP_DIR/file.1 log_must zpool detach $MMP_POOL $MMP_DIR/file.1 # 6. Verify normal, cache, log and special vdevs can be added +log_note "Verify normal, cache, log and special vdevs can be added" log_must zpool add $MMP_POOL $MMP_DIR/file.1 log_must zpool add $MMP_POOL $MMP_DIR/file.2 log_must zpool add $MMP_POOL cache $MMP_DIR/file.3 @@ -88,6 +91,7 @@ log_must zpool add $MMP_POOL special $MMP_DIR/file.5 # 7. Verify normal, cache, and log vdevs can be removed +log_note "Verify normal, cache, and log vdevs can be removed" log_must zpool remove $MMP_POOL $MMP_DIR/file.2 log_must zpool remove $MMP_POOL $MMP_DIR/file.3 log_must zpool remove $MMP_POOL $MMP_DIR/file.4 diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -27,7 +27,7 @@ # 2. Verify multihost=off and hostids match (no activity check) # 3. Verify multihost=off and hostids differ (no activity check) # 4. Verify multihost=off and hostid allowed (no activity check) -# 5. Verify multihost=on and hostids match (no activity check) +# 5. Verify multihost=on and hostids match (activity check) # 6. Verify multihost=on and hostids differ (activity check) # 7. Verify mmp_write and mmp_fail are set correctly # 8. Verify multihost=on and hostid zero fails (no activity check) @@ -42,7 +42,7 @@ function cleanup { - default_cleanup_noexit + mmp_pool_destroy $MMP_POOL $MMP_DIR log_must mmp_clear_hostid log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_DEFAULT } @@ -50,63 +50,71 @@ log_assert "multihost=on|off inactive pool activity checks" log_onexit cleanup -# 1. Create a zpool -log_must mmp_set_hostid $HOSTID1 -default_setup_noexit $DISK +# 1. Create an enriched zpool (hole, indirect, log, cache, and spare +# vdevs) so the activity checks exercise the non-writeable types. +mmp_pool_create_simple $MMP_POOL $MMP_DIR enriched # 2. Verify multihost=off and hostids match (no activity check) -log_must zpool set multihost=off $TESTPOOL +log_note "Verify multihost=off and hostids match (no activity check)" +log_must zpool set multihost=off $MMP_POOL for opt in "" "-f"; do - log_must zpool export -F $TESTPOOL - log_must import_no_activity_check $TESTPOOL $opt + log_must zpool export -F $MMP_POOL + log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR $opt" done # 3. Verify multihost=off and hostids differ (no activity check) -log_must zpool export -F $TESTPOOL +log_note "Verify multihost=off and hostids differ (no activity check)" +log_must zpool export -F $MMP_POOL log_must mmp_clear_hostid log_must mmp_set_hostid $HOSTID2 -log_mustnot import_no_activity_check $TESTPOOL "" -log_must import_no_activity_check $TESTPOOL "-f" +log_mustnot import_no_activity_check $MMP_POOL "-d $MMP_DIR" +log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR -f" # 4. Verify multihost=off and hostid zero allowed (no activity check) -log_must zpool export -F $TESTPOOL +log_note "Verify multihost=off and hostid zero allowed (no activity check)" +log_must zpool export -F $MMP_POOL log_must mmp_clear_hostid -log_mustnot import_no_activity_check $TESTPOOL "" -log_must import_no_activity_check $TESTPOOL "-f" +log_mustnot import_no_activity_check $MMP_POOL "-d $MMP_DIR" +log_must import_no_activity_check $MMP_POOL "-d $MMP_DIR -f" -# 5. Verify multihost=on and hostids match (no activity check) -log_must mmp_pool_set_hostid $TESTPOOL $HOSTID1 -log_must zpool set multihost=on $TESTPOOL +# 5. Verify multihost=on and hostids match (activity check) +log_note "Verify multihost=on and hostids match (activity check)" +log_must mmp_pool_set_hostid $MMP_POOL $HOSTID1 +log_must zpool set multihost=on $MMP_POOL for opt in "" "-f"; do - log_must zpool export -F $TESTPOOL - log_must import_no_activity_check $TESTPOOL $opt + log_must zpool export -F $MMP_POOL + log_must import_activity_check $MMP_POOL "-d $MMP_DIR $opt" done # 6. Verify multihost=on and hostids differ (activity check) -log_must zpool export -F $TESTPOOL +log_note "Verify multihost=on and hostids differ (activity check)" +log_must zpool export -F $MMP_POOL log_must mmp_clear_hostid log_must mmp_set_hostid $HOSTID2 -log_mustnot import_activity_check $TESTPOOL "" -log_must import_activity_check $TESTPOOL "-f" +log_mustnot import_activity_check $MMP_POOL "-d $MMP_DIR" +log_must import_activity_check $MMP_POOL "-d $MMP_DIR -f" # 7. Verify mmp_write and mmp_fail are set correctly -log_must zpool export -F $TESTPOOL -log_must verify_mmp_write_fail_present ${DISK[0]} +log_note "Verify mmp_write and mmp_fail are set correctly" +log_must zpool export -F $MMP_POOL +log_must verify_mmp_write_fail_present $MMP_DIR/vdev1 # 8. Verify multihost=on and hostid zero fails (no activity check) +log_note "Verify multihost=on and hostid zero fails (no activity check)" log_must mmp_clear_hostid MMP_IMPORTED_MSG="Set a unique system hostid" -log_must check_pool_import $TESTPOOL "-f" "action" "$MMP_IMPORTED_MSG" -log_mustnot import_no_activity_check $TESTPOOL "-f" +log_must check_pool_import $MMP_POOL "-d $MMP_DIR -f" "action" "$MMP_IMPORTED_MSG" +log_mustnot import_no_activity_check $MMP_POOL "-d $MMP_DIR -f" # 9. Verify activity check duration based on mmp_write and mmp_fail # Specify a short test via tunables but import pool imported while # tunables set to default duration. +log_note "Verify activity check duration based on mmp_write and mmp_fail" log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_MIN log_must mmp_clear_hostid log_must mmp_set_hostid $HOSTID1 -log_must import_activity_check $TESTPOOL "-f" $MMP_TEST_DURATION_DEFAULT +log_must import_activity_check $MMP_POOL "-d $MMP_DIR -f" log_pass "multihost=on|off inactive pool activity checks passed" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_off.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_off.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_off.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_off.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -44,7 +44,7 @@ function cleanup { - default_cleanup_noexit + datasetexists $TESTPOOL && destroy_pool $TESTPOOL log_must set_tunable64 TXG_TIMEOUT $TXG_TIMEOUT_DEFAULT log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_DEFAULT log_must rm -f $PREV_UBER $CURR_UBER @@ -58,7 +58,7 @@ log_must set_tunable64 TXG_TIMEOUT $TXG_TIMEOUT_LONG log_must mmp_set_hostid $HOSTID1 -default_setup_noexit $DISK +log_must zpool create -f $TESTPOOL $DISK log_must zpool set multihost=off $TESTPOOL log_must eval "zdb -u $TESTPOOL > $PREV_UBER" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_thread.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_thread.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_thread.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_thread.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -39,7 +39,7 @@ function cleanup { - default_cleanup_noexit + datasetexists $TESTPOOL && destroy_pool $TESTPOOL log_must set_tunable64 TXG_TIMEOUT $TXG_TIMEOUT_DEFAULT log_must rm -f $PREV_UBER $CURR_UBER log_must mmp_clear_hostid @@ -51,7 +51,7 @@ log_must set_tunable64 TXG_TIMEOUT $TXG_TIMEOUT_LONG log_must mmp_set_hostid $HOSTID1 -default_setup_noexit $DISK +log_must zpool create -f $TESTPOOL $DISK log_must zpool set multihost=on $TESTPOOL log_must eval "zdb -u $TESTPOOL > $PREV_UBER" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_uberblocks.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -39,15 +39,16 @@ verify_runnable "both" UBER_CHANGES=0 -EXPECTED=$(($(echo $DISKS | wc -w) * 10)) +DURATION=10 +EXPECTED=$((($(echo $DISKS | wc -w) * $DURATION * 1000) / $MMP_INTERVAL_DEFAULT)) FUDGE=$((EXPECTED * 20 / 100)) MIN_UB_WRITES=$((EXPECTED - FUDGE)) MAX_UB_WRITES=$((EXPECTED + FUDGE)) -MIN_SEQ_VALUES=7 +MIN_SEQ_VALUES=8 function cleanup { - default_cleanup_noexit + datasetexists $TESTPOOL && destroy_pool $TESTPOOL log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_DEFAULT set_tunable64 TXG_TIMEOUT $TXG_TIMEOUT_DEFAULT log_must mmp_clear_hostid @@ -56,13 +57,14 @@ log_assert "Ensure MMP uberblocks update at the correct interval" log_onexit cleanup +log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_DEFAULT log_must set_tunable64 TXG_TIMEOUT $TXG_TIMEOUT_LONG log_must mmp_set_hostid $HOSTID1 -default_setup_noexit "$DISKS" +log_must zpool create -f $TESTPOOL $DISKS log_must zpool set multihost=on $TESTPOOL clear_mmp_history -UBER_CHANGES=$(count_mmp_writes $TESTPOOL 10) +UBER_CHANGES=$(count_mmp_writes $TESTPOOL $DURATION) log_note "Uberblock changed $UBER_CHANGES times" @@ -76,7 +78,7 @@ log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_MIN SEQ_BEFORE=$(zdb -luuuu ${DISK[0]} | awk '/mmp_seq/ {if ($NF>max) max=$NF}; END {print max}') -sleep 1 +sleep 5 SEQ_AFTER=$(zdb -luuuu ${DISK[0]} | awk '/mmp_seq/ {if ($NF>max) max=$NF}; END {print max}') if [ $((SEQ_AFTER - SEQ_BEFORE)) -lt $MIN_SEQ_VALUES ]; then zdb -luuuu ${DISK[0]} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_on_zdb.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -51,7 +51,8 @@ verify_runnable "global" verify_disk_count "$DISKS" 2 -default_mirror_setup_noexit $DISKS +log_must zpool create -f $TESTPOOL mirror $DISKS +log_must zfs create $TESTPOOL/$TESTFS log_must mmp_set_hostid $HOSTID1 log_must zpool set multihost=on $TESTPOOL log_must zfs snap $TESTPOOL/$TESTFS@snap diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_reset_interval.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -43,7 +43,7 @@ function cleanup { - default_cleanup_noexit + datasetexists $TESTPOOL && destroy_pool $TESTPOOL log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_DEFAULT log_must set_tunable64 MULTIHOST_FAIL_INTERVALS \ $MMP_FAIL_INTERVALS_DEFAULT @@ -56,7 +56,7 @@ log_must set_tunable64 MULTIHOST_INTERVAL $MMP_INTERVAL_HOUR log_must mmp_set_hostid $HOSTID1 -default_setup_noexit $DISK +log_must zpool create -f $TESTPOOL $DISK log_must zpool set multihost=on $TESTPOOL clear_mmp_history @@ -68,6 +68,7 @@ fi # 7. Verify mmp_write and mmp_fail are written +log_note "Verify mmp_write and mmp_fail are written" for fails in $(seq $MMP_FAIL_INTERVALS_MIN $((MMP_FAIL_INTERVALS_MIN*2))); do for interval in $(seq $MMP_INTERVAL_MIN 200 $MMP_INTERVAL_DEFAULT); do log_must set_tunable64 MULTIHOST_FAIL_INTERVALS $fails @@ -88,7 +89,8 @@ # 8. Repeatedly change MULTIHOST_INTERVAL and fail_intervals -for x in $(seq 10); do +log_note "Repeatedly change MULTIHOST_INTERVAL and fail_intervals" +for x in $(seq 3); do typeset new_interval=$(( (RANDOM % 20 + 1) * $MMP_INTERVAL_MIN )) log_must set_tunable64 MULTIHOST_INTERVAL $new_interval typeset action=$((RANDOM %10)) diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_write_distribution.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_write_distribution.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_write_distribution.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_write_distribution.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -37,7 +37,7 @@ function cleanup { - log_must zpool destroy $MMP_POOL + datasetexists $MMP_POOL && destroy_pool $MMP_POOL log_must rm $MMP_DIR/file.{0..7} log_must rm $MMP_HISTORY_TMP log_must rmdir $MMP_DIR diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -38,7 +38,7 @@ function cleanup { zinject -c all - default_cleanup_noexit + datasetexists $TESTPOOL && destroy_pool $TESTPOOL log_must mmp_clear_hostid } @@ -46,7 +46,7 @@ log_onexit cleanup log_must mmp_set_hostid $HOSTID1 -default_mirror_setup_noexit $DISKS +log_must zpool create -f $TESTPOOL mirror $DISKS log_must zpool set multihost=on $TESTPOOL log_must zinject -d ${DISK[0]} -e io -T write -f 50 $TESTPOOL -L uber clear_mmp_history diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/mmp_zhack_reclaim.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -0,0 +1,305 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/mmp/mmp.cfg +. $STF_SUITE/tests/functional/mmp/mmp.kshlib + +# +# DESCRIPTION: +# Verify `zhack mmp reclaim` recovers a pool whose configuration expects +# mirror legs that went away with a failed host, and that it relaxes the +# uberblock claim no further than that. +# +# STRATEGY: +# 1. A pool stranded by legs the configuration still expects is +# recovered, and the claim then accepts it on an ordinary import. +# The import is made as a THIRD hostid on purpose: zhack exports +# cleanly under its own hostid, so importing again as the same host +# would skip the activity check and never exercise the claim at all. +# 2. The claim is relaxed only for legs this host cannot open. A pool +# held by a live host which shares a leg with us is still refused. +# 3. Legs of every top level vdev are still counted after a recovery. +# 4. A pool which does not use multihost is left alone, since no claim +# runs for it and an ordinary import already succeeds. +# 5. Legs of a log vdev are not touched, since the claim never counts +# them. +# 6. Members of a raidz vdev are not touched. The claim requires +# parity+1 writes in aggregate rather than one per member, so an +# absent member does not raise the requirement and there is nothing +# for this tool to recover. +# + +verify_runnable "both" + +# $HOSTID3 comes from mmp.cfg. A third identity is needed so a post-recovery +# import cannot take the exported-and-same-hostid shortcut past the activity +# check, which would leave the claim unexercised. +typeset HIDDEN_LEG=$TEST_BASE_DIR/mmp_zhack_hidden_leg +typeset PEER_DIR=$TEST_BASE_DIR/mmp_zhack_peer +typeset DBGMSG=/proc/spl/kstat/zfs/dbgmsg +typeset MMP_IMPORT_ERR=$TEST_BASE_DIR/mmp_zhack_import_err + +function cleanup +{ + mmp_pool_destroy $MMP_POOL $MMP_DIR + rm -rf $HIDDEN_LEG $PEER_DIR $MMP_IMPORT_ERR + log_must mmp_clear_hostid +} + +log_assert "zhack mmp reclaim recovers a stranded pool and relaxes no further" +log_onexit cleanup + +# +# Leave the pool looking imported, then take on a different identity, so the +# next import runs an activity check and an uberblock claim as it would after +# the original host failed. +# +function crash_export_as_other_host +{ + log_must zpool export -F $MMP_POOL + log_must mmp_clear_hostid + log_must mmp_set_hostid $HOSTID2 +} + +# +# Become a third host. Kept out of claim_reimport because log_must writes +# its SUCCESS lines to stdout, which would be captured along with the +# numbers by the command substitution below. +# +function become_third_host +{ + log_must mmp_clear_hostid + log_must mmp_set_hostid $HOSTID3 +} + +# +# Import and echo the claim's own accounting, "req good". Empty if the +# import failed. Nothing here may write to stdout except the numbers. +# +function claim_reimport +{ + typeset re='.*req_writes=([0-9]+) issued_writes=[0-9]+' + re="$re good_writes=([0-9]+).*" + + echo 0 >$DBGMSG + + zpool import -d $MMP_DIR $MMP_POOL >/dev/null 2>&1 || return + + grep -h 'mmp: claiming uberblock' $DBGMSG 2>/dev/null | + sed -nE "s/$re/\1 \2/p" | + tail -1 +} + +# 1. A stranded pool is recovered, and the claim accepts it afterwards +log_note "Verify a stranded pool is recovered and the claim then accepts it" +mmp_pool_create_simple $MMP_POOL $MMP_DIR +crash_export_as_other_host +log_must mv $MMP_DIR/vdev2 $HIDDEN_LEG + +# +# The import has to say which of the two refusals this is. It used to report +# the same "pool is imported on host" text used for a pool another host holds, +# which is wrong here: nothing holds this pool, the claim simply could not +# reach every leg the config expects. Both directions matter, so the wrong +# message is asserted against as well as the right one. +# +log_mustnot eval "zpool import -d $MMP_DIR -f $MMP_POOL >$MMP_IMPORT_ERR 2>&1" +log_must grep -q "could not be written to a device" $MMP_IMPORT_ERR +log_mustnot grep -q "pool is imported on host" $MMP_IMPORT_ERR +log_must rm -f $MMP_IMPORT_ERR + +log_must zhack -d $MMP_DIR mmp reclaim $MMP_POOL + +# +# zhack exports the pool when it is done, so there is nothing to inspect +# until the pool is imported again. That import is the point of the test. +# +become_third_host +typeset nums=$(claim_reimport) +if [[ "$nums" != "1 1" ]]; then + log_fail "claim after recovery counted '$nums', expected '1 1'" +fi +log_note "claim after recovery required 1 write and got 1" +log_must check_state $MMP_POOL "" "DEGRADED" + +# +# The leg has to be left OFFLINE specifically. A faulted leg would also read +# as DEGRADED and would also satisfy the claim, but only an offline one has +# "zpool online" as its documented inverse. +# +if ! zpool status $MMP_POOL | grep -q OFFLINE; then + log_fail "the absent leg was not left offline after recovery" +fi +mmp_pool_destroy $MMP_POOL $MMP_DIR +log_must rm -f $HIDDEN_LEG + +# 2. A pool held by a live host which shares a leg with us is still refused +log_note "Verify a live host sharing a leg is still refused" +mmp_pool_create_simple $MMP_POOL $MMP_DIR +log_must zpool export $MMP_POOL + +# +# The peer keeps both legs. We keep a link to one of them, so we cannot open +# the other and the relaxed claim has something to forgive, while the peer's +# multihost writes still reach a leg we can read. +# +log_must mkdir -p $PEER_DIR +log_must mv $MMP_DIR/vdev1 $PEER_DIR/vdev1 +log_must mv $MMP_DIR/vdev2 $PEER_DIR/vdev2 +log_must ln $PEER_DIR/vdev1 $MMP_DIR/vdev1 + +log_must mmp_clear_hostid +log_must mmp_set_hostid $HOSTID2 +log_must eval "ZFS_HOSTID=$HOSTID1 zhack -d $PEER_DIR action idle -t120 \ + $MMP_POOL >$MMP_ZHACK_LOG 2>&1 &" + +# +# Wait for the peer to hold the pool the same way mmp_pool_create_zhack does. +# Grepping its log for the activity check line would work only by accident: +# ZFS_HOSTID is parsed with strtoull(env, NULL, 0), so a leading zero makes it +# octal, and the peer's hostid happens not to match the label. Write the +# hostid unambiguously and the check is skipped and the line never appears. +# +typeset -i tries=0 +while ! is_pool_imported $MMP_POOL "-d $PEER_DIR"; do + if (( tries++ > 30 )); then + log_fail "peer never imported the pool" + fi + log_must pgrep -x zhack + log_must sleep 4 +done + +log_mustnot zhack -d $MMP_DIR mmp reclaim $MMP_POOL +log_must pgrep -x zhack +log_must rm -f $MMP_ZHACK_LOG +mmp_pool_destroy $MMP_POOL $MMP_DIR +log_must rm -rf $PEER_DIR + +# 3. Every top level vdev is still counted after a recovery +log_note "Verify both top level vdevs are counted after a recovery" +log_must mkdir -p $MMP_DIR +log_must rm -f $MMP_DIR/* +log_must truncate -s $MINVDEVSIZE $MMP_DIR/vdev1 $MMP_DIR/vdev2 \ + $MMP_DIR/vdev3 $MMP_DIR/vdev4 +log_must mmp_clear_hostid +log_must mmp_set_hostid $HOSTID1 +log_must zpool create -f -o cachefile=$MMP_CACHE $MMP_POOL \ + mirror $MMP_DIR/vdev1 $MMP_DIR/vdev2 mirror $MMP_DIR/vdev3 $MMP_DIR/vdev4 +log_must zpool set multihost=on $MMP_POOL +crash_export_as_other_host +log_must mv $MMP_DIR/vdev4 $HIDDEN_LEG + +log_mustnot zpool import -d $MMP_DIR -f $MMP_POOL +log_must zhack -d $MMP_DIR mmp reclaim $MMP_POOL + +become_third_host +nums=$(claim_reimport) +if [[ "$nums" != "3 3" ]]; then + log_fail "claim across two top levels counted '$nums', expected '3 3'" +fi +log_note "claim across two top levels required 3 writes and got 3" +mmp_pool_destroy $MMP_POOL $MMP_DIR +log_must rm -f $HIDDEN_LEG + +# 4. A pool which does not use multihost is left alone +log_note "Verify a pool without multihost is left alone" +log_must mkdir -p $MMP_DIR +log_must rm -f $MMP_DIR/* +log_must truncate -s $MINVDEVSIZE $MMP_DIR/vdev1 $MMP_DIR/vdev2 +log_must mmp_clear_hostid +log_must mmp_set_hostid $HOSTID1 +log_must zpool create -f -o cachefile=$MMP_CACHE $MMP_POOL \ + mirror $MMP_DIR/vdev1 $MMP_DIR/vdev2 +log_must zpool export -F $MMP_POOL +log_must mmp_clear_hostid +log_must mmp_set_hostid $HOSTID2 +log_must mv $MMP_DIR/vdev2 $HIDDEN_LEG + +log_mustnot zhack -d $MMP_DIR mmp reclaim $MMP_POOL +log_must zpool import -d $MMP_DIR -f $MMP_POOL +log_must check_state $MMP_POOL "" "DEGRADED" +if zpool status $MMP_POOL | grep -q OFFLINE; then + log_fail "a leg was offlined on a pool which does not use multihost" +fi +mmp_pool_destroy $MMP_POOL $MMP_DIR +log_must rm -f $HIDDEN_LEG + +# 5. Legs of a log vdev are not touched +log_note "Verify a log vdev leg is left alone" +log_must mkdir -p $MMP_DIR +log_must rm -f $MMP_DIR/* +log_must truncate -s $MINVDEVSIZE $MMP_DIR/vdev1 $MMP_DIR/vdev2 \ + $MMP_DIR/vdev3 $MMP_DIR/vdev4 +log_must mmp_clear_hostid +log_must mmp_set_hostid $HOSTID1 +log_must zpool create -f -o cachefile=$MMP_CACHE $MMP_POOL \ + mirror $MMP_DIR/vdev1 $MMP_DIR/vdev2 \ + log mirror $MMP_DIR/vdev3 $MMP_DIR/vdev4 +log_must zpool set multihost=on $MMP_POOL +crash_export_as_other_host +log_must mv $MMP_DIR/vdev4 $HIDDEN_LEG + +log_must zhack -d $MMP_DIR mmp reclaim $MMP_POOL + +become_third_host +nums=$(claim_reimport) +if [[ "$nums" != "2 2" ]]; then + log_fail "pool with an absent log leg counted '$nums', expected '2 2'" +fi +log_note "pool with an absent log leg still imports, claim required 2 got 2" +if zpool status $MMP_POOL | grep -q OFFLINE; then + log_fail "a log vdev leg was offlined" +fi +mmp_pool_destroy $MMP_POOL $MMP_DIR +log_must rm -f $HIDDEN_LEG + +# 6. Members of a raidz vdev are not touched +log_note "Verify a raidz member is left alone" +log_must mkdir -p $MMP_DIR +log_must rm -f $MMP_DIR/* +log_must truncate -s $MINVDEVSIZE $MMP_DIR/vdev1 $MMP_DIR/vdev2 \ + $MMP_DIR/vdev3 $MMP_DIR/vdev4 +log_must mmp_clear_hostid +log_must mmp_set_hostid $HOSTID1 +log_must zpool create -f -o cachefile=$MMP_CACHE $MMP_POOL \ + raidz2 $MMP_DIR/vdev1 $MMP_DIR/vdev2 $MMP_DIR/vdev3 $MMP_DIR/vdev4 +log_must zpool set multihost=on $MMP_POOL +crash_export_as_other_host +log_must mv $MMP_DIR/vdev4 $HIDDEN_LEG + +# +# A raidz vdev is required as parity+1 in aggregate rather than one write per +# member, so an absent member does not raise the requirement. The claim holds +# while parity+1 members remain writeable, and offlining one would be a +# persistent change that buys nothing. +# +log_must eval "zhack -d $MMP_DIR mmp reclaim $MMP_POOL >$MMP_ZHACK_LOG 2>&1" +log_must grep -q "no absent leaves" $MMP_ZHACK_LOG +log_must rm -f $MMP_ZHACK_LOG + +become_third_host +nums=$(claim_reimport) +if [[ "$nums" != "3 3" ]]; then + log_fail "raidz2 with an absent member counted '$nums', expected '3 3'" +fi +log_note "raidz2 with an absent member imports, claim required 3 got 3" +if zpool status $MMP_POOL | grep -q OFFLINE; then + log_fail "a raidz member was offlined" +fi + +log_pass "zhack mmp reclaim recovers a stranded pool and relaxes no further" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/multihost_history.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/multihost_history.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mmp/multihost_history.ksh 2025-05-01 18:23:24.020218764 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mmp/multihost_history.ksh 2026-08-21 20:57:12.585053569 +0000 @@ -50,6 +50,8 @@ log_assert "zfs_multihost_history records writes and skipped writes" log_onexit cleanup +MMP_INTERVAL_DEFAULT=1000 + mmp_pool_create_simple $MMP_POOL $MMP_DIR log_must zinject -d $MMP_DIR/vdev1 -D$((2*MMP_INTERVAL_DEFAULT)):10 $MMP_POOL log_must zinject -d $MMP_DIR/vdev2 -D$((2*MMP_INTERVAL_DEFAULT)):10 $MMP_POOL diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mount/mount_loopback.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mount/mount_loopback.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/mount/mount_loopback.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/mount/mount_loopback.ksh 2026-08-21 20:57:12.585666811 +0000 @@ -0,0 +1,112 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# Copyright (c) 2025 by Lawrence Livermore National Security, LLC. + +. $STF_SUITE/include/libtest.shlib + +# +# DESCRIPTION: +# Verify that we can make an xfs filesystem on a ZFS-backed loopback device. +# +# See: +# https://github.com/openzfs/zfs/pull/17298 +# https://github.com/openzfs/zfs/issues/17277 +# +# STRATEGY: +# 1. Make a pool +# 2. Make a file on the pool or create zvol +# 3. Mount the file/zvol behind a loopback device +# 4. Create & mount an xfs filesystem on the loopback device + +function cleanup +{ + if [ -d $TEST_BASE_DIR/mnt ] ; then + umount $TEST_BASE_DIR/mnt + log_must rmdir $TEST_BASE_DIR/mnt + fi + if [ -n "$DEV" ] ; then + log_must losetup -d $DEV + fi + destroy_pool $TESTPOOL2 + log_must rm -f $TEST_BASE_DIR/file1 +} + +if [ ! -x "$(which mkfs.xfs)" ] ; then + log_unsupported "No mkfs.xfs binary" +fi + +if [ ! -d /lib/modules/$(uname -r)/kernel/fs/xfs ] && \ + ! grep -qE '\sxfs$' /proc/filesystems ; then + log_unsupported "No XFS kernel support" +fi + +log_assert "Make an xfs filesystem on a ZFS-backed loopback device" +log_onexit cleanup + +# fio options +export NUMJOBS=2 +export RUNTIME=3 +export PERF_RANDSEED=1234 +export PERF_COMPPERCENT=66 +export PERF_COMPCHUNK=0 +export BLOCKSIZE=128K +export SYNC_TYPE=0 +export FILE_SIZE=$(( 1024 * 1024 )) + +function do_test +{ + imgfile=$1 + log_note "Running test on $imgfile" + log_must losetup -f $imgfile + # Alpine Linux loop devices appear as `/dev/loop/N` instead of `/dev/loopN`. + DEV=$(losetup --associated $imgfile | grep -Eo '^/dev/loop/?[0-9]+') + log_must mkfs.xfs $DEV + mkdir $TEST_BASE_DIR/mnt + log_must mount $DEV $TEST_BASE_DIR/mnt + export DIRECTORY=$TEST_BASE_DIR/mnt + + for d in 0 1 ; do + # fio options + export DIRECT=$d + log_must fio $FIO_SCRIPTS/mkfiles.fio + log_must fio $FIO_SCRIPTS/random_reads.fio + done + log_must umount $TEST_BASE_DIR/mnt + log_must rmdir $TEST_BASE_DIR/mnt + log_must losetup -d $DEV + DEV="" +} + +log_must truncate -s 1G $TEST_BASE_DIR/file1 +log_must zpool create $TESTPOOL2 $TEST_BASE_DIR/file1 +log_must truncate -s 512M /$TESTPOOL2/img +do_test /$TESTPOOL2/img +log_must rm /$TESTPOOL2/img +log_must zfs create -V 512M $TESTPOOL2/vol + +blkdev="$ZVOL_DEVDIR/$TESTPOOL2/vol" +block_device_wait $blkdev +do_test $blkdev + +log_pass "Verified xfs filesystem on a ZFS-backed loopback device" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh 2025-05-01 18:23:24.022218792 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/online_offline/online_offline_001_pos.ksh 2026-08-21 20:57:12.586598943 +0000 @@ -50,16 +50,18 @@ function cleanup { + kill $killpid >/dev/null 2>&1 + # # Ensure we don't leave disks in the offline state # for disk in $DISKLIST; do log_must zpool online $TESTPOOL $disk log_must check_state $TESTPOOL $disk "online" - done + sleep 1 # Delay for resilver to start + log_must zpool wait -t resilver $TESTPOOL - kill $killpid >/dev/null 2>&1 [[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* } @@ -76,9 +78,8 @@ log_must zpool online $TESTPOOL $disk log_must check_state $TESTPOOL $disk "online" - - # Delay for resilver to complete - sleep 3 + sleep 1 # Delay for resilver to start + log_must zpool wait -t resilver $TESTPOOL done log_must kill $killpid diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh 2025-05-01 18:23:24.022218792 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/online_offline/online_offline_002_neg.ksh 2026-08-21 20:57:12.586598943 +0000 @@ -51,6 +51,8 @@ function cleanup { + kill $killpid >/dev/null 2>&1 + # # Ensure we don't leave disks in the offline state # @@ -58,8 +60,9 @@ log_must zpool online $TESTPOOL $disk log_must check_state $TESTPOOL $disk "online" done + sleep 1 # Delay for resilver to start + log_must zpool wait -t resilver $TESTPOOL - kill $killpid >/dev/null 2>&1 [[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* } @@ -87,6 +90,7 @@ log_must zpool online $TESTPOOL ${disks[$i]} check_state $TESTPOOL ${disks[$i]} "online" || \ log_fail "Failed to set ${disks[$i]} online" + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL log_must zpool clear $TESTPOOL while [[ $j -lt ${#disks[*]} ]]; do @@ -119,6 +123,7 @@ log_must zpool online $TESTPOOL ${disks[$i]} check_state $TESTPOOL ${disks[$i]} "online" || \ log_fail "Failed to set ${disks[$i]} online" + sleep 1 # Delay for resilver to start log_must zpool wait -t resilver $TESTPOOL log_must zpool clear $TESTPOOL fi diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh 2025-05-01 18:23:24.022218792 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh 2026-08-21 20:57:12.586598943 +0000 @@ -49,7 +49,6 @@ destroy_pool $TESTPOOL1 fi - kill $killpid >/dev/null 2>&1 [[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/* } @@ -59,7 +58,7 @@ specials_list="" for i in 0 1 2; do - mkfile $MINVDEVSIZE $TESTDIR/$TESTFILE1.$i + log_must mkfile $MINVDEVSIZE $TESTDIR/$TESTFILE1.$i specials_list="$specials_list $TESTDIR/$TESTFILE1.$i" done disk=($specials_list) @@ -68,15 +67,9 @@ log_must zfs create $TESTPOOL1/$TESTFS1 log_must zfs set mountpoint=$TESTDIR1 $TESTPOOL1/$TESTFS1 -file_trunc -f $((64 * 1024 * 1024)) -b 8192 -c 0 -r $TESTDIR/$TESTFILE1 & -typeset killpid="$! " - for i in 0 1 2; do log_mustnot zpool offline $TESTPOOL1 ${disk[$i]} check_state $TESTPOOL1 ${disk[$i]} "online" done -log_must kill $killpid -sync_all_pools - log_pass diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh 2025-05-01 18:23:24.023218806 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_capacity.ksh 2026-08-21 20:57:12.587037544 +0000 @@ -60,14 +60,15 @@ log_must zfs create $DISKFS log_must mkfile $FILEDISKSIZE $FILEDISK1 -log_must zpool create $NESTEDPOOL $FILEDISK1 +log_must zpool create -O primarycache=metadata $NESTEDPOOL $FILEDISK1 -log_must zfs create -o compression=lz4 -o recordsize=8k $NESTEDFS0 +log_must zfs create $NESTEDFS0 log_must dd if=/dev/urandom of=$NESTEDFS0FILE bs=1M count=700 FILE0INTRO=$(head -c 100 $NESTEDFS0FILE) log_must zpool checkpoint $NESTEDPOOL log_must rm $NESTEDFS0FILE +log_must sync_pool $NESTEDPOOL # # only for debugging purposes diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh 2025-05-01 18:23:24.023218806 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/pool_checkpoint/checkpoint_zdb.ksh 2026-08-21 20:57:12.587037544 +0000 @@ -63,6 +63,7 @@ log_mustnot eval "zdb -k $TESTPOOL | grep -q \"Checkpointed uberblock found\"" log_mustnot eval "zdb $TESTPOOL | grep \"Dataset $FS1\"" log_must eval "zdb -k $TESTPOOL | grep \"Dataset $CHECKPOINTED_FS1\"" +log_must eval "zdb -k $TESTPOOL/ | grep \"$TESTPOOL$BOGUS_SUFFIX\"" log_must zpool export $TESTPOOL @@ -70,6 +71,7 @@ log_mustnot eval "zdb -k -e $TESTPOOL | grep \"Checkpointed uberblock found\"" log_mustnot eval "zdb -e $TESTPOOL | grep \"Dataset $FS1\"" log_must eval "zdb -k -e $TESTPOOL | grep \"Dataset $CHECKPOINTED_FS1\"" +log_must eval "zdb -k -e $TESTPOOL/ | grep \"$TESTPOOL$BOGUS_SUFFIX\"" log_must zpool import $TESTPOOL diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib 2025-05-01 18:23:24.023218806 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib 2026-08-21 20:57:12.587037544 +0000 @@ -139,7 +139,8 @@ log_must truncate -s $DISKSIZE $FILEDISK1 log_must truncate -s $DISKSIZE $FILEDISK2 - log_must zpool create -O sync=disabled $NESTEDPOOL $FILEDISKS + log_must zpool create -O primarycache=metadata -O sync=disabled \ + $NESTEDPOOL $FILEDISKS } function setup_test_pool diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh 2025-05-01 18:23:24.026218848 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/raidz/raidz_001_neg.ksh 2026-08-21 20:57:12.588968257 +0000 @@ -34,6 +34,6 @@ # This option should make raidz_test to return non 0. # -log_mustnot raidz_test -T +log_mustnot raidz_test -Tv log_pass "raidz_test detects errors as expected." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redacted_send/redacted_max_blkid.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redacted_send/redacted_max_blkid.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redacted_send/redacted_max_blkid.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redacted_send/redacted_max_blkid.ksh 2026-08-21 20:57:12.589350702 +0000 @@ -0,0 +1,118 @@ +#!/bin/ksh +# SPDX-License-Identifier: CDDL-1.0 + +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2026 by Delphix. All rights reserved. +# + +. $STF_SUITE/tests/functional/redacted_send/redacted.kshlib + +# +# Description: +# Verify that an incremental send from a redaction bookmark correctly sends +# the last block (dn_maxblkid) of a file through the PREVIOUSLY_REDACTED +# path. +# +# Regression test for an off-by-one bug in the PREVIOUSLY_REDACTED handler +# in send_reader_thread(). file_max was computed as: +# +# MIN(dn->dn_maxblkid, range->end_blkid) +# +# dn_maxblkid is an inclusive maximum block ID while range->end_blkid is +# exclusive (one past the last block). Mixing these in MIN() caused the +# loop condition "blkid < file_max" to skip block dn_maxblkid, silently +# dropping the last block of any file whose last block was in the redaction +# list. The block remained as zeros on the receiver even though ZFS +# reported the send and receive as successful. +# +# Strategy: +# 1. Create a dataset with a 16-block file of random data and snapshot it. +# 2. Create a clone (redact_clone) that overwrites only the last block +# (block 15, i.e., dn_maxblkid). +# 3. Redact the base snapshot using redact_clone; block 15 enters the +# redaction list. +# 4. Create a second clone (send_clone) of the base snapshot that does NOT +# modify block 15. Because block 15 in send_clone has birth <= +# snap.creation_txg the TO traversal thread skips it; it must be sent +# via the PREVIOUSLY_REDACTED path. +# 5. Redacted-send the base snapshot to the receiver (block 15 = zeros). +# 6. Incrementally send send_clone from the redaction bookmark; block 15 +# must be filled in by the PREVIOUSLY_REDACTED handler. +# 7. Verify that block 15 on the receiver matches the original. +# + +typeset ds_name="max_blkid" +typeset sendfs="$POOL/$ds_name" +typeset redact_clone="$POOL/${ds_name}_redact" +typeset send_clone="$POOL/${ds_name}_send" +typeset recvfs="$POOL2/$ds_name" +typeset recv_clone="$POOL2/${ds_name}_send" +typeset tmpdir="$(get_prop mountpoint $POOL)/tmp" +typeset stream=$(mktemp $tmpdir/stream.XXXX) + +log_onexit redacted_cleanup $sendfs $recvfs $recv_clone + +# Create a dataset with a 16-block file. +log_must zfs create $sendfs +typeset mntpnt=$(get_prop mountpoint $sendfs) +typeset bs=$(get_prop recsize $sendfs) +log_must dd if=/dev/urandom of=$mntpnt/f1 bs=$bs count=16 + +# Take the base snapshot. +log_must zfs snapshot $sendfs@snap + +# Create redact_clone and overwrite ONLY the last block (block 15). +# This is the block at index dn_maxblkid for a 16-block file. +log_must zfs clone $sendfs@snap $redact_clone +typeset redact_mnt=$(get_prop mountpoint $redact_clone) +log_must dd if=/dev/urandom of=$redact_mnt/f1 bs=$bs count=1 seek=15 conv=notrunc +log_must zfs snapshot $redact_clone@snap + +# Create the redaction bookmark; block 15 is now in the redaction list. +log_must zfs redact $sendfs@snap book1 $redact_clone@snap + +# Create send_clone as an unmodified clone of the base snapshot. +# Block 15 in send_clone is inherited (birth <= snap.creation_txg), so the +# TO traversal thread does not include it. The PREVIOUSLY_REDACTED path +# must send it. +log_must zfs clone $sendfs@snap $send_clone +log_must zfs snapshot $send_clone@snap + +# Redacted send of the base snapshot; block 15 of f1 is omitted. +log_must eval "zfs send --redact book1 $sendfs@snap >$stream" +log_must eval "zfs recv $recvfs <$stream" + +# Incremental send of send_clone from the redaction bookmark. +# Block 15 must be sent via the PREVIOUSLY_REDACTED path. +log_must eval "zfs send -i $sendfs#book1 $send_clone@snap >$stream" +log_must eval "zfs recv $recv_clone <$stream" + +# Verify that the received clone is identical to the source. +# If the bug is present, block 15 is zeros on the receiver and this fails. +typeset send_mnt=$(get_prop mountpoint $send_clone) +typeset recv_mnt=$(get_prop mountpoint $recv_clone) +log_must directory_diff $send_mnt $recv_mnt + +# Explicitly verify block 15 is not all zeros and matches the source. +typeset src_block=$(mktemp $tmpdir/src_block.XXXX) +typeset recv_block=$(mktemp $tmpdir/recv_block.XXXX) +typeset zero_block=$(mktemp $tmpdir/zero_block.XXXX) +log_must dd if=$mntpnt/f1 bs=$bs skip=15 count=1 of=$src_block 2>/dev/null +log_must dd if=$recv_mnt/f1 bs=$bs skip=15 count=1 of=$recv_block 2>/dev/null +log_must dd if=/dev/zero bs=$bs count=1 of=$zero_block 2>/dev/null + +cmp -s $recv_block $zero_block && log_fail "Block 15 is all zeros on receiver (off-by-one bug)" +log_must cmp $src_block $recv_block + +log_pass "Incremental send from bookmark correctly sends the last block (dn_maxblkid)." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib 2025-05-01 18:23:24.027218862 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib 2026-08-21 20:57:12.590118768 +0000 @@ -52,7 +52,7 @@ # function cksum_pool { - typeset -i cksum=$(zpool status $1 | awk ' + typeset -i cksum=$(zpool status -p $1 | awk ' !NF { isvdev = 0 } isvdev { errors += $NF } /CKSUM$/ { isvdev = 1 } @@ -349,3 +349,72 @@ return 0 } + +# +# Given a dRAID pool issue a scrub and verify the current pool status +# aligns with the expected status based on the 'replace_mode' passed. +# Valid modes are: +# +# 1. healing - The pool is perfectly intact. No checksum errors have +# been reported and the scrub didn't make any repairs. This is the +# expected state after a healing resilver of a healthy pool. +# +# 2. sequential - The pool is fully intact. There should never be a +# checksum error. +# +# 3. damaged - The pool was intentionally silently damaged. Checksum +# errors are expected to be reported as the damaged blocks are +# detected and repaired. +# +# In all of these cases a scrub must be able to successfully repair the +# pool and result in no data loss. +# +function verify_draid_pool +{ + typeset pool=${1:-$TESTPOOL} + typeset replace_mode=${2:-healing} + + log_note "verify_draid_pool $pool $replace_mode" + log_must zpool scrub -w $pool + + typeset -i cksum=$(cksum_pool $pool) + + if [[ "$replace_mode" = "healing" ]]; then + if [[ $cksum -gt 0 ]]; then + log_must zpool status -v $pool + log_fail "Unexpected CKSUM errors found for $pool ($cksum)" + fi + + if ! check_pool_status $pool "scan" "repaired 0B"; then + log_must zpool status -v $pool + log_fail "Unexpected repair IO found for $pool ($cksum)" + fi + elif [[ "$replace_mode" = "sequential" ]]; then + if [[ $cksum -gt 0 ]]; then + log_must zpool status -v $pool + log_fail "Unexpected CKSUM errors found for $pool ($cksum)" + fi + elif [[ "$replace_mode" = "damaged" ]]; then + if [[ $cksum -lt 1 ]]; then + log_must zpool status -v $pool + log_fail "Expected CKSUM errors missing for $pool ($cksum)" + fi + + if check_pool_status $pool "scan" "repaired 0B"; then + log_must zpool status -v $pool + log_fail "Expected repair IO missing for $pool ($cksum)" + fi + else + log_fail "Invalid replace_mode=$replace_mode" + fi + + if ! check_pool_status $pool "scan" "with 0 errors"; then + log_must zpool status -v $pool + log_fail "Unexpected repair errors found for $pool" + fi + + if ! check_pool_status $pool "errors" "No known data errors"; then + log_must zpool status -v $pool + log_fail "Unexpected data errors found for $pool" + fi +} diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh 2025-05-01 18:23:24.027218862 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -86,8 +86,7 @@ # from the files which were read. Before overwriting additional # devices we need to repair all of the blocks in the pool. # - log_must zpool scrub -w $pool - log_must check_pool_status $pool "errors" "No known data errors" + log_must verify_draid_pool $pool "damaged" log_must zpool clear $pool @@ -104,8 +103,7 @@ log_must eval "find $mntpnt -type f -exec cksum {} + >> /dev/null 2>&1" log_must check_pool_status $pool "errors" "No known data errors" - log_must zpool scrub -w $pool - log_must check_pool_status $pool "errors" "No known data errors" + log_must verify_draid_pool $pool "damaged" log_must zpool clear $pool } @@ -182,8 +180,7 @@ log_must zpool import -o cachefile=none -d $dir $pool - log_must zpool scrub -w $pool - log_must check_pool_status $pool "errors" "No known data errors" + log_must verify_draid_pool $pool "damaged" log_must zpool clear $pool @@ -196,8 +193,7 @@ log_must zpool import -o cachefile=none -d $dir $pool - log_must zpool scrub -w $pool - log_must check_pool_status $pool "errors" "No known data errors" + log_must verify_draid_pool $pool "damaged" log_must zpool clear $pool } diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged1.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged1.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged1.ksh 2025-05-01 18:23:24.027218862 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged1.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -89,12 +89,7 @@ log_must zpool replace -fsw $pool $dir/dev-$i $spare done - log_must zpool scrub -w $pool - log_must zpool status $pool - - log_mustnot check_pool_status $pool "scan" "repaired 0B" - log_must check_pool_status $pool "errors" "No known data errors" - log_must check_pool_status $pool "scan" "with 0 errors" + log_must verify_draid_pool $pool "damaged" } log_onexit cleanup diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged2.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged2.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged2.ksh 2025-05-01 18:23:24.028218876 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged2.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -121,12 +121,7 @@ # Scrub the pool after the sequential resilver and verify # that the silent damage was repaired by the scrub. - log_must zpool scrub -w $TESTPOOL - log_must zpool status $TESTPOOL - log_must check_pool_status $TESTPOOL "errors" \ - "No known data errors" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" - log_mustnot check_pool_status $TESTPOOL "scan" "repaired 0B" + log_must verify_draid_pool $TESTPOOL "damaged" done for nspare in 0 1 2; do @@ -145,12 +140,7 @@ done log_must zpool clear $TESTPOOL - log_must zpool scrub -w $TESTPOOL - log_must zpool status $TESTPOOL - - log_must check_pool_status $TESTPOOL "errors" "No known data errors" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" + log_must verify_draid_pool $TESTPOOL "healing" log_must zpool destroy "$TESTPOOL" done diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded1.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded1.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded1.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded1.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -0,0 +1,136 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Lawrence Livermore National Security, LLC. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/redundancy/redundancy.kshlib + +# +# DESCRIPTION: +# When sequentially resilvering a dRAID pool with multiple vdevs +# and N faulted vdevs, where N=parity, ensure that when another leaf +# is marked degraded the pool can still be sequentially resilvered +# without introducing new checksum errors. Note we've exhausted +# the available redundancy so no silent correction can be tolerated. +# +# STRATEGY: +# 1. Create block device files for the test draid pool +# 2. For each parity value [1..3] +# - create draid pool +# - fill it with some directories/files +# - fault N=parity vdevs eliminating any redundancy +# - force fault an additional vdev causing it to be degraded +# - replace the degraded (but online) vdev using a sequential +# resilver. The minimum pool redundancy requirements are met so +# reconstruction is possible when reading from all online vdevs. +# - verify that the draid spare was correctly reconstructed and +# no checksum errors were introduced. +# - destroy the draid pool +# + +typeset -r devs=7 +typeset -r dev_size_mb=512 + +typeset -a disks + +prefetch_disable=$(get_tunable PREFETCH_DISABLE) +rebuild_scrub_enabled=$(get_tunable REBUILD_SCRUB_ENABLED) + +function cleanup +{ + poolexists "$TESTPOOL" && destroy_pool "$TESTPOOL" + + for i in {0..$devs}; do + rm -f "$TEST_BASE_DIR/dev-$i" + done + + set_tunable32 PREFETCH_DISABLE $prefetch_disable + set_tunable32 REBUILD_SCRUB_ENABLED $rebuild_scrub_enabled +} + +function test_sequential_resilver # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + + # Fault N=parity devices + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool offline -f $pool $dir/dev-$i + done + + # Parity is exhausted, faulting another device marks it degraded + log_must zpool offline -f $pool $dir/dev-$nparity + + # Replace the degraded vdev with a distributed spare + spare=draid${nparity}-0-0 + log_must zpool replace -fsw $pool $dir/dev-$nparity $spare + + log_must verify_draid_pool $pool "sequential" +} + +log_onexit cleanup + +log_must set_tunable32 PREFETCH_DISABLE 1 +log_must set_tunable32 REBUILD_SCRUB_ENABLED 0 + +# Disk files which will be used by pool +for i in {0..$(($devs - 1))}; do + device=$TEST_BASE_DIR/dev-$i + log_must truncate -s ${dev_size_mb}M $device + disks[${#disks[*]}+1]=$device +done + +# Disk file which will be attached +log_must truncate -s 512M $TEST_BASE_DIR/dev-$devs + +for nparity in 1 2 3; do + raid=draid${nparity}:${nparity}s + dir=$TEST_BASE_DIR + + log_must zpool create -O compression=off -f -o cachefile=none $TESTPOOL $raid ${disks[@]} + log_must zfs set primarycache=metadata $TESTPOOL + + log_must zfs create $TESTPOOL/fs + log_must fill_fs /$TESTPOOL/fs 1 512 102400 1 R + + log_must zfs create -o compress=on $TESTPOOL/fs2 + log_must fill_fs /$TESTPOOL/fs2 1 512 102400 1 R + + log_must zfs create -o compress=on -o recordsize=8k $TESTPOOL/fs3 + log_must fill_fs /$TESTPOOL/fs3 1 512 102400 1 R + + log_must zpool export $TESTPOOL + log_must zpool import -o cachefile=none -d $dir $TESTPOOL + + log_must check_pool_status $TESTPOOL "errors" "No known data errors" + + test_sequential_resilver $TESTPOOL $nparity $dir + + log_must zpool destroy "$TESTPOOL" +done + +log_pass "draid degraded device(s) test succeeded." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded2.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded2.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded2.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_degraded2.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -0,0 +1,152 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026 by Lawrence Livermore National Security, LLC. +# Copyright (c) 2026 by Wasabi Technologies, Inc. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/redundancy/redundancy.kshlib + +# +# DESCRIPTION: +# When sequentially resilvering a dRAID pool with multiple vdevs +# and N faulted vdevs, where N=parity, ensure that when another leaf +# is marked degraded the pool can still be sequentially resilvered +# without introducing new checksum errors. Note we've exhausted +# the available redundancy so no silent correction can be tolerated. +# +# This test is very similar to redundancy_draid_degraded1 and is +# based on it. The difference is that 1) we always have some faulted +# vdev which is already resilvered, and 2) we resilver the most +# recently faulted, but marked degraded due to redundancy exhaustion, +# vdev also. +# +# STRATEGY: +# 1. Create block device files for the test draid pool +# 2. For each parity value [1..3] +# - create draid pool +# - fill it with some directories/files +# - fault one vdev and resilver it +# - fault N=parity vdevs eliminating any redundancy +# - force fault an additional vdev causing it to be degraded +# - replace faulted vdevs using a sequential resilver. +# The minimum pool redundancy requirements are met so +# reconstruction is possible when reading from all online vdevs. +# - verify that the draid spare was correctly reconstructed and +# no checksum errors were introduced. +# - destroy the draid pool +# + +typeset -r devs=13 +typeset -r dev_size_mb=512 + +typeset -a disks + +prefetch_disable=$(get_tunable PREFETCH_DISABLE) +rebuild_scrub_enabled=$(get_tunable REBUILD_SCRUB_ENABLED) +scan_suspend_progress=$(get_tunable SCAN_SUSPEND_PROGRESS) + +function cleanup +{ + poolexists "$TESTPOOL" && destroy_pool "$TESTPOOL" + + for i in {0..$devs}; do + rm -f "$TEST_BASE_DIR/dev-$i" + done + + set_tunable32 PREFETCH_DISABLE $prefetch_disable + set_tunable32 REBUILD_SCRUB_ENABLED $rebuild_scrub_enabled + set_tunable32 SCAN_SUSPEND_PROGRESS $scan_suspend_progress +} + +function test_sequential_resilver # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + + # Fault N=parity devices + for (( i=0; i<$nparity; i++ )); do + log_must zpool offline -f $pool $dir/dev-$i + done + + # Parity is exhausted, faulting another device marks it degraded + log_must zpool offline -f $pool $dir/dev-$nparity + + # Replace all faulted vdevs with distributed spares + log_must set_tunable32 SCAN_SUSPEND_PROGRESS 1 + for (( i=0; i<$((nparity+1)); i++ )); do + spare=draid${nparity}-0-$i + log_must zpool replace -fs $pool $dir/dev-$i $spare + done + log_must set_tunable32 SCAN_SUSPEND_PROGRESS 0 + + log_must zpool wait -t resilver $pool + + log_must verify_draid_pool $pool "sequential" +} + +log_onexit cleanup + +log_must set_tunable32 PREFETCH_DISABLE 1 +log_must set_tunable32 REBUILD_SCRUB_ENABLED 0 + +# Disk files which will be used by pool +for i in {0..$(($devs - 1))}; do + device=$TEST_BASE_DIR/dev-$i + log_must truncate -s ${dev_size_mb}M $device + disks[${#disks[*]}+1]=$device +done + +# Disk file which will be attached +log_must truncate -s 512M $TEST_BASE_DIR/dev-$devs + +for nparity in 3; do + raid=draid${nparity}:$((nparity+2))s + dir=$TEST_BASE_DIR + + log_must zpool create -O compression=off -f -o cachefile=none $TESTPOOL $raid ${disks[@]} + log_must zfs set primarycache=metadata $TESTPOOL + + log_must zfs create $TESTPOOL/fs + log_must fill_fs /$TESTPOOL/fs 1 512 102400 1 R + + log_must zfs create -o compress=on $TESTPOOL/fs2 + log_must fill_fs /$TESTPOOL/fs2 1 512 102400 1 R + + log_must zfs create -o compress=on -o recordsize=8k $TESTPOOL/fs3 + log_must fill_fs /$TESTPOOL/fs3 1 512 102400 1 R + + log_must zpool export $TESTPOOL + log_must zpool import -o cachefile=none -d $dir $TESTPOOL + + log_must check_pool_status $TESTPOOL "errors" "No known data errors" + + test_sequential_resilver $TESTPOOL $nparity $dir + + log_must zpool destroy "$TESTPOOL" +done + +log_pass "draid degraded device(s) test succeeded." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh 2025-05-01 18:23:24.028218876 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -19,6 +19,7 @@ # # Copyright (c) 2019, Datto Inc. All rights reserved. # Copyright (c) 2020 by Lawrence Livermore National Security, LLC. +# Copyright (c) 2026, Seagate Technology, LLC. # . $STF_SUITE/include/libtest.shlib @@ -82,10 +83,9 @@ log_must check_vdev_state spare-$i "DEGRADED" log_must check_vdev_state $spare_vdev "ONLINE" log_must check_hotspare_state $TESTPOOL $spare_vdev "INUSE" - log_must zpool detach $TESTPOOL $fault_vdev - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + # Preserve the 1st faulted vdev for the next test. + [[ $i -eq 0 ]] || log_must zpool detach $TESTPOOL $fault_vdev + log_must verify_draid_pool $TESTPOOL $replace_mode (( i += 1 )) done @@ -93,6 +93,11 @@ log_must is_data_valid $TESTPOOL log_must check_pool_status $TESTPOOL "errors" "No known data errors" + # Verify that after clearing the 1st faulted vdev, all is healed. + log_must zpool clear $TESTPOOL "$BASEDIR/vdev0" + log_must wait_resilvered $TESTPOOL + log_must verify_draid_pool $TESTPOOL $replace_mode + cleanup done diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh 2025-05-01 18:23:24.028218876 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -60,9 +60,9 @@ log_must zpool replace -w $TESTPOOL $BASEDIR/vdev9 draid1-0-2 # Verify, refill and verify the pool contents. -verify_pool $TESTPOOL +log_must verify_draid_pool $TESTPOOL "healing" refill_test_env $TESTPOOL -verify_pool $TESTPOOL +log_must verify_draid_pool $TESTPOOL "healing" # Bring everything back online and check for errors. log_must zpool clear $TESTPOOL @@ -72,9 +72,7 @@ log_must wait_hotspare_state $TESTPOOL draid1-0-1 "AVAIL" log_must wait_hotspare_state $TESTPOOL draid1-0-2 "AVAIL" -log_must zpool scrub -w $TESTPOOL -log_must check_pool_status $TESTPOOL "scan" "repaired 0B" -log_must check_pool_status $TESTPOOL "scan" "with 0 errors" +log_must verify_draid_pool $TESTPOOL "healing" log_must is_data_valid $TESTPOOL diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh 2025-05-01 18:23:24.028218876 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh 2026-08-21 20:57:12.590118768 +0000 @@ -111,9 +111,7 @@ log_must zpool detach $TESTPOOL $BASEDIR/vdev7 log_must check_vdev_state $TESTPOOL draid1-0-0 "ONLINE" log_must check_hotspare_state $TESTPOOL draid1-0-0 "INUSE" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Distributed spare in mirror with original device faulted log_must zpool offline -f $TESTPOOL $BASEDIR/vdev8 @@ -122,9 +120,7 @@ log_must check_vdev_state $TESTPOOL spare-8 "DEGRADED" log_must check_vdev_state $TESTPOOL draid1-0-1 "ONLINE" log_must check_hotspare_state $TESTPOOL draid1-0-1 "INUSE" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Distributed spare in mirror with original device still online log_must check_vdev_state $TESTPOOL $BASEDIR/vdev9 "ONLINE" @@ -132,9 +128,7 @@ log_must check_vdev_state $TESTPOOL spare-9 "ONLINE" log_must check_vdev_state $TESTPOOL draid1-0-2 "ONLINE" log_must check_hotspare_state $TESTPOOL draid1-0-2 "INUSE" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Normal faulted device replacement new_vdev0="$BASEDIR/new_vdev0" @@ -143,9 +137,7 @@ log_must check_vdev_state $TESTPOOL $BASEDIR/vdev0 "FAULTED" log_must zpool replace -w $flags $TESTPOOL $BASEDIR/vdev0 $new_vdev0 log_must check_vdev_state $TESTPOOL $new_vdev0 "ONLINE" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Distributed spare faulted device replacement log_must zpool offline -f $TESTPOOL $BASEDIR/vdev2 @@ -154,9 +146,7 @@ log_must check_vdev_state $TESTPOOL spare-2 "DEGRADED" log_must check_vdev_state $TESTPOOL draid1-0-3 "ONLINE" log_must check_hotspare_state $TESTPOOL draid1-0-3 "INUSE" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Normal online device replacement new_vdev1="$BASEDIR/new_vdev1" @@ -164,9 +154,7 @@ log_must check_vdev_state $TESTPOOL $BASEDIR/vdev1 "ONLINE" log_must zpool replace -w $flags $TESTPOOL $BASEDIR/vdev1 $new_vdev1 log_must check_vdev_state $TESTPOOL $new_vdev1 "ONLINE" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Distributed spare online device replacement (then fault) log_must zpool replace -w $flags $TESTPOOL $BASEDIR/vdev3 draid1-0-4 @@ -176,9 +164,7 @@ log_must zpool offline -f $TESTPOOL $BASEDIR/vdev3 log_must check_vdev_state $TESTPOOL $BASEDIR/vdev3 "FAULTED" log_must check_vdev_state $TESTPOOL spare-3 "DEGRADED" - log_must verify_pool $TESTPOOL - log_must check_pool_status $TESTPOOL "scan" "repaired 0B" - log_must check_pool_status $TESTPOOL "scan" "with 0 errors" + log_must verify_draid_pool $TESTPOOL $replace_mode # Verify the original data is valid log_must is_data_valid $TESTPOOL diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/removal/removal_with_missing_log.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/removal/removal_with_missing_log.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/removal/removal_with_missing_log.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/removal/removal_with_missing_log.ksh 2026-08-21 20:57:12.591185798 +0000 @@ -0,0 +1,95 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/removal/removal.kshlib + +# +# DESCRIPTION: +# Verify that a missing SLOG device can be removed even when +# ZIL blocks exist on it. +# +# STRATEGY: +# 1. Create a pool with a SLOG device +# 2. Freeze the pool and write data to ZIL +# 3. Export the pool (ZIL blocks remain uncommitted) +# 4. Import with -N to claim logs without replay +# 5. Export and clear SLOG device labels to simulate failure +# 6. Import with -m (missing devices allowed) +# 7. Remove the missing SLOG vdev +# 8. Verify pool is healthy and space accounting is correct +# + +verify_runnable "global" + +log_assert "Removal of missing SLOG with ZIL blocks succeeds" + +function cleanup +{ + poolexists $TESTPOOL && destroy_pool $TESTPOOL +} + +log_onexit cleanup + +VDEV1="$(echo $DISKS | cut -d' ' -f1)" +VDEV2="$(echo $DISKS | cut -d' ' -f2)" + +# Create pool with SLOG and dataset +log_must zpool create $TESTPOOL $VDEV1 log $VDEV2 +log_must zfs create $TESTPOOL/$TESTFS + +# Create initial ZIL header (required before freezing) +log_must dd if=/dev/zero of=/$TESTPOOL/$TESTFS/init \ + conv=fdatasync,fsync bs=1 count=1 + +# Freeze pool and write data to ZIL +log_must zpool freeze $TESTPOOL +log_must dd if=/dev/urandom of=/$TESTPOOL/$TESTFS/file1 \ + oflag=sync bs=128k count=128 + +# Export with uncommitted ZIL transactions +log_must zpool export $TESTPOOL + +# Import with -N to claim logs without mounting/replaying +log_must zpool import -N $TESTPOOL +log_must zpool export $TESTPOOL + +# Clear SLOG labels to simulate device failure +log_must zpool labelclear -f $VDEV2 + +# Import with missing SLOG allowed +log_must zpool import -m $TESTPOOL +log_must eval "zpool status $TESTPOOL | grep UNAVAIL" + +# Remove the missing SLOG - should succeed +log_must zpool remove $TESTPOOL $VDEV2 +log_must zpool wait -t remove $TESTPOOL +sync_pool $TESTPOOL +log_mustnot eval "zpool status -v $TESTPOOL | grep $VDEV2" + +# Verify pool health +log_must zpool scrub -w $TESTPOOL +log_must check_pool_status $TESTPOOL "errors" "No known data errors" + +# Verify space accounting is correct +log_must zdb -c $TESTPOOL + +log_pass "Removal of missing SLOG with ZIL blocks succeeded" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/replacement/resilver_restart_001.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/replacement/resilver_restart_001.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/replacement/resilver_restart_001.ksh 2025-05-01 18:23:24.031218918 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/replacement/resilver_restart_001.ksh 2026-08-21 20:57:12.592204017 +0000 @@ -46,6 +46,7 @@ function cleanup { + log_must zpool events log_must set_tunable32 RESILVER_MIN_TIME_MS $ORIG_RESILVER_MIN_TIME log_must set_tunable32 SCAN_SUSPEND_PROGRESS \ $ORIG_SCAN_SUSPEND_PROGRESS @@ -53,11 +54,12 @@ $ORIG_RESILVER_DEFER_PERCENT log_must set_tunable32 ZEVENT_LEN_MAX $ORIG_ZFS_ZEVENT_LEN_MAX log_must zinject -c all + log_must zpool events -c destroy_pool $TESTPOOL1 rm -f ${VDEV_FILES[@]} $SPARE_VDEV_FILE } -# count resilver events in zpool and number of deferred rsilvers on vdevs +# count resilver events in zpool and number of deferred resilvers on vdevs function verify_restarts # { msg=$1 @@ -113,7 +115,7 @@ log_must truncate -s $VDEV_FILE_SIZE ${VDEV_FILES[@]} $SPARE_VDEV_FILE log_must zpool create -f -o feature@resilver_defer=disabled $TESTPOOL1 \ - raidz ${VDEV_FILES[@]} + raidz2 ${VDEV_FILES[@]} # create 4 filesystems for fs in fs{0..3} @@ -154,11 +156,11 @@ log_must zpool events -c # limit scanning time - log_must set_tunable32 RESILVER_MIN_TIME_MS 50 + log_must set_tunable32 RESILVER_MIN_TIME_MS 20 # initiate a resilver and suspend the scan as soon as possible - log_must zpool replace $TESTPOOL1 $VDEV_REPLACE log_must set_tunable32 SCAN_SUSPEND_PROGRESS 1 + log_must zpool replace $TESTPOOL1 $VDEV_REPLACE # there should only be 1 resilver start verify_restarts '' "${RESTARTS[0]}" "${VDEVS[0]}" @@ -166,9 +168,12 @@ # offline then online a vdev to introduce a new DTL range after current # scan, which should restart (or defer) the resilver log_must zpool offline $TESTPOOL1 ${VDEV_FILES[2]} - sync_pool $TESTPOOL1 + log_must wait_vdev_state $TESTPOOL1 ${VDEV_FILES[2]} "OFFLINE" + sync_pool $TESTPOOL1 true + log_must zpool online $TESTPOOL1 ${VDEV_FILES[2]} - sync_pool $TESTPOOL1 + log_must wait_vdev_state $TESTPOOL1 ${VDEV_FILES[2]} "ONLINE" + sync_pool $TESTPOOL1 true # there should now be 2 resilver starts w/o defer, 1 with defer verify_restarts ' after offline/online' "${RESTARTS[1]}" "${VDEVS[1]}" @@ -190,8 +195,8 @@ log_must is_pool_resilvered $TESTPOOL1 # wait for a few txg's to see if a resilver happens - sync_pool $TESTPOOL1 - sync_pool $TESTPOOL1 + sync_pool $TESTPOOL1 true + sync_pool $TESTPOOL1 true # there should now be 2 resilver starts verify_restarts ' after resilver' "${RESTARTS[3]}" "${VDEVS[3]}" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/rsend.kshlib zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/rsend.kshlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/rsend.kshlib 2025-05-01 18:23:24.040219044 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/rsend.kshlib 2026-08-21 20:57:12.602001633 +0000 @@ -583,14 +583,34 @@ { sendfs=$1 recvfs=$2 + typeset -i compared=0 - if [[ -d /$recvfs/.zfs/snapshot/a && -d \ - /$sendfs/.zfs/snapshot/a ]]; then - log_must directory_diff /$recvfs/.zfs/snapshot/a /$sendfs/.zfs/snapshot/a - fi - if [[ -d /$recvfs/.zfs/snapshot/b && -d \ - /$sendfs/.zfs/snapshot/b ]]; then - log_must directory_diff /$recvfs/.zfs/snapshot/b /$sendfs/.zfs/snapshot/b + # + # The datasets are often not mounted at this point (the receive + # side is usually created with -u), and the .zfs directories the + # diffs need only exist once they are mounted. + # + ismounted $sendfs || log_must zfs mount $sendfs + ismounted $recvfs || log_must zfs mount $recvfs + + # + # Only compare the snapshots both sides have; some tests send + # just one of them. Comparing nothing means the caller's + # expectations are wrong, and historically this function did + # exactly that whenever the receive side was unmounted. + # + typeset snap + for snap in a b; do + [[ -d /$sendfs/.zfs/snapshot/$snap && \ + -d /$recvfs/.zfs/snapshot/$snap ]] || continue + log_must directory_diff /$recvfs/.zfs/snapshot/$snap \ + /$sendfs/.zfs/snapshot/$snap + compared=$((compared + 1)) + done + + if [[ $compared -eq 0 ]]; then + log_fail "file_check: no snapshots compared for" \ + "$sendfs and $recvfs" fi } diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh 2025-05-01 18:23:24.041219058 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh 2026-08-21 20:57:12.602001633 +0000 @@ -48,7 +48,12 @@ test_fs_setup $sendfs $recvfs $streamfs log_must zfs unmount -f $sendfs resume_test "zfs send $sendfs" $streamfs $recvfs 0 -file_check $sendfs $recvfs + +# The stream was taken from the head, not from the a/b snapshots +# file_check compares, so diff the mounted heads instead +log_must zfs mount $sendfs +log_must zfs mount $recvfs +log_must directory_diff /$sendfs /$recvfs log_pass "Verify resumability of a full ZFS send/receive with the source " \ "filesystem unmounted" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/send_leak_keymaps.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/send_leak_keymaps.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/send_leak_keymaps.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/send_leak_keymaps.ksh 2026-08-21 20:57:12.603001619 +0000 @@ -0,0 +1,82 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025 by George Amanakis. All rights reserved. +# + +. $STF_SUITE/tests/functional/rsend/rsend.kshlib + +# +# DESCRIPTION: +# Verify that an incremental non-raw zfs send from an encrypted filesystem +# does not leak any keys or key mappings. +# +# STRATEGY: +# 1. Create a new encrypted filesystem +# 2. Write some files and create snapshots. +# 3. Send to a new filesystem +# 4. Do an incremental (-I) send and before that access all properties on the +# sending filesystem (emulate sanoid) +# 5. Export and re-import the pool. Upon exporting the pool if any keys/key +# mappings leaked a panic will occur. +# + +verify_runnable "both" + +function cleanup +{ + datasetexists $TESTPOOL/$TESTFS2 && \ + destroy_dataset $TESTPOOL/$TESTFS2 -r + datasetexists $TESTPOOL/recv && \ + destroy_dataset $TESTPOOL/recv -r + [[ -f $keyfile ]] && log_must rm $keyfile +} +log_onexit cleanup + +log_assert "Verify non-raw send with encryption does not leak any key mappings" + +typeset keyfile=/$TESTPOOL/pkey + +# Create an encrypted dataset +log_must eval "echo 'password' > $keyfile" +log_must zfs create -o encryption=on -o keyformat=passphrase \ + -o keylocation=file://$keyfile $TESTPOOL/$TESTFS2 + +log_must dd if=/dev/urandom of=/$TESTPOOL/$TESTFS2/testfile bs=128K count=4 \ + status=none + +for i in $(seq 0 20); do + log_note "Taking snapshots" + log_must zfs snapshot $TESTPOOL/$TESTFS2@snap_$i + log_must dd if=/dev/urandom of=/$TESTPOOL/$TESTFS2/testfile bs=128K \ + count=4 status=none +done + +log_must eval "zfs send $TESTPOOL/$TESTFS2@snap_0 | zfs recv $TESTPOOL/recv" + +for i in $(seq 3 3 20); do + log_note "Sending incremental snapshot snap_$((i - 3)) -> snap_$i" + log_must zfs get -Hpd 1 -t snapshot all $TESTPOOL/$TESTFS2 &>/dev/null + log_must eval "zfs send -I $TESTPOOL/$TESTFS2@snap_$((i - 3)) \ + $TESTPOOL/$TESTFS2@snap_$i | zfs recv $TESTPOOL/recv" +done + +log_must zpool export $TESTPOOL +log_must zpool import $TESTPOOL + +log_pass "Verify non-raw send with encryption does not leak any key mappings" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/send_partial_dataset.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/send_partial_dataset.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/rsend/send_partial_dataset.ksh 2025-05-01 18:23:24.042219072 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/rsend/send_partial_dataset.ksh 2026-08-21 20:57:12.604001605 +0000 @@ -70,7 +70,9 @@ "$POOL/partialfs" token=$(zfs get -Hp -o value receive_resume_token $POOL/partialfs) log_must eval "zfs send -t $token | zfs recv -s $POOL/partialfs" -file_check $POOL/recvfullfs $POOL/partialfs +# recvfullfs never completes and has no snapshots to compare, so +# check the result against the dataset the stream originally came from +file_check $POOL/testfs2 $POOL/partialfs log_must zfs destroy -r $POOL/partialfs # Perform saved send with incremental diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/slog/slog_006_pos.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/slog/slog_006_pos.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/slog/slog_006_pos.ksh 2025-05-01 18:23:24.043219086 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/slog/slog_006_pos.ksh 2026-08-21 20:57:12.604925772 +0000 @@ -61,8 +61,7 @@ tdev=$(random_get $LDEV2) log_must zpool replace $TESTPOOL $sdev $tdev log_must display_status $TESTPOOL - # sleep 15 to make sure replacement completely. - log_must sleep 15 + log_must zpool wait $TESTPOOL log_must verify_slog_device \ $TESTPOOL $tdev 'ONLINE' $logtype diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/syncfs/syncfs_suspend.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/syncfs/syncfs_suspend.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/syncfs/syncfs_suspend.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/syncfs/syncfs_suspend.ksh 2026-08-21 20:57:12.606544479 +0000 @@ -0,0 +1,115 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or https://opensource.org/licenses/CDDL-1.0. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2025, Klara, Inc. +# + +. $STF_SUITE/include/libtest.shlib + +log_assert "syncfs() does not return success while the pool is suspended" + +typeset -i syncfs_pid=0 + +function cleanup +{ + zinject -c all || true + zpool clear $TESTPOOL || true + test $syncfs_pid -gt 0 && kill -9 $syncfs_pid || true + destroy_pool $TESTPOOL +} + +log_onexit cleanup + +DISK=${DISKS%% *} + +# create a single-disk pool, set failmode=wait +log_must zpool create -o failmode=wait -f $TESTPOOL $DISK +log_must zfs create -o recordsize=128k $TESTPOOL/$TESTFS + +# generate a write, then syncfs(), confirm success +log_must touch /$TESTPOOL/$TESTFS/file1 +log_must sync -f /$TESTPOOL/$TESTFS + +# and again with no changes +log_must sync -f /$TESTPOOL/$TESTFS + +# set up error injections to force the pool to suspend on next write +log_must zinject -d $DISK -e io -T write $TESTPOOL +log_must zinject -d $DISK -e nxio -T probe $TESTPOOL + +# generate another write +log_must touch /$TESTPOOL/$TESTFS/file2 + +# wait for the pool to suspend +log_note "waiting for pool to suspend" +typeset -i tries=10 +until [[ $(kstat_pool $TESTPOOL state) == "SUSPENDED" ]] ; do + if ((tries-- == 0)); then + log_fail "pool didn't suspend" + fi + sleep 1 +done + +# pool suspended. syncfs() in the background, as it may block +sync -f /$TESTPOOL/$TESTFS & +syncfs_pid=$! + +# give it a moment to get stuck +sleep 1 + +# depending on kernel version and pool config, syncfs should have either +# returned an error, or be blocked in the kernel +typeset -i blocked +typeset -i rc +if kill -0 $syncfs_pid ; then + blocked=1 + log_note "syncfs() is blocked in the kernel" +else + blocked=0 + log_note "syncfs() returned while pool was suspended" + + # exited, capture its error code directly + wait $syncfs_pid + rc=$? + syncfs_pid=0 +fi + +# bring the pool back online +log_must zinject -c all +log_must zpool clear $TESTPOOL + +if [[ $syncfs_pid -gt 0 ]] ; then + # it blocked, clean it up now + wait $syncfs_pid + rc=$? + syncfs_pid=0 +fi + +# if it returned when the pool was suspended, it must not claim success. if +# it blocked and returned after the pool suspended, then we don't care about +# the error (it depends on what happened after the pool resumed, which we're +# not testing here) +log_must test $blocked -eq 1 -o $rc -ne 0 + +log_pass "syncfs() does not return success while the pool is suspended" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_sys_config.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_sys_config.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_sys_config.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_sys_config.ksh 2026-08-21 20:57:12.607502823 +0000 @@ -0,0 +1,46 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/tests/functional/user_namespace/user_namespace_common.kshlib + +# +# Verify that secpolicy_sys_config() only allows the superuser in the root/init +# namespace. +# +# Currently, zpool/zfs start by getting a list of pools, which has separate +# zone visibility checks, and then don't proceed if no pools are found. So, +# we use `zpool events` for the test, which uses secpolicy_sys_config() but +# doesn't need a name to work, and so zpool doesn't bother with the lookup. +# + +verify_runnable "both" + +log_assert "secpolicy_sys_config correctly limits access." + +# default superuser can access pool events +log_must eval 'zpool events >/dev/null' + +# regular user cannot access pool events +log_mustnot eval 'sudo -u nobody zpool events >/dev/null' + +# superuser in a new user namespace cannot access pool events +log_mustnot eval 'unshare -Ur zpool events >/dev/null' + +# regular user in a new user namespace cannot access pool events +log_mustnot eval 'unshare -U zpool events >/dev/null' + +log_pass "secpolicy_sys_config correctly limits access." diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_zinject.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_zinject.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_zinject.ksh 1970-01-01 00:00:00.000000000 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/user_namespace/user_namespace_secpolicy_zinject.ksh 2026-08-21 20:57:12.607502823 +0000 @@ -0,0 +1,46 @@ +#!/bin/ksh -p +# SPDX-License-Identifier: CDDL-1.0 +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# https://opensource.org/license/CDDL-1.0. +# + +# +# Copyright (c) 2026, TrueNAS. +# + +. $STF_SUITE/tests/functional/user_namespace/user_namespace_common.kshlib + +# +# Verify that secpolicy_zinject() only allows the superuser in the root/init +# namespace. +# +# Because we don't actually want to inject anything, we just try to run +# `zinject -c all`, which with no injections is just a permission check and +# then an (effective) no-op. +# + +verify_runnable "both" + +log_assert "secpolicy_zinject correctly limits access." + +# default superuser can access pool events +log_must zinject -c all + +# regular user cannot access pool events +log_mustnot sudo -u nobody zinject -c all + +# superuser in a new user namespace cannot access pool events +log_mustnot unshare -Ur zinject -c all + +# regular user in a new user namespace cannot access pool events +log_mustnot unshare -U zinject -c all + +log_pass "secpolicy_zinject correctly limits access." + diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_fua.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_fua.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_fua.ksh 2025-05-01 18:23:24.051219199 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_fua.ksh 2026-08-21 20:57:12.610185326 +0000 @@ -50,17 +50,53 @@ typeset datafile1="$(mktemp -t zvol_misc_fua1.XXXXXX)" typeset datafile2="$(mktemp -t zvol_misc_fua2.XXXXXX)" +typeset datafile3="$(mktemp -t zvol_misc_fua3_log.XXXXXX)" typeset zvolpath=${ZVOL_DEVDIR}/$TESTPOOL/$TESTVOL +typeset DISK1=${DISKS%% *} function cleanup { - rm "$datafile1" "$datafile2" + log_must zpool remove $TESTPOOL $datafile3 + rm "$datafile1" "$datafile2" "$datafile2" +} + +# Prints the total number of sync writes for a vdev +# $1: vdev +function get_sync +{ + zpool iostat -p -H -v -r $TESTPOOL $1 | \ + awk '/[0-9]+$/{s+=$4+$5} END{print s}' } function do_test { # Wait for udev to create symlinks to our zvol block_device_wait $zvolpath + # Write using sync (creates FLUSH calls after writes, but not FUA) + old_vdev_writes=$(get_sync $DISK1) + old_log_writes=$(get_sync $datafile3) + + log_must fio --name=write_iops --size=5M \ + --ioengine=libaio --verify=0 --bs=4K \ + --iodepth=1 --rw=randwrite --group_reporting=1 \ + --filename=$zvolpath --sync=1 + + vdev_writes=$(( $(get_sync $DISK1) - $old_vdev_writes)) + log_writes=$(( $(get_sync $datafile3) - $old_log_writes)) + + # When we're doing sync writes, we should see many more writes go to + # the log vs the first vdev. Experiments show anywhere from a 160-320x + # ratio of writes to the log vs the first vdev (due to some straggler + # writes to the first vdev). + # + # Check that we have a large ratio (100x) of sync writes going to the + # log device + ratio=$(($log_writes / $vdev_writes)) + log_note "Got $log_writes log writes, $vdev_writes vdev writes." + if [ $ratio -lt 100 ] ; then + log_fail "Expected > 100x more log writes than vdev writes. " + fi + # Create a data file log_must dd if=/dev/urandom of="$datafile1" bs=1M count=5 @@ -81,6 +117,8 @@ log_onexit cleanup log_must zfs set compression=off $TESTPOOL/$TESTVOL +log_must truncate -s 100M $datafile3 +log_must zpool add $TESTPOOL log $datafile3 log_note "Testing without blk-mq" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_trim.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_trim.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_trim.ksh 2025-05-01 18:23:24.051219199 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_trim.ksh 2026-08-21 20:57:12.610185326 +0000 @@ -41,6 +41,7 @@ # 5. TRIM the first 1MB and last 2MB of the 5MB block of data. # 6. Observe 2MB of used space on the zvol # 7. Verify the trimmed regions are zero'd on the zvol +# 8. Verify Secure Erase does not work on zvols (Linux only) verify_runnable "global" @@ -56,6 +57,7 @@ else trimcmd='blkdiscard' fi + secure_trimcmd="$trimcmd --secure" else # By default, FreeBSD 'trim' always does a dry-run. '-f' makes # it perform the actual operation. @@ -114,6 +116,11 @@ log_must diff $datafile1 $datafile2 log_must rm $datafile1 $datafile2 + + # Secure erase should not work (Linux check only). + if [ -n "$secure_trimcmd" ] ; then + log_mustnot $secure_trimcmd $zvolpath + fi } log_assert "Verify that a ZFS volume can be TRIMed" diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress.ksh zfs-linux-2.3.9/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress.ksh --- zfs-linux-2.3.2/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress.ksh 2025-05-01 18:23:24.052219213 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/functional/zvol/zvol_stress/zvol_stress.ksh 2026-08-21 20:57:12.610648986 +0000 @@ -148,10 +148,11 @@ do_zvol_stress # Inject some errors, and verify we see some IO errors in zpool status +sync_pool $TESTPOOL for DISK in $DISKS ; do log_must zinject -d $DISK -f 10 -e io -T write $TESTPOOL done -log_must dd if=/dev/zero of=$ZVOL_DEVDIR/$TESTPOOL/testvol1 bs=512 count=50 +log_must dd if=/dev/urandom of=$ZVOL_DEVDIR/$TESTPOOL/testvol1 bs=16M count=1 sync_pool $TESTPOOL log_must zinject -c all diff -Nru zfs-linux-2.3.2/tests/zfs-tests/tests/perf/perf.shlib zfs-linux-2.3.9/tests/zfs-tests/tests/perf/perf.shlib --- zfs-linux-2.3.2/tests/zfs-tests/tests/perf/perf.shlib 2025-05-01 18:23:24.052219213 +0000 +++ zfs-linux-2.3.9/tests/zfs-tests/tests/perf/perf.shlib 2026-08-21 20:57:12.610951737 +0000 @@ -15,7 +15,7 @@ # Copyright (c) 2016, Intel Corporation. # -. $STF_SUITE/include/libtest.shlib +. "$STF_SUITE"/include/libtest.shlib # Defaults common to all the tests in the regression group export PERF_RUNTIME=${PERF_RUNTIME:-'180'} @@ -46,12 +46,12 @@ typeset sync=$2 typeset iosize=$3 - typeset sync_str=$(get_sync_str $sync) + typeset sync_str=$(get_sync_str "$sync") typeset filesystems=$(get_nfilesystems) typeset suffix="$sync_str.$iosize-ios" suffix="$suffix.$threads-threads.$filesystems-filesystems" - echo $suffix + echo "$suffix" } function do_fio_run_impl @@ -65,12 +65,12 @@ typeset sync=$6 typeset iosize=$7 - typeset sync_str=$(get_sync_str $sync) + typeset sync_str=$(get_sync_str "$sync") log_note "Running with $threads $sync_str threads, $iosize ios" if [[ -n $threads_per_fs && $threads_per_fs -ne 0 ]]; then - log_must test $do_recreate - verify_threads_per_fs $threads $threads_per_fs + log_must test "$do_recreate" + verify_threads_per_fs "$threads" "$threads_per_fs" fi if $do_recreate; then @@ -105,7 +105,7 @@ # the default filesystem (e.g. against a clone). # export DIRECTORY=$(get_directory) - log_note "DIRECTORY: " $DIRECTORY + log_note "DIRECTORY: $DIRECTORY" export RUNTIME=$PERF_RUNTIME export RANDSEED=$PERF_RANDSEED @@ -122,33 +122,33 @@ # disable client cache for reads. if [[ $NFS -eq 1 ]]; then export DIRECT=1 - do_setup_nfs $script + do_setup_nfs "$script" else export DIRECT=0 fi # This will be part of the output filename. - typeset suffix=$(get_suffix $threads $sync $iosize) + typeset suffix=$(get_suffix "$threads" "$sync" "$iosize") # Start the data collection - do_collect_scripts $suffix + do_collect_scripts "$suffix" # Define output file typeset logbase="$(get_perf_output_dir)/$(basename \ - $SUDO_COMMAND)" + "$SUDO_COMMAND")" typeset outfile="$logbase.fio.$suffix" # Start the load if [[ $NFS -eq 1 ]]; then - log_must ssh -t $NFS_USER@$NFS_CLIENT " + log_must ssh -t "$NFS_USER@$NFS_CLIENT" " fio --output-format=${PERF_FIO_FORMAT} \ --output /tmp/fio.out /tmp/test.fio " - log_must scp $NFS_USER@$NFS_CLIENT:/tmp/fio.out $outfile - log_must ssh -t $NFS_USER@$NFS_CLIENT "sudo -S umount $NFS_MOUNT" + log_must scp "$NFS_USER@$NFS_CLIENT":/tmp/fio.out "$outfile" + log_must ssh -t "$NFS_USER@$NFS_CLIENT" "sudo -S umount $NFS_MOUNT" else - log_must fio --output-format=${PERF_FIO_FORMAT} \ - --output $outfile $FIO_SCRIPTS/$script + log_must fio --output-format="${PERF_FIO_FORMAT}" \ + --output "$outfile" "$FIO_SCRIPTS/$script" fi } @@ -176,13 +176,13 @@ for sync in $PERF_SYNC_TYPES; do for iosize in $PERF_IOSIZES; do do_fio_run_impl \ - $script \ - $do_recreate \ - $clear_cache \ - $threads \ - $threads_per_fs \ - $sync \ - $iosize + "$script" \ + "$do_recreate" \ + "$clear_cache" \ + "$threads" \ + "$threads_per_fs" \ + "$sync" \ + "$iosize" done done done @@ -195,12 +195,12 @@ function do_setup_nfs { typeset script=$1 - zfs set sharenfs=on $TESTFS - log_must chmod -R 777 /$TESTFS + zfs set sharenfs=on "$TESTFS" + log_must chmod -R 777 /"$TESTFS" - ssh -t $NFS_USER@$NFS_CLIENT "mkdir -m 777 -p $NFS_MOUNT" - ssh -t $NFS_USER@$NFS_CLIENT "sudo -S umount $NFS_MOUNT" - log_must ssh -t $NFS_USER@$NFS_CLIENT " + ssh -t "$NFS_USER@$NFS_CLIENT" "mkdir -m 777 -p $NFS_MOUNT" + ssh -t "$NFS_USER@$NFS_CLIENT" "sudo -S umount $NFS_MOUNT" + log_must ssh -t "$NFS_USER@$NFS_CLIENT" " sudo -S mount $NFS_OPTIONS $NFS_SERVER:/$TESTFS $NFS_MOUNT " # @@ -211,9 +211,9 @@ export jobnum='$jobnum' while read line; do eval echo "$line" - done < $FIO_SCRIPTS/$script > /tmp/test.fio + done < "$FIO_SCRIPTS/$script" > /tmp/test.fio log_must sed -i -e "s%directory.*%directory=$NFS_MOUNT%" /tmp/test.fio - log_must scp /tmp/test.fio $NFS_USER@$NFS_CLIENT:/tmp + log_must scp /tmp/test.fio "$NFS_USER@$NFS_CLIENT":/tmp log_must rm /tmp/test.fio } @@ -233,17 +233,17 @@ typeset oIFS=$IFS IFS=',' for item in $PERF_COLLECT_SCRIPTS; do - collect_scripts+=($(echo $item | sed 's/^ *//g')) + collect_scripts+=($(echo "$item" | sed 's/^ *//g')) done IFS=$oIFS typeset idx=0 while [[ $idx -lt "${#collect_scripts[@]}" ]]; do typeset logbase="$(get_perf_output_dir)/$(basename \ - $SUDO_COMMAND)" + "$SUDO_COMMAND")" typeset outfile="$logbase.${collect_scripts[$idx + 1]}.$suffix" - timeout $PERF_RUNTIME ${collect_scripts[$idx]} >$outfile 2>&1 & + timeout "$PERF_RUNTIME" "${collect_scripts[$idx]}" >"$outfile" 2>&1 & ((idx += 2)) done @@ -256,9 +256,9 @@ function get_perf_output_dir { typeset dir="$PWD/perf_data" - [[ -d $dir ]] || mkdir -p $dir + [[ -d $dir ]] || mkdir -p "$dir" - echo $dir + echo "$dir" } function apply_zinject_delays @@ -270,7 +270,7 @@ for disk in $DISKS; do log_must zinject \ - -d $disk -D ${ZINJECT_DELAYS[$idx]} $PERFPOOL + -d "$disk" -D "${ZINJECT_DELAYS[$idx]}" "$PERFPOOL" done ((idx += 1)) @@ -302,7 +302,7 @@ # This function handles the case where the pool already exists, # and will destroy the previous pool and recreate a new pool. # - create_pool $PERFPOOL $DISKS + create_pool "$PERFPOOL" "$DISKS" } function verify_threads_per_fs @@ -310,8 +310,8 @@ typeset threads=$1 typeset threads_per_fs=$2 - log_must test -n $threads - log_must test -n $threads_per_fs + log_must test -n "$threads" + log_must test -n "$threads_per_fs" # # A value of "0" is treated as a "special value", and it is @@ -325,7 +325,7 @@ # than or equal to zero; since we just verified the value isn't # 0 above, then it must be greater than zero here. # - log_must test $threads_per_fs -ge 0 + log_must test "$threads_per_fs" -ge 0 # # This restriction can be lifted later if needed, but for now, @@ -341,9 +341,9 @@ typeset nfilesystems=${1:-1} export TESTFS="" - for i in $(seq 1 $nfilesystems); do + for i in $(seq 1 "$nfilesystems"); do typeset dataset="$PERFPOOL/fs$i" - create_dataset $dataset $PERF_FS_OPTS + create_dataset "$dataset" "$PERF_FS_OPTS" if [[ -z "$TESTFS" ]]; then TESTFS="$dataset" else @@ -354,13 +354,13 @@ function get_nfilesystems { - typeset filesystems=( $TESTFS ) + typeset filesystems=($TESTFS) echo ${#filesystems[@]} } function get_directory { - typeset filesystems=( $TESTFS ) + typeset filesystems=($TESTFS) typeset directory= typeset idx=0 @@ -376,7 +376,7 @@ ((idx += 1)) done - echo $directory + echo "$directory" } function get_min_arc_size @@ -447,7 +447,7 @@ dbuf_cache_size=$(($(get_arc_target) / 2**dbuf_cache_shift)) fi || log_fail "get_dbuf_cache_size failed" - echo $dbuf_cache_size + echo "$dbuf_cache_size" } # Create a file with some information about how this system is configured. @@ -455,23 +455,23 @@ { typeset config=$PERF_DATA_DIR/$1 - echo "{" >>$config + echo "{" >>"$config" if is_linux; then - echo " \"ncpus\": \"$(lscpu | awk '/^CPU\(s\)/ {print $2; exit}')\"," >>$config + echo " \"ncpus\": \"$(lscpu | awk '/^CPU\(s\)/ {print $2; exit}')\"," >>"$config" echo " \"physmem\": \"$(free -b | \ - awk '$1 == "Mem:" { print $2 }')\"," >>$config - echo " \"c_max\": \"$(get_max_arc_size)\"," >>$config - echo " \"hostname\": \"$(uname -n)\"," >>$config - echo " \"kernel version\": \"$(uname -sr)\"," >>$config + awk '$1 == "Mem:" { print $2 }')\"," >>"$config" + echo " \"c_max\": \"$(get_max_arc_size)\"," >>"$config" + echo " \"hostname\": \"$(uname -n)\"," >>"$config" + echo " \"kernel version\": \"$(uname -sr)\"," >>"$config" else dtrace -qn 'BEGIN{ printf(" \"ncpus\": %d,\n", `ncpus); printf(" \"physmem\": %u,\n", `physmem * `_pagesize); printf(" \"c_max\": %u,\n", `arc_stats.arcstat_c_max.value.ui64); printf(" \"kmem_flags\": \"0x%x\",", `kmem_flags); - exit(0)}' >>$config - echo " \"hostname\": \"$(uname -n)\"," >>$config - echo " \"kernel version\": \"$(uname -v)\"," >>$config + exit(0)}' >>"$config" + echo " \"hostname\": \"$(uname -n)\"," >>"$config" + echo " \"kernel version\": \"$(uname -v)\"," >>"$config" fi if is_linux; then lsblk -dino NAME,SIZE | awk 'BEGIN { @@ -479,11 +479,11 @@ {disk = $1} {size = $2; if (first != 1) {printf(",\n")} else {first = 0} printf(" \"%s\": \"%s\"", disk, size)} - END {printf("\n },\n")}' >>$config + END {printf("\n },\n")}' >>"$config" zfs_tunables="/sys/module/zfs/parameters" - printf " \"tunables\": {\n" >>$config + printf " \"tunables\": {\n" >>"$config" for tunable in \ zfs_arc_max \ zfs_arc_sys_free \ @@ -500,12 +500,12 @@ do if [ "$tunable" != "zfs_arc_max" ] then - printf ",\n" >>$config + printf ",\n" >>"$config" fi printf " \"$tunable\": \"$(<$zfs_tunables/$tunable)\"" \ - >>$config + >>"$config" done - printf "\n }\n" >>$config + printf "\n }\n" >>"$config" else iostat -En | awk 'BEGIN { printf(" \"disks\": {\n"); first = 1} @@ -513,15 +513,15 @@ /^Size: [^0]/ {size = $2; if (first != 1) {printf(",\n")} else {first = 0} printf(" \"%s\": \"%s\"", disk, size)} - END {printf("\n },\n")}' >>$config + END {printf("\n },\n")}' >>"$config" sed -n 's/^set \(.*\)[ ]=[ ]\(.*\)/\1=\2/p' /etc/system | \ awk -F= 'BEGIN {printf(" \"system\": {\n"); first = 1} {if (first != 1) {printf(",\n")} else {first = 0}; printf(" \"%s\": %s", $1, $2)} - END {printf("\n }\n")}' >>$config + END {printf("\n }\n")}' >>"$config" fi - echo "}" >>$config + echo "}" >>"$config" } # @@ -535,7 +535,7 @@ case "$UNAME" in Linux) - ctds=$(zpool list -HLv $pool | \ + ctds=$(zpool list -HLv "$pool" | \ awk '/sd[a-z]*|loop[0-9]*|dm-[0-9]*/ {print $1}') for ctd in $ctds; do @@ -543,17 +543,17 @@ done ;; FreeBSD) - lun_list+=$(zpool list -HLv $pool | \ + lun_list+=$(zpool list -HLv "$pool" | \ awk '/a?da[0-9]+|md[0-9]+|mfid[0-9]+|nda[0-9]+|nvd[0-9]+|vtbd[0-9]+/ { printf "%s:", $1 }') ;; *) - ctds=$(zpool list -v $pool | + ctds=$(zpool list -v "$pool" | awk '/c[0-9]*t[0-9a-fA-F]*d[0-9]*/ {print $1}') for ctd in $ctds; do # Get the device name as it appears in /etc/path_to_inst - devname=$(readlink -f /dev/dsk/${ctd}s0 | sed -n 's/\/devices\([^:]*\):.*/\1/p') + devname=$(readlink -f /dev/dsk/"${ctd}"s0 | sed -n 's/\/devices\([^:]*\):.*/\1/p') # Add a string composed of the driver name and instance # number to the list for comparison with dev_statname. lun=$(sed 's/"//g' /etc/path_to_inst | awk -v dn="$devname" '$0 ~ dn {print $3$2}') @@ -561,7 +561,7 @@ done ;; esac - echo $lun_list + echo "$lun_list" } function print_perf_settings diff -Nru zfs-linux-2.3.2/udev/Makefile.am zfs-linux-2.3.9/udev/Makefile.am --- zfs-linux-2.3.2/udev/Makefile.am 2025-05-01 18:23:24.053219227 +0000 +++ zfs-linux-2.3.9/udev/Makefile.am 2026-08-21 20:57:12.611533606 +0000 @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: CDDL-1.0 udevrule_DATA = \ %D%/rules.d/69-vdev.rules \ %D%/rules.d/60-zvol.rules \ diff -Nru zfs-linux-2.3.2/udev/rules.d/69-vdev.rules.in zfs-linux-2.3.9/udev/rules.d/69-vdev.rules.in --- zfs-linux-2.3.2/udev/rules.d/69-vdev.rules.in 2025-05-01 18:23:24.053219227 +0000 +++ zfs-linux-2.3.9/udev/rules.d/69-vdev.rules.in 2026-08-21 20:57:12.611580486 +0000 @@ -7,6 +7,7 @@ KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}" KERNEL=="nvme*[0-9]n*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="disk", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}" +KERNEL=="md*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="disk", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}" KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}-part%n" KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}" diff -Nru zfs-linux-2.3.2/udev/vdev_id zfs-linux-2.3.9/udev/vdev_id --- zfs-linux-2.3.2/udev/vdev_id 2025-05-01 18:23:24.053219227 +0000 +++ zfs-linux-2.3.9/udev/vdev_id 2026-08-21 20:57:12.611580486 +0000 @@ -288,13 +288,20 @@ # we have to append the -part suffix directly in the # helper. if [ "$DEVTYPE" != "partition" ] ; then - # Match p[number], remove the 'p' and prepend "-part" - PART=$(echo "$DM_NAME" | - awk 'match($0,/p[0-9]+$/) {print "-part"substr($0,RSTART+1,RLENGTH-1)}') + # WWNs end with number -> p, alphabet -> + # '3' + (WWN length 16) = 17 + PART=${DM_NAME:17} + if [[ $PART = "p"* ]]; then + # Match p[number], remove the 'p' and prepend "-part" + PART=$(echo "$DM_NAME" | + awk 'match($0,/p[0-9]+$/) {print "-part"substr($0,RSTART+1,RLENGTH-1)}') + elif [[ $PART != "" ]]; then + PART="-part"${PART} + fi fi # Strip off partition information. - DM_NAME=$(echo "$DM_NAME" | sed 's/p[0-9][0-9]*$//') + DM_NAME=${DM_NAME:0:17} if [ -z "$DM_NAME" ] ; then return fi @@ -305,10 +312,20 @@ # If our DEVNAME is something like /dev/dm-177, then we may be # able to get our DMDEV from it. DMDEV=$(echo $DEVNAME | sed 's;/dev/;;g') + if [ -n "$DMDEV" ]; then + DEV=$(ls /sys/block/$DMDEV/slaves) + for elm in "${DEV[@]}"; do + if [[ $elm == "dm-"* ]]; then + DMDEV=$elm + break + fi + done + fi + if [ ! -e /sys/block/$DMDEV/slaves/* ] ; then # It's not there, try looking in /dev/mapper DMDEV=$(ls -l --full-time /dev/mapper | grep $DM_NAME | - awk '{gsub("../", " "); print $NF}') + awk '{gsub("../", " "); print $NF}' | head -n 1) fi # Use sysfs pointers in /sys/block/dm-X/slaves because using @@ -520,13 +537,20 @@ # we have to append the -part suffix directly in the # helper. if [ "$DEVTYPE" != "partition" ] ; then - # Match p[number], remove the 'p' and prepend "-part" - PART=$(echo "$DM_NAME" | - awk 'match($0,/p[0-9]+$/) {print "-part"substr($0,RSTART+1,RLENGTH-1)}') + # WWNs end with number -> p, alphabet -> + # '3' + (WWN length 16) = 17 + PART=${DM_NAME:17} + if [[ $PART = "p"* ]]; then + # Match p[number], remove the 'p' and prepend "-part" + PART=$(echo "$DM_NAME" | + awk 'match($0,/p[0-9]+$/) {print "-part"substr($0,RSTART+1,RLENGTH-1)}') + elif [[ $PART != "" ]]; then + PART="-part"${PART} + fi fi # Strip off partition information. - DM_NAME=$(echo "$DM_NAME" | sed 's/p[0-9][0-9]*$//') + DM_NAME=${DM_NAME:0:17} if [ -z "$DM_NAME" ] ; then return fi diff -Nru zfs-linux-2.3.2/udev/zvol_id.c zfs-linux-2.3.9/udev/zvol_id.c --- zfs-linux-2.3.2/udev/zvol_id.c 2025-05-01 18:23:24.053219227 +0000 +++ zfs-linux-2.3.9/udev/zvol_id.c 2026-08-21 20:57:12.611580486 +0000 @@ -67,7 +67,7 @@ return (1); } - char zvol_name[MAXNAMELEN + strlen("-part") + 10]; + char zvol_name[MAXNAMELEN+15]; if (ioctl(fd, BLKZNAME, zvol_name) == -1) { fprintf(stderr, "%s: BLKZNAME: %s\n", dev_name, strerror(errno)); diff -Nru zfs-linux-2.3.2/zfs_config.h.in zfs-linux-2.3.9/zfs_config.h.in --- zfs-linux-2.3.2/zfs_config.h.in 2025-05-01 18:45:09.000000000 +0000 +++ zfs-linux-2.3.9/zfs_config.h.in 2026-08-21 21:15:38.454645607 +0000 @@ -22,6 +22,9 @@ /* Define if you have [rt] */ #undef HAVE_AIO_H +/* Define if your assembler supports .cfi_negate_ra_state. */ +#undef HAVE_AS_CFI_PSEUDO_OP + /* Define if host toolchain supports AVX */ #undef HAVE_AVX @@ -187,6 +190,9 @@ /* backing_dev_info is available through queue gendisk */ #undef HAVE_BLK_QUEUE_DISK_BDI +/* blk_queue_rot() is available */ +#undef HAVE_BLK_QUEUE_ROT + /* blk_queue_secure_erase() is available */ #undef HAVE_BLK_QUEUE_SECURE_ERASE @@ -196,12 +202,24 @@ /* BLK_STS_RESV_CONFLICT is defined */ #undef HAVE_BLK_STS_RESV_CONFLICT +/* Define if getgeo() in block_device_operations takes struct gendisk * as its + first arg */ +#undef HAVE_BLOCK_DEVICE_OPERATIONS_GETGEO_GENDISK + /* Define if release() in block_device_operations takes 1 arg */ #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG /* Define if revalidate_disk() in block_device_operations */ #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + /* check_disk_change() exists */ #undef HAVE_CHECK_DISK_CHANGE @@ -218,6 +236,9 @@ /* DECLARE_EVENT_CLASS() is available */ #undef HAVE_DECLARE_EVENT_CLASS +/* dentry aliases are in d_u member */ +#undef HAVE_DENTRY_D_U_ALIASES + /* 3-arg dequeue_signal() takes a type argument */ #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE @@ -242,24 +263,45 @@ /* dops->d_revalidate() takes 4 args */ #undef HAVE_D_REVALIDATE_4ARGS +/* Define if d_set_d_op() is available */ +#undef HAVE_D_SET_D_OP + /* Define to 1 if you have the `execvpe' function. */ #undef HAVE_EXECVPE /* fault_in_iov_iter_readable() is available */ #undef HAVE_FAULT_IN_IOV_ITER_READABLE +/* linux/filelock.h exists */ +#undef HAVE_FILELOCK_HEADER + /* file->f_version exists */ #undef HAVE_FILE_F_VERSION /* flush_dcache_page() is GPL-only */ #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY +/* use __flush_workqueue() to flush delay workqueue */ +#undef HAVE_FLUSH_DELAY_WORKQUEUE_INTERNAL + +/* use system_delay_wq for delay workqueue */ +#undef HAVE_FLUSH_DELAY_WORKQUEUE_PERCPU + +/* follow_down() takes a flags parameter */ +#undef HAVE_FOLLOW_DOWN_FLAGS + /* Define if compiler supports -Wformat-overflow */ #undef HAVE_FORMAT_OVERFLOW /* fsync_bdev() is declared in include/blkdev.h */ #undef HAVE_FSYNC_BDEV +/* fs_context exists */ +#undef HAVE_FS_CONTEXT + +/* fs_parse() takes fs_parameter_spec directly */ +#undef HAVE_FS_PARSE_TAKES_SPEC + /* yes */ #undef HAVE_GENERIC_FADVISE @@ -308,18 +350,27 @@ /* iops->setattr() takes struct mnt_idmap* */ #undef HAVE_IDMAP_IOPS_SETATTR +/* id mapping mechanism is mnt_idmap */ +#undef HAVE_IDMAP_MNTIDMAP + /* APIs for idmapped mount are present */ #undef HAVE_IDMAP_MNT_API /* mnt_idmap does not have user_namespace */ #undef HAVE_IDMAP_NO_USERNS +/* id mapping mechanism is user_namespace */ +#undef HAVE_IDMAP_USERNS + /* Define if compiler supports -Wimplicit-fallthrough */ #undef HAVE_IMPLICIT_FALLTHROUGH /* Define if compiler supports -Winfinite-recursion */ #undef HAVE_INFINITE_RECURSION +/* inode_generic_drop() exists */ +#undef HAVE_INODE_GENERIC_DROP + /* inode_get_atime() exists in linux/fs.h */ #undef HAVE_INODE_GET_ATIME @@ -347,6 +398,9 @@ /* inode_set_mtime_to_ts() exists in linux/fs.h */ #undef HAVE_INODE_SET_MTIME_TO_TS +/* inode_state_read_once() exists */ +#undef HAVE_INODE_STATE_READ_ONCE + /* timestamp_truncate() exists */ #undef HAVE_INODE_TIMESTAMP_TRUNCATE @@ -359,6 +413,9 @@ /* iops->create() takes struct user_namespace* */ #undef HAVE_IOPS_CREATE_USERNS +/* iops->mkdir() returns struct dentry* */ +#undef HAVE_IOPS_MKDIR_DENTRY + /* iops->mkdir() takes struct mnt_idmap* */ #undef HAVE_IOPS_MKDIR_IDMAP @@ -404,6 +461,9 @@ /* iter_is_ubuf() is available */ #undef HAVE_ITER_IS_UBUF +/* kasan_enabled() is GPL-only */ +#undef HAVE_KASAN_ENABLED_GPL_ONLY + /* kernel has kernel_fpu_* functions */ #undef HAVE_KERNEL_FPU @@ -473,9 +533,15 @@ /* Noting that make_request_fn() returns blk_qc_t */ #undef HAVE_MAKE_REQUEST_FN_RET_QC +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + /* Define to 1 if you have the `mlockall' function. */ #undef HAVE_MLOCKALL +/* 'flags' in 'struct page' is a struct */ +#undef HAVE_MM_PAGE_FLAGS_STRUCT + /* PG_error flag is available */ #undef HAVE_MM_PAGE_FLAG_ERROR @@ -485,12 +551,21 @@ /* page_size() is available */ #undef HAVE_MM_PAGE_SIZE +/* mount_setattr() and struct mount_attr are available */ +#undef HAVE_MOUNT_SETATTR + /* Define if host toolchain supports MOVBE */ #undef HAVE_MOVBE +/* Define if ns_type is accessible through ns_common */ +#undef HAVE_NS_COMMON_TYPE + /* folio_wait_bit() exists */ #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT +/* readahead_page() exists */ +#undef HAVE_PAGEMAP_READAHEAD_PAGE + /* part_to_dev() exists */ #undef HAVE_PART_TO_DEV @@ -503,6 +578,9 @@ /* pin_user_pages_unlocked() is available */ #undef HAVE_PIN_USER_PAGES_UNLOCKED +/* posix_acl_to_xattr() allocates its result */ +#undef HAVE_POSIX_ACL_TO_XATTR_ALLOC + /* proc_handler ctl_table arg is const */ #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST @@ -527,9 +605,6 @@ /* register_sysctl_table exists */ #undef HAVE_REGISTER_SYSCTL_TABLE -/* iops->rename() wants flags */ -#undef HAVE_RENAME_WANTS_FLAGS - /* revalidate_disk() is available */ #undef HAVE_REVALIDATE_DISK @@ -557,12 +632,18 @@ /* iops->set_acl() takes 4 args, arg2 is struct dentry * */ #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 +/* Define if set_default_d_op() is available */ +#undef HAVE_SET_DEFAULT_D_OP + /* shrinker_register exists */ #undef HAVE_SHRINKER_REGISTER /* kernel_siginfo_t exists */ #undef HAVE_SIGINFO +/* sops->free_inode() exists */ +#undef HAVE_SOPS_FREE_INODE + /* Define if host toolchain supports SSE */ #undef HAVE_SSE @@ -584,15 +665,21 @@ /* STACK_FRAME_NON_STANDARD is defined */ #undef HAVE_STACK_FRAME_NON_STANDARD +/* STACK_FRAME_NON_STANDARD asm macro is defined */ +#undef HAVE_STACK_FRAME_NON_STANDARD_ASM + /* standalone exists */ #undef HAVE_STANDALONE_LINUX_STDARG +/* statx() is available */ +#undef HAVE_STATX + +/* STATX_MNT_ID is available */ +#undef HAVE_STATX_MNT_ID + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_STDIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -617,6 +704,9 @@ /* have super_block s_shrink pointer */ #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR +/* have super_block s_wb_err */ +#undef HAVE_SUPER_BLOCK_S_WB_ERR + /* sync_blockdev() is declared in include/blkdev.h */ #undef HAVE_SYNC_BLOCKDEV @@ -629,6 +719,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* timer_delete_sync is available */ +#undef HAVE_TIMER_DELETE_SYNC + /* i_op->tmpfile() uses old dentry signature */ #undef HAVE_TMPFILE_DENTRY @@ -677,6 +770,12 @@ /* migrate_folio exists */ #undef HAVE_VFS_MIGRATE_FOLIO +/* vfs_parse_fs_string() takes 3 args */ +#undef HAVE_VFS_PARSE_FS_STRING_3ARGS + +/* vfs_path_lookup() is exported */ +#undef HAVE_VFS_PATH_LOOKUP_EXPORTED + /* address_space_operations->readpages exists */ #undef HAVE_VFS_READPAGES @@ -692,12 +791,18 @@ /* splice_copy_file_range() is available */ #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE +/* address_space_operations->writepage exists */ +#undef HAVE_VFS_WRITEPAGE + /* __vmalloc page flags exists */ #undef HAVE_VMALLOC_PAGE_KERNEL /* int (*writepage_t)() takes struct folio* */ #undef HAVE_WRITEPAGE_T_FOLIO +/* write_cache_pages() is available */ +#undef HAVE_WRITE_CACHE_PAGES + /* xattr_handler->get() wants dentry and inode and flags */ #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS @@ -725,6 +830,9 @@ /* Define if you have [z] */ #undef HAVE_ZLIB +/* libunwind is llvm libunwind */ +#undef IS_LIBUNWIND_LLVM + /* kernel exports FPU functions */ #undef KERNEL_EXPORTS_X86_FPU @@ -782,9 +890,7 @@ /* pde_data() is PDE_DATA() */ #undef SPL_PDE_DATA -/* Define to 1 if all of the C90 standard headers exist (not just the ones - required in a freestanding environment). This macro is provided for - backward compatibility; new code need not use it. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* True if ZFS is to be compiled for a FreeBSD system */