From owner-svn-src-stable-8@FreeBSD.ORG Tue Feb 26 06:01:59 2013 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DC0634A0; Tue, 26 Feb 2013 06:01:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BB717EBB; Tue, 26 Feb 2013 06:01:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1Q61xsI087654; Tue, 26 Feb 2013 06:01:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1Q61xPP087646; Tue, 26 Feb 2013 06:01:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201302260601.r1Q61xPP087646@svn.freebsd.org> From: Xin LI Date: Tue, 26 Feb 2013 06:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r247310 - in stable/8: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool sys/cddl/boot/zfs sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/common/zfs sys/... X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 06:01:59 -0000 Author: delphij Date: Tue Feb 26 06:01:58 2013 New Revision: 247310 URL: http://svnweb.freebsd.org/changeset/base/247310 Log: MF9 r247309: MFC r246586,246587,246619,246624,246768,246808: LZ4 compression support in ZFS. (Note: sys/conf/files change omitted from this changeset). Added: stable/8/sys/cddl/boot/zfs/lz4.c - copied unchanged from r247309, stable/9/sys/cddl/boot/zfs/lz4.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 - copied unchanged from r247309, stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip - copied unchanged from r247309, stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c - copied unchanged from r247309, stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 stable/8/sys/cddl/boot/zfs/README stable/8/sys/cddl/boot/zfs/zfsimpl.h stable/8/sys/cddl/boot/zfs/zfssubr.c stable/8/sys/cddl/compat/opensolaris/sys/byteorder.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/8/sys/cddl/contrib/opensolaris/uts/common/Makefile.files stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Directory Properties: stable/8/cddl/ (props changed) stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Feb 26 05:58:05 2013 (r247309) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Feb 26 06:01:58 2013 (r247310) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2012, Martin Matuska . +.\" Copyright (c) 2013, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -19,14 +19,15 @@ .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" Copyright (c) 2012, Glen Barber +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 26, 2012 +.Dd February 10, 2013 .Dt ZFS 8 .Os .Sh NAME @@ -38,14 +39,12 @@ .Nm .Cm create .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem .Nm .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Nm @@ -58,13 +57,13 @@ .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem@snapname Ns | Ns Ar volume@snapname +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem@snapname Ns | Ns Ar volume@snapname .Nm .Cm rollback .Op Fl rRf @@ -72,8 +71,8 @@ .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Nm .Cm promote .Ar clone-filesystem @@ -101,31 +100,29 @@ .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... +.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot .Nm .Cm set .Ar property Ns = Ns Ar value -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Nm .Cm upgrade .Op Fl v @@ -137,29 +134,25 @@ .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Nm .Cm mount .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Nm .Cm unmount @@ -191,63 +184,71 @@ .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm unallow .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Nm .Cm diff .Op Fl FHt @@ -859,7 +860,7 @@ but this may change in future releases). disables integrity checking on user data. Disabling checksums is .Em NOT a recommended practice. -.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle +.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4 Controls the compression algorithm used for this dataset. The .CM lzjb compression algorithm is optimized for performance while providing decent data @@ -887,6 +888,26 @@ The .Cm zle compression algorithm compresses runs of zeros. .Pp +The +.Sy lz4 +compression algorithm is a high-performance replacement +for the +.Sy lzjb +algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than +.Sy lzjb , +but can only be used on pools with +the +.Sy lz4_compress +feature set to +.Sy enabled . +See +.Xr zpool-features 7 +for details on ZFS feature flags and the +.Sy lz4_compress +feature. +.Pp This property can also be referred to by its shortened column name .Cm compress . Changing this property affects only newly-written data. @@ -1383,8 +1404,8 @@ Displays a help message. .Nm .Cm create .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... filesystem +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar filesystem .Xc .Pp Creates a new @@ -1419,8 +1440,7 @@ options. .Cm create .Op Fl ps .Op Fl b Ar blocksize -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Fl V .Ar size volume .Xc @@ -1520,7 +1540,7 @@ behavior for mounted file systems in use .Sm off .Ar snapshot .Op % Ns Ar snapname -.Op , Ns Ar ... +.Op , Ns ... .Sm on .Xc .Pp @@ -1581,8 +1601,7 @@ behavior for mounted file systems in use .Nm .Cm snapshot .Op Fl r -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem@snapname Ns | Ns volume@snapname .Xc .Pp @@ -1629,8 +1648,8 @@ option to force an unmount of any clone .Nm .Cm clone .Op Fl p -.Op Fl o Ar property Ns = Ns Ar value -.Ar ... snapshot filesystem Ns | Ns Ar volume +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... +.Ar snapshot filesystem Ns | Ns Ar volume .Xc .Pp Creates a clone of the given snapshot. See the @@ -1733,13 +1752,11 @@ only dataset that can be renamed recursi .Cm list .Op Fl r Ns | Ns Fl d Ar depth .Op Fl H -.Op Fl o Ar property Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar property -.Ar ... -.Op Fl S Ar property -.Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Oo Fl s Ar property Oc Ns ... +.Oo Fl S Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Lists the property information for the given datasets in tabular form. If @@ -1765,7 +1782,7 @@ will display only the dataset and its di .It Fl H Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space. -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... A comma-separated list of properties to display. The property must be: .Bl -bullet -offset 2n .It @@ -1789,7 +1806,7 @@ shortcut for specifying .Sy filesystem,volume syntax. .El -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1852,11 +1869,11 @@ section. .Cm get .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp -.Op Fl o Ar all | field Ns Op , Ns Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... -.Op Fl s Ar source Ns Op , Ns Ar ... -.Ar all | property Ns Op , Ns Ar ... -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... +.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... +.Ar all | property Ns Oo , Ns Ar property Oc Ns ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Displays properties for the given datasets. If no datasets are specified, then @@ -1906,7 +1923,7 @@ omitted, and fields are explicitly separ arbitrary amount of space. .It Fl p Display numbers in parseable (exact) values. -.It Fl o Cm all | Ar field Ns Op , Ns Ar ... +.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ... A comma-separated list of columns to display. Supported values are .Sy name,property,value,received,source . Default values are @@ -1914,7 +1931,7 @@ Default values are The keyword .Cm all specifies all columns. -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... A comma-separated list of types to display, where .Ar type is one of @@ -1922,7 +1939,7 @@ is one of For example, specifying .Fl t Cm snapshot displays only snapshots. -.It Fl s Ar source Ns Op , Ns Ar ... +.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: @@ -1934,7 +1951,7 @@ The default value is all sources. .Cm inherit .Op Fl rS .Ar property -.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp Clears the specified property, causing it to be inherited from an ancestor. If @@ -2009,12 +2026,10 @@ Upgrade the specified file system. .Nm .Cm userspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2031,7 +2046,7 @@ Print numeric ID instead of user/group n Do not print headers, use tab-delimited output. .It Fl p Use exact (parsable) numeric output. -.It Fl o Ar field Ns Op , Ns Ar ... +.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Display only the specified fields from the following set: .Sy type,name,used,quota . The default is to display all fields. @@ -2046,7 +2061,7 @@ another. The default is .It Fl S Ar field Sort by this field in reverse order. See .Fl s . -.It Fl t Ar type Ns Op , Ns Ar ... +.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Print only the specified types from the following set: .Sy all,posixuser,smbuser,posixgroup,smbgroup . .Pp @@ -2062,12 +2077,10 @@ Translate SID to POSIX ID. This flag cur .Nm .Cm groupspace .Op Fl Hinp -.Op Fl o Ar field Ns Op , Ns Ar ... -.Op Fl s Ar field -.Ar ... -.Op Fl S Ar field -.Ar ... -.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... +.Oo Fl s Ar field Oc Ns ... +.Oo Fl S Ar field Oc Ns ... +.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .Ar filesystem Ns | Ns Ar snapshot .Xc .Pp @@ -2091,7 +2104,7 @@ file systems currently mounted. .Nm .Cm mount .Op Fl vO -.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Fl a | Ar filesystem .Xc .Pp @@ -2104,7 +2117,7 @@ Report mount progress. .It Fl O Perform an overlay mount. Overlay mounts are not supported on .Fx . -.It Fl o Ar property Ns Op , Ns Ar ... +.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the .Qq Sx Temporary Mount Point Properties @@ -2423,16 +2436,18 @@ for more information. .Nm .Cm allow .Op Fl ldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Ar perm Ns | Ns Ar @setname Ns +.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm allow .Op Fl ld -.Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2442,26 +2457,31 @@ administration permission for the file s .Bl -tag -width indent .It Xo .Op Fl ug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ... .Xc Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the .Fl ug options are specified, then the argument is interpreted preferentially as the -keyword "everyone", then as a user name, and lastly as a group name. To specify -a user or group named "everyone", use the +keyword +.Cm everyone , +then as a user name, and lastly as a group name. To specify +a user or group named +.Qq everyone , +use the .Fl u or .Fl g options. To specify a group with the same name as a user, use the .Fl g option. +.It Op Fl e Ns | Ns Cm everyone +Specifies that the permissions be delegated to +.Qq everyone . .It Xo -.Op Fl e -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ... .Xc -Specifies that the permissions be delegated to "everyone". -Multiple permissions +The permissions to delegate. Multiple permissions may be specified as a comma-separated list. Permission names are the same as .Tn ZFS subcommand and property names. See the property list below. Property set names, @@ -2568,7 +2588,8 @@ protocol .Nm .Cm allow .Fl c -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2579,7 +2600,8 @@ creator of any newly-created descendent .Cm allow .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2595,16 +2617,18 @@ and can be no more than 64 characters lo .Nm .Cm unallow .Op Fl rldug -.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo .Nm .Cm unallow .Op Fl rld -.Fl e -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Fl e Ns | Ns Cm everyone +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .It Xo @@ -2612,7 +2636,8 @@ and can be no more than 64 characters lo .Cm unallow .Op Fl r .Fl c -.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2621,10 +2646,12 @@ Removes permissions that were granted wi command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified -.Ar user , group , No or Ar everyone -are removed. Specifying "everyone" (or using the -.Fl e -option) only removes the permissions that were granted to "everyone", +.Ar user , group , No or everyone +are removed. Specifying +.Cm everyone +.Po or using the Fl e +option +.Pc only removes the permissions that were granted to everyone , not all permissions for every user and group. See the .Qq Nm Cm allow command for a description of the @@ -2640,7 +2667,8 @@ Recursively remove the permissions from .Op Fl r .Fl s .Ar @setname -.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns +.Ns ... Oc .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -2650,7 +2678,7 @@ then all permissions are removed, thus r .Nm .Cm hold .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Adds a single reference, named with the @@ -2671,7 +2699,7 @@ snapshots of all descendent file systems .Nm .Cm holds .Op Fl r -.Ar snapshot ... +.Ar snapshot Ns ... .Xc .Pp Lists all existing user references for the given snapshot or snapshots. @@ -2684,7 +2712,7 @@ listing the holds on the named snapshot. .Nm .Cm release .Op Fl r -.Ar tag snapshot ... +.Ar tag snapshot Ns ... .Xc .Pp Removes a single reference, named with the Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Feb 26 05:58:05 2013 (r247309) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 Tue Feb 26 06:01:58 2013 (r247310) @@ -18,10 +18,11 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd Aug 28, 2012 +.Dd February 8, 2013 .Dt ZPOOL-FEATURES 7 .Os .Sh NAME @@ -185,6 +186,49 @@ This feature is .Sy active while there are any filesystems, volumes, or snapshots which were created after enabling this feature. +.It Sy lz4_compress +.Bl -column "READ\-ONLY COMPATIBLE" "org.illumos:lz4_compress" +.It GUID Ta org.illumos:lz4_compress +.It READ\-ONLY COMPATIBLE Ta no +.It DEPENDENCIES Ta none +.El +.Pp +.Sy lz4 +is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older +.Sy lzjb +compression. +Typically, +.Sy lz4 +compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +.Sy lzjb . +It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. +.Pp +When the +.Sy lz4_compress +feature is set to +.Sy enabled , +the +administrator can turn on +.Sy lz4 +compression on any dataset on the +pool using the +.Xr zfs 8 +command. Please note that doing so will +immediately activate the +.Sy lz4_compress +feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the +.Sy lz4_compress +feature. At the +moment, this operation cannot be reversed. Booting off of +.Sy lz4 +-compressed root pools is supported. .El .Sh SEE ALSO .Xr zpool 8 Modified: stable/8/sys/cddl/boot/zfs/README ============================================================================== --- stable/8/sys/cddl/boot/zfs/README Tue Feb 26 05:58:05 2013 (r247309) +++ stable/8/sys/cddl/boot/zfs/README Tue Feb 26 06:01:58 2013 (r247310) @@ -5,6 +5,7 @@ are used by the ZFS bootstrap: fletcher.c checksum support sha256.c checksum support + lz4.c compression support lzjb.c compression support zfssubr.c checksum, compression and raidz support zfsimpl.h mostly describing the physical layout Copied: stable/8/sys/cddl/boot/zfs/lz4.c (from r247309, stable/9/sys/cddl/boot/zfs/lz4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/cddl/boot/zfs/lz4.c Tue Feb 26 06:01:58 2013 (r247310, copy of r247309, stable/9/sys/cddl/boot/zfs/lz4.c) @@ -0,0 +1,308 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + * + * $FreeBSD$ + */ + +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); + +/* ARGSUSED */ +static int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int dummy __unused) +{ + const uint8_t *src = s_start; + uint32_t bufsiz = htonl(*(uint32_t *)src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + 4 > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative). + */ + return (LZ4_uncompress_unknownOutputSize(s_start + 4, d_start, bufsiz, + d_len) < 0); +} + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +#else +#define LZ4_ARCH64 0 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if BYTE_ORDER == BIG_ENDIAN +#define LZ4_BIG_ENDIAN 1 +#else + /* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) \ + | (((x) & 0xffu) << 8))) + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define COPYLENGTH 8 +#define LASTLITERALS 5 + +#define ML_BITS 4 +#define ML_MASK ((1U<> ML_BITS)) == RUN_MASK) { + int s = 255; + while ((ip < iend) && (s == 255)) { + s = *ip++; + length += s; + } + } + /* copy literals */ + cpy = op + length; + if ((cpy > oend - COPYLENGTH) || + (ip + length > iend - COPYLENGTH)) { + if (cpy > oend) + /* + * Error: request to write beyond destination + * buffer. + */ + goto _output_error; + if (ip + length > iend) + /* + * Error : request to read beyond source + * buffer. + */ + goto _output_error; + memcpy(op, ip, length); + op += length; + ip += length; + if (ip < iend) + /* Error : LZ4 format violation */ + goto _output_error; + /* Necessarily EOF, due to parsing restrictions. */ + break; + } + LZ4_WILDCOPY(ip, op, cpy); + ip -= (op - cpy); + op = cpy; + + /* get offset */ + LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); + ip += 2; + if (ref < (BYTE * const) dest) + /* + * Error: offset creates reference outside of + * destination buffer. + */ + goto _output_error; + + /* get matchlength */ + if ((length = (token & ML_MASK)) == ML_MASK) { + while (ip < iend) { + int s = *ip++; + length += s; + if (s == 255) + continue; + break; + } + } + /* copy repeated sequence */ + if unlikely(op - ref < STEPSIZE) { +#if LZ4_ARCH64 + size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; + size_t dec2 = dec2table[op - ref]; +#else + const int dec2 = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***