Date: Wed, 1 Jan 2014 21:25:14 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r260168 - in projects/altix2: . bin/ps bin/sh cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opensolaris/cmd/zpool cdd... Message-ID: <201401012125.s01LPENv040670@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Wed Jan 1 21:25:13 2014 New Revision: 260168 URL: http://svnweb.freebsd.org/changeset/base/260168 Log: Merge ^/head@260167. Added: projects/altix2/contrib/gcc/ChangeLog.apple - copied unchanged from r260166, head/contrib/gcc/ChangeLog.apple projects/altix2/contrib/gcc/cp/ChangeLog.apple - copied unchanged from r260166, head/contrib/gcc/cp/ChangeLog.apple projects/altix2/lib/libc/sys/aio_fsync.2 - copied unchanged from r260166, head/lib/libc/sys/aio_fsync.2 projects/altix2/lib/msun/ld128/k_expl.h - copied unchanged from r260166, head/lib/msun/ld128/k_expl.h projects/altix2/lib/msun/ld80/k_expl.h - copied unchanged from r260166, head/lib/msun/ld80/k_expl.h projects/altix2/lib/msun/src/e_coshl.c - copied unchanged from r260166, head/lib/msun/src/e_coshl.c projects/altix2/lib/msun/src/e_sinhl.c - copied unchanged from r260166, head/lib/msun/src/e_sinhl.c projects/altix2/lib/msun/src/s_tanhl.c - copied unchanged from r260166, head/lib/msun/src/s_tanhl.c projects/altix2/sbin/fsck_ffs/globs.c - copied unchanged from r260166, head/sbin/fsck_ffs/globs.c Modified: projects/altix2/COPYRIGHT projects/altix2/bin/ps/ps.1 projects/altix2/bin/sh/input.c projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.8 projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.c projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c projects/altix2/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c projects/altix2/cddl/contrib/opensolaris/cmd/zhack/zhack.c projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool.8 projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c projects/altix2/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c projects/altix2/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c projects/altix2/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h projects/altix2/contrib/binutils/gas/config/tc-ia64.c projects/altix2/contrib/binutils/opcodes/ia64-asmtab.c projects/altix2/contrib/gcc/ChangeLog.gcc43 projects/altix2/contrib/gcc/c-common.c projects/altix2/contrib/gcc/c-decl.c projects/altix2/contrib/gcc/c-opts.c projects/altix2/contrib/gcc/c-parser.c projects/altix2/contrib/gcc/c-tree.h projects/altix2/contrib/gcc/c-typeck.c projects/altix2/contrib/gcc/c.opt projects/altix2/contrib/gcc/cp/ChangeLog projects/altix2/contrib/gcc/cp/cp-gimplify.c projects/altix2/contrib/gcc/cp/cp-tree.def projects/altix2/contrib/gcc/cp/cp-tree.h projects/altix2/contrib/gcc/cp/decl.c projects/altix2/contrib/gcc/cp/dump.c projects/altix2/contrib/gcc/cp/g++spec.c projects/altix2/contrib/gcc/cp/init.c projects/altix2/contrib/gcc/cp/parser.c projects/altix2/contrib/gcc/cp/pt.c projects/altix2/contrib/gcc/cp/semantics.c projects/altix2/contrib/gcc/doc/extend.texi projects/altix2/contrib/gcc/doc/invoke.texi projects/altix2/contrib/gcc/dwarf2out.c projects/altix2/contrib/gcc/emit-rtl.c projects/altix2/contrib/gcc/final.c projects/altix2/contrib/gcc/libgcc2.c projects/altix2/contrib/gcc/libgcc2.h projects/altix2/contrib/gcc/loop-init.c projects/altix2/contrib/gcc/print-rtl.c projects/altix2/contrib/gcc/print-tree.c projects/altix2/contrib/gcc/reload1.c projects/altix2/contrib/gcc/rtl.def projects/altix2/contrib/gcc/rtl.h projects/altix2/contrib/gcc/stmt.c projects/altix2/contrib/gcc/toplev.c projects/altix2/contrib/gcc/toplev.h projects/altix2/contrib/gcc/tree-cfg.c projects/altix2/contrib/gcc/tree-ssa-address.c projects/altix2/contrib/gcc/tree.h projects/altix2/contrib/libc++/include/type_traits projects/altix2/etc/devd/usb.conf projects/altix2/etc/ntp.conf projects/altix2/gnu/usr.bin/gdb/kgdb/Makefile projects/altix2/gnu/usr.bin/gdb/kgdb/main.c projects/altix2/lib/libc/sys/Makefile.inc projects/altix2/lib/libc/sys/aio_mlock.2 projects/altix2/lib/libiconv_modules/BIG5/citrus_big5.c projects/altix2/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c projects/altix2/lib/libiconv_modules/EUC/citrus_euc.c projects/altix2/lib/libiconv_modules/EUCTW/citrus_euctw.c projects/altix2/lib/libiconv_modules/GBK2K/citrus_gbk2k.c projects/altix2/lib/libiconv_modules/HZ/citrus_hz.c projects/altix2/lib/libiconv_modules/ISO2022/citrus_iso2022.c projects/altix2/lib/libiconv_modules/JOHAB/citrus_johab.c projects/altix2/lib/libiconv_modules/MSKanji/citrus_mskanji.c projects/altix2/lib/libiconv_modules/UES/citrus_ues.c projects/altix2/lib/libiconv_modules/UTF7/citrus_utf7.c projects/altix2/lib/libiconv_modules/UTF8/citrus_utf8.c projects/altix2/lib/libiconv_modules/VIQR/citrus_viqr.c projects/altix2/lib/libiconv_modules/ZW/citrus_zw.c projects/altix2/lib/libkvm/kvm.c projects/altix2/lib/libkvm/kvm_ia64.c projects/altix2/lib/libprocstat/zfs/Makefile projects/altix2/lib/libstand/Makefile projects/altix2/lib/msun/Makefile projects/altix2/lib/msun/Symbol.map projects/altix2/lib/msun/ld128/s_expl.c projects/altix2/lib/msun/ld80/s_expl.c projects/altix2/lib/msun/man/cosh.3 projects/altix2/lib/msun/man/sinh.3 projects/altix2/lib/msun/man/tanh.3 projects/altix2/lib/msun/src/e_cosh.c projects/altix2/lib/msun/src/e_sinh.c projects/altix2/lib/msun/src/imprecise.c projects/altix2/lib/msun/src/math.h projects/altix2/lib/msun/src/s_tanh.c projects/altix2/release/release.sh projects/altix2/sbin/camcontrol/camcontrol.8 projects/altix2/sbin/camcontrol/camcontrol.c projects/altix2/sbin/fsck_ffs/Makefile projects/altix2/sbin/fsck_ffs/dir.c projects/altix2/sbin/fsck_ffs/fsck.h projects/altix2/sbin/fsck_ffs/fsck_ffs.8 projects/altix2/sbin/fsck_ffs/fsutil.c projects/altix2/sbin/fsck_ffs/main.c projects/altix2/sbin/fsck_ffs/pass1.c projects/altix2/sbin/fsck_ffs/pass1b.c projects/altix2/sbin/fsck_ffs/suj.c projects/altix2/sbin/fsck_ffs/utilities.c projects/altix2/sbin/fsdb/Makefile projects/altix2/sbin/geom/class/mirror/geom_mirror.c projects/altix2/sbin/geom/class/mirror/gmirror.8 projects/altix2/sbin/pfctl/Makefile projects/altix2/sbin/pfctl/pfctl_altq.c projects/altix2/sbin/pfctl/pfctl_parser.c projects/altix2/sbin/pfctl/pfctl_parser.h projects/altix2/share/man/man4/run.4 projects/altix2/sys/Makefile projects/altix2/sys/amd64/amd64/pmap.c projects/altix2/sys/amd64/include/vmm.h (contents, props changed) projects/altix2/sys/amd64/vmm/intel/vmx.c projects/altix2/sys/amd64/vmm/intel/vmx.h projects/altix2/sys/amd64/vmm/intel/vmx_genassym.c projects/altix2/sys/amd64/vmm/intel/vmx_support.S projects/altix2/sys/amd64/vmm/io/vlapic.c projects/altix2/sys/amd64/vmm/io/vlapic.h projects/altix2/sys/amd64/vmm/io/vlapic_priv.h projects/altix2/sys/arm/arm/gic.c projects/altix2/sys/arm/arm/intr.c projects/altix2/sys/arm/arm/nexus.c projects/altix2/sys/arm/arm/pmap-v6.c projects/altix2/sys/arm/at91/at91.c projects/altix2/sys/arm/include/intr.h projects/altix2/sys/arm/versatile/sp804.c projects/altix2/sys/boot/ficl/Makefile projects/altix2/sys/boot/i386/Makefile.inc projects/altix2/sys/boot/i386/boot2/Makefile projects/altix2/sys/boot/i386/gptboot/Makefile projects/altix2/sys/boot/i386/gptzfsboot/Makefile projects/altix2/sys/boot/i386/zfsboot/Makefile projects/altix2/sys/boot/pc98/Makefile.inc projects/altix2/sys/boot/pc98/boot2/Makefile projects/altix2/sys/boot/usb/Makefile projects/altix2/sys/boot/usb/Makefile.test projects/altix2/sys/boot/userboot/ficl/Makefile projects/altix2/sys/boot/userboot/libstand/Makefile projects/altix2/sys/boot/zfs/Makefile projects/altix2/sys/boot/zfs/zfsimpl.c projects/altix2/sys/cddl/boot/zfs/zfsimpl.h projects/altix2/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c projects/altix2/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_disk.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfeature.h projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/altix2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c projects/altix2/sys/cddl/dev/dtrace/dtrace_load.c projects/altix2/sys/conf/files projects/altix2/sys/conf/kern.pre.mk projects/altix2/sys/conf/options.arm projects/altix2/sys/dev/aac/aac.c projects/altix2/sys/dev/ahci/ahci.c projects/altix2/sys/dev/bge/if_bge.c projects/altix2/sys/dev/bxe/bxe.c projects/altix2/sys/dev/bxe/ecore_sp.c projects/altix2/sys/dev/ed/if_ed.c projects/altix2/sys/dev/ed/if_ed_3c503.c projects/altix2/sys/dev/ed/if_ed_pccard.c projects/altix2/sys/dev/ed/if_ed_rtl80x9.c projects/altix2/sys/dev/ed/if_edreg.h projects/altix2/sys/dev/ed/if_edvar.h projects/altix2/sys/dev/ed/tc5299jreg.h projects/altix2/sys/dev/en/midway.c projects/altix2/sys/dev/fb/boot_font.c projects/altix2/sys/dev/fb/gallant12x22.c projects/altix2/sys/dev/ipw/if_ipw.c projects/altix2/sys/dev/ipw/if_ipwvar.h projects/altix2/sys/dev/iscsi/icl.c projects/altix2/sys/dev/iwi/if_iwi.c projects/altix2/sys/dev/iwi/if_iwivar.h projects/altix2/sys/dev/iwn/if_iwn.c projects/altix2/sys/dev/iwn/if_iwn_chip_cfg.h projects/altix2/sys/dev/iwn/if_iwnvar.h projects/altix2/sys/dev/mcd/mcd.c projects/altix2/sys/dev/mpt/mpt.h projects/altix2/sys/dev/mpt/mpt_cam.c projects/altix2/sys/dev/mpt/mpt_pci.c projects/altix2/sys/dev/mpt/mpt_raid.c projects/altix2/sys/dev/my/if_my.c projects/altix2/sys/dev/nand/nand_id.c projects/altix2/sys/dev/oce/oce_if.c projects/altix2/sys/dev/ral/if_ral_pci.c projects/altix2/sys/dev/scc/scc_dev_z8530.c projects/altix2/sys/dev/sk/if_sk.c projects/altix2/sys/dev/sound/pci/maestro.c projects/altix2/sys/dev/tpm/tpm.c projects/altix2/sys/dev/usb/usbdevs projects/altix2/sys/dev/usb/wlan/if_run.c projects/altix2/sys/dev/usb/wlan/if_urtw.c projects/altix2/sys/dev/vt/vt_core.c projects/altix2/sys/dev/vt/vt_font.c projects/altix2/sys/dev/vxge/vxgehal/vxgehal-ring.c projects/altix2/sys/dev/wpi/if_wpi.c projects/altix2/sys/dev/wpi/if_wpivar.h projects/altix2/sys/geom/mirror/g_mirror.c projects/altix2/sys/geom/mirror/g_mirror.h projects/altix2/sys/geom/mirror/g_mirror_ctl.c projects/altix2/sys/geom/part/g_part.c projects/altix2/sys/geom/part/g_part.h projects/altix2/sys/geom/part/g_part_gpt.c projects/altix2/sys/ia64/ia64/dump_machdep.c projects/altix2/sys/kern/kern_cons.c projects/altix2/sys/kern/sched_4bsd.c projects/altix2/sys/kern/vfs_bio.c projects/altix2/sys/kern/vfs_cache.c projects/altix2/sys/modules/ath/Makefile projects/altix2/sys/modules/drm2/i915kms/Makefile projects/altix2/sys/modules/drm2/radeonkms/Makefile projects/altix2/sys/modules/ibcore/Makefile projects/altix2/sys/modules/ipfilter/Makefile projects/altix2/sys/modules/ipoib/Makefile projects/altix2/sys/modules/mlx4/Makefile projects/altix2/sys/modules/mlx4ib/Makefile projects/altix2/sys/modules/mlxen/Makefile projects/altix2/sys/modules/mthca/Makefile projects/altix2/sys/modules/wlan/Makefile projects/altix2/sys/net/ieee8023ad_lacp.c projects/altix2/sys/net/if_lagg.c projects/altix2/sys/net/if_lagg.h projects/altix2/sys/netgraph/netflow/netflow.c projects/altix2/sys/netgraph/netflow/netflow_v9.c projects/altix2/sys/netgraph/netflow/ng_netflow.c projects/altix2/sys/netgraph/ng_base.c projects/altix2/sys/netinet/in.c projects/altix2/sys/netinet/sctp_usrreq.c projects/altix2/sys/netinet/sctputil.c projects/altix2/sys/netinet6/nd6.c projects/altix2/sys/nfs/nfs_fha.c projects/altix2/sys/nfs/nfs_fha.h projects/altix2/sys/ofed/drivers/infiniband/hw/mlx4/Makefile projects/altix2/sys/ofed/drivers/net/mlx4/Makefile projects/altix2/sys/powerpc/powerpc/bus_machdep.c projects/altix2/sys/rpc/svc.c projects/altix2/sys/rpc/svc.h projects/altix2/sys/rpc/svc_dg.c projects/altix2/sys/rpc/svc_vc.c projects/altix2/sys/sys/copyright.h projects/altix2/sys/sys/gpt.h projects/altix2/sys/sys/param.h projects/altix2/sys/sys/pctrie.h projects/altix2/sys/ufs/ffs/ffs_alloc.c projects/altix2/sys/ufs/ufs/ufs_quota.c projects/altix2/sys/vm/vm_map.c projects/altix2/sys/vm/vm_page.c projects/altix2/sys/vm/vm_page.h projects/altix2/sys/vm/vm_phys.c projects/altix2/sys/vm/vm_reserv.c projects/altix2/tools/test/dtrace/Makefile projects/altix2/usr.bin/iscsictl/iscsictl.8 projects/altix2/usr.bin/netstat/if.c projects/altix2/usr.bin/netstat/route.c projects/altix2/usr.bin/rpcgen/rpc_main.c projects/altix2/usr.sbin/bhyve/acpi.c projects/altix2/usr.sbin/bhyve/acpi.h projects/altix2/usr.sbin/bhyve/bhyverun.c projects/altix2/usr.sbin/bhyve/mevent.c projects/altix2/usr.sbin/bhyve/mevent.h projects/altix2/usr.sbin/bhyve/mptbl.c projects/altix2/usr.sbin/bhyve/pm.c projects/altix2/usr.sbin/bhyve/pmtmr.c projects/altix2/usr.sbin/bhyvectl/bhyvectl.c projects/altix2/usr.sbin/bsnmpd/modules/snmp_hast/BEGEMOT-HAST-MIB.txt projects/altix2/usr.sbin/bsnmpd/modules/snmp_hast/hast_snmp.c projects/altix2/usr.sbin/bsnmpd/modules/snmp_hast/hast_tree.def projects/altix2/usr.sbin/makefs/cd9660/iso9660_rrip.c projects/altix2/usr.sbin/makefs/cd9660/iso9660_rrip.h Directory Properties: projects/altix2/ (props changed) projects/altix2/cddl/ (props changed) projects/altix2/cddl/contrib/opensolaris/ (props changed) projects/altix2/cddl/contrib/opensolaris/cmd/zfs/ (props changed) projects/altix2/contrib/binutils/ (props changed) projects/altix2/contrib/gcc/ (props changed) projects/altix2/contrib/libc++/ (props changed) projects/altix2/etc/ (props changed) projects/altix2/gnu/usr.bin/gdb/ (props changed) projects/altix2/lib/libc/ (props changed) projects/altix2/sbin/ (props changed) projects/altix2/share/man/man4/ (props changed) projects/altix2/sys/ (props changed) projects/altix2/sys/amd64/vmm/ (props changed) projects/altix2/sys/boot/ (props changed) projects/altix2/sys/cddl/contrib/opensolaris/ (props changed) projects/altix2/sys/conf/ (props changed) projects/altix2/usr.sbin/bhyve/ (props changed) projects/altix2/usr.sbin/bhyvectl/ (props changed) Modified: projects/altix2/COPYRIGHT ============================================================================== --- projects/altix2/COPYRIGHT Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/COPYRIGHT Wed Jan 1 21:25:13 2014 (r260168) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: projects/altix2/bin/ps/ps.1 ============================================================================== --- projects/altix2/bin/ps/ps.1 Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/bin/ps/ps.1 Wed Jan 1 21:25:13 2014 (r260168) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 15, 2013 +.Dd December 27, 2013 .Dt PS 1 .Os .Sh NAME @@ -416,8 +416,9 @@ The process has reduced CPU scheduling p .It Li s The process is a session leader. .It Li V -The process is suspended during a -.Xr vfork 2 . +The process' parent is suspended during a +.Xr vfork 2 , +waiting for the process to exec or exit. .It Li W The process is swapped out. .It Li X Modified: projects/altix2/bin/sh/input.c ============================================================================== --- projects/altix2/bin/sh/input.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/bin/sh/input.c Wed Jan 1 21:25:13 2014 (r260168) @@ -228,7 +228,6 @@ preadbuffer(void) { char *p, *q; int more; - int something; char savec; if (parsefile->strpush) { @@ -252,24 +251,18 @@ again: q = p = parsefile->buf + (parsenextc - parsefile->buf); /* delete nul characters */ - something = 0; for (more = 1; more;) { switch (*p) { case '\0': p++; /* Skip nul */ goto check; - case '\t': - case ' ': - break; - case '\n': parsenleft = q - parsenextc; more = 0; /* Stop processing here */ break; default: - something = 1; break; } @@ -288,7 +281,8 @@ check: *q = '\0'; #ifndef NO_HISTORY - if (parsefile->fd == 0 && hist && something) { + if (parsefile->fd == 0 && hist && + parsenextc[strspn(parsenextc, " \t\n")] != '\0') { HistEvent he; INTOFF; history(hist, &he, whichprompt == 1 ? H_ENTER : H_ADD, Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Wed Jan 1 21:25:13 2014 (r260168) @@ -14,11 +14,12 @@ .\" .\" Copyright 2012, Richard Lowe. .\" Copyright (c) 2012, Marcelo Araujo <araujo@FreeBSD.org>. +.\" Copyright (c) 2012 by Delphix. All rights reserved. .\" All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd May 10, 2012 +.Dd December 31, 2013 .Dt ZDB 8 .Os .Sh NAME @@ -29,27 +30,35 @@ .Op Fl CumdibcsDvhLXFPA .Op Fl e Op Fl p Ar path... .Op Fl t Ar txg +.Op Fl U Ar cache +.Op Fl M Ar inflight I/Os .Ar poolname .Op Ar object ... .Nm .Op Fl divPA .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache .Ar dataset .Op Ar object ... .Nm .Fl m Op Fl LXFPA .Op Fl t Ar txg .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache .Ar poolname .Nm .Fl R Op Fl A .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache +.Ar poolname .Ar poolname .Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags .Nm .Fl S .Op Fl AP .Op Fl e Op Fl p Ar path... +.Op Fl U Ar cache +.Ar poolname .Ar poolname .Nm .Fl l @@ -205,6 +214,11 @@ flag specifies the path under which devi .It Fl F Attempt to make an unreadable pool readable by trying progressively older transactions. +.It Fl M Ar inflight I/Os +Limit the number of outstanding checksum I/Os to the specified value. +The default value is 200. This option affects the performance of the +.Fl c +option. .It Fl P Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather than 1M. @@ -218,9 +232,7 @@ options for a means to see the available transaction numbers. .It Fl U Ar cachefile Use a cache file other than -.Pa /etc/zfs/zpool.cache . -This option is only valid with -.Fl C +.Pa /boot/zfs/zpool.cache . .It Fl v Enable verbosity. Specify multiple times for increased verbosity. Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Jan 1 21:25:13 2014 (r260168) @@ -89,6 +89,7 @@ extern void dump_intent_log(zilog_t *); uint64_t *zopt_object = NULL; int zopt_objects = 0; libzfs_handle_t *g_zfs; +uint64_t max_inflight = 200; /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -110,16 +111,17 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]]" - "poolname [object...]\n" - " %s [-divPA] [-e -p path...] dataset [object...]\n" - " %s -m [-LXFPA] [-t txg] [-e [-p path...]]" - "poolname [vdev [metaslab...]]\n" - " %s -R [-A] [-e [-p path...]] poolname " - "vdev:offset:size[:flags]\n" - " %s -S [-PA] [-e [-p path...]] poolname\n" - " %s -l [-uA] device\n" - " %s -C [-A] [-U config]\n\n", + "Usage: %s [-CumdibcsDvhLXFPA] [-t txg] [-e [-p path...]] " + "[-U config] [-M inflight I/Os] poolname [object...]\n" + " %s [-divPA] [-e -p path...] [-U config] dataset " + "[object...]\n" + " %s -m [-LXFPA] [-t txg] [-e [-p path...]] [-U config] " + "poolname [vdev [metaslab...]]\n" + " %s -R [-A] [-e [-p path...]] poolname " + "vdev:offset:size[:flags]\n" + " %s -S [-PA] [-e [-p path...]] [-U config] poolname\n" + " %s -l [-uA] device\n" + " %s -C [-A] [-U config]\n\n", cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname); (void) fprintf(stderr, " Dataset name must include at least one " @@ -164,6 +166,8 @@ usage(void) (void) fprintf(stderr, " -P print numbers in parseable form\n"); (void) fprintf(stderr, " -t <txg> -- highest txg to use when " "searching for uberblocks\n"); + (void) fprintf(stderr, " -M <number of inflight I/Os> -- " + "specify the maximum number of checksumming I/Os [default is 200]"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); @@ -760,7 +764,7 @@ dump_dde(const ddt_t *ddt, const ddt_ent if (ddp->ddp_phys_birth == 0) continue; ddt_bp_create(ddt->ddt_checksum, ddk, ddp, &blk); - sprintf_blkptr(blkbuf, &blk); + snprintf_blkptr(blkbuf, sizeof (blkbuf), &blk); (void) printf("index %llx refcnt %llu %s %s\n", (u_longlong_t)index, (u_longlong_t)ddp->ddp_refcnt, types[p], blkbuf); @@ -1020,31 +1024,39 @@ blkid2offset(const dnode_phys_t *dnp, co } static void -sprintf_blkptr_compact(char *blkbuf, const blkptr_t *bp) +snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp) { const dva_t *dva = bp->blk_dva; int ndvas = dump_opt['d'] > 5 ? BP_GET_NDVAS(bp) : 1; if (dump_opt['b'] >= 6) { - sprintf_blkptr(blkbuf, bp); + snprintf_blkptr(blkbuf, buflen, bp); return; } blkbuf[0] = '\0'; for (int i = 0; i < ndvas; i++) - (void) sprintf(blkbuf + strlen(blkbuf), "%llu:%llx:%llx ", + (void) snprintf(blkbuf + strlen(blkbuf), + buflen - strlen(blkbuf), "%llu:%llx:%llx ", (u_longlong_t)DVA_GET_VDEV(&dva[i]), (u_longlong_t)DVA_GET_OFFSET(&dva[i]), (u_longlong_t)DVA_GET_ASIZE(&dva[i])); - (void) sprintf(blkbuf + strlen(blkbuf), - "%llxL/%llxP F=%llu B=%llu/%llu", - (u_longlong_t)BP_GET_LSIZE(bp), - (u_longlong_t)BP_GET_PSIZE(bp), - (u_longlong_t)bp->blk_fill, - (u_longlong_t)bp->blk_birth, - (u_longlong_t)BP_PHYSICAL_BIRTH(bp)); + if (BP_IS_HOLE(bp)) { + (void) snprintf(blkbuf + strlen(blkbuf), + buflen - strlen(blkbuf), "B=%llu", + (u_longlong_t)bp->blk_birth); + } else { + (void) snprintf(blkbuf + strlen(blkbuf), + buflen - strlen(blkbuf), + "%llxL/%llxP F=%llu B=%llu/%llu", + (u_longlong_t)BP_GET_LSIZE(bp), + (u_longlong_t)BP_GET_PSIZE(bp), + (u_longlong_t)bp->blk_fill, + (u_longlong_t)bp->blk_birth, + (u_longlong_t)BP_PHYSICAL_BIRTH(bp)); + } } static void @@ -1069,7 +1081,7 @@ print_indirect(blkptr_t *bp, const zbook } } - sprintf_blkptr_compact(blkbuf, bp); + snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp); (void) printf("%s\n", blkbuf); } @@ -1084,7 +1096,7 @@ visit_indirect(spa_t *spa, const dnode_p print_indirect(bp, zb, dnp); - if (BP_GET_LEVEL(bp) > 0) { + if (BP_GET_LEVEL(bp) > 0 && !BP_IS_HOLE(bp)) { uint32_t flags = ARC_WAIT; int i; blkptr_t *cbp; @@ -1209,7 +1221,7 @@ dump_dsl_dataset(objset_t *os, uint64_t zdb_nicenum(ds->ds_compressed_bytes, compressed); zdb_nicenum(ds->ds_uncompressed_bytes, uncompressed); zdb_nicenum(ds->ds_unique_bytes, unique); - sprintf_blkptr(blkbuf, &ds->ds_bp); + snprintf_blkptr(blkbuf, sizeof (blkbuf), &ds->ds_bp); (void) printf("\t\tdir_obj = %llu\n", (u_longlong_t)ds->ds_dir_obj); @@ -1254,7 +1266,7 @@ dump_bptree_cb(void *arg, const blkptr_t char blkbuf[BP_SPRINTF_LEN]; if (bp->blk_birth != 0) { - sprintf_blkptr(blkbuf, bp); + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); (void) printf("\t%s\n", blkbuf); } return (0); @@ -1292,7 +1304,7 @@ dump_bpobj_cb(void *arg, const blkptr_t char blkbuf[BP_SPRINTF_LEN]; ASSERT(bp->blk_birth != 0); - sprintf_blkptr_compact(blkbuf, bp); + snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp); (void) printf("\t%s\n", blkbuf); return (0); } @@ -1791,8 +1803,9 @@ dump_dir(objset_t *os) zdb_nicenum(refdbytes, numbuf); if (verbosity >= 4) { - (void) sprintf(blkbuf, ", rootbp "); - (void) sprintf_blkptr(blkbuf + strlen(blkbuf), os->os_rootbp); + (void) snprintf(blkbuf, sizeof (blkbuf), ", rootbp "); + (void) snprintf_blkptr(blkbuf + strlen(blkbuf), + sizeof (blkbuf) - strlen(blkbuf), os->os_rootbp); } else { blkbuf[0] = '\0'; } @@ -1822,7 +1835,7 @@ dump_dir(objset_t *os) if (verbosity < 2) return; - if (os->os_rootbp->blk_birth == 0) + if (BP_IS_HOLE(os->os_rootbp)) return; dump_object(os, 0, verbosity, &print_header); @@ -1863,7 +1876,7 @@ dump_uberblock(uberblock_t *ub, const ch (u_longlong_t)ub->ub_timestamp, asctime(localtime(×tamp))); if (dump_opt['u'] >= 3) { char blkbuf[BP_SPRINTF_LEN]; - sprintf_blkptr(blkbuf, &ub->ub_rootbp); + snprintf_blkptr(blkbuf, sizeof (blkbuf), &ub->ub_rootbp); (void) printf("\trootbp = %s\n", blkbuf); } (void) printf(footer ? footer : ""); @@ -2154,16 +2167,68 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * bp, NULL, NULL, ZIO_FLAG_CANFAIL)), ==, 0); } +/* ARGSUSED */ +static void +zdb_blkptr_done(zio_t *zio) +{ + spa_t *spa = zio->io_spa; + blkptr_t *bp = zio->io_bp; + int ioerr = zio->io_error; + zdb_cb_t *zcb = zio->io_private; + zbookmark_t *zb = &zio->io_bookmark; + + zio_data_buf_free(zio->io_data, zio->io_size); + + mutex_enter(&spa->spa_scrub_lock); + spa->spa_scrub_inflight--; + cv_broadcast(&spa->spa_scrub_io_cv); + + if (ioerr && !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { + char blkbuf[BP_SPRINTF_LEN]; + + zcb->zcb_haderrors = 1; + zcb->zcb_errors[ioerr]++; + + if (dump_opt['b'] >= 2) + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); + else + blkbuf[0] = '\0'; + + (void) printf("zdb_blkptr_cb: " + "Got error %d reading " + "<%llu, %llu, %lld, %llx> %s -- skipping\n", + ioerr, + (u_longlong_t)zb->zb_objset, + (u_longlong_t)zb->zb_object, + (u_longlong_t)zb->zb_level, + (u_longlong_t)zb->zb_blkid, + blkbuf); + } + mutex_exit(&spa->spa_scrub_lock); +} + +/* ARGSUSED */ static int zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp, const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg) { zdb_cb_t *zcb = arg; - char blkbuf[BP_SPRINTF_LEN]; dmu_object_type_t type; boolean_t is_metadata; - if (bp == NULL) + if (dump_opt['b'] >= 5 && bp->blk_birth > 0) { + char blkbuf[BP_SPRINTF_LEN]; + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); + (void) printf("objset %llu object %llu " + "level %lld offset 0x%llx %s\n", + (u_longlong_t)zb->zb_objset, + (u_longlong_t)zb->zb_object, + (longlong_t)zb->zb_level, + (u_longlong_t)blkid2offset(dnp, bp, zb), + blkbuf); + } + + if (BP_IS_HOLE(bp)) return (0); type = BP_GET_TYPE(bp); @@ -2174,53 +2239,26 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog is_metadata = (BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)); if (dump_opt['c'] > 1 || (dump_opt['c'] && is_metadata)) { - int ioerr; size_t size = BP_GET_PSIZE(bp); - void *data = malloc(size); + void *data = zio_data_buf_alloc(size); int flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_SCRUB | ZIO_FLAG_RAW; /* If it's an intent log block, failure is expected. */ if (zb->zb_level == ZB_ZIL_LEVEL) flags |= ZIO_FLAG_SPECULATIVE; - ioerr = zio_wait(zio_read(NULL, spa, bp, data, size, - NULL, NULL, ZIO_PRIORITY_ASYNC_READ, flags, zb)); - - free(data); - if (ioerr && !(flags & ZIO_FLAG_SPECULATIVE)) { - zcb->zcb_haderrors = 1; - zcb->zcb_errors[ioerr]++; + mutex_enter(&spa->spa_scrub_lock); + while (spa->spa_scrub_inflight > max_inflight) + cv_wait(&spa->spa_scrub_io_cv, &spa->spa_scrub_lock); + spa->spa_scrub_inflight++; + mutex_exit(&spa->spa_scrub_lock); - if (dump_opt['b'] >= 2) - sprintf_blkptr(blkbuf, bp); - else - blkbuf[0] = '\0'; - - (void) printf("zdb_blkptr_cb: " - "Got error %d reading " - "<%llu, %llu, %lld, %llx> %s -- skipping\n", - ioerr, - (u_longlong_t)zb->zb_objset, - (u_longlong_t)zb->zb_object, - (u_longlong_t)zb->zb_level, - (u_longlong_t)zb->zb_blkid, - blkbuf); - } + zio_nowait(zio_read(NULL, spa, bp, data, size, + zdb_blkptr_done, zcb, ZIO_PRIORITY_ASYNC_READ, flags, zb)); } zcb->zcb_readfails = 0; - if (dump_opt['b'] >= 5) { - sprintf_blkptr(blkbuf, bp); - (void) printf("objset %llu object %llu " - "level %lld offset 0x%llx %s\n", - (u_longlong_t)zb->zb_objset, - (u_longlong_t)zb->zb_object, - (longlong_t)zb->zb_level, - (u_longlong_t)blkid2offset(dnp, bp, zb), - blkbuf); - } - if (dump_opt['b'] < 5 && isatty(STDERR_FILENO) && gethrtime() > zcb->zcb_lastprint + NANOSEC) { uint64_t now = gethrtime(); @@ -2377,7 +2415,7 @@ count_block_cb(void *arg, const blkptr_t if (dump_opt['b'] >= 5) { char blkbuf[BP_SPRINTF_LEN]; - sprintf_blkptr(blkbuf, bp); + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); (void) printf("[%s] %s\n", "deferred free", blkbuf); } @@ -2433,6 +2471,18 @@ dump_block_stats(spa_t *spa) zcb.zcb_start = zcb.zcb_lastprint = gethrtime(); zcb.zcb_haderrors |= traverse_pool(spa, 0, flags, zdb_blkptr_cb, &zcb); + /* + * If we've traversed the data blocks then we need to wait for those + * I/Os to complete. We leverage "The Godfather" zio to wait on + * all async I/Os to complete. + */ + if (dump_opt['c']) { + (void) zio_wait(spa->spa_async_zio_root); + spa->spa_async_zio_root = zio_root(spa, NULL, NULL, + ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE | + ZIO_FLAG_GODFATHER); + } + if (zcb.zcb_haderrors) { (void) printf("\nError counts:\n\n"); (void) printf("\t%5s %s\n", "errno", "count"); @@ -2599,7 +2649,7 @@ zdb_ddt_add_cb(spa_t *spa, zilog_t *zilo avl_index_t where; zdb_ddt_entry_t *zdde, zdde_search; - if (bp == NULL) + if (BP_IS_HOLE(bp)) return (0); if (dump_opt['S'] > 1 && zb->zb_level == ZB_ROOT_LEVEL) { @@ -2766,7 +2816,7 @@ zdb_print_blkptr(blkptr_t *bp, int flags if (flags & ZDB_FLAG_BSWAP) byteswap_uint64_array((void *)bp, sizeof (blkptr_t)); - sprintf_blkptr(blkbuf, bp); + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); (void) printf("%s\n", blkbuf); } @@ -3202,7 +3252,7 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); - while ((c = getopt(argc, argv, "bcdhilmsuCDRSAFLXevp:t:U:P")) != -1) { + while ((c = getopt(argc, argv, "bcdhilmM:suCDRSAFLXevp:t:U:P")) != -1) { switch (c) { case 'b': case 'c': @@ -3231,6 +3281,15 @@ main(int argc, char **argv) case 'v': verbose++; break; + case 'M': + max_inflight = strtoull(optarg, NULL, 0); + if (max_inflight == 0) { + (void) fprintf(stderr, "maximum number " + "of inflight I/Os must be greater " + "than 0\n"); + usage(); + } + break; case 'p': if (searchdirs == NULL) { searchdirs = umem_alloc(sizeof (char *), Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Wed Jan 1 21:25:13 2014 (r260168) @@ -24,6 +24,10 @@ */ /* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +/* * Print intent log header and statistics. */ @@ -47,7 +51,7 @@ print_log_bp(const blkptr_t *bp, const c { char blkbuf[BP_SPRINTF_LEN]; - sprintf_blkptr(blkbuf, bp); + snprintf_blkptr(blkbuf, sizeof (blkbuf), bp); (void) printf("%s%s\n", prefix, blkbuf); } @@ -132,6 +136,7 @@ zil_prt_rec_write(zilog_t *zilog, int tx if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) { (void) printf("%shas blkptr, %s\n", prefix, + !BP_IS_HOLE(bp) && bp->blk_birth >= spa_first_txg(zilog->zl_spa) ? "will claim" : "won't claim"); print_log_bp(bp, prefix); @@ -139,8 +144,6 @@ zil_prt_rec_write(zilog_t *zilog, int tx if (BP_IS_HOLE(bp)) { (void) printf("\t\t\tLSIZE 0x%llx\n", (u_longlong_t)BP_GET_LSIZE(bp)); - } - if (bp->blk_birth == 0) { bzero(buf, sizeof (buf)); (void) printf("%s<hole>\n", prefix); return; @@ -313,7 +316,8 @@ print_log_block(zilog_t *zilog, blkptr_t if (verbose >= 5) { (void) strcpy(blkbuf, ", "); - sprintf_blkptr(blkbuf + strlen(blkbuf), bp); + snprintf_blkptr(blkbuf + strlen(blkbuf), + sizeof (blkbuf) - strlen(blkbuf), bp); } else { blkbuf[0] = '\0'; } @@ -361,7 +365,7 @@ dump_intent_log(zilog_t *zilog) int verbose = MAX(dump_opt['d'], dump_opt['i']); int i; - if (zh->zh_log.blk_birth == 0 || verbose < 1) + if (BP_IS_HOLE(&zh->zh_log) || verbose < 1) return; (void) printf("\n ZIL header: claim_txg %llu, " Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Jan 1 21:25:13 2014 (r260168) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011-2012 Pawel Jakub Dawidek <pawel@dawidek.net>. @@ -2157,7 +2157,7 @@ static int us_type_bits[] = { USTYPE_SMB_USR, USTYPE_ALL }; -static char *us_type_names[] = { "posixgroup", "posxiuser", "smbgroup", +static char *us_type_names[] = { "posixgroup", "posixuser", "smbgroup", "smbuser", "all" }; typedef struct us_node { Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zhack/zhack.c ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zhack/zhack.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zhack/zhack.c Wed Jan 1 21:25:13 2014 (r260168) @@ -277,6 +277,9 @@ zhack_do_feature_stat(int argc, char **a dump_obj(os, spa->spa_feat_for_read_obj, "for_read"); dump_obj(os, spa->spa_feat_for_write_obj, "for_write"); dump_obj(os, spa->spa_feat_desc_obj, "descriptions"); + if (spa_feature_is_active(spa, SPA_FEATURE_ENABLED_TXG)) { + dump_obj(os, spa->spa_feat_enabled_txg_obj, "enabled_txg"); + } dump_mos(spa); spa_close(spa, FTAG); @@ -313,7 +316,9 @@ zhack_do_feature_enable(int argc, char * feature.fi_uname = "zhack"; feature.fi_mos = B_FALSE; feature.fi_can_readonly = B_FALSE; + feature.fi_activate_on_enable = B_FALSE; feature.fi_depends = nodeps; + feature.fi_feature = SPA_FEATURE_NONE; optind = 1; while ((c = getopt(argc, argv, "rmd:")) != -1) { @@ -371,7 +376,7 @@ feature_incr_sync(void *arg, dmu_tx_t *t zfeature_info_t *feature = arg; uint64_t refcount; - VERIFY0(feature_get_refcount(spa, feature, &refcount)); + 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); @@ -384,7 +389,7 @@ feature_decr_sync(void *arg, dmu_tx_t *t zfeature_info_t *feature = arg; uint64_t refcount; - VERIFY0(feature_get_refcount(spa, feature, &refcount)); + 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); @@ -411,6 +416,7 @@ zhack_do_feature_ref(int argc, char **ar feature.fi_mos = B_FALSE; feature.fi_desc = NULL; feature.fi_depends = nodeps; + feature.fi_feature = SPA_FEATURE_NONE; optind = 1; while ((c = getopt(argc, argv, "md")) != -1) { @@ -459,8 +465,8 @@ zhack_do_feature_ref(int argc, char **ar if (decr) { uint64_t count; - if (feature_get_refcount(spa, &feature, &count) == 0 && - count != 0) { + if (feature_get_refcount_from_disk(spa, &feature, + &count) == 0 && count != 0) { fatal(spa, FTAG, "feature refcount already 0: %s", feature.fi_guid); } Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Wed Jan 1 21:25:13 2014 (r260168) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 08, 2013 +.Dd December 31, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -286,6 +286,76 @@ and will be returned to the .Sy enabled state when all datasets that use this feature are destroyed. +.It Sy enabled_txg +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:enabled_txg" +.It GUID Ta com.delphix:enabled_txg +.It READ\-ONLY COMPATIBLE Ta yes +.It DEPENDENCIES Ta none +.El +.Pp +Once this feature is enabled ZFS records the transaction group number +in which new features are enabled. This has no user-visible impact, +but other features may depend on this feature. +.Pp +This feature becomes +.Sy active +as soon as it is enabled and will +never return to being +.Sy enabled . +.It Sy hole_birth +.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:hole_birth" +.It GUID Ta com.delphix:hole_birth +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta enabled_txg +.El +.Pp +This feature improves performance of incremental sends +.Pq Dq zfs send -i +and receives for objects with many holes. +The most common case of +hole-filled objects is zvols. +.Pp +An incremental send stream from snapshot +.Sy A +to snapshot +.Sy B +contains information about every block that changed between +.Sy A +and +.Sy B . +Blocks which did not change between those snapshots can be +identified and omitted from the stream using a piece of metadata called +the 'block birth time', but birth times are not recorded for holes +.Pq blocks filled only with zeroes . +Since holes created after +.Sy A +cannot be +distinguished from holes created before +.Sy A , +information about every +hole in the entire filesystem or zvol is included in the send stream. +.Pp +For workloads where holes are rare this is not a problem. +However, when +incrementally replicating filesystems or zvols with many holes +.Pq for example a zvol formatted with another filesystem +a lot of time will +be spent sending and receiving unnecessary information about holes that +already exist on the receiving side. +.Pp +Once the +.Sy hole_birth +feature has been enabled the block birth times +of all new holes will be recorded. +Incremental sends between snapshots +created after this feature is enabled will use this new metadata to avoid +sending information about holes that already exist on the receiving side. +.Pp +This feature becomes +.Sy active +as soon as it is enabled and will +never return to being +.Sy enabled . .El .Sh SEE ALSO .Xr zpool 8 Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Wed Jan 1 21:25:13 2014 (r260168) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 14, 2013 +.Dd December 31, 2013 .Dt ZPOOL 8 .Os .Sh NAME @@ -141,6 +141,9 @@ .Cm remove .Ar pool device ... .Nm +.Cm reopen +.Ar pool +.Nm .Cm replace .Op Fl f .Ar pool device @@ -1431,6 +1434,13 @@ command. Non-redundant and devices cannot be removed from a pool. .It Xo .Nm +.Cm reopen +.Ar pool +.Xc +.Pp +Reopen all the vdevs associated with the pool. +.It Xo +.Nm .Cm replace .Op Fl f .Ar pool device Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Jan 1 21:25:13 2014 (r260168) @@ -248,7 +248,7 @@ get_usage(zpool_help_t idx) { case HELP_REMOVE: return (gettext("\tremove <pool> <device> ...\n")); case HELP_REOPEN: - return (""); /* Undocumented command */ + return (gettext("\treopen <pool>\n")); case HELP_SCRUB: return (gettext("\tscrub [-s] <pool> ...\n")); case HELP_STATUS: @@ -3720,22 +3720,37 @@ zpool_do_reguid(int argc, char **argv) * zpool reopen <pool> * * Reopen the pool so that the kernel can update the sizes of all vdevs. - * - * NOTE: This command is currently undocumented. If the command is ever - * exposed then the appropriate usage() messages will need to be made. */ int zpool_do_reopen(int argc, char **argv) { + int c; int ret = 0; zpool_handle_t *zhp; char *pool; + /* check options */ + while ((c = getopt(argc, argv, "")) != -1) { + switch (c) { + case '?': + (void) fprintf(stderr, gettext("invalid option '%c'\n"), + optopt); + usage(B_FALSE); + } + } + argc--; argv++; - if (argc != 1) - return (2); + if (argc < 1) { + (void) fprintf(stderr, gettext("missing pool name\n")); + usage(B_FALSE); + } + + if (argc > 1) { + (void) fprintf(stderr, gettext("too many arguments\n")); + usage(B_FALSE); + } pool = argv[0]; if ((zhp = zpool_open_canfail(g_zfs, pool)) == NULL) Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Wed Jan 1 21:25:13 2014 (r260168) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright (c) 2013, Delphix. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2011 +.Dd December 31, 2013 .Dt ZSTREAMDUMP 8 .Os .Sh NAME @@ -30,6 +31,7 @@ .Sh SYNOPSIS .Nm .Op Fl C +.Op Fl d .Op Fl v .Sh DESCRIPTION The @@ -43,6 +45,8 @@ The following options are supported: .Bl -tag -width indent .It Fl C Suppress the validation of checksums. +.It Fl d +Dump contents of blocks modified, implies verbose. .It Fl v Verbose. Dump all headers, not only begin and end headers. .El Modified: projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c ============================================================================== --- projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Wed Jan 1 21:17:08 2014 (r260167) +++ projects/altix2/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c Wed Jan 1 21:25:13 2014 (r260168) @@ -24,6 +24,11 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +#include <ctype.h> #include <libnvpair.h> #include <stdio.h> #include <stdlib.h> @@ -34,6 +39,16 @@ #include <sys/zfs_ioctl.h> #include <zfs_fletcher.h> +/* + * If dump mode is enabled, the number of bytes to print per line + */ +#define BYTES_PER_LINE 16 +/* + * If dump mode is enabled, the number of bytes to group together, separated + * by newlines or spaces + */ +#define DUMP_GROUPING 4 + uint64_t drr_record_count[DRR_NUMTYPES]; uint64_t total_write_size = 0; uint64_t total_stream_len = 0; @@ -45,9 +60,11 @@ boolean_t do_cksum = B_TRUE; static void usage(void) { - (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] < file\n"); + (void) fprintf(stderr, "usage: zstreamdump [-v] [-C] [-d] < file\n"); (void) fprintf(stderr, "\t -v -- verbose\n"); (void) fprintf(stderr, "\t -C -- suppress checksum verification\n"); + (void) fprintf(stderr, "\t -d -- dump contents of blocks modified, " + "implies verbose\n"); exit(1); } @@ -75,6 +92,70 @@ ssread(void *buf, size_t len, zio_cksum_ return (outlen); } +/* + * Print part of a block in ASCII characters + */ +static void +print_ascii_block(char *subbuf, int length) +{ + int i; + + for (i = 0; i < length; i++) { + char char_print = isprint(subbuf[i]) ? subbuf[i] : '.'; + if (i != 0 && i % DUMP_GROUPING == 0) { + (void) printf(" "); + } + (void) printf("%c", char_print); + } + (void) printf("\n"); +} + +/* + * print_block - Dump the contents of a modified block to STDOUT + * + * Assume that buf has capacity evenly divisible by BYTES_PER_LINE + */ +static void +print_block(char *buf, int length) +{ + int i; + /* + * Start printing ASCII characters at a constant offset, after + * the hex prints. Leave 3 characters per byte on a line (2 digit + * hex number plus 1 space) plus spaces between characters and + * groupings + */ + int ascii_start = BYTES_PER_LINE * 3 + + BYTES_PER_LINE / DUMP_GROUPING + 2; + + for (i = 0; i < length; i += BYTES_PER_LINE) { + int j; + int this_line_length = MIN(BYTES_PER_LINE, length - i); + int print_offset = 0; + + for (j = 0; j < this_line_length; j++) { + int buf_offset = i + j; + + /* + * Separate every DUMP_GROUPING bytes by a space. + */ + if (buf_offset % DUMP_GROUPING == 0) { + print_offset += printf(" "); + } + + /* + * Print the two-digit hex value for this byte. + */ + unsigned char hex_print = buf[buf_offset]; + print_offset += printf("%02x ", hex_print); + } + + (void) printf("%*s", ascii_start - print_offset, " "); + + print_ascii_block(buf + i, this_line_length); + } +} + int main(int argc, char *argv[]) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401012125.s01LPENv040670>