svn commit: r247309 - in stable/9: 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/...

Xin LI delphij at FreeBSD.org
Tue Feb 26 05:58:06 UTC 2013


Author: delphij
Date: Tue Feb 26 05:58:05 2013
New Revision: 247309
URL: http://svnweb.freebsd.org/changeset/base/247309

Log:
  MFC r246586,246587,246619,246624,246768,246808:
  
  LZ4 compression support in ZFS.
  
  (Note: sys/conf/files change omitted from this changeset).

Added:
  stable/9/sys/cddl/boot/zfs/lz4.c
     - copied unchanged from r246586, head/sys/cddl/boot/zfs/lz4.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4
     - copied unchanged from r246586, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip
     - copied unchanged from r246586, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
     - copied, changed from r246586, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c
Modified:
  stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
  stable/9/sys/cddl/boot/zfs/README
  stable/9/sys/cddl/boot/zfs/zfsimpl.h
  stable/9/sys/cddl/boot/zfs/zfssubr.c
  stable/9/sys/cddl/compat/opensolaris/sys/byteorder.h
  stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
  stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
  stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c
Directory Properties:
  stable/9/cddl/   (props changed)
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Tue Feb 26 05:44:48 2013	(r247308)
+++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Tue Feb 26 05:58:05 2013	(r247309)
@@ -1,5 +1,5 @@
 '\" te
-.\" Copyright (c) 2012, Martin Matuska <mm at FreeBSD.org>.
+.\" Copyright (c) 2013, Martin Matuska <mm at FreeBSD.org>.
 .\" All Rights Reserved.
 .\"
 .\" The contents of this file are subject to the terms of the
@@ -19,15 +19,16 @@
 .\"
 .\" 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 <pjd at FreeBSD.org>
 .\" Copyright (c) 2012, Bryan Drewery <bdrewery at FreeBSD.org>
 .\" Copyright (c) 2012, Glen Barber <gjb at FreeBSD.org>
+.\" 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
@@ -39,14 +40,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
@@ -59,13 +58,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 at snapname Ns | Ns Ar volume at snapname
+.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
+.Ar filesystem at snapname Ns | Ns Ar volume at snapname
 .Nm
 .Cm rollback
 .Op Fl rRf
@@ -73,8 +72,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
@@ -102,31 +101,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
@@ -138,29 +135,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
@@ -192,63 +185,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
@@ -860,7 +861,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
@@ -888,6 +889,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.
@@ -1384,8 +1405,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
@@ -1420,8 +1441,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
@@ -1521,7 +1541,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
@@ -1582,8 +1602,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 at snapname Ns | Ns volume at snapname
 .Xc
 .Pp
@@ -1630,8 +1649,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
@@ -1734,13 +1753,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
@@ -1766,7 +1783,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
@@ -1790,7 +1807,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
@@ -1853,11 +1870,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
@@ -1907,7 +1924,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
@@ -1915,7 +1932,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
@@ -1923,7 +1940,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:
@@ -1935,7 +1952,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
@@ -2010,12 +2027,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
@@ -2032,7 +2047,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.
@@ -2047,7 +2062,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
@@ -2063,12 +2078,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
@@ -2092,7 +2105,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
@@ -2105,7 +2118,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
@@ -2424,16 +2437,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
@@ -2443,26 +2458,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,
@@ -2569,7 +2589,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
@@ -2580,7 +2601,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
@@ -2596,16 +2618,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
@@ -2613,7 +2637,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
@@ -2622,10 +2647,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
@@ -2641,7 +2668,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
@@ -2651,7 +2679,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
@@ -2672,7 +2700,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.
@@ -2685,7 +2713,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/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7	Tue Feb 26 05:44:48 2013	(r247308)
+++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7	Tue Feb 26 05:58:05 2013	(r247309)
@@ -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/9/sys/cddl/boot/zfs/README
==============================================================================
--- stable/9/sys/cddl/boot/zfs/README	Tue Feb 26 05:44:48 2013	(r247308)
+++ stable/9/sys/cddl/boot/zfs/README	Tue Feb 26 05:58:05 2013	(r247309)
@@ -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/9/sys/cddl/boot/zfs/lz4.c (from r246586, head/sys/cddl/boot/zfs/lz4.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/sys/cddl/boot/zfs/lz4.c	Tue Feb 26 05:58:05 2013	(r247309, copy of r246586, head/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)-1)
+#define	RUN_BITS (8-ML_BITS)
+#define	RUN_MASK ((1U<<RUN_BITS)-1)
+
+/*
+ * Architecture-specific macros
+ */
+#if LZ4_ARCH64
+#define	STEPSIZE 8
+#define	UARCH U64
+#define	AARCH A64
+#define	LZ4_COPYSTEP(s, d)	A64(d) = A64(s); d += 8; s += 8;
+#define	LZ4_COPYPACKET(s, d)	LZ4_COPYSTEP(s, d)
+#define	LZ4_SECURECOPY(s, d, e)	if (d < e) LZ4_WILDCOPY(s, d, e)
+#define	HTYPE U32
+#define	INITBASE(base)		const BYTE* const base = ip
+#else
+#define	STEPSIZE 4
+#define	UARCH U32
+#define	AARCH A32
+#define	LZ4_COPYSTEP(s, d)	A32(d) = A32(s); d += 4; s += 4;
+#define	LZ4_COPYPACKET(s, d)	LZ4_COPYSTEP(s, d); LZ4_COPYSTEP(s, d);
+#define	LZ4_SECURECOPY		LZ4_WILDCOPY
+#define	HTYPE const BYTE*
+#define	INITBASE(base)		const int base = 0
+#endif
+
+#if (defined(LZ4_BIG_ENDIAN) && !defined(BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE))
+#define	LZ4_READ_LITTLEENDIAN_16(d, s, p) \
+	{ U16 v = A16(p); v = lz4_bswap16(v); d = (s) - v; }
+#define	LZ4_WRITE_LITTLEENDIAN_16(p, i) \
+	{ U16 v = (U16)(i); v = lz4_bswap16(v); A16(p) = v; p += 2; }
+#else
+#define	LZ4_READ_LITTLEENDIAN_16(d, s, p) { d = (s) - A16(p); }
+#define	LZ4_WRITE_LITTLEENDIAN_16(p, v)  { A16(p) = v; p += 2; }
+#endif
+
+/* Macros */
+#define	LZ4_WILDCOPY(s, d, e) do { LZ4_COPYPACKET(s, d) } while (d < e);
+
+/* Decompression functions */
+
+static int
+LZ4_uncompress_unknownOutputSize(const char *source,
+    char *dest, int isize, int maxOutputSize)
+{
+	/* Local Variables */
+	const BYTE *restrict ip = (const BYTE *) source;
+	const BYTE *const iend = ip + isize;
+	const BYTE *restrict ref;
+
+	BYTE *restrict op = (BYTE *) dest;
+	BYTE *const oend = op + maxOutputSize;
+	BYTE *cpy;
+
+	size_t dec[] = { 0, 3, 2, 3, 0, 0, 0, 0 };
+
+	/* Main Loop */
+	while (ip < iend) {
+		BYTE token;
+		int length;
+
+		/* get runlength */
+		token = *ip++;
+		if ((length = (token >> 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

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-stable-9 mailing list