Date: Wed, 2 Aug 2017 19:53:44 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r321940 - in projects/pnfs-planb-server-stable11/sys: amd64/amd64 amd64/cloudabi32 amd64/cloudabi64 amd64/ia32 amd64/include amd64/linux amd64/linux32 amd64/vmm/io arm/arm arm/cloudabi3... Message-ID: <201708021953.v72JriIE006717@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Wed Aug 2 19:53:43 2017 New Revision: 321940 URL: https://svnweb.freebsd.org/changeset/base/321940 Log: Merge the updates for the kernel from stable/11/sys. Added: projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c - copied unchanged from r321939, stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h - copied unchanged from r321939, stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/abd.h Modified: projects/pnfs-planb-server-stable11/sys/amd64/amd64/efirt.c projects/pnfs-planb-server-stable11/sys/amd64/amd64/pmap.c projects/pnfs-planb-server-stable11/sys/amd64/amd64/trap.c projects/pnfs-planb-server-stable11/sys/amd64/cloudabi32/cloudabi32_sysvec.c projects/pnfs-planb-server-stable11/sys/amd64/cloudabi64/cloudabi64_sysvec.c projects/pnfs-planb-server-stable11/sys/amd64/ia32/ia32_syscall.c projects/pnfs-planb-server-stable11/sys/amd64/include/proc.h projects/pnfs-planb-server-stable11/sys/amd64/linux/linux_sysvec.c projects/pnfs-planb-server-stable11/sys/amd64/linux32/linux32_sysvec.c projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vhpet.c projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vioapic.c projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v4.S projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v6.S projects/pnfs-planb-server-stable11/sys/arm/arm/syscall.c projects/pnfs-planb-server-stable11/sys/arm/cloudabi32/cloudabi32_sysvec.c projects/pnfs-planb-server-stable11/sys/arm/include/atomic.h projects/pnfs-planb-server-stable11/sys/arm64/arm64/trap.c projects/pnfs-planb-server-stable11/sys/arm64/cloudabi64/cloudabi64_sysvec.c projects/pnfs-planb-server-stable11/sys/arm64/include/proc.h projects/pnfs-planb-server-stable11/sys/boot/common/Makefile.inc projects/pnfs-planb-server-stable11/sys/boot/common/module.c projects/pnfs-planb-server-stable11/sys/boot/common/part.c projects/pnfs-planb-server-stable11/sys/boot/efi/boot1/zfs_module.c projects/pnfs-planb-server-stable11/sys/boot/zfs/libzfs.h projects/pnfs-planb-server-stable11/sys/boot/zfs/zfs.c projects/pnfs-planb-server-stable11/sys/boot/zfs/zfsimpl.c projects/pnfs-planb-server-stable11/sys/cam/ctl/ctl_backend_ramdisk.c projects/pnfs-planb-server-stable11/sys/cam/ctl/scsi_ctl.c projects/pnfs-planb-server-stable11/sys/cddl/boot/zfs/zfsimpl.h projects/pnfs-planb-server-stable11/sys/cddl/compat/opensolaris/kern/opensolaris_kstat.c projects/pnfs-planb-server-stable11/sys/cddl/compat/opensolaris/sys/kstat.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/common/zfs/zfs_fletcher.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/Makefile.files projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/edonr_zfs.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_tx.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_file.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_checksum.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c projects/pnfs-planb-server-stable11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c projects/pnfs-planb-server-stable11/sys/compat/freebsd32/freebsd32_util.h projects/pnfs-planb-server-stable11/sys/compat/ia32/ia32_util.h projects/pnfs-planb-server-stable11/sys/compat/linux/linux_fork.c projects/pnfs-planb-server-stable11/sys/compat/linux/linux_ioctl.h projects/pnfs-planb-server-stable11/sys/conf/NOTES projects/pnfs-planb-server-stable11/sys/conf/files projects/pnfs-planb-server-stable11/sys/conf/files.amd64 projects/pnfs-planb-server-stable11/sys/conf/files.i386 projects/pnfs-planb-server-stable11/sys/conf/kern.pre.mk projects/pnfs-planb-server-stable11/sys/conf/kmod.mk projects/pnfs-planb-server-stable11/sys/conf/newvers.sh projects/pnfs-planb-server-stable11/sys/dev/arcmsr/arcmsr.c projects/pnfs-planb-server-stable11/sys/dev/arcmsr/arcmsr.h projects/pnfs-planb-server-stable11/sys/dev/atkbdc/psm.c projects/pnfs-planb-server-stable11/sys/dev/bxe/bxe.c projects/pnfs-planb-server-stable11/sys/dev/bxe/bxe.h projects/pnfs-planb-server-stable11/sys/dev/hyperv/netvsc/if_hn.c projects/pnfs-planb-server-stable11/sys/dev/hyperv/netvsc/if_hnvar.h projects/pnfs-planb-server-stable11/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c projects/pnfs-planb-server-stable11/sys/dev/ichsmb/ichsmb_pci.c projects/pnfs-planb-server-stable11/sys/dev/isp/isp.c projects/pnfs-planb-server-stable11/sys/dev/isp/isp_freebsd.c projects/pnfs-planb-server-stable11/sys/dev/isp/isp_library.c projects/pnfs-planb-server-stable11/sys/dev/isp/isp_library.h projects/pnfs-planb-server-stable11/sys/dev/isp/ispmbox.h projects/pnfs-planb-server-stable11/sys/dev/isp/ispvar.h projects/pnfs-planb-server-stable11/sys/dev/ksyms/ksyms.c projects/pnfs-planb-server-stable11/sys/dev/mpr/mpr.c projects/pnfs-planb-server-stable11/sys/dev/mps/mps.c projects/pnfs-planb-server-stable11/sys/dev/psci/psci_arm.S projects/pnfs-planb-server-stable11/sys/dev/qlxgbe/ql_def.h projects/pnfs-planb-server-stable11/sys/dev/qlxgbe/ql_hw.c projects/pnfs-planb-server-stable11/sys/dev/qlxgbe/ql_hw.h projects/pnfs-planb-server-stable11/sys/dev/qlxgbe/ql_os.c projects/pnfs-planb-server-stable11/sys/dev/vt/hw/vga/vt_vga.c projects/pnfs-planb-server-stable11/sys/dev/vt/vt_buf.c projects/pnfs-planb-server-stable11/sys/fs/fdescfs/fdesc_vfsops.c projects/pnfs-planb-server-stable11/sys/fs/fdescfs/fdesc_vnops.c projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clbio.c projects/pnfs-planb-server-stable11/sys/fs/smbfs/smbfs_io.c projects/pnfs-planb-server-stable11/sys/geom/geom_disk.c projects/pnfs-planb-server-stable11/sys/i386/cloudabi32/cloudabi32_sysvec.c projects/pnfs-planb-server-stable11/sys/i386/i386/pmap.c projects/pnfs-planb-server-stable11/sys/i386/i386/trap.c projects/pnfs-planb-server-stable11/sys/i386/include/proc.h projects/pnfs-planb-server-stable11/sys/i386/linux/linux_sysvec.c projects/pnfs-planb-server-stable11/sys/kern/capabilities.conf projects/pnfs-planb-server-stable11/sys/kern/init_main.c projects/pnfs-planb-server-stable11/sys/kern/kern_exec.c projects/pnfs-planb-server-stable11/sys/kern/kern_fork.c projects/pnfs-planb-server-stable11/sys/kern/kern_kthread.c projects/pnfs-planb-server-stable11/sys/kern/kern_shutdown.c projects/pnfs-planb-server-stable11/sys/kern/kern_sig.c projects/pnfs-planb-server-stable11/sys/kern/kern_thr.c projects/pnfs-planb-server-stable11/sys/kern/subr_blist.c projects/pnfs-planb-server-stable11/sys/kern/subr_prf.c projects/pnfs-planb-server-stable11/sys/kern/subr_sbuf.c projects/pnfs-planb-server-stable11/sys/kern/subr_syscall.c projects/pnfs-planb-server-stable11/sys/kern/sys_process.c projects/pnfs-planb-server-stable11/sys/kern/sys_socket.c projects/pnfs-planb-server-stable11/sys/kern/uipc_mqueue.c projects/pnfs-planb-server-stable11/sys/kern/uipc_shm.c projects/pnfs-planb-server-stable11/sys/kern/vfs_bio.c projects/pnfs-planb-server-stable11/sys/libkern/arm64/crc32c_armv8.S projects/pnfs-planb-server-stable11/sys/mips/include/proc.h projects/pnfs-planb-server-stable11/sys/mips/mips/trap.c projects/pnfs-planb-server-stable11/sys/net/ethernet.h projects/pnfs-planb-server-stable11/sys/net/if_ethersubr.c projects/pnfs-planb-server-stable11/sys/net/iflib.c projects/pnfs-planb-server-stable11/sys/net/rndis.h projects/pnfs-planb-server-stable11/sys/net80211/ieee80211_amrr.c projects/pnfs-planb-server-stable11/sys/net80211/ieee80211_rssadapt.c projects/pnfs-planb-server-stable11/sys/netinet/in_mcast.c projects/pnfs-planb-server-stable11/sys/netinet/sctp_syscalls.c projects/pnfs-planb-server-stable11/sys/netinet6/in6_mcast.c projects/pnfs-planb-server-stable11/sys/netpfil/ipfw/ip_fw2.c projects/pnfs-planb-server-stable11/sys/netpfil/pf/pf.c projects/pnfs-planb-server-stable11/sys/powerpc/include/proc.h projects/pnfs-planb-server-stable11/sys/powerpc/powerpc/trap.c projects/pnfs-planb-server-stable11/sys/riscv/include/proc.h projects/pnfs-planb-server-stable11/sys/riscv/riscv/trap.c projects/pnfs-planb-server-stable11/sys/security/mac_bsdextended/mac_bsdextended.c projects/pnfs-planb-server-stable11/sys/sparc64/include/proc.h projects/pnfs-planb-server-stable11/sys/sparc64/sparc64/trap.c projects/pnfs-planb-server-stable11/sys/sys/_pctrie.h projects/pnfs-planb-server-stable11/sys/sys/blist.h projects/pnfs-planb-server-stable11/sys/sys/cdefs.h projects/pnfs-planb-server-stable11/sys/sys/copyright.h projects/pnfs-planb-server-stable11/sys/sys/pctrie.h projects/pnfs-planb-server-stable11/sys/sys/proc.h projects/pnfs-planb-server-stable11/sys/sys/ptrace.h projects/pnfs-planb-server-stable11/sys/sys/sbuf.h projects/pnfs-planb-server-stable11/sys/sys/sysent.h projects/pnfs-planb-server-stable11/sys/vm/_vm_radix.h projects/pnfs-planb-server-stable11/sys/vm/swap_pager.c projects/pnfs-planb-server-stable11/sys/vm/swap_pager.h projects/pnfs-planb-server-stable11/sys/vm/vm_map.c projects/pnfs-planb-server-stable11/sys/vm/vm_object.c projects/pnfs-planb-server-stable11/sys/vm/vm_pageout.c projects/pnfs-planb-server-stable11/sys/vm/vm_radix.c projects/pnfs-planb-server-stable11/sys/vm/vm_radix.h projects/pnfs-planb-server-stable11/sys/vm/vnode_pager.c projects/pnfs-planb-server-stable11/sys/vm/vnode_pager.h Directory Properties: projects/pnfs-planb-server-stable11/sys/ (props changed) Modified: projects/pnfs-planb-server-stable11/sys/amd64/amd64/efirt.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/amd64/efirt.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/amd64/efirt.c Wed Aug 2 19:53:43 2017 (r321940) @@ -192,8 +192,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int uint64_t idx; int bits, i, mode; - obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, 1 + NPML4EPG + - NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG, + obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, ptoa(1 + + NPML4EPG + NPML4EPG * NPDPEPG + NPML4EPG * NPDPEPG * NPDEPG), VM_PROT_ALL, 0, NULL); VM_OBJECT_WLOCK(obj_1t1_pt); efi_pml4_page = efi_1t1_page(0); Modified: projects/pnfs-planb-server-stable11/sys/amd64/amd64/pmap.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/amd64/pmap.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/amd64/pmap.c Wed Aug 2 19:53:43 2017 (r321940) @@ -1868,7 +1868,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset { if (force) { - sva &= ~(vm_offset_t)cpu_clflush_line_size; + sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); } else { KASSERT((sva & PAGE_MASK) == 0, ("pmap_invalidate_cache_range: sva not page-aligned")); Modified: projects/pnfs-planb-server-stable11/sys/amd64/amd64/trap.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/amd64/trap.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/amd64/trap.c Wed Aug 2 19:53:43 2017 (r321940) @@ -829,16 +829,18 @@ dblfault_handler(struct trapframe *frame) } int -cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cpu_fetch_syscall_args(struct thread *td) { struct proc *p; struct trapframe *frame; register_t *argp; + struct syscall_args *sa; caddr_t params; int reg, regcnt, error; p = td->td_proc; frame = td->td_frame; + sa = &td->td_sa; reg = 0; regcnt = 6; @@ -889,7 +891,6 @@ cpu_fetch_syscall_args(struct thread *td, struct sysca void amd64_syscall(struct thread *td, int traced) { - struct syscall_args sa; int error; ksiginfo_t ksi; @@ -899,7 +900,7 @@ amd64_syscall(struct thread *td, int traced) /* NOT REACHED */ } #endif - error = syscallenter(td, &sa); + error = syscallenter(td); /* * Traced syscall. @@ -915,15 +916,16 @@ amd64_syscall(struct thread *td, int traced) KASSERT(PCB_USER_FPU(td->td_pcb), ("System call %s returning with kernel FPU ctx leaked", - syscallname(td->td_proc, sa.code))); + syscallname(td->td_proc, td->td_sa.code))); KASSERT(td->td_pcb->pcb_save == get_pcb_user_save_td(td), ("System call %s returning with mangled pcb_save", - syscallname(td->td_proc, sa.code))); + syscallname(td->td_proc, td->td_sa.code))); KASSERT(td->td_md.md_invl_gen.gen == 0, ("System call %s returning with leaked invl_gen %lu", - syscallname(td->td_proc, sa.code), td->td_md.md_invl_gen.gen)); + syscallname(td->td_proc, td->td_sa.code), + td->td_md.md_invl_gen.gen)); - syscallret(td, error, &sa); + syscallret(td, error); /* * If the user-supplied value of %rip is not a canonical Modified: projects/pnfs-planb-server-stable11/sys/amd64/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/cloudabi32/cloudabi32_sysvec.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/cloudabi32/cloudabi32_sysvec.c Wed Aug 2 19:53:43 2017 (r321940) @@ -90,10 +90,14 @@ cloudabi32_proc_setregs(struct thread *td, struct imag } static int -cloudabi32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cloudabi32_fetch_syscall_args(struct thread *td) { - struct trapframe *frame = td->td_frame; + struct trapframe *frame; + struct syscall_args *sa; int error; + + frame = td->td_frame; + sa = &td->td_sa; /* Obtain system call number. */ sa->code = frame->tf_rax; Modified: projects/pnfs-planb-server-stable11/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 19:53:43 2017 (r321940) @@ -87,9 +87,13 @@ cloudabi64_proc_setregs(struct thread *td, struct imag } static int -cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cloudabi64_fetch_syscall_args(struct thread *td) { - struct trapframe *frame = td->td_frame; + struct trapframe *frame; + struct syscall_args *sa; + + frame = td->td_frame; + sa = &td->td_sa; /* Obtain system call number. */ sa->code = frame->tf_rax; Modified: projects/pnfs-planb-server-stable11/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/ia32/ia32_syscall.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/ia32/ia32_syscall.c Wed Aug 2 19:53:43 2017 (r321940) @@ -105,16 +105,18 @@ ia32_set_syscall_retval(struct thread *td, int error) } int -ia32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +ia32_fetch_syscall_args(struct thread *td) { struct proc *p; struct trapframe *frame; + struct syscall_args *sa; caddr_t params; u_int32_t args[8], tmp; int error, i; p = td->td_proc; frame = td->td_frame; + sa = &td->td_sa; params = (caddr_t)frame->tf_rsp + sizeof(u_int32_t); sa->code = frame->tf_rax; @@ -175,7 +177,6 @@ void ia32_syscall(struct trapframe *frame) { struct thread *td; - struct syscall_args sa; register_t orig_tf_rflags; int error; ksiginfo_t ksi; @@ -184,7 +185,7 @@ ia32_syscall(struct trapframe *frame) td = curthread; td->td_frame = frame; - error = syscallenter(td, &sa); + error = syscallenter(td); /* * Traced syscall. @@ -198,7 +199,7 @@ ia32_syscall(struct trapframe *frame) trapsignal(td, &ksi); } - syscallret(td, error, &sa); + syscallret(td, error); } static void Modified: projects/pnfs-planb-server-stable11/sys/amd64/include/proc.h ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/include/proc.h Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/include/proc.h Wed Aug 2 19:53:43 2017 (r321940) @@ -70,6 +70,13 @@ struct mdproc { #define KINFO_PROC_SIZE 1088 #define KINFO_PROC32_SIZE 768 +struct syscall_args { + u_int code; + struct sysent *callp; + register_t args[8]; + int narg; +}; + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ @@ -92,13 +99,6 @@ int amd64_set_ldt_data(struct thread *td, int start, i extern struct mtx dt_lock; extern int max_ldt_segment; - -struct syscall_args { - u_int code; - struct sysent *callp; - register_t args[8]; - int narg; -}; #endif /* _KERNEL */ #endif /* !_MACHINE_PROC_H_ */ Modified: projects/pnfs-planb-server-stable11/sys/amd64/linux/linux_sysvec.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/linux/linux_sysvec.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/linux/linux_sysvec.c Wed Aug 2 19:53:43 2017 (r321940) @@ -126,7 +126,7 @@ static boolean_t linux_trans_osrel(const Elf_Note *not static void linux_vdso_install(void *param); static void linux_vdso_deinstall(void *param); static void linux_set_syscall_retval(struct thread *td, int error); -static int linux_fetch_syscall_args(struct thread *td, struct syscall_args *sa); +static int linux_fetch_syscall_args(struct thread *td); static void linux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack); static int linux_vsyscall(struct thread *td); @@ -217,13 +217,15 @@ translate_traps(int signal, int trap_code) } static int -linux_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +linux_fetch_syscall_args(struct thread *td) { struct proc *p; struct trapframe *frame; + struct syscall_args *sa; p = td->td_proc; frame = td->td_frame; + sa = &td->td_sa; sa->args[0] = frame->tf_rdi; sa->args[1] = frame->tf_rsi; Modified: projects/pnfs-planb-server-stable11/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/linux32/linux32_sysvec.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/linux32/linux32_sysvec.c Wed Aug 2 19:53:43 2017 (r321940) @@ -725,13 +725,15 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_ } static int -linux32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +linux32_fetch_syscall_args(struct thread *td) { struct proc *p; struct trapframe *frame; + struct syscall_args *sa; p = td->td_proc; frame = td->td_frame; + sa = &td->td_sa; sa->args[0] = frame->tf_rbx; sa->args[1] = frame->tf_rcx; Modified: projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vhpet.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vhpet.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vhpet.c Wed Aug 2 19:53:43 2017 (r321940) @@ -715,8 +715,10 @@ vhpet_init(struct vm *vm) vhpet->freq_sbt = bttosbt(bt); pincount = vioapic_pincount(vm); - if (pincount >= 24) - allowed_irqs = 0x00f00000; /* irqs 20, 21, 22 and 23 */ + if (pincount >= 32) + allowed_irqs = 0xff000000; /* irqs 24-31 */ + else if (pincount >= 20) + allowed_irqs = 0xf << (pincount - 4); /* 4 upper irqs */ else allowed_irqs = 0; Modified: projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vioapic.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vioapic.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/amd64/vmm/io/vioapic.c Wed Aug 2 19:53:43 2017 (r321940) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define IOREGSEL 0x00 #define IOWIN 0x10 -#define REDIR_ENTRIES 24 +#define REDIR_ENTRIES 32 #define RTBL_RO_BITS ((uint64_t)(IOART_REM_IRR | IOART_DELIVS)) struct vioapic { Modified: projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v4.S ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v4.S Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v4.S Wed Aug 2 19:53:43 2017 (r321940) @@ -355,7 +355,7 @@ svcstk: * Memory for the initial pagetable. We are unable to place this in * the bss as this will be cleared after the table is loaded. */ - .section ".init_pagetable" + .section ".init_pagetable", "aw", %nobits .align 14 /* 16KiB aligned */ pagetable: .space L1_TABLE_SIZE Modified: projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v6.S ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v6.S Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm/arm/locore-v6.S Wed Aug 2 19:53:43 2017 (r321940) @@ -429,7 +429,7 @@ svcstk: * Memory for the initial pagetable. We are unable to place this in * the bss as this will be cleared after the table is loaded. */ - .section ".init_pagetable" + .section ".init_pagetable", "aw", %nobits .align 14 /* 16KiB aligned */ .globl boot_pt1 boot_pt1: Modified: projects/pnfs-planb-server-stable11/sys/arm/arm/syscall.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm/arm/syscall.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm/arm/syscall.c Wed Aug 2 19:53:43 2017 (r321940) @@ -99,12 +99,14 @@ __FBSDID("$FreeBSD$"); void swi_handler(struct trapframe *); int -cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cpu_fetch_syscall_args(struct thread *td) { struct proc *p; register_t *ap; + struct syscall_args *sa; int error; + sa = &td->td_sa; sa->code = td->td_frame->tf_r7; ap = &td->td_frame->tf_r0; if (sa->code == SYS_syscall) { @@ -141,15 +143,14 @@ cpu_fetch_syscall_args(struct thread *td, struct sysca static void syscall(struct thread *td, struct trapframe *frame) { - struct syscall_args sa; int error; - sa.nap = 4; + td->td_sa.nap = 4; - error = syscallenter(td, &sa); + error = syscallenter(td); KASSERT(error != 0 || td->td_ar == NULL, ("returning from syscall with td_ar set!")); - syscallret(td, error, &sa); + syscallret(td, error); } void Modified: projects/pnfs-planb-server-stable11/sys/arm/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm/cloudabi32/cloudabi32_sysvec.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm/cloudabi32/cloudabi32_sysvec.c Wed Aug 2 19:53:43 2017 (r321940) @@ -67,10 +67,14 @@ cloudabi32_proc_setregs(struct thread *td, struct imag } static int -cloudabi32_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cloudabi32_fetch_syscall_args(struct thread *td) { - struct trapframe *frame = td->td_frame; + struct trapframe *frame; + struct syscall_args *sa; int error; + + frame = td->td_frame; + sa = &td->td_sa; /* Obtain system call number. */ sa->code = frame->tf_r12; Modified: projects/pnfs-planb-server-stable11/sys/arm/include/atomic.h ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm/include/atomic.h Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm/include/atomic.h Wed Aug 2 19:53:43 2017 (r321940) @@ -78,15 +78,22 @@ atomic_store_long(volatile u_long *dst, u_long src) } #define atomic_clear_ptr atomic_clear_32 +#define atomic_clear_acq_ptr atomic_clear_acq_32 +#define atomic_clear_rel_ptr atomic_clear_rel_32 #define atomic_set_ptr atomic_set_32 +#define atomic_set_acq_ptr atomic_set_acq_32 +#define atomic_set_rel_ptr atomic_set_rel_32 #define atomic_fcmpset_ptr atomic_fcmpset_32 #define atomic_fcmpset_rel_ptr atomic_fcmpset_rel_32 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_32 #define atomic_cmpset_ptr atomic_cmpset_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_32 +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 +#define atomic_load_acq_ptr atomic_load_acq_32 #define atomic_store_ptr atomic_store_32 #define atomic_store_rel_ptr atomic_store_rel_32 +#define atomic_swap_ptr atomic_swap_32 +#define atomic_readandclear_ptr atomic_readandclear_32 #define atomic_add_int atomic_add_32 #define atomic_add_acq_int atomic_add_acq_32 Modified: projects/pnfs-planb-server-stable11/sys/arm64/arm64/trap.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm64/arm64/trap.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm64/arm64/trap.c Wed Aug 2 19:53:43 2017 (r321940) @@ -92,15 +92,17 @@ call_trapsignal(struct thread *td, int sig, int code, } int -cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cpu_fetch_syscall_args(struct thread *td) { struct proc *p; register_t *ap; + struct syscall_args *sa; int nap; nap = 8; p = td->td_proc; ap = td->td_frame->tf_x; + sa = &td->td_sa; sa->code = td->td_frame->tf_x[8]; @@ -132,12 +134,11 @@ cpu_fetch_syscall_args(struct thread *td, struct sysca static void svc_handler(struct thread *td, struct trapframe *frame) { - struct syscall_args sa; int error; if ((frame->tf_esr & ESR_ELx_ISS_MASK) == 0) { - error = syscallenter(td, &sa); - syscallret(td, error, &sa); + error = syscallenter(td); + syscallret(td, error); } else { call_trapsignal(td, SIGILL, ILL_ILLOPN, (void *)frame->tf_elr); userret(td, frame); Modified: projects/pnfs-planb-server-stable11/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 19:53:43 2017 (r321940) @@ -67,10 +67,14 @@ cloudabi64_proc_setregs(struct thread *td, struct imag } static int -cloudabi64_fetch_syscall_args(struct thread *td, struct syscall_args *sa) +cloudabi64_fetch_syscall_args(struct thread *td) { - struct trapframe *frame = td->td_frame; + struct trapframe *frame; + struct syscall_args *sa; int i; + + frame = td->td_frame; + sa = &td->td_sa; /* Obtain system call number. */ sa->code = frame->tf_x[8]; Modified: projects/pnfs-planb-server-stable11/sys/arm64/include/proc.h ============================================================================== --- projects/pnfs-planb-server-stable11/sys/arm64/include/proc.h Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/arm64/include/proc.h Wed Aug 2 19:53:43 2017 (r321940) @@ -45,8 +45,6 @@ struct mdproc { #define KINFO_PROC_SIZE 1088 -#ifdef _KERNEL - #define MAXARGS 8 struct syscall_args { u_int code; @@ -54,7 +52,5 @@ struct syscall_args { register_t args[MAXARGS]; int narg; }; - -#endif #endif /* !_MACHINE_PROC_H_ */ Modified: projects/pnfs-planb-server-stable11/sys/boot/common/Makefile.inc ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/common/Makefile.inc Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/common/Makefile.inc Wed Aug 2 19:53:43 2017 (r321940) @@ -39,6 +39,9 @@ CFLAGS+= -DLOADER_GPT_SUPPORT CFLAGS+= -DLOADER_MBR_SUPPORT .endif .endif +.if !defined(LOADER_NO_GELI_SUPPORT) +CFLAGS+= -DLOADER_GELI_SUPPORT +.endif .if defined(HAVE_BCACHE) SRCS+= bcache.c Modified: projects/pnfs-planb-server-stable11/sys/boot/common/module.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/common/module.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/common/module.c Wed Aug 2 19:53:43 2017 (r321940) @@ -180,6 +180,7 @@ command_load(int argc, char *argv[]) return (error == 0 ? CMD_OK : CMD_CRIT); } +#ifdef LOADER_GELI_SUPPORT COMMAND_SET(load_geli, "load_geli", "load a geli key", command_load_geli); static int @@ -217,6 +218,7 @@ command_load_geli(int argc, char *argv[]) sprintf(typestr, "%s:geli_keyfile%d", argv[1], num); return (file_loadraw(argv[2], typestr, 1) ? CMD_OK : CMD_ERROR); } +#endif void unload(void) Modified: projects/pnfs-planb-server-stable11/sys/boot/common/part.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/common/part.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/common/part.c Wed Aug 2 19:53:43 2017 (r321940) @@ -664,8 +664,9 @@ ptable_open(void *dev, off_t sectors, uint16_t sectors if (dp[1].dp_typ != DOSPTYP_HFS) { table->type = PTABLE_NONE; DEBUG("Incorrect PMBR, ignore it"); - } else + } else { DEBUG("Bootcamp detected"); + } } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { Modified: projects/pnfs-planb-server-stable11/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/efi/boot1/zfs_module.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/efi/boot1/zfs_module.c Wed Aug 2 19:53:43 2017 (r321940) @@ -173,8 +173,8 @@ load(const char *filepath, dev_info_t *devinfo, void * if ((status = bs->AllocatePool(EfiLoaderData, (UINTN)st.st_size, &buf)) != EFI_SUCCESS) { - printf("Failed to allocate load buffer %zd for pool '%s' for '%s' " - "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); + printf("Failed to allocate load buffer %jd for pool '%s' for '%s' " + "(%lu)\n", (intmax_t)st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); return (EFI_INVALID_PARAMETER); } Modified: projects/pnfs-planb-server-stable11/sys/boot/zfs/libzfs.h ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/zfs/libzfs.h Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/zfs/libzfs.h Wed Aug 2 19:53:43 2017 (r321940) @@ -65,7 +65,7 @@ int zfs_probe_dev(const char *devname, uint64_t *pool_ int zfs_list(const char *name); void init_zfs_bootenv(char *currdev); int zfs_bootenv(const char *name); -int zfs_belist_add(const char *name); +int zfs_belist_add(const char *name, uint64_t __unused); int zfs_set_env(void); extern struct devsw zfs_dev; Modified: projects/pnfs-planb-server-stable11/sys/boot/zfs/zfs.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/zfs/zfs.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/zfs/zfs.c Wed Aug 2 19:53:43 2017 (r321940) @@ -801,7 +801,7 @@ zfs_bootenv(const char *name) } int -zfs_belist_add(const char *name) +zfs_belist_add(const char *name, uint64_t value __unused) { /* Skip special datasets that start with a $ character */ Modified: projects/pnfs-planb-server-stable11/sys/boot/zfs/zfsimpl.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/boot/zfs/zfsimpl.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/boot/zfs/zfsimpl.c Wed Aug 2 19:53:43 2017 (r321940) @@ -1472,12 +1472,12 @@ zap_lookup(const spa_t *spa, const dnode_phys_t *dnode * the directory contents. */ static int -mzap_list(const dnode_phys_t *dnode, int (*callback)(const char *)) +mzap_list(const dnode_phys_t *dnode, int (*callback)(const char *, uint64_t)) { const mzap_phys_t *mz; const mzap_ent_phys_t *mze; size_t size; - int chunks, i; + int chunks, i, rc; /* * Microzap objects use exactly one block. Read the whole @@ -1489,9 +1489,11 @@ mzap_list(const dnode_phys_t *dnode, int (*callback)(c for (i = 0; i < chunks; i++) { mze = &mz->mz_chunk[i]; - if (mze->mze_name[0]) - //printf("%-32s 0x%jx\n", mze->mze_name, (uintmax_t)mze->mze_value); - callback(mze->mze_name); + if (mze->mze_name[0]) { + rc = callback(mze->mze_name, mze->mze_value); + if (rc != 0) + return (rc); + } } return (0); @@ -1502,12 +1504,12 @@ mzap_list(const dnode_phys_t *dnode, int (*callback)(c * the directory header. */ static int -fzap_list(const spa_t *spa, const dnode_phys_t *dnode, int (*callback)(const char *)) +fzap_list(const spa_t *spa, const dnode_phys_t *dnode, int (*callback)(const char *, uint64_t)) { int bsize = dnode->dn_datablkszsec << SPA_MINBLOCKSHIFT; zap_phys_t zh = *(zap_phys_t *) zap_scratch; fat_zap_t z; - int i, j; + int i, j, rc; if (zh.zap_magic != ZAP_MAGIC) return (EIO); @@ -1565,14 +1567,16 @@ fzap_list(const spa_t *spa, const dnode_phys_t *dnode, value = fzap_leaf_value(&zl, zc); //printf("%s 0x%jx\n", name, (uintmax_t)value); - callback((const char *)name); + rc = callback((const char *)name, value); + if (rc != 0) + return (rc); } } return (0); } -static int zfs_printf(const char *name) +static int zfs_printf(const char *name, uint64_t value __unused) { printf("%s\n", name); @@ -1867,7 +1871,7 @@ zfs_list_dataset(const spa_t *spa, uint64_t objnum/*, } int -zfs_callback_dataset(const spa_t *spa, uint64_t objnum, int (*callback)(const char *name)) +zfs_callback_dataset(const spa_t *spa, uint64_t objnum, int (*callback)(const char *, uint64_t)) { uint64_t dir_obj, child_dir_zapobj, zap_type; dnode_phys_t child_dir_zap, dir, dataset; @@ -2007,9 +2011,72 @@ zfs_mount(const spa_t *spa, uint64_t rootobj, struct z return (0); } +/* + * callback function for feature name checks. + */ static int +check_feature(const char *name, uint64_t value) +{ + int i; + + if (value == 0) + return (0); + if (name[0] == '\0') + return (0); + + for (i = 0; features_for_read[i] != NULL; i++) { + if (strcmp(name, features_for_read[i]) == 0) + return (0); + } + printf("ZFS: unsupported feature: %s\n", name); + return (EIO); +} + +/* + * Checks whether the MOS features that are active are supported. + */ +static int +check_mos_features(const spa_t *spa) +{ + dnode_phys_t dir; + uint64_t objnum, zap_type; + size_t size; + int rc; + + if ((rc = objset_get_dnode(spa, &spa->spa_mos, DMU_OT_OBJECT_DIRECTORY, + &dir)) != 0) + return (rc); + if ((rc = zap_lookup(spa, &dir, DMU_POOL_FEATURES_FOR_READ, &objnum)) != 0) { + /* + * It is older pool without features. As we have already + * tested the label, just return without raising the error. + */ + return (0); + } + + if ((rc = objset_get_dnode(spa, &spa->spa_mos, objnum, &dir)) != 0) + return (rc); + + if (dir.dn_type != DMU_OTN_ZAP_METADATA) + return (EIO); + + size = dir.dn_datablkszsec * 512; + if (dnode_read(spa, &dir, 0, zap_scratch, size)) + return (EIO); + + zap_type = *(uint64_t *) zap_scratch; + if (zap_type == ZBT_MICRO) + rc = mzap_list(&dir, check_feature); + else + rc = fzap_list(spa, &dir, check_feature); + + return (rc); +} + +static int zfs_spa_init(spa_t *spa) { + int rc; if (zio_read(spa, &spa->spa_uberblock.ub_rootbp, &spa->spa_mos)) { printf("ZFS: can't read MOS of pool %s\n", spa->spa_name); @@ -2019,7 +2086,13 @@ zfs_spa_init(spa_t *spa) printf("ZFS: corrupted MOS of pool %s\n", spa->spa_name); return (EIO); } - return (0); + + rc = check_mos_features(spa); + if (rc != 0) { + printf("ZFS: pool %s is not supported\n", spa->spa_name); + } + + return (rc); } static int @@ -2074,6 +2147,61 @@ zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, str return (0); } +static int +zfs_dnode_readlink(const spa_t *spa, dnode_phys_t *dn, char *path, size_t psize) +{ + int rc = 0; + + if (dn->dn_bonustype == DMU_OT_SA) { + sa_hdr_phys_t *sahdrp = NULL; + size_t size = 0; + void *buf = NULL; + int hdrsize; + char *p; + + if (dn->dn_bonuslen != 0) + sahdrp = (sa_hdr_phys_t *)DN_BONUS(dn); + else { + blkptr_t *bp; + + if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0) + return (EIO); + bp = &dn->dn_spill; + + size = BP_GET_LSIZE(bp); + buf = zfs_alloc(size); + rc = zio_read(spa, bp, buf); + if (rc != 0) { + zfs_free(buf, size); + return (rc); + } + sahdrp = buf; + } + hdrsize = SA_HDR_SIZE(sahdrp); + p = (char *)((uintptr_t)sahdrp + hdrsize + SA_SYMLINK_OFFSET); + memcpy(path, p, psize); + if (buf != NULL) + zfs_free(buf, size); + return (0); + } + /* + * Second test is purely to silence bogus compiler + * warning about accessing past the end of dn_bonus. + */ + if (psize + sizeof(znode_phys_t) <= dn->dn_bonuslen && + sizeof(znode_phys_t) <= sizeof(dn->dn_bonus)) { + memcpy(path, &dn->dn_bonus[sizeof(znode_phys_t)], psize); + } else { + rc = dnode_read(spa, dn, 0, path, psize); + } + return (rc); +} + +struct obj_list { + uint64_t objnum; + STAILQ_ENTRY(obj_list) entry; +}; + /* * Lookup a file and return its dnode. */ @@ -2081,7 +2209,7 @@ static int zfs_lookup(const struct zfsmount *mount, const char *upath, dnode_phys_t *dnode) { int rc; - uint64_t objnum, rootnum, parentnum; + uint64_t objnum; const spa_t *spa; dnode_phys_t dn; const char *p, *q; @@ -2089,6 +2217,8 @@ zfs_lookup(const struct zfsmount *mount, const char *u char path[1024]; int symlinks_followed = 0; struct stat sb; + struct obj_list *entry, *tentry; + STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache); spa = mount->spa; if (mount->objset.os_type != DMU_OST_ZFS) { @@ -2097,102 +2227,145 @@ zfs_lookup(const struct zfsmount *mount, const char *u return (EIO); } + if ((entry = malloc(sizeof(struct obj_list))) == NULL) + return (ENOMEM); + /* * Get the root directory dnode. */ rc = objset_get_dnode(spa, &mount->objset, MASTER_NODE_OBJ, &dn); - if (rc) + if (rc) { + free(entry); return (rc); + } - rc = zap_lookup(spa, &dn, ZFS_ROOT_OBJ, &rootnum); - if (rc) + rc = zap_lookup(spa, &dn, ZFS_ROOT_OBJ, &objnum); + if (rc) { + free(entry); return (rc); + } + entry->objnum = objnum; + STAILQ_INSERT_HEAD(&on_cache, entry, entry); - rc = objset_get_dnode(spa, &mount->objset, rootnum, &dn); - if (rc) - return (rc); + rc = objset_get_dnode(spa, &mount->objset, objnum, &dn); + if (rc != 0) + goto done; - objnum = rootnum; p = upath; while (p && *p) { + rc = objset_get_dnode(spa, &mount->objset, objnum, &dn); + if (rc != 0) + goto done; + while (*p == '/') p++; - if (!*p) + if (*p == '\0') break; - q = strchr(p, '/'); - if (q) { - memcpy(element, p, q - p); - element[q - p] = 0; - p = q; - } else { - strcpy(element, p); - p = NULL; + q = p; + while (*q != '\0' && *q != '/') + q++; + + /* skip dot */ + if (p + 1 == q && p[0] == '.') { + p++; + continue; } + /* double dot */ + if (p + 2 == q && p[0] == '.' && p[1] == '.') { + p += 2; + if (STAILQ_FIRST(&on_cache) == + STAILQ_LAST(&on_cache, obj_list, entry)) { + rc = ENOENT; + goto done; + } + entry = STAILQ_FIRST(&on_cache); + STAILQ_REMOVE_HEAD(&on_cache, entry); + free(entry); + objnum = (STAILQ_FIRST(&on_cache))->objnum; + continue; + } + if (q - p + 1 > sizeof(element)) { + rc = ENAMETOOLONG; + goto done; + } + memcpy(element, p, q - p); + element[q - p] = 0; + p = q; - rc = zfs_dnode_stat(spa, &dn, &sb); - if (rc) - return (rc); - if (!S_ISDIR(sb.st_mode)) - return (ENOTDIR); + if ((rc = zfs_dnode_stat(spa, &dn, &sb)) != 0) + goto done; + if (!S_ISDIR(sb.st_mode)) { + rc = ENOTDIR; + goto done; + } - parentnum = objnum; rc = zap_lookup(spa, &dn, element, &objnum); if (rc) - return (rc); + goto done; objnum = ZFS_DIRENT_OBJ(objnum); + if ((entry = malloc(sizeof(struct obj_list))) == NULL) { + rc = ENOMEM; + goto done; + } + entry->objnum = objnum; + STAILQ_INSERT_HEAD(&on_cache, entry, entry); rc = objset_get_dnode(spa, &mount->objset, objnum, &dn); if (rc) - return (rc); + goto done; /* * Check for symlink. */ rc = zfs_dnode_stat(spa, &dn, &sb); if (rc) - return (rc); + goto done; if (S_ISLNK(sb.st_mode)) { - if (symlinks_followed > 10) - return (EMLINK); + if (symlinks_followed > 10) { + rc = EMLINK; + goto done; + } symlinks_followed++; /* * Read the link value and copy the tail of our * current path onto the end. */ - if (p) - strcpy(&path[sb.st_size], p); - else - path[sb.st_size] = 0; - /* - * Second test is purely to silence bogus compiler - * warning about accessing past the end of dn_bonus. - */ - if (sb.st_size + sizeof(znode_phys_t) <= - dn.dn_bonuslen && sizeof(znode_phys_t) <= - sizeof(dn.dn_bonus)) { - memcpy(path, &dn.dn_bonus[sizeof(znode_phys_t)], - sb.st_size); - } else { - rc = dnode_read(spa, &dn, 0, path, sb.st_size); - if (rc) - return (rc); + if (sb.st_size + strlen(p) + 1 > sizeof(path)) { + rc = ENAMETOOLONG; + goto done; } + strcpy(&path[sb.st_size], p); + rc = zfs_dnode_readlink(spa, &dn, path, sb.st_size); + if (rc != 0) + goto done; + /* * Restart with the new path, starting either at * the root or at the parent depending whether or * not the link is relative. */ p = path; - if (*p == '/') - objnum = rootnum; - else - objnum = parentnum; - objset_get_dnode(spa, &mount->objset, objnum, &dn); + if (*p == '/') { + while (STAILQ_FIRST(&on_cache) != + STAILQ_LAST(&on_cache, obj_list, entry)) { + entry = STAILQ_FIRST(&on_cache); + STAILQ_REMOVE_HEAD(&on_cache, entry); + free(entry); + } + } else { + entry = STAILQ_FIRST(&on_cache); + STAILQ_REMOVE_HEAD(&on_cache, entry); + free(entry); + } + objnum = (STAILQ_FIRST(&on_cache))->objnum; } } *dnode = dn; - return (0); +done: + STAILQ_FOREACH_SAFE(entry, &on_cache, entry, tentry) + free(entry); + return (rc); } Modified: projects/pnfs-planb-server-stable11/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/cam/ctl/ctl_backend_ramdisk.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/cam/ctl/ctl_backend_ramdisk.c Wed Aug 2 19:53:43 2017 (r321940) @@ -525,6 +525,11 @@ nospc: io->scsiio.kern_sg_entries = sgs; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; PRIV(io)->len += lbas; + if ((ARGS(io)->flags & CTL_LLF_READ) && + ARGS(io)->len <= PRIV(io)->len) { + ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbinuptime(&io->io_hdr.dma_start_bt); #endif Modified: projects/pnfs-planb-server-stable11/sys/cam/ctl/scsi_ctl.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/cam/ctl/scsi_ctl.c Wed Aug 2 19:45:09 2017 (r321939) +++ projects/pnfs-planb-server-stable11/sys/cam/ctl/scsi_ctl.c Wed Aug 2 19:53:43 2017 (r321940) @@ -529,7 +529,7 @@ ctlferegister(struct cam_periph *periph, void *arg) new_ccb->ccb_h.io_ptr = new_io; LIST_INSERT_HEAD(&softc->atio_list, &new_ccb->ccb_h, periph_links.le); - xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); new_ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; new_ccb->ccb_h.cbfcnp = ctlfedone; new_ccb->ccb_h.flags |= CAM_UNLOCKED; @@ -576,7 +576,7 @@ ctlferegister(struct cam_periph *periph, void *arg) new_ccb->ccb_h.io_ptr = new_io; LIST_INSERT_HEAD(&softc->inot_list, &new_ccb->ccb_h, periph_links.le); - xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); new_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; new_ccb->ccb_h.cbfcnp = ctlfedone; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708021953.v72JriIE006717>