diff --git a/CREDITS.txt b/CREDITS.txt
new file mode 100644
index 00000000..dde0a024
--- /dev/null
+++ b/CREDITS.txt
@@ -0,0 +1,64 @@
+Credits
+
+Many people contributed to ZFS in general and to Mac OSX port MacZFS. Those we know of are listed here:
+
+ The inventors and principal engineers of ZFS, at Sun Microsystems
+ * Jeff Bonwick and Matthew Ahrens, and their team (possibly listed
+ below; clarification is needed)
+
+ Co-founders of ZFS on Mac OS, at Apple, Inc:
+ * Chris Emura, the Filesystem Development Manager within Apple's
+ CoreOS organization (cemura at apple.com)
+ * Don Brady, principal software engineer
+
+ Other original contributors at Apple, Inc
+ * Noel Dellofano, software engineer
+ * who else?
+
+ Contributors to the public MacZFS project
+ * Dustin Sallings: software engineer
+ * Jason R. McNeil: software engineer
+ * Bj�rn Kahl: software engineer, documentation -- Github
+ * Alex Blewitt, software engineer, release engineer, documentation --
+ Github
+ * Daniel Bethe -- webmaster, documentation
+ * Lucien Pullen -- documentation
+ * Matthew Earlywine -- launchd scripts
+ * KonaB1end -- launchd scripts and hard core hacking
+
+ These additional names were harvested from the git repository, dating
+ back to the original ZFS code. They are presented in no significant
+ order.
+
+ When it comes to a volunteer project, remember this above all...
+
+There are NO small roles. The community thanks you all.
+
+ johansen, esaxe, elowe, dp78419, dm120769, casper, mh27603, ly149593,
+ frankho, susans, stans, rm160521, mishra, eota, edp, ck153898, anish,
+ egillett, dv142724, dp, cindi, vb160487, trevtom, szhou, stevel, sethg,
+ rg137905, rd117015, qiao, meem, jg, gt29601, govinda, cwb, akolb,
+ zh199473, wesolows, vsakar, vikram, th199096, tabriz, stephh, sp92102,
+ schwartz, rsb, robinson, rica, ramat, phitran, peterte, paulsan, mrj,
+ maheshvs, llai1, kupfer, krgopi, kp158701, jjc, is, ha137994, gjelinek,
+ evanl, eh208807, dougm, dilpreet, dduvall, darrenm, carlsonj, bmc,
+ blakej, billm, ae112802, yq193411, vb70745, udpa, tsien, taylor,
+ sudheer, seb, rs135747, rb150246, prabahar, peteh, ns92644, nordmark,
+ nn35248, myers, mws, mlf, ml93401, mjnelson, lclee, ksn, krishna,
+ kk112340, kg150529, josephb, jkennedy, jdunham, jarrett, gp87344,
+ georges, gd78059, fr157268, fl147353, esolom, ericheng, eg155566,
+ dr146992, dmick, dh155122, bs21162, baban, artem, Timeless, yz147069,
+ yx209491, yt160523, yl150051, xy158873, xs154138, wroche, wentaoy,
+ webaker, vv149972, vivek, ton, timh, timf, swilcox, stevel@tonic-gate,
+ ss146032, srust, sommerfe, sjelinek, sherrym, shepler, sdebnath, robj,
+ rh87107, rbourbon, randyf, rab, ps57422, pramodbg, pm145316, petede,
+ pd144616, paulson, owenr, osaeed, nw141292, nr123932, nf202958,
+ mp46848, mp204432, mm156350, ml29623, micheng, mcneal, mc142369,
+ mb158278, masputra, lq150181, kz151634, kcpoon, kalai, kais, jwahlig,
+ jwadams, jpk, johnny, johnlev, jl139090, jj204856, jj146644, jimp, jhd,
+ jfrank, jchu, jc25722, jacobs, ja97890, hx147065, huah, hiremath,
+ hg115875, gz161490, gm149974, girish, ggredvig, gfaden, gavinm,
+ ethindra, et142600, dstaff, dp201428, dg199075, craigm, convert-repo,
+ cm136836, cg149915, bm42561, bg159949, batschul, ayznaga, at204353,
+ as145665, ap25164, andyb, andrei, agiri, acruz, achartre, ab196087
+
diff --git a/README.txt b/README.txt
index f6064372..9de17800 100644
--- a/README.txt
+++ b/README.txt
@@ -1,18 +1,35 @@
-MacZFS is a community effort to prolong the life of ZFS on Mac OS X,
-since the Apple Open Source project was shut down. It is supported on
-both Leopard (Intel/PPC) and Snow Leopard (Intel 32-bit and 64-bit)
-platforms, although it may require Snow Leopard in order to build.
-Preview support for Lion is included.
+About MacZFS
+============
+
+MacZFS is a community effort hosted on www.maczfs.org to prolong
+the life of ZFS on Mac OS X, since the Apple Open Source project
+was shut down. It is supported on both Leopard (Intel/PPC) and
+Snow Leopard (Intel 32-bit and 64-bit)platforms, including newer
+releases up to Mountain Lion.
+
Getting involved
================
-If you would like to help, the source code is avaialble and an issue
-tracker exists to track bugs.
+The MacZFS community welcomes everyone who wants to share thoughts,
+opinions or success stories or wants to contribute to the project's
+further development.
+
+Discussion of use cases, user-to-user help and future development takes
+place on our mailing list hosted at http://groups.google.com/group/zfs-macos/
+
+Problem reports and feature requests should be submitted to the issue
+tracker at http://code.google.com/p/maczfs/
+If you want to help with development, the source code is available on
+Github at http://github.com/alblue/mac-zfs
+
+Resources:
Source: http://github.com/alblue/mac-zfs
Issues: http://code.google.com/p/maczfs/
Groups: http://groups.google.com/group/zfs-macos/
+IRC: http://webchat.freenode.net/ , select a nick name and enter channel #mac-zfs
+
Backups
=======
@@ -30,6 +47,7 @@ of problems. You should therefore take full responsiblity of backups
of data in the event that a restoration is needed. Any single filing
system, including ZFS, is not a substitute for backups.
+
Disclaimer
==========
diff --git a/support/MacZFS.pmdoc/01zfs-contents.xml b/support/MacZFS.pmdoc/01zfs-contents.xml
index b82a0d46..4f2e5409 100644
--- a/support/MacZFS.pmdoc/01zfs-contents.xml
+++ b/support/MacZFS.pmdoc/01zfs-contents.xml
@@ -26,9 +26,13 @@
+
+
+
+
diff --git a/support/MacZFS.pmdoc/01zfs.xml b/support/MacZFS.pmdoc/01zfs.xml
index b4c7437b..6331bbbc 100644
--- a/support/MacZFS.pmdoc/01zfs.xml
+++ b/support/MacZFS.pmdoc/01zfs.xml
@@ -13,10 +13,17 @@
installFrom.isRelativeType
installTo
+ scripts.scriptsDirectoryPath.path
identifier
parent
version
+ scripts.postinstall.isRelativeType
+ installFrom.isRelativeType
+
+ post-install.sh
+ Resources
+
01zfs-contents.xml
+
+
+
+
diff --git a/support/MacZFS.pmdoc/02zfs.xml b/support/MacZFS.pmdoc/02zfs.xml
index 7cdc9281..d2fa4ca5 100644
--- a/support/MacZFS.pmdoc/02zfs.xml
+++ b/support/MacZFS.pmdoc/02zfs.xml
@@ -13,10 +13,17 @@
installFrom.isRelativeType
installTo
+ scripts.scriptsDirectoryPath.path
identifier
parent
version
+ scripts.postinstall.isRelativeType
+ installFrom.isRelativeType
+
+ post-install.sh
+ Resources
+
02zfs-contents.xml
+ Welcome to MacZFS, a free implementation of the ZFS file system for Mac OSX Leopard and newer.
+
+MacZFS offers nearly unlimited storage capacity, only limited by the amount and size of hard disks connected to an computer. It offers data replication in mirror or raidz configuration, dynamic stripping and build-in storage pool based volume management.
+
+MacZFS has end-to-end compression and strong data checksumming, including self-healing of bit-rot or any other read problem in redundant pools and offers unlimited, nearly-instantaneous snapshot support for backup and ecovery. Snapshots can be mount for read-only inspection, efficiently transfered between storage pools for off-site backups or promoted to full read-write filesystems.
+
+MacZFS is based on the original Sun implementation of the ZFS file system and Apple's initial port to Leopard whch was discontinued before public release.
+
+Today, MacZFS is developed by a community effort on www.maczfs.org and released under the CDDL and APSL liecenses.
+
-
@@ -40,7 +50,7 @@
selected="no" enabled="no" hidden="yes"
startSelected="unchanged" startEnabled="unchanged"
startHidden="unchanged" />
-
@@ -59,20 +69,22 @@
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
-\f0\fs26 \cf0 This will install the next-generation ZFS support for Mac OSX systems running either Leopard or Snow Leopard. Preview support for Lion is available.}]]>
+\f0\fs26 \cf0 This will install the next-generation ZFS support for Mac OSX systems running either Leopard or Snow Leopard and newer.}]]>
+ ../CREDITS.txt
Mac ZFS needs at least Leopard to run.
-
- Mac ZFS is only certified to run on Leopard and Snow Leopard at this time, though preview support for Lion is available.
+
+ Mac ZFS is only certified to run on Mac OSX Leopard to Mountain Lion.
- 01zfs.xml
- 02zfs.xml
properties.title
+ description
diff --git a/support/post-install.sh b/support/post-install.sh
new file mode 100755
index 00000000..a9c20541
--- /dev/null
+++ b/support/post-install.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+chmod -R u+w,go-w,a+r /System/Library/Extensions/zfs.kext
+
diff --git a/support/release.sh b/support/release.sh
index cc5910c9..c0471063 100755
--- a/support/release.sh
+++ b/support/release.sh
@@ -18,21 +18,25 @@ then
fi
USER=`whoami`
+GROUP=`id -n -g`
(
mkdir -p ${DIR}/../${BUILD}
rm -rf ${DIR}/../${BUILD}/ZFS105
-rm -rf ${DIR}/../${BUILD}/ZFS105
+rm -rf ${DIR}/../${BUILD}/ZFS106
cp -R ${DIR}/MacZFS.pmdoc ${DIR}/../${BUILD}
+cp -R ${DIR}/post-install.sh ${DIR}/../${BUILD}
sed -i~ -e "s/0\\.0\\.0/${VERSION}/g" ${DIR}/../${BUILD}/MacZFS.pmdoc/*
cd ${DIR}/..
-xcodebuild -sdk macosx10.5 -configuration ${CONFIG} -parallelizeTargets install INSTALL_OWNER=${USER} SYMROOT=${BUILD}/${CONFIG}105 DSTROOT=${BUILD}/ZFS105 || exit 2
+xcodebuild -sdk macosx10.5 -configuration ${CONFIG} -parallelizeTargets install INSTALL_OWNER=${USER} INSTALL_GROUP=${GROUP} SYMROOT=${BUILD}/${CONFIG}105 DSTROOT=${BUILD}/ZFS105 || exit 2
+chmod -Rv u+w,go-w,a+r ${BUILD}/ZFS105
# No point in building on 10.5, it'll just do the same thing again
if [ "`sysctl -b kern.osrelease`" != "9.8.0" ]
then
- xcodebuild -sdk macosx10.6 -configuration ${CONFIG} -parallelizeTargets install INSTALL_OWNER=${USER} SYMROOT=${BUILD}/${CONFIG}106 DSTROOT=${BUILD}/ZFS106 || exit 3
+ xcodebuild -sdk macosx10.6 -configuration ${CONFIG} -parallelizeTargets install INSTALL_OWNER=${USER} INSTALL_GROUP=${GROUP} SYMROOT=${BUILD}/${CONFIG}106 DSTROOT=${BUILD}/ZFS106 || exit 3
+ chmod -R u+w,go-w,a+r ${BUILD}/ZFS106
fi
cd ${BUILD}
diff --git a/usr/src/cmd/zdb/zdb.c b/usr/src/cmd/zdb/zdb.c
index 09bbd332..8e7ee54b 100644
--- a/usr/src/cmd/zdb/zdb.c
+++ b/usr/src/cmd/zdb/zdb.c
@@ -19,14 +19,19 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+/* Portions Copyright 2007-2008 Apple Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
@@ -66,6 +71,8 @@ int zopt_objects = 0;
int zdb_advance = ADVANCE_PRE;
zbookmark_t zdb_noread = { 0, 0, ZB_NO_LEVEL, 0 };
libzfs_handle_t *g_zfs;
+boolean_t zdb_sig_user_data = B_TRUE;
+int zdb_sig_cksumalg = ZIO_CHECKSUM_SHA256;
/*
* These libumem hooks provide a reasonable set of defaults for the allocator's
@@ -110,7 +117,7 @@ usage(void)
(void) fprintf(stderr, " -U use zpool.cache in /tmp\n");
(void) fprintf(stderr, " -B objset:object:level:blkid -- "
"simulate bad block\n");
- (void) fprintf(stderr, " -R read and display block from a"
+ (void) fprintf(stderr, " -R read and display block from a "
"device\n");
(void) fprintf(stderr, " -e Pool is exported/destroyed\n");
(void) fprintf(stderr, " -p (use with -e)\n");
@@ -1190,6 +1197,18 @@ dump_label(const char *dev)
exit(1);
}
+#ifdef __APPLE__
+ /* OS X: we can't use fstat to get the size of a block device */
+ if (S_ISBLK(statbuf.st_mode)) {
+ if ((statbuf.st_size = get_disk_size(fd)) == -1) {
+ statbuf.st_size = 0;
+ (void) printf("failed to stat '%s': %s\n", dev,
+ strerror(errno));
+ exit(1);
+
+ }
+ }
+#endif
psize = statbuf.st_size;
psize = P2ALIGN(psize, (uint64_t)sizeof (vdev_label_t));
@@ -2206,12 +2225,22 @@ main(int argc, char **argv)
int exported = 0;
char *vdev_dir = NULL;
+#ifdef __APPLE__
+ volatile int zdb_forever = 0;
+#endif
+
(void) setrlimit(RLIMIT_NOFILE, &rl);
(void) enable_extended_FILE_stdio(-1, -1);
dprintf_setup(&argc, argv);
- while ((c = getopt(argc, argv, "udibcsvCLO:B:UlRep:")) != -1) {
+ while ((c = getopt(argc, argv,
+#ifdef __APPLE__
+ "udibcsvCLO:B:UlRep:D"
+#else
+ "udibcsvCLO:B:UlRep:"
+#endif
+ )) != -1) {
switch (c) {
case 'u':
case 'd':
@@ -2280,6 +2309,11 @@ main(int argc, char **argv)
case 'p':
vdev_dir = optarg;
break;
+#ifdef __APPLE__
+ case 'D':
+ zdb_forever = 1;
+ break;
+#endif
default:
usage();
break;
@@ -2289,15 +2323,22 @@ main(int argc, char **argv)
if (vdev_dir != NULL && exported == 0)
(void) fatal("-p option requires use of -e\n");
+#ifdef __APPLE__
+ /* to attach gdb, run zdb with "-D" and say in gdb "set zdb_forever = 0" */
+ while (zdb_forever) {}
+#endif
+
kernel_init(FREAD);
g_zfs = libzfs_init();
ASSERT(g_zfs != NULL);
+#ifndef __APPLE__
/*
* Disable vdev caching. If we don't do this, live pool traversal
* won't make progress because it will never see disk updates.
*/
zfs_vdev_cache_size = 0;
+#endif
for (c = 0; c < 256; c++) {
if (dump_all && c != 'L' && c != 'l' && c != 'R')
diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c
index 247865ec..9c19b819 100644
--- a/usr/src/cmd/zpool/zpool_main.c
+++ b/usr/src/cmd/zpool/zpool_main.c
@@ -196,8 +196,8 @@ get_usage(zpool_help_t idx) {
case HELP_CLEAR:
return (gettext("\tclear [device]\n"));
case HELP_CREATE:
- return (gettext("\tcreate [-fn] [-R root] [-m mountpoint] "
- " ...\n"));
+ return (gettext("\tcreate [-fn] [-o property=value] ... \n"
+ "\t [-m mountpoint] [-R root] ...\n"));
case HELP_DESTROY:
return (gettext("\tdestroy [-f] \n"));
case HELP_DETACH:
@@ -445,6 +445,52 @@ print_vdev_tree(zpool_handle_t *zhp, const char *name, nvlist_t *nv, int indent,
}
}
+/*
+ * Add a property pair (name, string-value) into a property nvlist.
+ */
+static int
+add_prop_list(const char *propname, char *propval, nvlist_t **props,
+ boolean_t poolprop)
+{
+ zpool_prop_t prop = ZPOOL_PROP_INVAL;
+ zfs_prop_t fprop;
+ nvlist_t *proplist;
+ const char *normnm;
+ char *strval;
+
+ if (*props == NULL &&
+ nvlist_alloc(props, NV_UNIQUE_NAME, 0) != 0) {
+ (void) fprintf(stderr,
+ gettext("internal error: out of memory\n"));
+ return (1);
+ }
+
+ proplist = *props;
+
+ if (poolprop) {
+ if ((prop = zpool_name_to_prop(propname)) == ZPOOL_PROP_INVAL) {
+ (void) fprintf(stderr, gettext("property '%s' is "
+ "not a valid pool property\n"), propname);
+ return (2);
+ }
+ normnm = zpool_prop_to_name(prop);
+ } else {
+ if ((fprop = zfs_name_to_prop(propname)) != ZFS_PROP_INVAL) {
+ normnm = zfs_prop_to_name(fprop);
+ } else {
+ normnm = propname;
+ }
+ }
+
+ if (nvlist_add_string(proplist, normnm, propval) != 0) {
+ (void) fprintf(stderr, gettext("internal "
+ "error: out of memory\n"));
+ return (1);
+ }
+
+ return (0);
+}
+
/*
* zpool add [-fn] ...
*
@@ -513,7 +559,7 @@ zpool_do_add(int argc, char **argv)
}
/* pass off to get_vdev_spec for processing */
- nvroot = make_root_vdev(zhp, force, !force, B_FALSE, argc, argv);
+ nvroot = make_root_vdev(zhp, NULL, force, !force, B_FALSE, argc, argv);
if (nvroot == NULL) {
zpool_close(zhp);
return (1);
@@ -589,7 +635,7 @@ zpool_do_remove(int argc, char **argv)
}
/*
- * zpool create [-fn] [-R root] [-m mountpoint] ...
+ * zpool create [-fn] [-o property=value] ... [-R root] [-m mountpoint] ...
*
* -f Force creation, even if devices appear in use
* -n Do not create the pool, but display the resulting layout if it
@@ -597,6 +643,7 @@ zpool_do_remove(int argc, char **argv)
* -R Create a pool under an alternate root
* -m Set default mountpoint for the root dataset. By default it's
* '/'
+ * -o Set property=value.
*
* Creates the named pool according to the given vdev specification. The
* bulk of the vdev processing is done in get_vdev_spec() in zpool_vdev.c. Once
@@ -616,9 +663,11 @@ zpool_do_create(int argc, char **argv)
char *mountpoint = NULL;
nvlist_t **child;
uint_t children;
+ nvlist_t *props = NULL;
+ char *propval = NULL;
/* check options */
- while ((c = getopt(argc, argv, ":fnR:m:")) != -1) {
+ while ((c = getopt(argc, argv, ":fnR:m:o:")) != -1) {
switch (c) {
case 'f':
force = B_TRUE;
@@ -632,6 +681,17 @@ zpool_do_create(int argc, char **argv)
case 'm':
mountpoint = optarg;
break;
+ case 'o':
+ if ((propval = strchr(optarg, '=')) == NULL) {
+ (void) fprintf(stderr, gettext("missing "
+ "'=' for -o option\n"));
+ usage(B_FALSE);
+ }
+ *propval = '\0';
+ propval++;
+ if (add_prop_list(optarg, propval, &props, B_TRUE))
+ usage(B_FALSE);
+ break;
case ':':
(void) fprintf(stderr, gettext("missing argument for "
"'%c' option\n"), optopt);
@@ -672,7 +732,7 @@ zpool_do_create(int argc, char **argv)
}
/* pass off to get_vdev_spec for bulk processing */
- nvroot = make_root_vdev(NULL, force, !force, B_FALSE, argc - 1,
+ nvroot = make_root_vdev(NULL, props, force, !force, B_FALSE, argc - 1,
argv + 1);
if (nvroot == NULL)
return (1);
@@ -766,6 +826,12 @@ zpool_do_create(int argc, char **argv)
ret = 0;
} else {
ret = 1;
+ /*
+ * Add other properties not describing the vdev topology
+ */
+ if (props)
+ nvlist_add_nvlist(nvroot, ZPOOL_CONFIG_PROPS, props);
+
/*
* Hand off to libzfs.
*/
@@ -2322,7 +2388,7 @@ zpool_do_attach_or_replace(int argc, char **argv, int replacing)
return (1);
}
- nvroot = make_root_vdev(zhp, force, B_FALSE, replacing, argc, argv);
+ nvroot = make_root_vdev(zhp, NULL, force, B_FALSE, replacing, argc, argv);
if (nvroot == NULL) {
zpool_close(zhp);
return (1);
diff --git a/usr/src/cmd/zpool/zpool_util.h b/usr/src/cmd/zpool/zpool_util.h
index 2a1aca03..f4e2c154 100644
--- a/usr/src/cmd/zpool/zpool_util.h
+++ b/usr/src/cmd/zpool/zpool_util.h
@@ -47,7 +47,7 @@ uint_t num_logs(nvlist_t *nv);
* Virtual device functions
*/
-nvlist_t *make_root_vdev(zpool_handle_t *zhp, int force, int check_rep,
+nvlist_t *make_root_vdev(zpool_handle_t *zhp, nvlist_t *props, int force, int check_rep,
boolean_t isreplace, int argc, char **argv);
/*
diff --git a/usr/src/cmd/zpool/zpool_vdev.c b/usr/src/cmd/zpool/zpool_vdev.c
index 63b93a19..d8a8c5e7 100644
--- a/usr/src/cmd/zpool/zpool_vdev.c
+++ b/usr/src/cmd/zpool/zpool_vdev.c
@@ -413,7 +413,7 @@ is_whole_disk(const char *arg)
* xxx Shorthand for /dev/dsk/xxx
*/
static nvlist_t *
-make_leaf_vdev(const char *arg, uint64_t is_log)
+make_leaf_vdev(nvlist_t *props, const char *arg, uint64_t is_log)
{
char path[MAXPATHLEN];
struct stat statbuf;
@@ -538,6 +538,20 @@ make_leaf_vdev(const char *arg, uint64_t is_log)
(void) close(fd);
}
+ if (props != NULL) {
+
+ uint64_t ashift = 0;
+ char *value = NULL;
+
+ if (nvlist_lookup_string(props,
+ zpool_prop_to_name(ZPOOL_PROP_ASHIFT), &value) == 0)
+ zfs_nicestrtonum(NULL, value, &ashift);
+
+ if (ashift > 0)
+ verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT,
+ ashift) == 0);
+ }
+
return (vdev);
}
@@ -1158,7 +1172,7 @@ is_grouping(const char *type, int *mindev)
* because the program is just going to exit anyway.
*/
nvlist_t *
-construct_spec(int argc, char **argv)
+construct_spec(nvlist_t *props, int argc, char **argv)
{
nvlist_t *nvroot, *nv, **top, **spares;
int t, toplevels, mindev, nspares, nlogs;
@@ -1234,7 +1248,7 @@ construct_spec(int argc, char **argv)
children * sizeof (nvlist_t *));
if (child == NULL)
zpool_no_memory();
- if ((nv = make_leaf_vdev(argv[c], B_FALSE))
+ if ((nv = make_leaf_vdev(props, argv[c], B_FALSE))
== NULL)
return (NULL);
child[children - 1] = nv;
@@ -1279,7 +1293,7 @@ construct_spec(int argc, char **argv)
* We have a device. Pass off to make_leaf_vdev() to
* construct the appropriate nvlist describing the vdev.
*/
- if ((nv = make_leaf_vdev(argv[0], is_log)) == NULL)
+ if ((nv = make_leaf_vdev(props, argv[0], is_log)) == NULL)
return (NULL);
if (is_log)
nlogs++;
@@ -1342,7 +1356,7 @@ construct_spec(int argc, char **argv)
* added, even if they appear in use.
*/
nvlist_t *
-make_root_vdev(zpool_handle_t *zhp, int force, int check_rep,
+make_root_vdev(zpool_handle_t *zhp, nvlist_t *props, int force, int check_rep,
boolean_t isreplacing, int argc, char **argv)
{
nvlist_t *newroot;
@@ -1354,7 +1368,7 @@ make_root_vdev(zpool_handle_t *zhp, int force, int check_rep,
* that we have a valid specification, and that all devices can be
* opened.
*/
- if ((newroot = construct_spec(argc, argv)) == NULL)
+ if ((newroot = construct_spec(props, argc, argv)) == NULL)
return (NULL);
if (zhp && ((poolconfig = zpool_get_config(zhp, NULL)) == NULL))
diff --git a/usr/src/cmd/ztest/kernel.c b/usr/src/cmd/ztest/kernel.c
index be445a57..eb89c523 100644
--- a/usr/src/cmd/ztest/kernel.c
+++ b/usr/src/cmd/ztest/kernel.c
@@ -25,6 +25,10 @@
#pragma ident "@(#)kernel.c 1.3 06/03/16 SMI"
+#ifdef __APPLE__
+#import
+#import
+#endif /* __APPLE__ */
#include
#include
#include
@@ -34,7 +38,9 @@
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
/*
* Emulation of kernel services in userland.
diff --git a/usr/src/cmd/ztest/ztest.c b/usr/src/cmd/ztest/ztest.c
index 42715d7f..3e3dff0e 100644
--- a/usr/src/cmd/ztest/ztest.c
+++ b/usr/src/cmd/ztest/ztest.c
@@ -19,7 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Portions Copyright 2009 Apple Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -83,7 +86,9 @@
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
@@ -96,11 +101,13 @@
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
-#include
+//#include
#include
#include
#include
@@ -125,6 +132,11 @@ static int zopt_init = 1;
static char *zopt_dir = "/tmp";
static uint64_t zopt_time = 300; /* 5 minutes */
static int zopt_maxfaults;
+#ifdef __APPLE__
+static uint64_t zopt_seed = 0;
+volatile int ztest_forever = 0;
+int zdb_forever = 0;
+#endif
typedef struct ztest_args {
char *za_pool;
@@ -166,6 +178,9 @@ ztest_func_t ztest_spa_rename;
typedef struct ztest_info {
ztest_func_t *zi_func; /* test function */
+#ifdef __APPLE__
+ char *zi_name; /* test function name */
+#endif
uint64_t *zi_interval; /* execute every seconds */
uint64_t zi_calls; /* per-pass count */
uint64_t zi_call_time; /* per-pass time */
@@ -178,6 +193,7 @@ uint64_t zopt_often = 1; /* every second */
uint64_t zopt_sometimes = 10; /* every 10 seconds */
uint64_t zopt_rarely = 60; /* every 60 seconds */
+#ifndef __APPLE__
ztest_info_t ztest_info[] = {
{ ztest_dmu_read_write, &zopt_always },
{ ztest_dmu_write_parallel, &zopt_always },
@@ -196,6 +212,58 @@ ztest_info_t ztest_info[] = {
{ ztest_vdev_add_remove, &zopt_vdevtime },
{ ztest_scrub, &zopt_vdevtime },
};
+#else
+ztest_info_t ztest_info[] = {
+ { ztest_dmu_read_write,
+ "ztest_dmu_read_write",
+ &zopt_always},
+ { ztest_dmu_write_parallel,
+ "ztest_dmu_write_parallel",
+ &zopt_always},
+ { ztest_dmu_object_alloc_free,
+ "ztest_dmu_object_alloc_free",
+ &zopt_always},
+ { ztest_zap,
+ "ztest_zap",
+ &zopt_always},
+ { ztest_zap_parallel,
+ "ztest_zap_parallel",
+ &zopt_always},
+ { ztest_traverse,
+ "ztest_traverse",
+ &zopt_often},
+ { ztest_dsl_prop_get_set,
+ "ztest_dsl_prop_get_set",
+ &zopt_sometimes},
+ { ztest_dmu_objset_create_destroy,
+ "ztest_dmu_objset_create_destroy",
+ &zopt_sometimes},
+ { ztest_dmu_snapshot_create_destroy,
+ "ztest_dmu_snapshot_create_destroy",
+ &zopt_rarely},
+ { ztest_spa_create_destroy,
+ "ztest_spa_create_destroy",
+ &zopt_sometimes},
+ { ztest_fault_inject,
+ "ztest_fault_inject",
+ &zopt_sometimes},
+ { ztest_spa_rename,
+ "ztest_spa_rename",
+ &zopt_rarely},
+ { ztest_vdev_attach_detach,
+ "ztest_vdev_attach_detach",
+ &zopt_rarely},
+ { ztest_vdev_LUN_growth,
+ "ztest_vdev_LUN_growth",
+ &zopt_rarely},
+ { ztest_vdev_add_remove,
+ "ztest_vdev_add_remove",
+ &zopt_vdevtime},
+ { ztest_scrub,
+ "ztest_scrub",
+ &zopt_vdevtime},
+};
+#endif
#define ZTEST_FUNCS (sizeof (ztest_info) / sizeof (ztest_info_t))
@@ -231,7 +299,11 @@ typedef struct ztest_block_tag {
static char ztest_dev_template[] = "%s/%s.%llua";
static ztest_shared_t *ztest_shared;
+#ifdef __APPLE__
+static mutex_t ztest_random_mtx = PTHREAD_MUTEX_INITIALIZER;
+#else
static int ztest_random_fd;
+#endif
static int ztest_dump_core = 1;
extern uint64_t zio_gang_bang;
@@ -244,7 +316,11 @@ extern uint16_t zio_zil_fail_shift;
#define ZTEST_DIROBJ_BLOCKSIZE (1 << 10)
#define ZTEST_DIRSIZE 256
+#ifdef __APPLE__
+static void usage(boolean_t) __attribute__ ((noreturn));
+#else
static void usage(boolean_t) __NORETURN;
+#endif
/*
* These libumem hooks provide a reasonable set of defaults for the allocator's
@@ -376,6 +452,10 @@ usage(boolean_t requested)
"\t[-T time] total run time (default: %llu sec)\n"
"\t[-P passtime] time per pass (default: %llu sec)\n"
"\t[-z zil failure rate (default: fail every 2^%llu allocs)]\n"
+#ifdef __APPLE__
+ "\t[-S random seed (default: randomly chosen)]\n"
+ "\t[-D] wait in child process for GDB to attach. (After attaching say 'set ztest_forever=0')\n"
+#endif
"\t[-h] (print help)\n"
"",
cmdname,
@@ -406,8 +486,14 @@ ztest_random(uint64_t range)
if (range == 0)
return (0);
+#ifdef __APPLE__
+ pthread_mutex_lock(&ztest_random_mtx);
+ r = random();
+ pthread_mutex_unlock(&ztest_random_mtx);
+#else
if (read(ztest_random_fd, &r, sizeof (r)) != sizeof (r))
fatal(1, "short read from /dev/urandom");
+#endif
return (r % range);
}
@@ -432,7 +518,11 @@ process_options(int argc, char **argv)
zio_zil_fail_shift = 5;
while ((opt = getopt(argc, argv,
+#ifdef __APPLE__
+ "v:s:a:m:r:R:d:t:g:i:k:p:f:VET:P:z:h:S:D")) != EOF) {
+#else
"v:s:a:m:r:R:d:t:g:i:k:p:f:VET:P:z:h")) != EOF) {
+#endif
value = 0;
switch (opt) {
case 'v':
@@ -449,6 +539,9 @@ process_options(int argc, char **argv)
case 'T':
case 'P':
case 'z':
+#ifdef __APPLE__
+ case 'S':
+#endif
value = nicenumtoull(optarg);
}
switch (opt) {
@@ -506,6 +599,19 @@ process_options(int argc, char **argv)
case 'z':
zio_zil_fail_shift = MIN(value, 16);
break;
+#ifdef __APPLE__
+ case 'S':
+ zopt_seed = value;
+ break;
+ case 'D':
+ if (ztest_forever == 0) {
+ ztest_forever = 1;
+ } else {
+ zdb_forever = 1;
+ ztest_forever = 0;
+ }
+ break;
+#endif
case 'h':
usage(B_TRUE);
break;
@@ -845,8 +951,14 @@ ztest_vdev_add_remove(ztest_args_t *za)
/*
* Make 1/4 of the devices be log devices.
*/
+#ifndef __APPLE__
nvroot = make_vdev_root(zopt_vdev_size,
ztest_random(4) == 0, zopt_raidz, zopt_mirrors, 1);
+#else
+ /* XXX/b94: turning this off, since we don't support log devices */
+ nvroot = make_vdev_root(zopt_vdev_size,
+ 0, zopt_raidz, zopt_mirrors, 1);
+#endif
error = spa_vdev_add(spa, nvroot);
nvlist_free(nvroot);
@@ -2840,6 +2952,10 @@ ztest_replace_one_disk(spa_t *spa, uint64_t vdev)
nvlist_free(root);
}
+/* fake getexecname() by just saving Arg0, which is supposed to be the
+ full path to the executable. */
+char *getexecname_fake=0;
+
static void
ztest_verify_blocks(char *pool)
{
@@ -2851,7 +2967,34 @@ ztest_verify_blocks(char *pool)
char *isa;
int isalen;
FILE *fp;
-
+
+#ifdef __APPLE__
+ /* Assume zdb is always located at /usr/sbin/zdb */
+ /* snprintf(zdb, 15, "%s", "/usr/bin/ztest"); */
+ (void) realpath(getexecname_fake, zdb);
+
+ ztest = strstr(zdb, "/ztest");
+#ifdef ZDB_STATIC
+ strcpy(ztest, "/" ZDB_STATIC);
+#else
+ strcpy(ztest, "/zdb");
+#endif
+ if (access(zdb, F_OK) != 0) {
+ /* zdb not found in same path as ztest. */
+ printf("Failed to find zdb as '%s'\n", zdb);
+#ifdef ZDB_STATIC
+ strcpy(zdb,"/usr/sbin/" ZDB_STATIC);
+#else
+ strcpy(zdb,"/usr/sbin/zdb");
+#endif
+ }
+ bin = strdup(zdb);
+ (void) sprintf(zdb, "%s -bc%s%s -U -O %s %s",
+ bin,
+ zopt_verbose >= 3 ? "s" : "",
+ zopt_verbose >= 4 ? "v" : "",
+ ztest_random(2) == 0 ? "pre" : "post", pool);
+ #else
(void) realpath(getexecname(), zdb);
/* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
@@ -2868,9 +3011,17 @@ ztest_verify_blocks(char *pool)
zopt_verbose >= 4 ? "v" : "",
ztest_random(2) == 0 ? "pre" : "post", pool);
free(isa);
+ #endif
+
+#ifdef __APPLE__
+ if (zdb_forever) {
+ strcat(zdb, " -D");
+ }
+#endif
if (zopt_verbose >= 5)
- (void) printf("Executing %s\n", strstr(zdb, "zdb "));
+ (void) printf("Executing '%s'\n", zdb);
+ /* (void) printf("Executing %s\n", strstr(zdb, "zdb ")); */
fp = popen(zdb, "r");
@@ -3049,10 +3200,15 @@ ztest_thread(void *arg)
atomic_add_64(&zi->zi_call_time, functime);
if (zopt_verbose >= 4) {
+#ifdef __APPLE__
+ (void) printf("%6.2f sec in %s\n",
+ (double)functime / NANOSEC, zi->zi_name);
+#else
Dl_info dli;
(void) dladdr((void *)zi->zi_func, &dli);
(void) printf("%6.2f sec in %s\n",
(double)functime / NANOSEC, dli.dli_sname);
+#endif
}
/*
@@ -3351,13 +3507,37 @@ main(int argc, char **argv)
/* Override location of zpool.cache */
spa_config_dir = "/tmp";
+#ifdef __APPLE__
+ zopt_seed = time(0);
+#else
ztest_random_fd = open("/dev/urandom", O_RDONLY);
+#endif
+
+#ifdef __APPLE__
+ /* fake getexecname() by just saving Arg0, which is supposed
+ to be the full path to the executable. */
+ getexecname_fake = strdup(argv[0]);
+#endif
process_options(argc, argv);
+#ifdef __APPLE__
+ srandom(zopt_seed);
+#endif
argc -= optind;
argv += optind;
+#ifdef __APPLE__
+ /*
+ * Check zopt_dir, as ztest_init() will fail if path is not absolute
+ */
+
+ if (zopt_dir[0] != '/') {
+ fprintf(stderr, "%s: -f : path must start with '/'.\n", getexecname_fake);
+ exit(1);
+ }
+#endif
+
dprintf_setup(&argc, argv);
/*
@@ -3371,10 +3551,17 @@ main(int argc, char **argv)
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
if (zopt_verbose >= 1) {
+#ifdef __APPLE__
+ (void) printf("%llu vdevs, %d datasets, %d threads,"
+ " %llu seconds, seeding with %llu...\n",
+ (u_longlong_t)zopt_vdevs, zopt_datasets, zopt_threads,
+ (u_longlong_t)zopt_time, (u_longlong_t)zopt_seed);
+#else
(void) printf("%llu vdevs, %d datasets, %d threads,"
" %llu seconds...\n",
(u_longlong_t)zopt_vdevs, zopt_datasets, zopt_threads,
(u_longlong_t)zopt_time);
+#endif
}
/*
@@ -3426,9 +3613,16 @@ main(int argc, char **argv)
pid = fork();
if (pid == -1)
- fatal(1, "fork failed");
+ fatal(1, "fork of ztest failed");
if (pid == 0) { /* child */
+ /* To debug the child with gdb, uncomment these lines
+ * and then attach and do "set variable forever=0" */
+#ifdef __APPLE__
+ printf("forever=%d\n", ztest_forever);
+ while (ztest_forever) {}
+#endif
+
struct rlimit rl = { 1024, 1024 };
(void) setrlimit(RLIMIT_NOFILE, &rl);
(void) enable_extended_FILE_stdio(-1, -1);
@@ -3442,21 +3636,21 @@ main(int argc, char **argv)
if (WIFEXITED(status)) {
if (WEXITSTATUS(status) != 0) {
(void) fprintf(stderr,
- "child exited with code %d\n",
- WEXITSTATUS(status));
+ "child %s exited with code %d\n",
+ argv[0], WEXITSTATUS(status));
exit(2);
}
} else if (WIFSIGNALED(status)) {
if (WTERMSIG(status) != SIGKILL) {
(void) fprintf(stderr,
- "child died with signal %d\n",
- WTERMSIG(status));
+ "child %s died with signal %d\n",
+ argv[0], WTERMSIG(status));
exit(3);
}
kills++;
} else {
(void) fprintf(stderr, "something strange happened "
- "to child\n");
+ "to child %s\n", argv[0]);
exit(4);
}
@@ -3487,6 +3681,13 @@ main(int argc, char **argv)
(void) printf("%7s %9s %s\n",
"-----", "----", "--------");
for (f = 0; f < ZTEST_FUNCS; f++) {
+ #ifdef __APPLE__
+ zi = &zs->zs_info[f];
+ print_time(zi->zi_call_time, timebuf);
+ (void) printf("%7llu %9s %s\n",
+ (u_longlong_t)zi->zi_calls, timebuf,
+ zi->zi_name);
+ #else
Dl_info dli;
zi = &zs->zs_info[f];
@@ -3495,6 +3696,7 @@ main(int argc, char **argv)
(void) printf("%7llu %9s %s\n",
(u_longlong_t)zi->zi_calls, timebuf,
dli.dli_sname);
+ #endif
}
(void) printf("\n");
}
diff --git a/usr/src/common/zfs/zfs_prop.c b/usr/src/common/zfs/zfs_prop.c
index 4bb2d3d7..3d30d64b 100644
--- a/usr/src/common/zfs/zfs_prop.c
+++ b/usr/src/common/zfs/zfs_prop.c
@@ -70,7 +70,14 @@
typedef enum {
PROP_DEFAULT,
PROP_READONLY,
- PROP_INHERIT
+ PROP_INHERIT,
+ /*
+ * ONETIME properties are a sort of conglomeration of READONLY
+ * and INHERIT. They can be set only during object creation,
+ * after that they are READONLY. If not explicitly set during
+ * creation, they can be inherited.
+ */
+ PROP_ONETIME
} prop_attr_t;
typedef struct zfs_index {
@@ -326,10 +333,15 @@ zfs_prop_init(void)
register_number(ZFS_PROP_COMPRESSRATIO, "compressratio", 0,
PROP_READONLY, ZFS_TYPE_ANY,
"<1.00x or higher if compressed>", "RATIO");
+
+ /* readonly onetime number properties */
+ register_number(ZPOOL_PROP_ASHIFT, "ashift", 0, PROP_ONETIME,
+ ZFS_TYPE_POOL, "", "ASHIFT");
register_number(ZFS_PROP_VOLBLOCKSIZE, "volblocksize", 8192,
- PROP_READONLY,
+ PROP_ONETIME,
ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK");
+
/* default number properties */
register_number(ZFS_PROP_QUOTA, "quota", 0, PROP_DEFAULT,
ZFS_TYPE_FILESYSTEM, " | none", "QUOTA");
@@ -616,7 +628,17 @@ zpool_prop_default_numeric(zpool_prop_t prop)
int
zfs_prop_readonly(zfs_prop_t prop)
{
- return (zfs_prop_table[prop].pd_attr == PROP_READONLY);
+ return (zfs_prop_table[prop].pd_attr == PROP_READONLY ||
+ zfs_prop_table[prop].pd_attr == PROP_ONETIME);
+}
+
+/*
+ * Returns TRUE if the property is only allowed to be set once.
+ */
+boolean_t
+zfs_prop_setonce(zfs_prop_t prop)
+{
+ return (zfs_prop_table[prop].pd_attr == PROP_ONETIME);
}
/*
@@ -645,7 +667,8 @@ zpool_prop_to_name(zpool_prop_t prop)
int
zfs_prop_inheritable(zfs_prop_t prop)
{
- return (zfs_prop_table[prop].pd_attr == PROP_INHERIT);
+ return (zfs_prop_table[prop].pd_attr == PROP_INHERIT ||
+ zfs_prop_table[prop].pd_attr == PROP_ONETIME);
}
/*
diff --git a/usr/src/lib/libgen/common/mkdirp.c b/usr/src/lib/libgen/common/mkdirp.c
index 29601311..3520cbf4 100644
--- a/usr/src/lib/libgen/common/mkdirp.c
+++ b/usr/src/lib/libgen/common/mkdirp.c
@@ -26,11 +26,15 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ * Portions Copyright 2007 Apple Inc. All rights reserved.
+ * Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+#pragma ident "@(#)mkdirp.c 1.15 06/01/04 SMI"
+#ifndef __APPLE__
#pragma weak mkdirp = _mkdirp
+#endif
/*
* Creates directory and it's parents if the parents do not
diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c
index 58abeb60..5f214d01 100644
--- a/usr/src/lib/libzfs/common/libzfs_dataset.c
+++ b/usr/src/lib/libzfs/common/libzfs_dataset.c
@@ -694,7 +694,7 @@ bootfs_poolname_valid(char *pool, char *bootfs)
*/
nvlist_t *
zfs_validate_properties(libzfs_handle_t *hdl, zfs_type_t type, char *pool_name,
- nvlist_t *nvl, uint64_t zoned, zfs_handle_t *zhp, const char *errbuf)
+ nvlist_t *nvl, uint64_t zoned, zfs_handle_t *zhp, const char *errbuf, boolean_t creating)
{
nvpair_t *elem;
const char *propname;
@@ -780,7 +780,7 @@ zfs_validate_properties(libzfs_handle_t *hdl, zfs_type_t type, char *pool_name,
}
if (zfs_prop_readonly(prop) &&
- (prop != ZFS_PROP_VOLBLOCKSIZE || zhp != NULL)) {
+ (!zfs_prop_setonce(prop) || (creating == B_FALSE))) {
zfs_error_aux(hdl,
dgettext(TEXT_DOMAIN, "'%s' is readonly"),
propname);
@@ -1036,6 +1036,26 @@ zfs_validate_properties(libzfs_handle_t *hdl, zfs_type_t type, char *pool_name,
break;
#endif /* !__APPLE__ */
+
+ case ZPOOL_PROP_ASHIFT:
+ if (creating == B_FALSE) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "property '%s' can only be set at "
+ "creation time"), propname);
+ (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+ goto error;
+ }
+
+ if (intval != 0 && (intval < 9 || intval > 17)) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "property '%s' number %d is invalid."),
+ propname, intval);
+ (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+ goto error;
+ }
+
+ break;
+
case ZPOOL_PROP_BOOTFS:
/*
* bootfs property value has to be a dataset name and
@@ -1848,7 +1868,7 @@ zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval)
}
if ((realprops = zfs_validate_properties(hdl, zhp->zfs_type, NULL, nvl,
- zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf)) == NULL)
+ zfs_prop_get_int(zhp, ZFS_PROP_ZONED), zhp, errbuf, B_FALSE)) == NULL)
goto error;
nvlist_free(nvl);
nvl = realprops;
@@ -2835,7 +2855,7 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
zc.zc_objset_type = DMU_OST_ZFS;
if (props && (props = zfs_validate_properties(hdl, type, NULL, props,
- zoned, NULL, errbuf)) == 0)
+ zoned, NULL, errbuf, B_TRUE)) == 0)
return (-1);
if (type == ZFS_TYPE_VOLUME) {
@@ -3120,7 +3140,7 @@ zfs_clone(zfs_handle_t *zhp, const char *target, nvlist_t *props)
if (props) {
if ((props = zfs_validate_properties(hdl, type, NULL, props,
- zoned, zhp, errbuf)) == NULL)
+ zoned, zhp, errbuf, B_TRUE)) == NULL)
return (-1);
if (zcmd_write_src_nvlist(hdl, &zc, props, NULL) != 0) {
diff --git a/usr/src/lib/libzfs/common/libzfs_impl.h b/usr/src/lib/libzfs/common/libzfs_impl.h
index ed575c87..e401eda7 100644
--- a/usr/src/lib/libzfs/common/libzfs_impl.h
+++ b/usr/src/lib/libzfs/common/libzfs_impl.h
@@ -119,7 +119,7 @@ zfs_prop_t zfs_prop_iter_common(zfs_prop_f, void *, zfs_type_t, boolean_t,
zfs_prop_t zfs_name_to_prop_common(const char *, zfs_type_t);
nvlist_t *zfs_validate_properties(libzfs_handle_t *, zfs_type_t, char *,
- nvlist_t *, uint64_t, zfs_handle_t *zhp, const char *errbuf);
+ nvlist_t *, uint64_t, zfs_handle_t *zhp, const char *errbuf, boolean_t creating);
typedef struct prop_changelist prop_changelist_t;
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c
index 3a6471fc..b30c431f 100644
--- a/usr/src/lib/libzfs/common/libzfs_pool.c
+++ b/usr/src/lib/libzfs/common/libzfs_pool.c
@@ -399,6 +399,7 @@ zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot,
{
zfs_cmd_t zc = { 0 };
char msg[1024];
+ nvlist_t *props = NULL;
(void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN,
"cannot create '%s'"), pool);
@@ -410,6 +411,24 @@ zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot,
return (zfs_error_fmt(hdl, EZFS_BADPATH,
dgettext(TEXT_DOMAIN, "bad alternate root '%s'"), altroot));
+ /*
+ * Process additional properties not (directly) describing the
+ * vdev tree.
+ */
+
+ if (nvlist_lookup_nvlist(nvroot, ZPOOL_CONFIG_PROPS, &props) == 0) {
+ char errbuf[1024];
+ nvlist_t *newprops = zfs_validate_properties(hdl, ZFS_TYPE_POOL,
+ pool, props, 0, NULL, errbuf, B_TRUE);
+ nvlist_remove(nvroot, ZPOOL_CONFIG_PROPS, DATA_TYPE_NVLIST);
+ if (newprops) {
+ nvlist_add_nvlist(nvroot, ZPOOL_CONFIG_PROPS, newprops);
+ } else {
+ return(zfs_error(hdl, EZFS_BADPROP, msg));
+ }
+ nvlist_free(newprops);
+ }
+
if (zcmd_write_src_nvlist(hdl, &zc, nvroot, NULL) != 0)
return (-1);
@@ -2228,7 +2247,7 @@ zpool_set_prop(zpool_handle_t *zhp, const char *propname, const char *propval)
}
if ((realprops = zfs_validate_properties(zhp->zpool_hdl, ZFS_TYPE_POOL,
- zhp->zpool_name, nvl, 0, NULL, errbuf)) == NULL) {
+ zhp->zpool_name, nvl, 0, NULL, errbuf, B_FALSE)) == NULL) {
nvlist_free(nvl);
return (-1);
}
@@ -2267,6 +2286,7 @@ zpool_get_prop_int(zpool_handle_t *zhp, zpool_prop_t prop)
switch (prop) {
case ZPOOL_PROP_AUTOREPLACE:
+ case ZPOOL_PROP_ASHIFT:
if (nvlist_lookup_nvlist(zhp->zpool_props,
zpool_prop_to_name(prop), &nvp) != 0) {
value = zpool_prop_default_numeric(prop);
@@ -2347,6 +2367,21 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *propbuf,
(void) strlcpy(propbuf, value ? "on" : "off", proplen);
break;
+ case ZPOOL_PROP_ASHIFT:
+ if (nvlist_lookup_nvlist(zhp->zpool_props,
+ zpool_prop_to_name(prop), &nvp) != 0) {
+ value = zpool_prop_default_numeric(prop);
+ src = ZFS_SRC_DEFAULT;
+ } else {
+ VERIFY(nvlist_lookup_uint64(nvp,
+ ZFS_PROP_SOURCE, &value) == 0);
+ src = value;
+ VERIFY(nvlist_lookup_uint64(nvp, ZFS_PROP_VALUE,
+ &value) == 0);
+ }
+ (void) snprintf(propbuf, proplen, "%llu", value);
+ break;
+
default:
return (-1);
}
diff --git a/usr/src/lib/libzpool/common/kernel.c b/usr/src/lib/libzpool/common/kernel.c
index 12219b72..092ec2d5 100644
--- a/usr/src/lib/libzpool/common/kernel.c
+++ b/usr/src/lib/libzpool/common/kernel.c
@@ -19,7 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Portions Copyright 2009 Apple Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,7 +37,9 @@
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
@@ -47,9 +52,11 @@ uint64_t physmem;
vnode_t *rootdir = (vnode_t *)0xabcd1234;
char hw_serial[11];
+#ifndef __APPLE__
struct utsname utsname = {
"userland", "libzpool", "1", "1", "na"
};
+#endif
/*
* =========================================================================
@@ -68,6 +75,7 @@ zk_thread_create(void (*func)(), void *arg)
return ((void *)(uintptr_t)tid);
}
+#ifndef __APPLE__
/*
* =========================================================================
* kstats
@@ -90,6 +98,7 @@ kstat_install(kstat_t *ksp)
void
kstat_delete(kstat_t *ksp)
{}
+#endif
/*
* =========================================================================
@@ -164,8 +173,16 @@ mutex_owner(kmutex_t *mp)
void
rw_init(krwlock_t *rwlp, char *name, int type, void *arg)
{
+#ifdef __APPLE__
+ VERIFY(rwlock_init(&rwlp->rw_lock, USYNC_THREAD, NULL) == 0);
+#else
rwlock_init(&rwlp->rw_lock, USYNC_THREAD, NULL);
+#endif
rwlp->rw_owner = NULL;
+#ifdef __APPLE__
+ zmutex_init(&rwlp->mutex);
+ rwlp->reader_thr_count = 0;
+#endif
rwlp->initialized = B_TRUE;
}
@@ -174,23 +191,48 @@ rw_destroy(krwlock_t *rwlp)
{
rwlock_destroy(&rwlp->rw_lock);
rwlp->rw_owner = (void *)-1UL;
+#ifdef __APPLE__
+ zmutex_destroy(&rwlp->mutex);
+ rwlp->reader_thr_count = -2;
+#endif
rwlp->initialized = B_FALSE;
}
void
rw_enter(krwlock_t *rwlp, krw_t rw)
{
+#ifndef __APPLE__
ASSERT(!RW_LOCK_HELD(rwlp));
+#endif
ASSERT(rwlp->initialized == B_TRUE);
ASSERT(rwlp->rw_owner != (void *)-1UL);
ASSERT(rwlp->rw_owner != curthread);
+#ifdef __APPLE__
+ if (rw == RW_READER) {
+ VERIFY(rw_rdlock(&rwlp->rw_lock) == 0);
+
+ mutex_enter(&rwlp->mutex);
+ ASSERT(rwlp->reader_thr_count >= 0);
+ rwlp->reader_thr_count++;
+ mutex_exit(&rwlp->mutex);
+ ASSERT(rwlp->rw_owner == NULL);
+ } else {
+ VERIFY(rw_wrlock(&rwlp->rw_lock) == 0);
+
+ ASSERT(rwlp->rw_owner == NULL);
+ ASSERT(rwlp->reader_thr_count == 0);
+ rwlp->reader_thr_count = -1;
+ rwlp->rw_owner = curthread;
+ }
+#else
if (rw == RW_READER)
(void) rw_rdlock(&rwlp->rw_lock);
else
(void) rw_wrlock(&rwlp->rw_lock);
rwlp->rw_owner = curthread;
+#endif
}
void
@@ -199,7 +241,23 @@ rw_exit(krwlock_t *rwlp)
ASSERT(rwlp->initialized == B_TRUE);
ASSERT(rwlp->rw_owner != (void *)-1UL);
+#ifdef __APPLE__
+ if(rwlp->rw_owner == curthread) {
+ /* Write locked */
+ ASSERT(rwlp->reader_thr_count == -1);
+ rwlp->reader_thr_count = 0;
+ rwlp->rw_owner = NULL;
+ } else {
+ /* Read locked */
+ ASSERT(rwlp->rw_owner == NULL);
+ mutex_enter(&rwlp->mutex);
+ ASSERT(rwlp->reader_thr_count >= 1);
+ rwlp->reader_thr_count--;
+ mutex_exit(&rwlp->mutex);
+ }
+#else
rwlp->rw_owner = NULL;
+#endif
(void) rw_unlock(&rwlp->rw_lock);
}
@@ -210,6 +268,9 @@ rw_tryenter(krwlock_t *rwlp, krw_t rw)
ASSERT(rwlp->initialized == B_TRUE);
ASSERT(rwlp->rw_owner != (void *)-1UL);
+#ifdef __APPLE__
+ ASSERT(rwlp->rw_owner != curthread);
+#endif
if (rw == RW_READER)
rv = rw_tryrdlock(&rwlp->rw_lock);
@@ -217,7 +278,22 @@ rw_tryenter(krwlock_t *rwlp, krw_t rw)
rv = rw_trywrlock(&rwlp->rw_lock);
if (rv == 0) {
+#ifdef __APPLE__
+ if(rw == RW_READER) {
+ mutex_enter(&rwlp->mutex);
+ ASSERT(rwlp->reader_thr_count >= 0);
+ rwlp->reader_thr_count++;
+ mutex_exit(&rwlp->mutex);
+ ASSERT(rwlp->rw_owner == NULL);
+ } else {
+ ASSERT(rwlp->rw_owner == NULL);
+ ASSERT(rwlp->reader_thr_count == 0);
+ rwlp->reader_thr_count = -1;
+ rwlp->rw_owner = curthread;
+ }
+#else
rwlp->rw_owner = curthread;
+#endif
return (1);
}
@@ -243,13 +319,21 @@ rw_tryupgrade(krwlock_t *rwlp)
void
cv_init(kcondvar_t *cv, char *name, int type, void *arg)
{
+#ifdef __APPLE__
+ ASSERT(type == CV_DEFAULT);
+#endif
VERIFY(cond_init(cv, type, NULL) == 0);
}
void
cv_destroy(kcondvar_t *cv)
{
+#ifdef __APPLE__
+ int ret = cond_destroy(cv);
+ VERIFY(ret == 0 || ret == EINVAL); /* XXX/ztest: ok to ignore EINVAL? */
+#else
VERIFY(cond_destroy(cv) == 0);
+#endif
}
void
@@ -268,22 +352,50 @@ cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime)
int error;
timestruc_t ts;
clock_t delta;
+#ifdef __APPLE__
+ struct timeval tv;
+ uint64_t dsec;
+#endif
top:
delta = abstime - lbolt;
if (delta <= 0)
return (-1);
+#ifdef __APPLE__
+ VERIFY(gettimeofday(&tv, NULL) == 0);
+
+ dsec = MAX(1, delta / hz);
+ ASSERT(dsec >= 1);
+ ts.tv_sec = tv.tv_sec + dsec;
+ ts.tv_nsec = tv.tv_usec * 1000 + (delta % hz) * (NANOSEC / hz);
+ ASSERT(ts.tv_nsec >= 0);
+
+ if (ts.tv_nsec >= NANOSEC) {
+ ts.tv_sec++;
+ ts.tv_nsec -= NANOSEC;
+ }
+#else
ts.tv_sec = delta / hz;
ts.tv_nsec = (delta % hz) * (NANOSEC / hz);
+#endif
ASSERT(mutex_owner(mp) == curthread);
mp->m_owner = NULL;
+#ifdef __APPLE__
+ error = cond_timedwait(cv, &mp->m_lock, &ts);
+#else
error = cond_reltimedwait(cv, &mp->m_lock, &ts);
+#endif
mp->m_owner = curthread;
+#ifdef __APPLE__
+ if (error == ETIMEDOUT)
+ return (-1);
+#else
if (error == ETIME)
return (-1);
+#endif
if (error == EINTR)
goto top;
@@ -325,7 +437,11 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
vnode_t *vp;
int old_umask;
char realpath[MAXPATHLEN];
+#if _DARWIN_FEATURE_64_BIT_INODE
+ struct stat st;
+#else
struct stat64 st;
+#endif
/*
* If we're accessing a real disk from userland, we need to use
@@ -342,7 +458,11 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
fd = open64(path, O_RDONLY);
if (fd == -1)
return (errno);
+#if _DARWIN_FEATURE_64_BIT_INODE
+ if (fstat(fd, &st) == -1) {
+#else
if (fstat64(fd, &st) == -1) {
+#endif
close(fd);
return (errno);
}
@@ -354,7 +474,11 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
dsk + 1);
} else {
(void) sprintf(realpath, "%s", path);
+#if _DARWIN_FEATURE_64_BIT_INODE
+ if (!(flags & FCREAT) && stat(realpath, &st) == -1)
+#else
if (!(flags & FCREAT) && stat64(realpath, &st) == -1)
+#endif
return (errno);
}
@@ -373,11 +497,29 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
if (fd == -1)
return (errno);
+#if _DARWIN_FEATURE_64_BIT_INODE
+ if (fstat(fd, &st) == -1) {
+#else
if (fstat64(fd, &st) == -1) {
+#endif
close(fd);
return (errno);
}
+/*
+ * OSX fstat on a block device will return an st_size of 0 instead of
+ * the actual size of the device. So we need to ioctl directly to the disk
+ * instead in order to get its size
+ */
+#ifdef __APPLE__
+ if (S_ISBLK(st.st_mode)) {
+ if ((st.st_size = get_disk_size(fd)) == -1) {
+ st.st_size = 0;
+ return (errno);
+ }
+ }
+#endif
+
(void) fcntl(fd, F_SETFD, FD_CLOEXEC);
*vpp = vp = umem_zalloc(sizeof (vnode_t), UMEM_NOFAIL);
@@ -543,8 +685,10 @@ __dprintf(const char *file, const char *func, int line, const char *fmt, ...)
(void) printf("%d ", getpid());
if (dprintf_find_string("tid"))
(void) printf("%u ", thr_self());
+ #ifndef __APPLE__
if (dprintf_find_string("cpu"))
(void) printf("%u ", getcpuid());
+ #endif
if (dprintf_find_string("time"))
(void) printf("%llu ", gethrtime());
if (dprintf_find_string("long"))
@@ -626,7 +770,11 @@ kobj_open_file(char *name)
return ((void *)-1UL);
file = umem_zalloc(sizeof (struct _buf), UMEM_NOFAIL);
+#ifdef __APPLE__
+ file->_fd = vp;
+#else
file->_fd = (intptr_t)vp;
+#endif
return (file);
}
@@ -651,10 +799,18 @@ kobj_close_file(struct _buf *file)
int
kobj_get_filesize(struct _buf *file, uint64_t *size)
{
+#if _DARWIN_FEATURE_64_BIT_INODE
+ struct stat st;
+#else
struct stat64 st;
+#endif
vnode_t *vp = (vnode_t *)file->_fd;
+#if _DARWIN_FEATURE_64_BIT_INODE
+ if (fstat(vp->v_fd, &st) == -1) {
+#else
if (fstat64(vp->v_fd, &st) == -1) {
+#endif
vn_close(vp);
return (errno);
}
@@ -742,6 +898,7 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len)
return (random_get_bytes_common(ptr, len, "/dev/urandom"));
}
+#ifndef __APPLE__
int
ddi_strtoul(const char *hw_serial, char **nptr, int base, unsigned long *result)
{
@@ -752,6 +909,7 @@ ddi_strtoul(const char *hw_serial, char **nptr, int base, unsigned long *result)
return (errno);
return (0);
}
+#endif
/*
* =========================================================================
@@ -771,12 +929,28 @@ umem_out_of_memory(void)
void
kernel_init(int mode)
{
+ pthread_mutex_init(&zfs_global_atomic_mutex, 0);
umem_nofail_callback(umem_out_of_memory);
+#ifdef __APPLE__
+ int mib[2] = {CTL_HW, HW_MEMSIZE};
+ u_int mib_array_size = sizeof(mib)/sizeof(mib[0]);
+ uint64_t memsize;
+ size_t len = sizeof(memsize);
+
+ if (sysctl(mib, mib_array_size, &memsize, &len, NULL, 0) == 0) {
+ physmem = memsize / sysconf(_SC_PAGE_SIZE);
+ dprintf("physmem = %llu pages (%.2f GB)\n", physmem,
+ (double)memsize / (1ULL << 30));
+ } else {
+ dprintf("Couldn't determine the physical memory with sysctl\n");
+ }
+#else
physmem = sysconf(_SC_PHYS_PAGES);
dprintf("physmem = %llu pages (%.2f GB)\n", physmem,
(double)physmem * sysconf(_SC_PAGE_SIZE) / (1ULL << 30));
+#endif
snprintf(hw_serial, sizeof (hw_serial), "%ld", gethostid());
@@ -789,6 +963,7 @@ kernel_fini(void)
spa_fini();
}
+//#ifndef __APPLE__
int
z_uncompress(void *dst, size_t *dstlen, const void *src, size_t srclen)
{
@@ -813,6 +988,7 @@ z_compress_level(void *dst, size_t *dstlen, const void *src, size_t srclen,
return (ret);
}
+//#endif
uid_t
crgetuid(cred_t *cr)
@@ -826,6 +1002,7 @@ crgetgid(cred_t *cr)
return (0);
}
+#ifndef __APPLE__
int
crgetngroups(cred_t *cr)
{
@@ -837,6 +1014,7 @@ crgetgroups(cred_t *cr)
{
return (NULL);
}
+#endif
int
zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr)
@@ -850,8 +1028,11 @@ zfs_secpolicy_rename_perms(const char *from, const char *to, cred_t *cr)
return (0);
}
+#ifndef __APPLE__
int
zfs_secpolicy_destroy_perms(const char *name, cred_t *cr)
{
return (0);
}
+
+#endif
diff --git a/usr/src/lib/libzpool/common/sys/zfs_context.h b/usr/src/lib/libzpool/common/sys/zfs_context.h
index 0a6fdca5..438ee83c 100644
--- a/usr/src/lib/libzpool/common/sys/zfs_context.h
+++ b/usr/src/lib/libzpool/common/sys/zfs_context.h
@@ -19,13 +19,18 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Portions Copyright 2009 Apple Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_ZFS_CONTEXT_H
#define _SYS_ZFS_CONTEXT_H
+/* This is the zfs_context for the *userland* implementation libzpool! */
+
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
@@ -52,16 +57,22 @@ extern "C" {
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
#include
#include
#include
@@ -73,8 +84,456 @@ extern "C" {
#include
#include
#include
+#ifndef __APPLE__
#include
+#endif
+
+#ifdef __APPLE__
+ /*
+ * Apple's zfs_znode.c needs access to (a subset of) znode_t even
+ * when build in userland mode. To define that subset, we need
+ * znode_phys_t (the whole thing) which is in zfs_znode.h.
+ *
+ * Note that almost all of zfs_znode.h is 'ifdef _KERNEL ...'
+ * protected, so it will really only define znode_phys_t here. The
+ * subset of znode_t is define below. Note that we can not easily
+ * include the full zfs_znode.h (by temporarily defining _KERNEL),
+ * because that would pull in a lot of vfs stuff not easily emulated
+ * in userland.
+ */
+#endif
+
+#ifdef __APPLE__
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/*
+ * Threads and locking. We use POSIX threads and functions.
+ */
+#define THR_BOUND 1
+#define THR_DETACHED 2
+
+#define USYNC_THREAD 0
+
+#define thr_self() pthread_self()
+#define mutex_lock(l) pthread_mutex_lock(l)
+#define mutex_trylock(l) pthread_mutex_trylock(l)
+#define mutex_unlock(l) pthread_mutex_unlock(l)
+#define _mutex_destroy(l) pthread_mutex_destroy(l)
+#define _mutex_init(l,f,a) pthread_mutex_init(l,NULL)
+#define rwlock_init(l,f,a) pthread_rwlock_init(l,NULL)
+#define rwlock_destroy(l) pthread_rwlock_destroy(l)
+#define rw_rdlock(l) pthread_rwlock_rdlock(l)
+#define rw_wrlock(l) pthread_rwlock_wrlock(l)
+#define rw_tryrdlock(l) pthread_rwlock_tryrdlock(l)
+#define rw_trywrlock(l) pthread_rwlock_trywrlock(l)
+#define rw_unlock(l) pthread_rwlock_unlock(l)
+#define cond_init(l,f,a) pthread_cond_init(l,NULL)
+#define cond_destroy(l) pthread_cond_destroy(l)
+#define cond_wait(l,m) pthread_cond_wait(l,m)
+#define cond_signal(l) pthread_cond_signal(l)
+#define cond_broadcast(l) pthread_cond_broadcast(l)
+#define cond_timedwait(l,m,t) pthread_cond_timedwait(l,m,t)
+#define thr_join(t,d,s) pthread_join(t,s)
+#define thread_exit(r) pthread_exit(NULL)
+
+typedef pthread_mutex_t mutex_t;
+typedef pthread_rwlock_t rwlock_t;
+typedef pthread_cond_t cond_t;
+/* XXX/ztest: workaround for type conflict from including mach/mach_time.h */
+//typedef pthread_t thread_t;
+#define thread_t pthread_t
+
+/* open-only modes */
+#include
+#define FCREAT O_CREAT
+#define FTRUNC O_TRUNC
+
+extern zfs_memory_stats_t zfs_footprint;
+
+/* user / kernel address space type flags. borrowed from bsd/sys/uio.h */
+enum uio_seg {
+ UIO_USERSPACE = 0, /* kernel address is virtual, to/from user virtual */
+ UIO_SYSSPACE = 2, /* kernel address is virtual, to/from system virtual */
+ UIO_USERSPACE32 = 5, /* kernel address is virtual, to/from user 32-bit virtual */
+ UIO_USERSPACE64 = 8, /* kernel address is virtual, to/from user 64-bit virtual */
+ UIO_SYSSPACE32 = 11 /* deprecated */
+};
+
+#define ERESTART (-1)
+
+typedef int cred_t;
+#define kcred (cred_t *)NOCRED
+
+/* Modified from atomic.h */
+/* We need the userspace atomic operations. */
+/*
+ * Add delta to target
+ */
+#define atomic_add_32(addr, amt) (void)OSAtomicAdd32(amt, (volatile int32_t *)addr)
+#define atomic_add_64(addr, amt) (void)OSAtomicAdd64(amt, (volatile int64_t *)addr)
+#define atomic_inc_64(addr) (void)OSAtomicIncrement64((volatile int64_t *)addr)
+#define atomic_inc_32(addr) (void)OSAtomicIncrement32((volatile int32_t *)addr)
+
+extern SInt64 OSAddAtomic64_NV(SInt64 theAmount, volatile SInt64 *address);
+#define atomic_add_64_nv(addr, amt) (uint64_t)OSAddAtomic64_NV(amt, (volatile SInt64 *)addr)
+
+extern uint64_t atomic_cas_64(volatile uint64_t *, uint64_t, uint64_t);
+/*
+ * logical OR bits with target
+ */
+#define atomic_or_8(addr, mask) (void)OSBitOrAtomic8((UInt32)mask, (volatile UInt8 *)addr)
+
+extern void *atomic_cas_ptr(volatile void *, void *, void *);
+
+/*
+ * Decrement target.
+ */
+#define atomic_dec_32(addr) (void)OSAtomicDecrement32((volatile int32_t *)addr)
+#define atomic_dec_64(addr) (void)OSAtomicAdd64(-1, (volatile int64_t *)addr)
+
+/* From OSAtomic.h */
+extern UInt8 OSBitOrAtomic8(UInt32 mask, volatile UInt8 * address);
+
+#if !defined(__i386__) && !defined(__x86_64__)
+extern SInt64 OSAtomicAdd64(int64_t theAmount, volatile int64_t *address);
+extern SInt64 OSAtomicIncrement64(volatile int64_t *address);
+#endif
+
+ /* needed to emulate some atomic function not available in userspace. */
+extern pthread_mutex_t zfs_global_atomic_mutex;
+
+/* Constants for sysevents framework*/
+#define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear"
+#define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove"
+#define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy"
+#define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish"
+#define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start"
+#define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check"
+
+/*
+ * Arrange that all stores issued before this point in the code reach
+ * global visibility before any stores that follow; useful in producer
+ * modules that update a data item, then set a flag that it is available.
+ * The memory barrier guarantees that the available flag is not visible
+ * earlier than the updated data, i.e. it imposes store ordering.
+ */
+extern void membar_producer(void);
+
+/* file flags */
+#define FOFFMAX 0x2000 /* large file */
+
+
+#define RLIM64_INFINITY ((rlim64_t)-3)
+
+#define open64 open
+#define pread64 pread
+#define pwrite64 pwrite
+
+#define enable_extended_FILE_stdio(fd, act) (0)
+
+typedef u_longlong_t rlim64_t;
+
+typedef struct timespec timestruc_t;
+
+struct dk_callback {
+ void (*dkc_callback)(void *dkc_cookie, int error);
+ void *dkc_cookie;
+};
+
+static inline int thr_create(void *stack_base,
+ size_t stack_size, void *(*start_func) (void*),
+ void *arg, long flags, thread_t *new_thread_ID)
+{
+ assert(stack_base == NULL);
+ assert(stack_size == 0);
+ assert((flags & ~THR_BOUND & ~THR_DETACHED) == 0);
+
+ int ret;
+ pthread_attr_t attr;
+
+ pthread_attr_init(&attr);
+
+ if (flags & THR_DETACHED)
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
+ ret = pthread_create(new_thread_ID, &attr, start_func, arg);
+
+ pthread_attr_destroy(&attr);
+
+ return ret;
+}
+
+extern hrtime_t gethrtime(void);
+/* XXX/ztest: old code -- remove
+static inline hrtime_t gethrtime(void) {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (((u_int64_t)tv.tv_sec) << 32) | tv.tv_usec;
+}
+*/
+
+#define debug_msg(a...)
+
+#undef PAGE_SIZE
+#define PAGESIZE PAGE_SIZE
+#define PAGE_SIZE (sysconf(_SC_PAGE_SIZE))
+
+#define EBADE EBADMACHO
+
+#include
+#define DKIOCFLUSHWRITECACHE DKIOCSYNCHRONIZECACHE
+
+#define kstat_create(a...) (NULL)
+#define kstat_install(a...)
+#define kstat_delete(a...)
+
+/*
+ * vnodes
+ */
+/* A subset of the kernel vnode structure. */
+struct vnode {
+ uint64_t v_size;
+ int v_fd;
+ char *v_path;
+};
+// The vnode_t has differing types in OSX and the ZFS codebase - one is a struct vnode, the other is a struct vnode*
+// If we use a #define here, we can replace all the code on the fly - but we need to be careful about the OSX headers
+// (e.g. mount.h, ubc.h, file.h, libc.h) that expect the vnode to be sane. So, we provide maczfs/maczfs_{mount,ubc,file,libc}.h
+// to use instead e.g. if there's compile errors, do:
+// #ifdef __APPLE__
+// #include
+// #else
+// #include
+// #endif /* __APPLE__ */
+#define vnode_t struct vnode
+
+extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp,
+ int x2, int x3);
+extern int vn_openat(char *path, int x1, int oflags, int mode, vnode_t **vpp,
+#ifdef __APPLE__
+ int x2, int x3, vnode_t *vp);
+#else
+ int x2, int x3, vnode_t *vp, int fd);
+#endif
+extern int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len,
+ offset_t offset, int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp);
+extern void vn_close(vnode_t *vp);
+
+#define getrootdir() (struct vnode *)0xabcd1234
+
+struct _buf {
+ vnode_t * _fd;
+};
+
+/* From user.h */
+/*
+ * VFS context structure (part of uthread)
+ */
+struct vfs_context {
+ thread_t vc_thread; /* pointer to Mach thread */
+};
+
+typedef struct vfs_context * vfs_context_t;
+/*
+ * From sys/vnode.h
+ *
+ * We need IO_APPEND, but for completeness I copied all IO_* defines -- BjoKaSH
+ */
+/*
+ * Flags for ioflag.
+ */
+#define IO_UNIT 0x0001 /* do I/O as atomic unit */
+#define IO_APPEND 0x0002 /* append write to end */
+#define IO_SYNC 0x0004 /* do I/O synchronously */
+#define IO_NODELOCKED 0x0008 /* underlying node already locked */
+#define IO_NDELAY 0x0010 /* FNDELAY flag set in file table */
+#define IO_NOZEROFILL 0x0020 /* F_SETSIZE fcntl uses to prevent zero filling */
+#define IO_TAILZEROFILL 0x0040 /* zero fills at the tail of write */
+#define IO_HEADZEROFILL 0x0080 /* zero fills at the head of write */
+#define IO_NOZEROVALID 0x0100 /* do not zero fill if valid page */
+#define IO_NOZERODIRTY 0x0200 /* do not zero fill if page is dirty */
+#define IO_CLOSE 0x0400 /* I/O issued from close path */
+#define IO_NOCACHE 0x0800 /* same effect as VNOCACHE_DATA, but only for this 1 I/O */
+#define IO_RAOFF 0x1000 /* same effect as VRAOFF, but only for this 1 I/O */
+#define IO_DEFWRITE 0x2000 /* defer write if vfs.defwrite is set */
+#define IO_PASSIVE 0x4000 /* this I/O is marked as background I/O so it won't throttle Throttleable I/O */
+#define IO_BACKGROUND IO_PASSIVE /* used for backward compatibility. to be removed after IO_BACKGROUND is no longer
+ * used by DiskImages in-kernel mode */
+#define IO_NOAUTH 0x8000 /* No authorization checks. */
+
+
+
+/* A subset of the kernel vnode_attr structure. */
+struct vnode_attr {
+ /* bitfields */
+ uint64_t va_supported;
+ uint64_t va_active;
+
+ /*
+ * Control flags. The low 16 bits are reserved for the
+ * ioflags being passed for truncation operations.
+ */
+ int va_vaflags;
+
+ /* traditional stat(2) parameter fields */
+ u_offset_t va_data_size; /* file size in bytes */
+};
+
+#define va_mask va_active
+#define va_size va_data_size
+
+typedef struct vnode_attr vattr_t;
+
+#if 0
+struct vnode_attr {
+ /* bitfields */
+ uint64_t va_supported;
+ uint64_t va_active;
+
+ /*
+ * Control flags. The low 16 bits are reserved for the
+ * ioflags being passed for truncation operations.
+ */
+ int va_vaflags;
+
+ /* traditional stat(2) parameter fields */
+ dev_t va_rdev; /* device id (device nodes only) */
+ uint64_t va_nlink; /* number of references to this file */
+ uint64_t va_total_size; /* size in bytes of all forks */
+ uint64_t va_total_alloc; /* disk space used by all forks */
+ uint64_t va_data_size; /* size in bytes of the fork managed by current vnode */
+ uint64_t va_data_alloc; /* disk space used by the fork managed by current vnode */
+ uint32_t va_iosize; /* optimal I/O blocksize */
+
+ /* file security information */
+ uid_t va_uid; /* owner UID */
+ gid_t va_gid; /* owner GID */
+ mode_t va_mode; /* posix permissions */
+ uint32_t va_flags; /* file flags */
+ struct kauth_acl *va_acl; /* access control list */
+
+ /* timestamps */
+ struct timespec va_create_time; /* time of creation */
+ struct timespec va_access_time; /* time of last access */
+ struct timespec va_modify_time; /* time of last data modification */
+ struct timespec va_change_time; /* time of last metadata change */
+ struct timespec va_backup_time; /* time of last backup */
+
+ /* file parameters */
+ uint64_t va_fileid; /* file unique ID in filesystem */
+ uint64_t va_linkid; /* file link unique ID */
+ uint64_t va_parentid; /* parent ID */
+ uint32_t va_fsid; /* filesystem ID */
+ uint64_t va_filerev; /* file revision counter */ /* XXX */
+ uint32_t va_gen; /* file generation count */ /* XXX - relationship of
+ * these two? */
+ /* misc parameters */
+ uint32_t va_encoding; /* filename encoding script */
+
+ enum vtype va_type; /* file type (create only) */
+ char * va_name; /* Name for ATTR_CMN_NAME; MAXPATHLEN bytes */
+ guid_t va_uuuid; /* file owner UUID */
+ guid_t va_guuid; /* file group UUID */
+
+ /* Meaningful for directories only */
+ uint64_t va_nchildren; /* Number of items in a directory */
+ uint64_t va_dirlinkcount; /* Real references to dir (i.e. excluding "." and ".." refs) */
+
+ /* add new fields here only */
+
+};
+#endif
+
+/*
+ * Vnode attributes, new-style.
+ *
+ * The vnode_attr structure is used to transact attribute changes and queries
+ * with the filesystem.
+ *
+ * Note that this structure may be extended, but existing fields must not move.
+ */
+#define VATTR_INIT(v) do {(v)->va_supported = (v)->va_active = 0ll; (v)->va_vaflags = 0;} while(0)
+#define VATTR_SET_ACTIVE(v, a) ((v)->va_active |= VNODE_ATTR_ ## a)
+#define VATTR_IS_SUPPORTED(v, a) (1)
+#define VATTR_WANTED(v, a) VATTR_SET_ACTIVE(v, a)
+
+#define VNODE_ATTR_va_data_size (1LL<< 4) /* 00000010 */
+
+vfs_context_t vfs_context_create(vfs_context_t ctx);
+int vfs_context_rele(vfs_context_t ctx);
+
+#define vnode_getattr(vp, vap, co) ((vap)->va_data_size = (vp)->v_size, 0)
+#define vnode_close(vp, f, c) 0
+
+/*
+ * Returns true if any vdevs in the hierarchy is a disk
+ */
+typedef struct vdev vdev_t;
+extern int vdev_contains_disks(vdev_t *);
+
+
+struct vmem {
+ int vm_quantum;
+ int vm_qcache_max;
+ int vm_cflags;
+};
+typedef struct vmem vmem_t;
+
+/* We don't have umem on OS X, so we fake it. */
+
+#define UMEM_CACHE_NAMELEN 31
+
+/* A workaround so that the umem_cache operations are simple implementations of malloc/free/etc,
+ with the object constructor/destructor allowing initialization/destruction of structures. */
+
+typedef struct umem_cache {
+ char cache_name[UMEM_CACHE_NAMELEN + 1];
+ size_t cache_bufsize; /* object size */
+ int (*cache_constructor)(void *, void *, int);
+ void (*cache_destructor)(void *, void *);
+ void *cache_private; /* opaque arg to callbacks */
+ int cache_objcount; /* number of object in cache. */
+} umem_cache_t;
+
+/* From umem.h */
+
+extern void *umem_alloc(size_t size, int umflag);
+extern void *umem_zalloc(size_t size, int umflag);
+extern void umem_free(void * buf, size_t size);
+
+#define UMEM_DEFAULT 0x0000 /* normal -- may fail */
+#define UMEM_NOFAIL 0x0100 /* Never fails -- may call exit(2) */
+#define UMC_NODEBUG 0x00020000
+
+typedef int umem_constructor_t(void *, void *, int);
+typedef void umem_destructor_t(void *, void *);
+typedef void umem_reclaim_t(void *);
+
+typedef int umem_nofail_callback_t(void);
+#define UMEM_CALLBACK_RETRY 0
+#define UMEM_CALLBACK_EXIT(status) (0x100 | ((status) & 0xFF))
+
+extern void umem_nofail_callback(umem_nofail_callback_t *);
+
+extern umem_cache_t *umem_cache_create(char *name, size_t bufsize,
+ size_t align, umem_constructor_t *constructor, umem_destructor_t *destructor,
+ umem_reclaim_t *reclaim, void *private, void *vmp, int cflags);
+extern void umem_cache_destroy(umem_cache_t *cp);
+
+extern void *umem_cache_alloc(umem_cache_t *cp, int);
+extern void umem_cache_free(umem_cache_t *cp, void *);
+
+#endif /* __APPLE__ */
+
+
/*
* Debugging
*/
@@ -102,6 +561,13 @@ extern void vcmn_err(int, const char *, __va_list);
extern void panic(const char *, ...);
extern void vpanic(const char *, __va_list);
+#ifdef __APPLE__
+
+#define verify(ex) (void)((ex) || \
+(assert(ex), 0))
+
+#else /* !__APPLE__ */
+
/* This definition is copied from assert.h. */
#if defined(__STDC__)
#if __STDC_VERSION__ - 0 >= 199901L
@@ -113,11 +579,31 @@ extern void vpanic(const char *, __va_list);
#else
#define verify(EX) (void)((EX) || (_assert("EX", __FILE__, __LINE__), 0))
#endif /* __STDC__ */
+#endif /* !__APPLE__ */
#define VERIFY verify
#define ASSERT assert
+#ifdef __APPLE__
+
+#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \
+ const TYPE __left = (TYPE)(LEFT); \
+ const TYPE __right = (TYPE)(RIGHT); \
+ if (!(__left OP __right)) { \
+ char *__buf = alloca(256); \
+ (void) snprintf(__buf, 256, "%s %s %s (0x%llx %s 0x%llx)", \
+ #LEFT, #OP, #RIGHT, \
+ (u_longlong_t)__left, #OP, (u_longlong_t)__right); \
+ fprintf (stderr, "%s:%u: failed assertion `%s'\n", __FILE__, __LINE__, __buf); \
+ fflush (stderr); \
+ abort (); \
+ } \
+} while (0)
+
+#define _NOTE(x)
+
+#else /* !__APPLE__ */
extern void __assert(const char *, const char *, int);
#ifdef lint
@@ -137,6 +623,7 @@ extern void __assert(const char *, const char *, int);
_NOTE(CONSTCOND) } while (0)
/* END CSTYLED */
#endif /* lint */
+#endif /* !__APPLE__ */
#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t)
#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t)
@@ -157,7 +644,19 @@ _NOTE(CONSTCOND) } while (0)
* kernel. If they're being used in kernel code, re-define them out of
* existence for their counterparts in libzpool.
*/
+
+#ifdef __APPLE__
+#undef DTRACE_PROBE1
+#define DTRACE_PROBE1(a, b, c) ((void)0)
+
+#undef DTRACE_PROBE2
+#define DTRACE_PROBE2(a, b, c, d, e) ((void)0)
+
+#undef DTRACE_PROBE3
+#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0)
+#else /* !__APPLE__ */
+
#ifdef DTRACE_PROBE1
#undef DTRACE_PROBE1
#define DTRACE_PROBE1(a, b, c) ((void)0)
@@ -178,17 +677,25 @@ _NOTE(CONSTCOND) } while (0)
#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0)
#endif /* DTRACE_PROBE4 */
+#endif /* !__APPLE__ */
+
+
/*
* Threads
*/
#define curthread ((void *)(uintptr_t)thr_self())
+#ifndef __APPLE__
typedef struct kthread kthread_t;
-
+#endif /* !__APPLE__ */
+
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
zk_thread_create(func, arg)
-#define thread_exit() thr_exit(NULL)
-
+
+#ifndef __APPLE__
+#define thread_exit() thr_exit(0)
+#endif /* !__APPLE__ */
+
extern kthread_t *zk_thread_create(void (*func)(), void *arg);
#define issig(why) (FALSE)
@@ -204,6 +711,11 @@ typedef struct kmutex {
} kmutex_t;
#define MUTEX_DEFAULT USYNC_THREAD
+#ifdef __APPLE__
+extern int mutex_owned(kmutex_t *);
+#define MUTEX_HELD(x) (mutex_owned(x))
+#define MUTEX_NOT_HELD(x) (!mutex_owned(x))
+#else /* __APPLE__ */
#undef MUTEX_HELD
#define MUTEX_HELD(m) _mutex_held(&(m)->m_lock)
@@ -213,6 +725,7 @@ typedef struct kmutex {
*/
extern int _mutex_init(mutex_t *mp, int type, void *arg);
extern int _mutex_destroy(mutex_t *mp);
+#endif /* !__APPLE__ */
#define mutex_init(mp, b, c, d) zmutex_init((kmutex_t *)(mp))
#define mutex_destroy(mp) zmutex_destroy((kmutex_t *)(mp))
@@ -231,6 +744,10 @@ typedef struct krwlock {
void *rw_owner;
boolean_t initialized;
rwlock_t rw_lock;
+#ifdef __APPLE__
+ kmutex_t mutex;
+ int reader_thr_count;
+#endif
} krwlock_t;
typedef int krw_t;
@@ -239,12 +756,23 @@ typedef int krw_t;
#define RW_WRITER 1
#define RW_DEFAULT USYNC_THREAD
+#ifdef __APPLE__
+
+extern int rw_write_held(krwlock_t *);
+extern int rw_lock_held(krwlock_t *);
+#define RW_WRITE_HELD(x) (rw_write_held((x)))
+#define RW_LOCK_HELD(x) (rw_lock_held((x)))
+
+#else /* !__APPLE__ */
+
#undef RW_READ_HELD
#define RW_READ_HELD(x) _rw_read_held(&(x)->rw_lock)
#undef RW_WRITE_HELD
#define RW_WRITE_HELD(x) _rw_write_held(&(x)->rw_lock)
+#endif /* !__APPLE__ */
+
extern void rw_init(krwlock_t *rwlp, char *name, int type, void *arg);
extern void rw_destroy(krwlock_t *rwlp);
extern void rw_enter(krwlock_t *rwlp, krw_t rw);
@@ -253,10 +781,12 @@ extern int rw_tryupgrade(krwlock_t *rwlp);
extern void rw_exit(krwlock_t *rwlp);
#define rw_downgrade(rwlp) do { } while (0)
+#ifndef __APPLE__
extern uid_t crgetuid(cred_t *cr);
extern gid_t crgetgid(cred_t *cr);
extern int crgetngroups(cred_t *cr);
extern gid_t *crgetgroups(cred_t *cr);
+#endif
/*
* Condition variables
@@ -272,6 +802,7 @@ extern clock_t cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime);
extern void cv_signal(kcondvar_t *cv);
extern void cv_broadcast(kcondvar_t *cv);
+#ifndef __APPLE__
/*
* kstat creation, installation and deletion
*/
@@ -279,6 +810,7 @@ extern kstat_t *kstat_create(char *, int,
char *, char *, uchar_t, ulong_t, uchar_t);
extern void kstat_install(kstat_t *);
extern void kstat_delete(kstat_t *);
+#endif
/*
* Kernel memory
@@ -320,6 +852,7 @@ extern void taskq_destroy(taskq_t *);
extern void taskq_wait(taskq_t *);
extern int taskq_member(taskq_t *, void *);
+#ifndef __APPLE__
/*
* vnodes
*/
@@ -328,11 +861,14 @@ typedef struct vnode {
int v_fd;
char *v_path;
} vnode_t;
+#endif /* !__APPLE__ */
+#if 0
typedef struct vattr {
uint_t va_mask; /* bit-mask of attributes */
u_offset_t va_size; /* file size in bytes */
} vattr_t;
+#endif
#define AT_TYPE 0x0001
#define AT_MODE 0x0002
@@ -360,6 +896,7 @@ typedef struct vattr {
#define VN_RELE(vp) vn_close(vp)
+#ifndef __APPLE__
extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp,
int x2, int x3);
extern int vn_openat(char *path, int x1, int oflags, int mode, vnode_t **vpp,
@@ -367,6 +904,7 @@ extern int vn_openat(char *path, int x1, int oflags, int mode, vnode_t **vpp,
extern int vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len,
offset_t offset, int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp);
extern void vn_close(vnode_t *vp);
+#endif /* !__APPLE__ */
#define vn_remove(path, x1, x2) remove(path)
#define vn_rename(from, to, seg) rename((from), (to))
@@ -374,7 +912,11 @@ extern void vn_close(vnode_t *vp);
extern vnode_t *rootdir;
+#ifdef __APPLE__
+#include /* for FREAD, FWRITE, etc */
+#else
#include /* for FREAD, FWRITE, etc */
+#endif
/*
* Random stuff
@@ -392,9 +934,18 @@ extern void delay(clock_t ticks);
#define minclsyspri 60
#define maxclsyspri 99
+/*
+ * On Mac OS X we don't yet have access to cpu_number on all platforms.
+ *
+ * So we currently don't support per processor transaction state.
+ */
+#ifdef __APPLE__
+#define CPU_SEQID (0)
+#else /* !__APPLE__ */
#define CPU_SEQID (thr_self() & (max_ncpus - 1))
-#define kcred NULL
+#endif
+/*#define kcred NULL*/
#define CRED() NULL
extern uint64_t physmem;
@@ -441,11 +992,13 @@ extern char hw_serial[];
extern int ddi_strtoul(const char *str, char **nptr, int base,
unsigned long *result);
+#ifndef __APPLE__
/* ZFS Boot Related stuff. */
struct _buf {
intptr_t _fd;
};
+#endif
struct bootstat {
uint64_t st_size;
@@ -460,7 +1013,13 @@ extern int zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr);
extern int zfs_secpolicy_rename_perms(const char *from, const char *to,
cred_t *cr);
extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr);
+
+#define get_disk_size get_disk_size_libzpool
+
+#ifndef __APPLE__
extern zoneid_t getzoneid(void);
+
+#endif
#ifdef __cplusplus
}
diff --git a/usr/src/lib/libzpool/common/sys/zfs_file.h b/usr/src/lib/libzpool/common/sys/zfs_file.h
new file mode 100644
index 00000000..e1e80702
--- /dev/null
+++ b/usr/src/lib/libzpool/common/sys/zfs_file.h
@@ -0,0 +1,2 @@
+
+#include
diff --git a/usr/src/lib/libzpool/common/taskq.c b/usr/src/lib/libzpool/common/taskq.c
index ccf5b4de..166eacd0 100644
--- a/usr/src/lib/libzpool/common/taskq.c
+++ b/usr/src/lib/libzpool/common/taskq.c
@@ -21,6 +21,9 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Portions Copyright 2009 Apple Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -29,12 +32,22 @@
int taskq_now;
+#ifdef __APPLE__
+struct task {
+#else
typedef struct task {
+#endif
struct task *task_next;
struct task *task_prev;
task_func_t *task_func;
void *task_arg;
+#ifndef __APPLE__
} task_t;
+#else /* __APPLE__ */
+};
+/* XXX/ztest: workaround for type conflict from including mach/mach_time.h */
+#define task_t struct task
+#endif
#define TASKQ_ACTIVE 0x00010000
diff --git a/usr/src/maczfs/zfs_context_libzpool.c b/usr/src/maczfs/zfs_context_libzpool.c
new file mode 100644
index 00000000..0b0c0cd0
--- /dev/null
+++ b/usr/src/maczfs/zfs_context_libzpool.c
@@ -0,0 +1,494 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2010 Alex Blewitt. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include
+#include
+#include
+#include
+
+#define _ZFS_CONTEXT_IMP
+
+#include
+#include
+#include
+
+/*
+ * Arrange that all stores issued before this point in the code reach
+ * global visibility before any stores that follow; useful in producer
+ * modules that update a data item, then set a flag that it is available.
+ * The memory barrier guarantees that the available flag is not visible
+ * earlier than the updated data, i.e. it imposes store ordering.
+ */
+void
+membar_producer(void)
+{
+#if defined (__ppc__) || defined (__ppc64__)
+ __asm__ volatile("sync");
+#elif defined (__i386__) || defined(__x86_64__)
+ __asm__ volatile("sfence");
+#elif defined (__arm__)
+#if defined(_ARM_ARCH_6)
+// __asm__ volatile("dmb");
+#endif
+#else
+#error architecture not supported
+#endif
+}
+
+/*
+ * gethrtime() provides high-resolution timestamps with machine-dependent origin.
+ * Hence its primary use is to specify intervals.
+ */
+
+hrtime_t zfs_gettimeofday_nano(struct timeval *tv) {
+ const long long mio = 1000000;
+ hrtime_t res = tv->tv_sec * mio;
+ res += tv->tv_usec;
+ res *= 1000;
+ return res;
+}
+
+hrtime_t
+gethrtime(void)
+{
+ static uint64_t start = 0;
+
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+
+ if (start == 0) {
+ start = zfs_gettimeofday_nano(&tv);
+ return 0;
+ }
+
+ return (zfs_gettimeofday_nano(&tv) - start);
+}
+
+void
+gethrestime(struct timespec *ts)
+{
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+ ts->tv_sec = tv.tv_sec;
+ ts->tv_nsec = tv.tv_usec * 1000;
+}
+
+
+void log_message(const char *fmt, ...) {
+ char msgbuffer[1024];
+ va_list ap;
+ va_start(ap, fmt);
+ vsnprintf(msgbuffer, 1023, fmt, ap);
+ va_end(ap);
+}
+
+int umem_nofail_default_callback(void) {
+ return UMEM_CALLBACK_EXIT(255);
+}
+
+umem_nofail_callback_t *umem_no_fail_callback_global_ptr = &umem_nofail_default_callback;
+
+void umem_nofail_callback(umem_nofail_callback_t *cb_a) {
+ umem_no_fail_callback_global_ptr = cb_a;
+}
+
+int umem_alloc_retry(umem_cache_t *cp, int umflag) {
+ /* some "alloc" function ran out of memory. decide what to do: */
+
+ if ( (umflag & UMEM_NOFAIL) == UMEM_NOFAIL) {
+ int nofail_cb_res = umem_no_fail_callback_global_ptr();
+
+ if (nofail_cb_res == UMEM_CALLBACK_RETRY)
+ /* we are allowed to retry */
+ return 1;
+
+ if ( (nofail_cb_res & ~0xff) != UMEM_CALLBACK_EXIT(0) ) {
+ /* callback returned unexpected value. */
+ log_message("nofail callback returned %x\n", nofail_cb_res);
+ nofail_cb_res = UMEM_CALLBACK_EXIT(255);
+ }
+
+ exit(nofail_cb_res & 0xff);
+ /*NOTREACHED*/
+ }
+
+ /* allocation was allowed to fail. */
+ return 0;
+}
+
+
+/* umem_alloc(size_t size, int flags) */
+void *umem_alloc(size_t size, int _)
+{
+ return malloc(size);
+}
+
+/* umem_free(void *mem, size_t size_of_object_freed) */
+void umem_free(void *mem, size_t _)
+{
+ free(mem);
+}
+
+/* umem_zalloc(size_t size, int flags) */
+void *umem_zalloc(size_t size, int _)
+{
+ void *p = malloc(size);
+ bzero(p, size);
+ return p;
+}
+
+umem_cache_t *
+umem_cache_create(
+ char *name, /* descriptive name for this cache */
+ size_t bufsize, /* size of the objects it manages */
+ size_t align, /* required object alignment */
+ umem_constructor_t *constructor, /* object constructor */
+ umem_destructor_t *destructor, /* object destructor */
+ umem_reclaim_t *reclaim, /* memory reclaim callback */
+ void *private, /* pass-thru arg for constr/destr/reclaim */
+ void *vmp, /* vmem source for slab allocation */
+ int cflags) /* cache creation flags */
+{
+ /* in this simple implementation we ignore the vmem source. all
+ memory comes from malloc().
+
+ In fact not even have a real cache here!
+ */
+
+ umem_cache_t *cp = (umem_cache_t *)malloc(sizeof(umem_cache_t));
+
+ if (0 == cp) {
+ if (umem_alloc_retry(0, cflags)) {
+ /* retry requested. Do so, but don't allow another retry
+ to avoid infinit loops. */
+ cp = umem_cache_create(name, bufsize, align,
+ constructor, destructor, reclaim, private,
+ vmp, cflags & ~UMEM_NOFAIL);
+ if (cp)
+ return cp;
+
+ /* no luck again, and failing not allowed -> commit suicide. */
+ exit(UMEM_CALLBACK_EXIT(255));
+
+ } else {
+
+ /* allocation was allowed to fail. */
+ return 0;
+ }
+ }
+
+ bzero(cp, sizeof(umem_cache_t));
+
+ if (0 == name)
+ name = "zfs anon umem cache";
+ strncpy(cp->cache_name, name, UMEM_CACHE_NAMELEN);
+
+ cp->cache_bufsize = bufsize;
+ cp->cache_constructor = constructor;
+ cp->cache_destructor = destructor;
+ cp->cache_private = private;
+
+ return cp;
+}
+
+void umem_cache_destroy(umem_cache_t *cp) {
+ if (cp->cache_objcount != 0)
+ log_message("Destroying umem cache with active objects!\n");
+
+ free(cp);
+}
+
+void *umem_cache_alloc(umem_cache_t *cp, int umflag) {
+ void *buf = malloc(cp->cache_bufsize);
+ if (0 == buf) {
+ /* check what to do in case of no memory */
+ if (umem_alloc_retry(cp, umflag) == 1) {
+ /* we are not allowed to fail and should retry.
+ Avoid infinit loop by allowing failure. */
+ buf = umem_cache_alloc(cp, umflag & ~UMEM_NOFAIL);
+ if (0 == buf) {
+ /* no luck & failure not allowed -> commit suicide */
+ exit(UMEM_CALLBACK_EXIT(255));
+ }
+
+ }
+ /* reached if (1) got our memory, or (2) ran out of memory and
+ were allowed to fail. */
+ return buf;
+ }
+
+ if (cp->cache_constructor)
+ cp->cache_constructor(buf, cp->cache_private, UMEM_DEFAULT);
+ cp->cache_objcount++;
+ return buf;
+}
+
+void umem_cache_free(umem_cache_t *cp, void *buf) {
+ if (cp->cache_destructor)
+ cp->cache_destructor(buf, cp->cache_private);
+
+ free(buf);
+ cp->cache_objcount--;
+}
+
+
+/*
+ * MISCELLANEOUS WRAPPERS
+ */
+#if 0
+int
+uio_move(caddr_t cp, int n, int rw_flag, struct uio *uio)
+{
+ uio_setrw(uio, rw_flag);
+ return uiomove(cp, n, uio);
+}
+#endif
+
+void
+dmu_buf_will_dirty(dmu_buf_t *db, dmu_tx_t *tx)
+{
+ dbuf_will_dirty((dmu_buf_impl_t *)db, tx);
+}
+
+void
+dmu_buf_fill_done(dmu_buf_t *db, dmu_tx_t *tx)
+{
+ dbuf_fill_done((dmu_buf_impl_t *)db, tx);
+}
+
+void
+dmu_buf_add_ref(dmu_buf_t *db, void* tag)
+{
+ dbuf_add_ref((dmu_buf_impl_t *)db, tag);
+}
+
+void
+dmu_buf_rele(dmu_buf_t *db, void *tag)
+{
+ dbuf_rele((dmu_buf_impl_t *)db, tag);
+}
+
+uint64_t
+dmu_buf_refcount(dmu_buf_t *db)
+{
+ return dbuf_refcount((dmu_buf_impl_t *)db);
+}
+
+
+
+/*
+ * MUTEX LOCKS
+ */
+
+
+int
+mutex_owned(kmutex_t *mp)
+{
+ /* thr_self is def'ed to pthread_self() is zfs_context.h */
+ return (mp->m_owner == thr_self());
+}
+
+
+/*
+ * READER/WRITER LOCKS
+ */
+int
+rw_lock_held(krwlock_t *rwlp)
+{
+ /*
+ * ### not sure about this one ###
+ */
+ return (rwlp->rw_owner == thr_self() || rwlp->reader_thr_count > 0);
+}
+
+int
+rw_write_held(krwlock_t *rwlp)
+{
+ return (rwlp->rw_owner == thr_self());
+}
+
+vfs_context_t vfs_context_create(vfs_context_t vctx) {
+
+ if (vctx == 0)
+ vctx = malloc(sizeof(struct vfs_context));
+
+ vctx->vc_thread = thr_self();
+
+ return vctx;
+}
+
+int vfs_context_rele(vfs_context_t vctx) {
+ /* do nothing */
+ return 0;
+}
+
+zfs_memory_stats_t zfs_footprint;
+
+/* copied from usr/src/lib/libzfs/common/libzfs_util.c */
+off_t
+get_disk_size_libzpool(int fd)
+{
+ uint32_t blksize;
+ uint64_t blkcnt;
+ off_t d_size = 0;
+
+ if (ioctl(fd, DKIOCGETBLOCKSIZE, &blksize) < 0) {
+ return (-1);
+ }
+ if (ioctl(fd, DKIOCGETBLOCKCOUNT, &blkcnt) < 0) {
+ return (-1);
+ }
+
+ d_size = (off_t)((uint64_t)blksize * blkcnt);
+ return (d_size);
+}
+
+/*
+ * Returns true if any vdevs in the hierarchy is a disk
+ */
+int
+vdev_contains_disks(vdev_t *vd)
+{
+ /* ztest does not access full disks from userland. */
+ return (0);
+}
+
+
+SInt64 OSAddAtomic64_NV(SInt64 theAmount, volatile SInt64 *address) {
+ return OSAtomicAdd64(theAmount, address);
+}
+
+/* Userland and Kernel bhave opposite when executin atomic arithmetics:
+ * The kernel functions return the value BEFORE the operation. The
+ * sources have be adapted to expect this behavior, which is opposite
+ * from what Solaris does.
+ *
+ * MacOSX USERLAND returns the value AFTER the operation. To match the
+ * (non-Solaris) expectations of the current code, we need to reverse
+ * the operation before returning.
+ */
+SInt64 OSAddAtomic64(SInt64 theAmount, volatile SInt64 *address) {
+ SInt64 val = OSAtomicAdd64(theAmount, address); // Userland: value after operation
+ return (val - theAmount);
+}
+
+
+/* MacOSX has no userland 8-bit atomic function. so we should use a
+ global mutext to lockout other threads while we manipulate the
+ byte. On the other hand, a simple byte or should be a single cpu
+ instruction, making it atomic wrt. the same cpu. */
+
+pthread_mutex_t zfs_global_atomic_mutex;
+
+UInt8 OSBitOrAtomic8(UInt32 mask, volatile UInt8 *addr) {
+ pthread_mutex_lock(&zfs_global_atomic_mutex);
+ UInt8 old = *addr;
+ *addr |= mask;
+ pthread_mutex_unlock(&zfs_global_atomic_mutex);
+ return old;
+}
+
+#if !defined(__i386__) && !defined(__x86_64__)
+/*
+ * Emulated for architectures that don't have this primitive. Do an atomic
+ * add for the low order bytes, try to detect overflow/underflow, and
+ * update the high order bytes. The second update is definitely not
+ * atomic, but it's better than nothing.
+ *
+ * This implementation is for USERLAND, hence it must return the value
+ * AFTER carring out the operation.
+ */
+SInt64
+OSAtomicAdd64(SInt64 theAmount, volatile SInt64 *address)
+{
+ volatile SInt32 *lowaddr;
+ volatile SInt32 *highaddr;
+ SInt32 highword;
+ SInt32 lowword;
+ SInt32 oldlowword;
+
+#ifdef __BIG_ENDIAN__
+ highaddr = (volatile SInt32 *)address;
+ lowaddr = highaddr + 1;
+#else
+ lowaddr = (volatile SInt32 *)address;
+ highaddr = lowaddr + 1;
+#endif
+
+ highword = *highaddr;
+ lowword = OSAtomicAdd32((SInt32)theAmount, lowaddr); // lowword is the new value
+ oldlowword = lowword - (SInt32)theAmount;
+ if ((theAmount < 0) && (oldlowword < -theAmount)) {
+ // underflow, decrement the high word
+ (void)OSAtomicAdd32(-1, highaddr);
+ } else if ((theAmount > 0) && ((UInt32)oldlowword > 0xFFFFFFFF-theAmount)) {
+ // overflow, increment the high word
+ (void)OSAtomicAdd32(1, highaddr);
+ }
+ return ((SInt64)highword << 32) | ((UInt32)lowword);
+}
+
+SInt64
+OSAtomicIncrement64(volatile SInt64 *address)
+{
+ return OSAtomicAdd64(1, address);
+}
+#endif /* !__i386__ && !__x86_64__ */
+
+/*
+ * This operation is not thread-safe and the user must
+ * protect it my some other means. The only known caller
+ * is zfs_vnop_write() and the value is protected by the
+ * znode's mutex.
+ */
+uint64_t
+atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t new)
+{
+
+ pthread_mutex_lock(&zfs_global_atomic_mutex);
+ uint64_t old = *target;
+ if (old == cmp)
+ *target = new;
+ pthread_mutex_unlock(&zfs_global_atomic_mutex);
+ return (old);
+}
+
+void *
+atomic_cas_ptr(volatile void *target, void *cmp, void *new)
+{
+ void *old = *(void **)target;
+
+#ifdef __LP64__
+ OSAtomicCompareAndSwapPtr(cmp, new, target);
+#else
+ OSAtomicCompareAndSwap32( (uint32_t)cmp, (uint32_t)new, (unsigned long *)target );
+#endif
+ return old;
+}
+
+
+
+/* End */
diff --git a/usr/src/uts/common/fs/zfs/dnode.c b/usr/src/uts/common/fs/zfs/dnode.c
index 358d3d11..cdb98ec6 100644
--- a/usr/src/uts/common/fs/zfs/dnode.c
+++ b/usr/src/uts/common/fs/zfs/dnode.c
@@ -60,7 +60,7 @@ dnode_cons(void *arg, void *unused, int kmflag)
rw_init(&dn->dn_struct_rwlock, NULL, RW_DEFAULT, NULL);
// This is from the 10a286 bits
#ifdef __APPLE__
- cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL);
+ cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL);
#endif
mutex_init(&dn->dn_mtx, NULL, MUTEX_DEFAULT, NULL);
diff --git a/usr/src/uts/common/fs/zfs/dsl_prop.c b/usr/src/uts/common/fs/zfs/dsl_prop.c
index e814fe27..3fd2fae9 100644
--- a/usr/src/uts/common/fs/zfs/dsl_prop.c
+++ b/usr/src/uts/common/fs/zfs/dsl_prop.c
@@ -44,8 +44,13 @@ dodefault(const char *propname, int intsz, int numint, void *buf)
{
zfs_prop_t prop;
+ /*
+ * The setonce properties are read-only, BUT they still
+ * have a default value that can be used as the initial
+ * value.
+ */
if ((prop = zfs_name_to_prop(propname)) == ZFS_PROP_INVAL ||
- zfs_prop_readonly(prop))
+ (zfs_prop_readonly(prop) && !zfs_prop_setonce(prop)))
return (ENOENT);
if (zfs_prop_get_type(prop) == PROP_TYPE_STRING) {
diff --git a/usr/src/uts/common/fs/zfs/refcount.c b/usr/src/uts/common/fs/zfs/refcount.c
index 98f18d95..99d3bb7f 100644
--- a/usr/src/uts/common/fs/zfs/refcount.c
+++ b/usr/src/uts/common/fs/zfs/refcount.c
@@ -21,7 +21,7 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- * Portions Copyright 2007 Apple Inc. All rights reserved.
+ * Portions Copyright 2007-2008 Apple Inc. All rights reserved.
* Use is subject to license terms.
*/
diff --git a/usr/src/uts/common/fs/zfs/spa.c b/usr/src/uts/common/fs/zfs/spa.c
index 33e63251..7686b15b 100644
--- a/usr/src/uts/common/fs/zfs/spa.c
+++ b/usr/src/uts/common/fs/zfs/spa.c
@@ -1138,6 +1138,7 @@ spa_create(const char *pool, nvlist_t *nvroot, const char *altroot,
uint64_t txg = TXG_INITIAL;
nvlist_t **spares;
uint_t nspares;
+ nvlist_t *props = 0;
/*
* If this pool already exists, return failure.
@@ -1272,6 +1273,21 @@ spa_create(const char *pool, nvlist_t *nvroot, const char *altroot,
mutex_exit(&spa_namespace_lock);
+ /*
+ * Process additional properties not set diectly in above call.
+ */
+
+ if (nvlist_lookup_nvlist(nvroot, ZPOOL_CONFIG_PROPS, &props) == 0) {
+ /*
+ * Remove properties already set above
+ */
+ nvlist_remove(nvroot, zpool_prop_to_name(ZPOOL_PROP_DELEGATION), DATA_TYPE_UINT64);
+ nvlist_remove(nvroot, zpool_prop_to_name(ZPOOL_PROP_BOOTFS), DATA_TYPE_UINT64);
+
+ /* apply porperties. */
+ spa_set_props(spa, props);
+ }
+
return (0);
}
@@ -3014,6 +3030,15 @@ spa_sync_props(void *arg1, void *arg2, cred_t *cr, dmu_tx_t *tx)
zpool_prop_to_name(ZPOOL_PROP_AUTOREPLACE), 8, 1,
&intval, tx) == 0);
break;
+
+ case ZPOOL_PROP_ASHIFT:
+ VERIFY(nvlist_lookup_uint64(nvp,
+ nvpair_name(nvpair), &intval) == 0);
+ VERIFY(zap_update(mos,
+ spa->spa_pool_props_object,
+ zpool_prop_to_name(ZPOOL_PROP_ASHIFT), 8, 1,
+ &intval, tx) == 0);
+ break;
}
spa_history_internal_log(LOG_POOL_PROPSET,
spa, tx, cr, "%s %lld %s",
diff --git a/usr/src/uts/common/fs/zfs/space_map.c b/usr/src/uts/common/fs/zfs/space_map.c
index 9263b311..4aeaf25c 100644
--- a/usr/src/uts/common/fs/zfs/space_map.c
+++ b/usr/src/uts/common/fs/zfs/space_map.c
@@ -67,6 +67,8 @@ space_map_create(space_map_t *sm, uint64_t start, uint64_t size, uint8_t shift,
sm->sm_size = size;
sm->sm_shift = shift;
sm->sm_lock = lp;
+
+ cv_init(&sm->sm_load_cv, NULL, CV_DEFAULT, NULL);
}
void
@@ -75,6 +77,8 @@ space_map_destroy(space_map_t *sm)
ASSERT(!sm->sm_loaded && !sm->sm_loading);
VERIFY3U(sm->sm_space, ==, 0);
avl_destroy(&sm->sm_root);
+
+ cv_destroy(&sm->sm_load_cv);
}
void
diff --git a/usr/src/uts/common/fs/zfs/sys/refcount.h b/usr/src/uts/common/fs/zfs/sys/refcount.h
index 130b34e4..3ba0833e 100644
--- a/usr/src/uts/common/fs/zfs/sys/refcount.h
+++ b/usr/src/uts/common/fs/zfs/sys/refcount.h
@@ -21,7 +21,7 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- * Portions Copyright 2007 Apple Inc. All rights reserved.
+ * Portions Copyright 2007-2008 Apple Inc. All rights reserved.
* Use is subject to license terms.
*/
diff --git a/usr/src/uts/common/fs/zfs/txg.c b/usr/src/uts/common/fs/zfs/txg.c
index 70f24c90..f6c5e192 100644
--- a/usr/src/uts/common/fs/zfs/txg.c
+++ b/usr/src/uts/common/fs/zfs/txg.c
@@ -53,12 +53,24 @@ txg_init(dsl_pool_t *dp, uint64_t txg)
tx->tx_cpu = kmem_zalloc(max_ncpus * sizeof (tx_cpu_t), KM_SLEEP);
- for (c = 0; c < max_ncpus; c++)
+ for (c = 0; c < max_ncpus; c++) {
mutex_init(&tx->tx_cpu[c].tc_lock, NULL, MUTEX_DEFAULT, NULL);
+ int cv;
+ for (cv=0; cv < TXG_SIZE; cv++) {
+ cv_init(&tx->tx_cpu[c].tc_cv[cv], NULL, CV_DEFAULT, NULL);
+ }
+ }
rw_init(&tx->tx_suspend, NULL, RW_DEFAULT, NULL);
mutex_init(&tx->tx_sync_lock, NULL, MUTEX_DEFAULT, NULL);
+ cv_init(&tx->tx_sync_more_cv, NULL, CV_DEFAULT, NULL);
+ cv_init(&tx->tx_sync_done_cv, NULL, CV_DEFAULT, NULL);
+ cv_init(&tx->tx_quiesce_more_cv, NULL, CV_DEFAULT, NULL);
+ cv_init(&tx->tx_quiesce_done_cv, NULL, CV_DEFAULT, NULL);
+ cv_init(&tx->tx_timeout_exit_cv, NULL, CV_DEFAULT, NULL);
+ cv_init(&tx->tx_exit_cv, NULL, CV_DEFAULT, NULL);
+
tx->tx_open_txg = txg;
}
@@ -76,8 +88,20 @@ txg_fini(dsl_pool_t *dp)
rw_destroy(&tx->tx_suspend);
mutex_destroy(&tx->tx_sync_lock);
- for (c = 0; c < max_ncpus; c++)
+ cv_destroy(&tx->tx_sync_more_cv);
+ cv_destroy(&tx->tx_sync_done_cv);
+ cv_destroy(&tx->tx_quiesce_more_cv);
+ cv_destroy(&tx->tx_quiesce_done_cv);
+ cv_destroy(&tx->tx_timeout_exit_cv);
+ cv_destroy(&tx->tx_exit_cv);
+
+ for (c = 0; c < max_ncpus; c++) {
mutex_destroy(&tx->tx_cpu[c].tc_lock);
+ int cv;
+ for (cv=0; cv < TXG_SIZE; cv++) {
+ cv_destroy(&tx->tx_cpu[c].tc_cv[cv]);
+ }
+ }
kmem_free(tx->tx_cpu, max_ncpus * sizeof (tx_cpu_t));
diff --git a/usr/src/uts/common/fs/zfs/vdev_disk.c b/usr/src/uts/common/fs/zfs/vdev_disk.c
index c77ab681..e5003016 100644
--- a/usr/src/uts/common/fs/zfs/vdev_disk.c
+++ b/usr/src/uts/common/fs/zfs/vdev_disk.c
@@ -339,6 +339,10 @@ vdev_disk_close(vdev_t *vd)
if (dvd == NULL)
return;
+ dprintf("removing disk %s, devid %s\n",
+ vd->vdev_path ? vd->vdev_path : "",
+ vd->vdev_devid ? vd->vdev_devid : "");
+
#ifdef __APPLE__
if (dvd->vd_devvp != NULL) {
vfs_context_t context;
diff --git a/usr/src/uts/common/fs/zfs/zfs_ioctl.c b/usr/src/uts/common/fs/zfs/zfs_ioctl.c
index b28bf952..a692e881 100644
--- a/usr/src/uts/common/fs/zfs/zfs_ioctl.c
+++ b/usr/src/uts/common/fs/zfs/zfs_ioctl.c
@@ -1535,6 +1535,15 @@ zfs_ioc_pool_set_props(zfs_cmd_t *zc)
objnum = dmu_objset_id(os);
dmu_objset_close(os);
break;
+
+ case ZPOOL_PROP_ASHIFT:
+ /*
+ * Property can only be set at pool create time, and
+ * that code path does not go through this function.
+ * So unconditionally fail here.
+ */
+ error = EPERM;
+ break;
}
if (error)
diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
index 1e428fc1..2d63527b 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
@@ -1446,7 +1446,7 @@ zfs_statvfs(vfs_t *vfsp, struct statvfs64 *statp)
#endif /* __APPLE__ */
{
#ifdef __APPLE__
- zfsvfs_t *zfsvfs = vfs_fsprivate(mp);
+ zfsvfs_t *zfsvfs = vfs_fsprivate(mp);
#else
zfsvfs_t *zfsvfs = vfsp->vfs_data;
#endif /* __APPLE__ */
diff --git a/usr/src/uts/common/fs/zfs/zfs_znode.c b/usr/src/uts/common/fs/zfs/zfs_znode.c
index 4c6926ce..21403bd0 100644
--- a/usr/src/uts/common/fs/zfs/zfs_znode.c
+++ b/usr/src/uts/common/fs/zfs/zfs_znode.c
@@ -1071,22 +1071,22 @@ zfs_zinactive(znode_t *zp)
#ifdef __APPLE__
zfs_znode_free(zp);
#else
- VFS_RELE(zfsvfs->z_vfs);
+ VFS_RELE(zfsvfs->z_vfs);
#endif /* __APPLE__ */
return;
}
#ifndef __APPLE__
- ASSERT(zp->z_phys);
- ASSERT(zp->z_dbuf_held);
+ ASSERT(zp->z_phys);
+ ASSERT(zp->z_dbuf_held);
- zp->z_dbuf_held = 0;
+ zp->z_dbuf_held = 0;
#endif /* __APPLE__ */
-
+
mutex_exit(&zp->z_lock);
dmu_buf_rele(zp->z_dbuf, NULL);
ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id);
#ifdef __APPLE__
- zfs_znode_free(zp);
+ zfs_znode_free(zp);
#else
VFS_RELE(zfsvfs->z_vfs);
#endif /* __APPLE__ */
@@ -1588,6 +1588,8 @@ zfs_obj_to_path(objset_t *osp, uint64_t obj, char *buf, int len)
}
#ifdef __APPLE__
+#ifndef LIBZPOOL_HACK
+
uint32_t
zfs_getbsdflags(znode_t *zp)
{
@@ -1647,9 +1649,11 @@ zfs_setbsdflags(znode_t *zp, uint32_t bsdflags)
zp->z_phys->zp_flags = zflags;
}
+#endif /* LIBZPOOL_HACK */
#ifdef _KERNEL
#ifdef ZFS_DEBUG
+#ifndef LIBZPOOL_HACK
char *
n_event_to_str(whereami_t event); // the prototype that removes gcc warning
char *
@@ -1708,6 +1712,7 @@ znode_stalker_fini(znode_t *zp)
}
list_destroy(&zp->z_stalker);
}
+#endif /* LIBZPOOL_HACK */
#endif /* ZFS_DEBUG */
#endif /* _KERNEL */
#endif /* __APPLE__ */
diff --git a/usr/src/uts/common/os/kmem.c b/usr/src/uts/common/os/kmem.c
index 79293741..f044fb0c 100644
--- a/usr/src/uts/common/os/kmem.c
+++ b/usr/src/uts/common/os/kmem.c
@@ -791,6 +791,8 @@ kmem_slab_destroy(kmem_cache_t *cp, kmem_slab_t *sp)
vmem_t *vmp = cp->cache_arena;
void *slab = (void *)P2ALIGN((uintptr_t)sp->slab_base, vmp->vm_quantum);
+ ASSERT(sp->slab_cache == cp);
+
if (cp->cache_flags & KMF_HASH) {
kmem_bufctl_t *bcp;
while ((bcp = sp->slab_head) != NULL) {
diff --git a/usr/src/uts/common/sys/fs/zfs.h b/usr/src/uts/common/sys/fs/zfs.h
index 2dbb168f..4fed3e99 100644
--- a/usr/src/uts/common/sys/fs/zfs.h
+++ b/usr/src/uts/common/sys/fs/zfs.h
@@ -106,6 +106,7 @@ typedef enum {
ZPOOL_PROP_DELEGATION,
ZFS_PROP_VERSION,
ZPOOL_PROP_NAME,
+ ZPOOL_PROP_ASHIFT,
ZFS_NUM_PROPS
} zfs_prop_t;
@@ -283,6 +284,9 @@ extern zpool_prop_t zpool_prop_iter(zpool_prop_f, void *);
#define ZPOOL_CONFIG_DEGRADED "degraded"
#define ZPOOL_CONFIG_REMOVED "removed"
+/* Extra properties passed to spa_create. */
+#define ZPOOL_CONFIG_PROPS "props"
+
#define VDEV_TYPE_ROOT "root"
#define VDEV_TYPE_MIRROR "mirror"
#define VDEV_TYPE_REPLACING "replacing"
diff --git a/zfs.xcodeproj/project.pbxproj b/zfs.xcodeproj/project.pbxproj
index b633e4d7..51839ee3 100644
--- a/zfs.xcodeproj/project.pbxproj
+++ b/zfs.xcodeproj/project.pbxproj
@@ -20,6 +20,11 @@
26B29B900ACE1CAB00A6F03B /* PBXTargetDependency */,
26B29B920ACE1CAF00A6F03B /* PBXTargetDependency */,
2665B6470BB47474004F043E /* PBXTargetDependency */,
+ 20FA07DC15DBB679007E2315 /* PBXTargetDependency */,
+ 20FA07DE15DBB67E007E2315 /* PBXTargetDependency */,
+ 20FA07E015DBB682007E2315 /* PBXTargetDependency */,
+ 20FA07E215DBB686007E2315 /* PBXTargetDependency */,
+ 20FA07E415DBB68B007E2315 /* PBXTargetDependency */,
);
name = "zfs aggregate";
productName = "zfs aggregate";
@@ -27,6 +32,85 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 200E785415DB1497000957FF /* xdr_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93756810A38E6300754C9E /* xdr_mem.c */; };
+ 200E785515DB1497000957FF /* xdr.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93756910A38E6300754C9E /* xdr.c */; };
+ 200E785615DB1497000957FF /* xdr_array.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93756A10A38E6300754C9E /* xdr_array.c */; };
+ 200E786515DB1545000957FF /* libnvpair.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93756010A38E6300754C9E /* libnvpair.c */; };
+ 200E786615DB1545000957FF /* nvpair_alloc_system.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93756210A38E6300754C9E /* nvpair_alloc_system.c */; };
+ 200E786715DB1559000957FF /* nvpair.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93765410A38E6300754C9E /* nvpair.c */; };
+ 200E786815DB1559000957FF /* nvpair_alloc_fixed.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93765510A38E6300754C9E /* nvpair_alloc_fixed.c */; };
+ 200E788215DB15CD000957FF /* liblibnsl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 200E784C15DB13A3000957FF /* liblibnsl.a */; };
+ 200E788315DB15CD000957FF /* liblibnvpair.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 200E786215DB14A1000957FF /* liblibnvpair.a */; };
+ 200E788615DB16DD000957FF /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 200E788515DB16DD000957FF /* libz.dylib */; };
+ 20FA076415DBB067007E2315 /* arc.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DB10A38E6300754C9E /* arc.c */; };
+ 20FA076515DBB0AF007E2315 /* assfail.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656A811F1BFA3001E7C56 /* assfail.c */; };
+ 20FA076615DBB111007E2315 /* avl.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93765A10A38E6300754C9E /* avl.c */; };
+ 20FA076715DBB185007E2315 /* bplist.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DD10A38E6300754C9E /* bplist.c */; };
+ 20FA076815DBB185007E2315 /* dbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760910A38E6300754C9E /* dbuf.c */; };
+ 20FA076915DBB185007E2315 /* dmu.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DF10A38E6300754C9E /* dmu.c */; };
+ 20FA076A15DBB185007E2315 /* dmu_object.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DE10A38E6300754C9E /* dmu_object.c */; };
+ 20FA076B15DBB185007E2315 /* dmu_objset.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375ED10A38E6300754C9E /* dmu_objset.c */; };
+ 20FA076C15DBB185007E2315 /* dmu_send.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D410A38E6300754C9E /* dmu_send.c */; };
+ 20FA076D15DBB185007E2315 /* dmu_traverse.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375CB10A38E6300754C9E /* dmu_traverse.c */; };
+ 20FA076E15DBB185007E2315 /* dmu_tx.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D210A38E6300754C9E /* dmu_tx.c */; };
+ 20FA076F15DBB185007E2315 /* dmu_zfetch.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F810A38E6300754C9E /* dmu_zfetch.c */; };
+ 20FA077015DBB185007E2315 /* dnode.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375FD10A38E6300754C9E /* dnode.c */; };
+ 20FA077115DBB185007E2315 /* dnode_sync.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375CD10A38E6300754C9E /* dnode_sync.c */; };
+ 20FA077215DBB185007E2315 /* dsl_dataset.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DA10A38E6300754C9E /* dsl_dataset.c */; };
+ 20FA077315DBB185007E2315 /* dsl_deleg.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D910A38E6300754C9E /* dsl_deleg.c */; };
+ 20FA077415DBB185007E2315 /* dsl_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F610A38E6300754C9E /* dsl_dir.c */; };
+ 20FA077515DBB185007E2315 /* dsl_pool.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D710A38E6300754C9E /* dsl_pool.c */; };
+ 20FA077615DBB185007E2315 /* dsl_prop.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D510A38E6300754C9E /* dsl_prop.c */; };
+ 20FA077715DBB185007E2315 /* dsl_synctask.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375FF10A38E6300754C9E /* dsl_synctask.c */; };
+ 20FA077815DBB185007E2315 /* fletcher.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375CF10A38E6300754C9E /* fletcher.c */; };
+ 20FA077915DBB185007E2315 /* gzip.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375CE10A38E6300754C9E /* gzip.c */; };
+ 20FA078315DBB1F8007E2315 /* kernel.c in Sources */ = {isa = PBXBuildFile; fileRef = 20FA077C15DBB1DD007E2315 /* kernel.c */; };
+ 20FA078615DBB26E007E2315 /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93764510A38E6300754C9E /* list.c */; };
+ 20FA078715DBB2CE007E2315 /* lzjb.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D010A38E6300754C9E /* lzjb.c */; };
+ 20FA078815DBB2CE007E2315 /* metaslab.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93763F10A38E6300754C9E /* metaslab.c */; };
+ 20FA078915DBB2CE007E2315 /* refcount.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E310A38E6300754C9E /* refcount.c */; };
+ 20FA078A15DBB2CE007E2315 /* rprwlock.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375FB10A38E6300754C9E /* rprwlock.c */; };
+ 20FA078B15DBB2CE007E2315 /* sha256.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93764110A38E6300754C9E /* sha256.c */; };
+ 20FA078C15DBB2CE007E2315 /* spa.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375EA10A38E6300754C9E /* spa.c */; };
+ 20FA078D15DBB2CE007E2315 /* spa_config.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760610A38E6300754C9E /* spa_config.c */; };
+ 20FA078E15DBB2CE007E2315 /* spa_errlog.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760110A38E6300754C9E /* spa_errlog.c */; };
+ 20FA078F15DBB2CE007E2315 /* spa_history.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E610A38E6300754C9E /* spa_history.c */; };
+ 20FA079015DBB2CE007E2315 /* spa_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F210A38E6300754C9E /* spa_misc.c */; };
+ 20FA079115DBB2CE007E2315 /* space_map.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93763E10A38E6300754C9E /* space_map.c */; };
+ 20FA079215DBB317007E2315 /* taskq.c in Sources */ = {isa = PBXBuildFile; fileRef = 20FA078115DBB1DD007E2315 /* taskq.c */; };
+ 20FA079315DBB348007E2315 /* txg.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D610A38E6300754C9E /* txg.c */; };
+ 20FA079415DBB348007E2315 /* uberblock.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375FC10A38E6300754C9E /* uberblock.c */; };
+ 20FA079515DBB348007E2315 /* unique.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760810A38E6300754C9E /* unique.c */; };
+ 20FA079615DBB37F007E2315 /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = 20FA078215DBB1DD007E2315 /* util.c */; };
+ 20FA07A515DBB475007E2315 /* vdev.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375EF10A38E6300754C9E /* vdev.c */; };
+ 20FA07A615DBB475007E2315 /* vdev_cache.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E110A38E6300754C9E /* vdev_cache.c */; };
+ 20FA07A715DBB475007E2315 /* vdev_file.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E910A38E6300754C9E /* vdev_file.c */; };
+ 20FA07A815DBB475007E2315 /* vdev_label.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F910A38E6300754C9E /* vdev_label.c */; };
+ 20FA07A915DBB475007E2315 /* vdev_mirror.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760010A38E6300754C9E /* vdev_mirror.c */; };
+ 20FA07AA15DBB475007E2315 /* vdev_missing.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375EB10A38E6300754C9E /* vdev_missing.c */; };
+ 20FA07AB15DBB475007E2315 /* vdev_queue.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E010A38E6300754C9E /* vdev_queue.c */; };
+ 20FA07AC15DBB475007E2315 /* vdev_raidz.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375EC10A38E6300754C9E /* vdev_raidz.c */; };
+ 20FA07AD15DBB475007E2315 /* vdev_root.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F710A38E6300754C9E /* vdev_root.c */; };
+ 20FA07AE15DBB475007E2315 /* zap.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760310A38E6300754C9E /* zap.c */; };
+ 20FA07AF15DBB475007E2315 /* zap_leaf.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F010A38E6300754C9E /* zap_leaf.c */; };
+ 20FA07B015DBB475007E2315 /* zap_micro.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375EE10A38E6300754C9E /* zap_micro.c */; };
+ 20FA07B115DBB475007E2315 /* zfs_byteswap.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D310A38E6300754C9E /* zfs_byteswap.c */; };
+ 20FA07B315DBB4CC007E2315 /* zfs_context_libzpool.c in Sources */ = {isa = PBXBuildFile; fileRef = 20FA07B215DBB4B9007E2315 /* zfs_context_libzpool.c */; };
+ 20FA07B415DBB524007E2315 /* zfs_deleg.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9376A510A38FB500754C9E /* zfs_deleg.c */; };
+ 20FA07B515DBB54B007E2315 /* zfs_namecheck.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9376A310A38FB500754C9E /* zfs_namecheck.c */; };
+ 20FA07B615DBB54B007E2315 /* zfs_prop.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9376A110A38FB500754C9E /* zfs_prop.c */; };
+ 20FA07B715DBB58D007E2315 /* zfs_fm.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375CC10A38E6300754C9E /* zfs_fm.c */; };
+ 20FA07B815DBB58D007E2315 /* zfs_znode.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E710A38E6300754C9E /* zfs_znode.c */; };
+ 20FA07B915DBB58D007E2315 /* zil.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375E810A38E6300754C9E /* zil.c */; };
+ 20FA07BA15DBB58D007E2315 /* zio.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DC10A38E6300754C9E /* zio.c */; };
+ 20FA07BB15DBB58D007E2315 /* zio_checksum.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375F510A38E6300754C9E /* zio_checksum.c */; };
+ 20FA07BC15DBB58D007E2315 /* zio_compress.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93760510A38E6300754C9E /* zio_compress.c */; };
+ 20FA07BD15DBB58D007E2315 /* zio_inject.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375D810A38E6300754C9E /* zio_inject.c */; };
+ 20FA07D015DBB5FB007E2315 /* libzfs.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2696406C0AACEAD20073456B /* libzfs.dylib */; };
+ 20FA07D115DBB5FB007E2315 /* libzpool.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 200E787A15DB15BE000957FF /* libzpool.dylib */; };
+ 20FA07EE15DBB806007E2315 /* zdb.c in Sources */ = {isa = PBXBuildFile; fileRef = 20FA07EC15DBB806007E2315 /* zdb.c */; };
+ 20FA07EF15DBB806007E2315 /* zdb_il.c in Sources */ = {isa = PBXBuildFile; fileRef = 20FA07ED15DBB806007E2315 /* zdb_il.c */; };
+ 20FA082C15DBBEF8007E2315 /* libzpool.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 200E787A15DB15BE000957FF /* libzpool.dylib */; };
2611F7400ACDD29E00E5D4E2 /* zfsutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 2611F73F0ACDD29E00E5D4E2 /* zfsutil.c */; };
2611F7F60ACDE5F200E5D4E2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2611F7F50ACDE5F200E5D4E2 /* InfoPlist.strings */; };
2611F8040ACDE72900E5D4E2 /* zfs.util in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2611F7360ACDD13900E5D4E2 /* zfs.util */; };
@@ -97,9 +181,6 @@
FA93776A10A3922300754C9E /* zfs_iter.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93766E10A38E6300754C9E /* zfs_iter.c */; };
FA93776B10A3922300754C9E /* zfs_main.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93766F10A38E6300754C9E /* zfs_main.c */; };
FA93777410A3925300754C9E /* ztest.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93766610A38E6300754C9E /* ztest.c */; };
- FA93777510A3925300754C9E /* kernel.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93766710A38E6300754C9E /* kernel.c */; };
- FA93777610A3925300754C9E /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93766A10A38E6300754C9E /* util.c */; };
- FA93777710A3925300754C9E /* taskq.c in Sources */ = {isa = PBXBuildFile; fileRef = FA93766B10A38E6300754C9E /* taskq.c */; };
FA9656AE11F1BFA3001E7C56 /* assfail.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656A811F1BFA3001E7C56 /* assfail.c */; };
FA9656AF11F1BFA3001E7C56 /* maczfs_kernel.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656AB11F1BFA3001E7C56 /* maczfs_kernel.c */; };
FA9656B011F1BFA3001E7C56 /* zfs_context.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656AD11F1BFA3001E7C56 /* zfs_context.c */; };
@@ -108,7 +189,6 @@
FA9656B611F1BFC0001E7C56 /* assfail.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656A811F1BFA3001E7C56 /* assfail.c */; };
FA9656B711F1BFC1001E7C56 /* assfail.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656A811F1BFA3001E7C56 /* assfail.c */; };
FA9656B811F1BFC1001E7C56 /* assfail.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656A811F1BFA3001E7C56 /* assfail.c */; };
- FA9656B911F1BFC5001E7C56 /* assfail.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9656A811F1BFA3001E7C56 /* assfail.c */; };
FA965A1611F366D2001E7C56 /* zmod.c in Sources */ = {isa = PBXBuildFile; fileRef = FA96598B11F35E74001E7C56 /* zmod.c */; };
FAA3738910A3A7E600B9ADAC /* arc.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DB10A38E6300754C9E /* arc.c */; };
FAA3738A10A3A7E600B9ADAC /* bplist.c in Sources */ = {isa = PBXBuildFile; fileRef = FA9375DD10A38E6300754C9E /* bplist.c */; };
@@ -194,6 +274,76 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
+ 200E787E15DB15C7000957FF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E784B15DB13A3000957FF;
+ remoteInfo = libnsl;
+ };
+ 200E788015DB15C7000957FF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E785715DB14A1000957FF;
+ remoteInfo = libnvpair;
+ };
+ 206EDD2B15DC34A800DD2C9E /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E787915DB15BE000957FF /* libzpool */;
+ remoteInfo = libzpool;
+ };
+ 20FA07C015DBB5AE007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 2696406B0AACEAD20073456B;
+ remoteInfo = libzfs;
+ };
+ 20FA07CE15DBB5F3007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E787915DB15BE000957FF;
+ remoteInfo = libzpool;
+ };
+ 20FA07DB15DBB679007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E784B15DB13A3000957FF;
+ remoteInfo = libnsl;
+ };
+ 20FA07DD15DBB67E007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E785715DB14A1000957FF;
+ remoteInfo = libnvpair;
+ };
+ 20FA07DF15DBB682007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 200E787915DB15BE000957FF;
+ remoteInfo = libzpool;
+ };
+ 20FA07E115DBB686007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 20FA07BE15DBB5AE007E2315;
+ remoteInfo = zdb;
+ };
+ 20FA07E315DBB68B007E2315 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = FA93776E10A3924300754C9E;
+ remoteInfo = ztest;
+ };
2611F76A0ACDD5C900E5D4E2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
@@ -278,13 +428,6 @@
remoteGlobalIDString = 2696406B0AACEAD20073456B;
remoteInfo = libzfs;
};
- FA63A7201139EC8000754FDD /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 089C1669FE841209C02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 2696406B0AACEAD20073456B;
- remoteInfo = libzfs;
- };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -359,6 +502,20 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 200E784C15DB13A3000957FF /* liblibnsl.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblibnsl.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 200E786215DB14A1000957FF /* liblibnvpair.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblibnvpair.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 200E787A15DB15BE000957FF /* libzpool.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libzpool.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ 200E788515DB16DD000957FF /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = ""; };
+ 20FA077C15DBB1DD007E2315 /* kernel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = kernel.c; sourceTree = ""; };
+ 20FA077D15DBB1DD007E2315 /* llib-lzpool */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "llib-lzpool"; sourceTree = ""; };
+ 20FA077F15DBB1DD007E2315 /* zfs_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zfs_context.h; sourceTree = ""; };
+ 20FA078015DBB1DD007E2315 /* zfs_file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zfs_file.h; sourceTree = ""; };
+ 20FA078115DBB1DD007E2315 /* taskq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = taskq.c; sourceTree = ""; };
+ 20FA078215DBB1DD007E2315 /* util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = util.c; sourceTree = ""; };
+ 20FA07B215DBB4B9007E2315 /* zfs_context_libzpool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zfs_context_libzpool.c; sourceTree = ""; };
+ 20FA07CC15DBB5AE007E2315 /* zdb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = zdb; sourceTree = BUILT_PRODUCTS_DIR; };
+ 20FA07EC15DBB806007E2315 /* zdb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zdb.c; sourceTree = ""; };
+ 20FA07ED15DBB806007E2315 /* zdb_il.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zdb_il.c; sourceTree = ""; };
2611F7360ACDD13900E5D4E2 /* zfs.util */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = zfs.util; sourceTree = BUILT_PRODUCTS_DIR; };
2611F73F0ACDD29E00E5D4E2 /* zfsutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zfsutil.c; sourceTree = ""; };
2611F75E0ACDD4E100E5D4E2 /* zfs.fs */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = zfs.fs; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -651,6 +808,39 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 200E784A15DB13A3000957FF /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 200E785D15DB14A1000957FF /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 200E787815DB15BE000957FF /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 200E788215DB15CD000957FF /* liblibnsl.a in Frameworks */,
+ 200E788315DB15CD000957FF /* liblibnvpair.a in Frameworks */,
+ 200E788615DB16DD000957FF /* libz.dylib in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 20FA07C715DBB5AE007E2315 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 20FA07D015DBB5FB007E2315 /* libzfs.dylib in Frameworks */,
+ 20FA07D115DBB5FB007E2315 /* libzpool.dylib in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
2611F7340ACDD13900E5D4E2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -697,6 +887,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 20FA082C15DBBEF8007E2315 /* libzpool.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -713,6 +904,7 @@
269334AF0AD1C1E2000CDAB9 /* Documentation */,
19C28FB6FE9D52B211CA2CBB /* Products */,
DAD6B41710940DCF008A0395 /* Foundation.framework */,
+ 200E788515DB16DD000957FF /* libz.dylib */,
);
name = zfs;
sourceTree = "";
@@ -728,10 +920,52 @@
2611F75E0ACDD4E100E5D4E2 /* zfs.fs */,
26E59EBF0B87AA2700CFC573 /* zoink */,
FA93776F10A3924300754C9E /* ztest */,
+ 200E784C15DB13A3000957FF /* liblibnsl.a */,
+ 200E786215DB14A1000957FF /* liblibnvpair.a */,
+ 200E787A15DB15BE000957FF /* libzpool.dylib */,
+ 20FA07CC15DBB5AE007E2315 /* zdb */,
);
name = Products;
sourceTree = "";
};
+ 20FA077A15DBB1DD007E2315 /* libzpool */ = {
+ isa = PBXGroup;
+ children = (
+ 20FA077B15DBB1DD007E2315 /* common */,
+ );
+ path = libzpool;
+ sourceTree = "";
+ };
+ 20FA077B15DBB1DD007E2315 /* common */ = {
+ isa = PBXGroup;
+ children = (
+ 20FA077C15DBB1DD007E2315 /* kernel.c */,
+ 20FA077D15DBB1DD007E2315 /* llib-lzpool */,
+ 20FA077E15DBB1DD007E2315 /* sys */,
+ 20FA078115DBB1DD007E2315 /* taskq.c */,
+ 20FA078215DBB1DD007E2315 /* util.c */,
+ );
+ path = common;
+ sourceTree = "";
+ };
+ 20FA077E15DBB1DD007E2315 /* sys */ = {
+ isa = PBXGroup;
+ children = (
+ 20FA077F15DBB1DD007E2315 /* zfs_context.h */,
+ 20FA078015DBB1DD007E2315 /* zfs_file.h */,
+ );
+ path = sys;
+ sourceTree = "";
+ };
+ 20FA07EB15DBB806007E2315 /* zdb */ = {
+ isa = PBXGroup;
+ children = (
+ 20FA07EC15DBB806007E2315 /* zdb.c */,
+ 20FA07ED15DBB806007E2315 /* zdb_il.c */,
+ );
+ path = zdb;
+ sourceTree = "";
+ };
262438310ACDCD8F007444B5 /* zfs_bundle */ = {
isa = PBXGroup;
children = (
@@ -804,6 +1038,7 @@
FA93755E10A38E6300754C9E /* lib */ = {
isa = PBXGroup;
children = (
+ 20FA077A15DBB1DD007E2315 /* libzpool */,
FA93755F10A38E6300754C9E /* libnvpair */,
FA93756310A38E6300754C9E /* libnsl */,
FA93756B10A38E6300754C9E /* libzfs */,
@@ -1272,6 +1507,7 @@
FA93765E10A38E6300754C9E /* cmd */ = {
isa = PBXGroup;
children = (
+ 20FA07EB15DBB806007E2315 /* zdb */,
FA93765F10A38E6300754C9E /* zpool */,
FA93766510A38E6300754C9E /* ztest */,
FA93766C10A38E6300754C9E /* zfs */,
@@ -1325,6 +1561,7 @@
FA9656A711F1BFA3001E7C56 /* maczfs */ = {
isa = PBXGroup;
children = (
+ 20FA07B215DBB4B9007E2315 /* zfs_context_libzpool.c */,
FA96584511F304B1001E7C56 /* maczfs_file.h */,
FA96584611F304B1001E7C56 /* maczfs_libc.h */,
FA96584711F304B1001E7C56 /* maczfs_mount.h */,
@@ -1379,6 +1616,27 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
+ 200E784815DB13A3000957FF /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 200E785815DB14A1000957FF /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 200E787615DB15BE000957FF /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
269640680AACEAD20073456B /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -1411,6 +1669,77 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 200E784B15DB13A3000957FF /* libnsl */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 200E785115DB13C1000957FF /* Build configuration list for PBXNativeTarget "libnsl" */;
+ buildPhases = (
+ 200E784815DB13A3000957FF /* Headers */,
+ 200E784915DB13A3000957FF /* Sources */,
+ 200E784A15DB13A3000957FF /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = libnsl;
+ productName = libnsl;
+ productReference = 200E784C15DB13A3000957FF /* liblibnsl.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 200E785715DB14A1000957FF /* libnvpair */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 200E785E15DB14A1000957FF /* Build configuration list for PBXNativeTarget "libnvpair" */;
+ buildPhases = (
+ 200E785815DB14A1000957FF /* Headers */,
+ 200E785915DB14A1000957FF /* Sources */,
+ 200E785D15DB14A1000957FF /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = libnvpair;
+ productName = libnsl;
+ productReference = 200E786215DB14A1000957FF /* liblibnvpair.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 200E787915DB15BE000957FF /* libzpool */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 200E788415DB1600000957FF /* Build configuration list for PBXNativeTarget "libzpool" */;
+ buildPhases = (
+ 200E787615DB15BE000957FF /* Headers */,
+ 200E787715DB15BE000957FF /* Sources */,
+ 200E787815DB15BE000957FF /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 200E787F15DB15C7000957FF /* PBXTargetDependency */,
+ 200E788115DB15C7000957FF /* PBXTargetDependency */,
+ );
+ name = libzpool;
+ productName = libzpool;
+ productReference = 200E787A15DB15BE000957FF /* libzpool.dylib */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 20FA07BE15DBB5AE007E2315 /* zdb */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 20FA07C815DBB5AE007E2315 /* Build configuration list for PBXNativeTarget "zdb" */;
+ buildPhases = (
+ 20FA07C115DBB5AE007E2315 /* Sources */,
+ 20FA07C715DBB5AE007E2315 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 20FA07BF15DBB5AE007E2315 /* PBXTargetDependency */,
+ 20FA07CF15DBB5F3007E2315 /* PBXTargetDependency */,
+ );
+ name = zdb;
+ productName = ztest;
+ productReference = 20FA07CC15DBB5AE007E2315 /* zdb */;
+ productType = "com.apple.product-type.tool";
+ };
2611F7350ACDD13900E5D4E2 /* zfs.util */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2611F73B0ACDD14700E5D4E2 /* Build configuration list for PBXNativeTarget "zfs.util" */;
@@ -1549,7 +1878,7 @@
buildRules = (
);
dependencies = (
- FA63A7211139EC8000754FDD /* PBXTargetDependency */,
+ 206EDD2C15DC34A800DD2C9E /* PBXTargetDependency */,
);
name = ztest;
productName = ztest;
@@ -1566,7 +1895,14 @@
};
buildConfigurationList = 1DEB91C708733DAC0010E9CD /* Build configuration list for PBXProject "zfs" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
mainGroup = 089C166AFE841209C02AAC07 /* zfs */;
projectDirPath = "";
projectRoot = "";
@@ -1580,6 +1916,10 @@
2611F75D0ACDD4E100E5D4E2 /* zfs.fs */,
26E59EBE0B87AA2700CFC573 /* zoink */,
FA93776E10A3924300754C9E /* ztest */,
+ 200E784B15DB13A3000957FF /* libnsl */,
+ 200E785715DB14A1000957FF /* libnvpair */,
+ 200E787915DB15BE000957FF /* libzpool */,
+ 20FA07BE15DBB5AE007E2315 /* zdb */,
);
};
/* End PBXProject section */
@@ -1634,6 +1974,107 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 200E784915DB13A3000957FF /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 200E785415DB1497000957FF /* xdr_mem.c in Sources */,
+ 200E785515DB1497000957FF /* xdr.c in Sources */,
+ 200E785615DB1497000957FF /* xdr_array.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 200E785915DB14A1000957FF /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 200E786715DB1559000957FF /* nvpair.c in Sources */,
+ 200E786815DB1559000957FF /* nvpair_alloc_fixed.c in Sources */,
+ 200E786515DB1545000957FF /* libnvpair.c in Sources */,
+ 200E786615DB1545000957FF /* nvpair_alloc_system.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 200E787715DB15BE000957FF /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 20FA07B715DBB58D007E2315 /* zfs_fm.c in Sources */,
+ 20FA07B815DBB58D007E2315 /* zfs_znode.c in Sources */,
+ 20FA07B915DBB58D007E2315 /* zil.c in Sources */,
+ 20FA07BA15DBB58D007E2315 /* zio.c in Sources */,
+ 20FA07BB15DBB58D007E2315 /* zio_checksum.c in Sources */,
+ 20FA07BC15DBB58D007E2315 /* zio_compress.c in Sources */,
+ 20FA07BD15DBB58D007E2315 /* zio_inject.c in Sources */,
+ 20FA07B515DBB54B007E2315 /* zfs_namecheck.c in Sources */,
+ 20FA07B615DBB54B007E2315 /* zfs_prop.c in Sources */,
+ 20FA07B415DBB524007E2315 /* zfs_deleg.c in Sources */,
+ 20FA07B315DBB4CC007E2315 /* zfs_context_libzpool.c in Sources */,
+ 20FA07A515DBB475007E2315 /* vdev.c in Sources */,
+ 20FA07A615DBB475007E2315 /* vdev_cache.c in Sources */,
+ 20FA07A715DBB475007E2315 /* vdev_file.c in Sources */,
+ 20FA07A815DBB475007E2315 /* vdev_label.c in Sources */,
+ 20FA07A915DBB475007E2315 /* vdev_mirror.c in Sources */,
+ 20FA07AA15DBB475007E2315 /* vdev_missing.c in Sources */,
+ 20FA07AB15DBB475007E2315 /* vdev_queue.c in Sources */,
+ 20FA07AC15DBB475007E2315 /* vdev_raidz.c in Sources */,
+ 20FA07AD15DBB475007E2315 /* vdev_root.c in Sources */,
+ 20FA07AE15DBB475007E2315 /* zap.c in Sources */,
+ 20FA07AF15DBB475007E2315 /* zap_leaf.c in Sources */,
+ 20FA07B015DBB475007E2315 /* zap_micro.c in Sources */,
+ 20FA07B115DBB475007E2315 /* zfs_byteswap.c in Sources */,
+ 20FA079615DBB37F007E2315 /* util.c in Sources */,
+ 20FA079315DBB348007E2315 /* txg.c in Sources */,
+ 20FA079415DBB348007E2315 /* uberblock.c in Sources */,
+ 20FA079515DBB348007E2315 /* unique.c in Sources */,
+ 20FA079215DBB317007E2315 /* taskq.c in Sources */,
+ 20FA078715DBB2CE007E2315 /* lzjb.c in Sources */,
+ 20FA078815DBB2CE007E2315 /* metaslab.c in Sources */,
+ 20FA078915DBB2CE007E2315 /* refcount.c in Sources */,
+ 20FA078A15DBB2CE007E2315 /* rprwlock.c in Sources */,
+ 20FA078B15DBB2CE007E2315 /* sha256.c in Sources */,
+ 20FA078C15DBB2CE007E2315 /* spa.c in Sources */,
+ 20FA078D15DBB2CE007E2315 /* spa_config.c in Sources */,
+ 20FA078E15DBB2CE007E2315 /* spa_errlog.c in Sources */,
+ 20FA078F15DBB2CE007E2315 /* spa_history.c in Sources */,
+ 20FA079015DBB2CE007E2315 /* spa_misc.c in Sources */,
+ 20FA079115DBB2CE007E2315 /* space_map.c in Sources */,
+ 20FA078615DBB26E007E2315 /* list.c in Sources */,
+ 20FA078315DBB1F8007E2315 /* kernel.c in Sources */,
+ 20FA076715DBB185007E2315 /* bplist.c in Sources */,
+ 20FA076815DBB185007E2315 /* dbuf.c in Sources */,
+ 20FA076915DBB185007E2315 /* dmu.c in Sources */,
+ 20FA076A15DBB185007E2315 /* dmu_object.c in Sources */,
+ 20FA076B15DBB185007E2315 /* dmu_objset.c in Sources */,
+ 20FA076C15DBB185007E2315 /* dmu_send.c in Sources */,
+ 20FA076D15DBB185007E2315 /* dmu_traverse.c in Sources */,
+ 20FA076E15DBB185007E2315 /* dmu_tx.c in Sources */,
+ 20FA076F15DBB185007E2315 /* dmu_zfetch.c in Sources */,
+ 20FA077015DBB185007E2315 /* dnode.c in Sources */,
+ 20FA077115DBB185007E2315 /* dnode_sync.c in Sources */,
+ 20FA077215DBB185007E2315 /* dsl_dataset.c in Sources */,
+ 20FA077315DBB185007E2315 /* dsl_deleg.c in Sources */,
+ 20FA077415DBB185007E2315 /* dsl_dir.c in Sources */,
+ 20FA077515DBB185007E2315 /* dsl_pool.c in Sources */,
+ 20FA077615DBB185007E2315 /* dsl_prop.c in Sources */,
+ 20FA077715DBB185007E2315 /* dsl_synctask.c in Sources */,
+ 20FA077815DBB185007E2315 /* fletcher.c in Sources */,
+ 20FA077915DBB185007E2315 /* gzip.c in Sources */,
+ 20FA076615DBB111007E2315 /* avl.c in Sources */,
+ 20FA076515DBB0AF007E2315 /* assfail.c in Sources */,
+ 20FA076415DBB067007E2315 /* arc.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 20FA07C115DBB5AE007E2315 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 20FA07EE15DBB806007E2315 /* zdb.c in Sources */,
+ 20FA07EF15DBB806007E2315 /* zdb_il.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
2611F7330ACDD13900E5D4E2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1811,16 +2252,62 @@
buildActionMask = 2147483647;
files = (
FA93777410A3925300754C9E /* ztest.c in Sources */,
- FA93777510A3925300754C9E /* kernel.c in Sources */,
- FA93777610A3925300754C9E /* util.c in Sources */,
- FA93777710A3925300754C9E /* taskq.c in Sources */,
- FA9656B911F1BFC5001E7C56 /* assfail.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ 200E787F15DB15C7000957FF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E784B15DB13A3000957FF /* libnsl */;
+ targetProxy = 200E787E15DB15C7000957FF /* PBXContainerItemProxy */;
+ };
+ 200E788115DB15C7000957FF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E785715DB14A1000957FF /* libnvpair */;
+ targetProxy = 200E788015DB15C7000957FF /* PBXContainerItemProxy */;
+ };
+ 206EDD2C15DC34A800DD2C9E /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E787915DB15BE000957FF /* libzpool */;
+ targetProxy = 206EDD2B15DC34A800DD2C9E /* PBXContainerItemProxy */;
+ };
+ 20FA07BF15DBB5AE007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 2696406B0AACEAD20073456B /* libzfs */;
+ targetProxy = 20FA07C015DBB5AE007E2315 /* PBXContainerItemProxy */;
+ };
+ 20FA07CF15DBB5F3007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E787915DB15BE000957FF /* libzpool */;
+ targetProxy = 20FA07CE15DBB5F3007E2315 /* PBXContainerItemProxy */;
+ };
+ 20FA07DC15DBB679007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E784B15DB13A3000957FF /* libnsl */;
+ targetProxy = 20FA07DB15DBB679007E2315 /* PBXContainerItemProxy */;
+ };
+ 20FA07DE15DBB67E007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E785715DB14A1000957FF /* libnvpair */;
+ targetProxy = 20FA07DD15DBB67E007E2315 /* PBXContainerItemProxy */;
+ };
+ 20FA07E015DBB682007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 200E787915DB15BE000957FF /* libzpool */;
+ targetProxy = 20FA07DF15DBB682007E2315 /* PBXContainerItemProxy */;
+ };
+ 20FA07E215DBB686007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 20FA07BE15DBB5AE007E2315 /* zdb */;
+ targetProxy = 20FA07E115DBB686007E2315 /* PBXContainerItemProxy */;
+ };
+ 20FA07E415DBB68B007E2315 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = FA93776E10A3924300754C9E /* ztest */;
+ targetProxy = 20FA07E315DBB68B007E2315 /* PBXContainerItemProxy */;
+ };
2611F76B0ACDD5C900E5D4E2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 2611F7350ACDD13900E5D4E2 /* zfs.util */;
@@ -1881,11 +2368,6 @@
target = 2696406B0AACEAD20073456B /* libzfs */;
targetProxy = FA63A71E1139EC7500754FDD /* PBXContainerItemProxy */;
};
- FA63A7211139EC8000754FDD /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 2696406B0AACEAD20073456B /* libzfs */;
- targetProxy = FA63A7201139EC8000754FDD /* PBXContainerItemProxy */;
- };
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
@@ -2028,6 +2510,552 @@
};
name = Release;
};
+ 200E784D15DB13A3000957FF /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/lib;
+ OTHER_CFLAGS = (
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/sys/zfs_context.h",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-isystem",
+ "$(SRCROOT)/usr/src",
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
+ PRODUCT_NAME = libnsl;
+ };
+ name = Debug;
+ };
+ 200E784E15DB13A3000957FF /* DebugLLVM */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ OTHER_CFLAGS = (
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/sys/zfs_context.h",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-isystem",
+ "$(SRCROOT)/usr/src",
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
+ PRODUCT_NAME = libnsl;
+ };
+ name = DebugLLVM;
+ };
+ 200E784F15DB13A3000957FF /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ OTHER_CFLAGS = (
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/sys/zfs_context.h",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-isystem",
+ "$(SRCROOT)/usr/src",
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
+ PRODUCT_NAME = libnsl;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 200E785F15DB14A1000957FF /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/lib;
+ OTHER_CFLAGS = (
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/sys/zfs_context.h",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-isystem",
+ "$(SRCROOT)/usr/src",
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
+ PRODUCT_NAME = libnvpair;
+ };
+ name = Debug;
+ };
+ 200E786015DB14A1000957FF /* DebugLLVM */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ OTHER_CFLAGS = (
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/sys/zfs_context.h",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-isystem",
+ "$(SRCROOT)/usr/src",
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
+ PRODUCT_NAME = libnvpair;
+ };
+ name = DebugLLVM;
+ };
+ 200E786115DB14A1000957FF /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/lib;
+ OTHER_CFLAGS = (
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/sys/zfs_context.h",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-isystem",
+ "$(SRCROOT)/usr/src",
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
+ PRODUCT_NAME = libnvpair;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 200E787B15DB15BE000957FF /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ EXECUTABLE_PREFIX = "";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ LIBZPOOL_HACK,
+ DEBUG,
+ );
+ HEADER_SEARCH_PATHS = "";
+ INSTALL_PATH = /usr/lib;
+ OTHER_CFLAGS = (
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzpool/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = libzpool;
+ };
+ name = Debug;
+ };
+ 200E787C15DB15BE000957FF /* DebugLLVM */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ EXECUTABLE_PREFIX = "";
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ LIBZPOOL_HACK,
+ DEBUG,
+ );
+ HEADER_SEARCH_PATHS = "";
+ INSTALL_PATH = /usr/lib;
+ OTHER_CFLAGS = (
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzpool/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = libzpool;
+ };
+ name = DebugLLVM;
+ };
+ 200E787D15DB15BE000957FF /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ EXECUTABLE_PREFIX = "";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_PREPROCESSOR_DEFINITIONS = LIBZPOOL_HACK;
+ HEADER_SEARCH_PATHS = "";
+ INSTALL_PATH = /usr/lib;
+ OTHER_CFLAGS = (
+ "-isystem",
+ "$(SRCROOT)/usr/src/head",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libuutil/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libnvpair",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzfs/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/lib/libzpool/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/libgen/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/common/zfs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/fs/zfs/",
+ "-isystem",
+ "$(SRCROOT)/usr/src/uts/common/sys",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ "-v",
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = libzpool;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 20FA07C915DBB5AE007E2315 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/sbin;
+ OTHER_CFLAGS = (
+ "-v",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = zdb;
+ };
+ name = Debug;
+ };
+ 20FA07CA15DBB5AE007E2315 /* DebugLLVM */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/sbin;
+ OTHER_CFLAGS = (
+ "-v",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = zdb;
+ };
+ name = DebugLLVM;
+ };
+ 20FA07CB15DBB5AE007E2315 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/sbin;
+ OTHER_CFLAGS = (
+ "-v",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ );
+ PREBINDING = NO;
+ PRODUCT_NAME = zdb;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
2611F73C0ACDD14700E5D4E2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -2453,7 +3481,14 @@
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
- INSTALL_PATH = /usr/local/bin;
+ INSTALL_PATH = /usr/bin;
+ OTHER_CFLAGS = (
+ "-v",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ );
PREBINDING = NO;
PRODUCT_NAME = ztest;
};
@@ -2468,7 +3503,14 @@
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
- INSTALL_PATH = /usr/local/bin;
+ INSTALL_PATH = /usr/bin;
+ OTHER_CFLAGS = (
+ "-v",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ );
PREBINDING = NO;
PRODUCT_NAME = ztest;
};
@@ -2482,7 +3524,14 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
- INSTALL_PATH = /usr/local/bin;
+ INSTALL_PATH = /usr/bin;
+ OTHER_CFLAGS = (
+ "-v",
+ "-include",
+ "$(SRCROOT)/usr/src/uts/common/sys/types.h",
+ "-include",
+ "$(SRCROOT)/usr/src/lib/libzpool/common/sys/zfs_context.h",
+ );
PREBINDING = NO;
PRODUCT_NAME = ztest;
ZERO_LINK = NO;
@@ -2512,6 +3561,46 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 200E785115DB13C1000957FF /* Build configuration list for PBXNativeTarget "libnsl" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 200E784D15DB13A3000957FF /* Debug */,
+ 200E784E15DB13A3000957FF /* DebugLLVM */,
+ 200E784F15DB13A3000957FF /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 200E785E15DB14A1000957FF /* Build configuration list for PBXNativeTarget "libnvpair" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 200E785F15DB14A1000957FF /* Debug */,
+ 200E786015DB14A1000957FF /* DebugLLVM */,
+ 200E786115DB14A1000957FF /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 200E788415DB1600000957FF /* Build configuration list for PBXNativeTarget "libzpool" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 200E787B15DB15BE000957FF /* Debug */,
+ 200E787C15DB15BE000957FF /* DebugLLVM */,
+ 200E787D15DB15BE000957FF /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 20FA07C815DBB5AE007E2315 /* Build configuration list for PBXNativeTarget "zdb" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 20FA07C915DBB5AE007E2315 /* Debug */,
+ 20FA07CA15DBB5AE007E2315 /* DebugLLVM */,
+ 20FA07CB15DBB5AE007E2315 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
2611F73B0ACDD14700E5D4E2 /* Build configuration list for PBXNativeTarget "zfs.util" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/zfs_documentation/man8/zfs.8 b/zfs_documentation/man8/zfs.8
index 6b2f78a9..84fe04a5 100644
--- a/zfs_documentation/man8/zfs.8
+++ b/zfs_documentation/man8/zfs.8
@@ -20,11 +20,6 @@ zfs \- configures ZFS file systems
\fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR
.fi
-.LP
-.nf
-\fBzfs\fR \fBcreate\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR
-.fi
-
.LP
.nf
\fBzfs\fR \fBdestroy\fR [\fB-rRf\fR] \fIfilesystem\fR|\fIvolume\fR
@@ -32,7 +27,7 @@ zfs \- configures ZFS file systems
.LP
.nf
-\fBzfs\fR \fBdestroy\fR [\fB-rRd\fR] \fIsnapshot\fR
+\fBzfs\fR \fBdestroy\fR [\fB-rR\fR] \fIsnapshot\fR
.fi
.LP
@@ -104,18 +99,6 @@ zfs \- configures ZFS file systems
\fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR
.fi
-.LP
-.nf
-\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
- [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
- [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR
-.fi
-
.LP
.nf
\fBzfs\fR \fBmount\fR
@@ -133,17 +116,7 @@ zfs \- configures ZFS file systems
.LP
.nf
-\fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBsend\fR [\fB-vR\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
+\fBzfs\fR \fBsend\fR [\fB-v\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
.fi
.LP
@@ -156,68 +129,6 @@ zfs \- configures ZFS file systems
\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR
.fi
-.LP
-.nf
-\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...]
- \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]]
- \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR...
-.fi
-
-.LP
-.nf
-\fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
-.fi
-
.SH DESCRIPTION
.sp
.LP
@@ -398,17 +309,6 @@ The compression ratio achieved for this dataset, expressed as a multiplier. Comp
The time this dataset was created.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBdefer_destroy\fR\fR
-.ad
-.sp .6
-.RS 4n
-This property is \fBon\fR if the snapshot has been marked for deferred destroy by using the \fBzfs destroy\fR \fB-d\fR command. Otherwise, the property is \fBoff\fR.
-.RE
-
.sp
.ne 2
.mk
@@ -470,137 +370,6 @@ When snapshots (see the "Snapshots" section) are created, their space is initial
The amount of space used, available, or referenced does not take into account pending changes. Pending changes are generally accounted for within a few seconds. Committing a change to a disk using \fBfsync\fR(3c) or \fBO_SYNC\fR does not necessarily guarantee that the space usage information is updated immediately.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBusedby*\fR\fR
-.ad
-.sp .6
-.RS 4n
-The \fBusedby*\fR properties decompose the \fBused\fR properties into the various reasons that space is used. Specifically, \fBused\fR = \fBusedbychildren\fR + \fBusedbydataset\fR + \fBusedbyrefreservation\fR +, \fBusedbysnapshots\fR. These properties are only available for datasets created on \fBzpool\fR "version 13" pools.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBusedbychildren\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBusedbydataset\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space used by this dataset itself, which would be freed if the dataset were destroyed (after first removing any \fBrefreservation\fR and destroying any necessary snapshots or descendents).
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBusedbyrefreservation\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space used by a \fBrefreservation\fR set on this dataset, which would be freed if the \fBrefreservation\fR was removed.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBusedbysnapshots\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space consumed by snapshots of this dataset. In particular, it is the amount of space that would be freed if all of this dataset's snapshots were destroyed. Note that this is not simply the sum of the snapshots' \fBused\fR properties because space can be shared by multiple snapshots.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBuserused@\fR\fIuser\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space consumed by the specified user in this dataset. Space is charged to the owner of each file, as displayed by \fBls\fR \fB-l\fR. The amount of space charged is displayed by \fBdu\fR and \fBls\fR \fB-s\fR. See the \fBzfs userspace\fR subcommand for more information.
-.sp
-Unprivileged users can access only their own space usage. The root user, or a user who has been granted the \fBuserused\fR privilege with \fBzfs allow\fR, can access everyone's usage.
-.sp
-The \fBuserused@\fR... properties are not displayed by \fBzfs get all\fR. The user's name must be appended after the \fB@\fR symbol, using one of the following forms:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX name\fR (for example, \fBjoe\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX numeric ID\fR (for example, \fB789\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
-.RE
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBuserrefs\fR\fR
-.ad
-.sp .6
-.RS 4n
-This property is set to the number of user holds on this snapshot. User holds are set by using the \fBzfs hold\fR command.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBgroupused@\fR\fIgroup\fR\fR
-.ad
-.sp .6
-.RS 4n
-The amount of space consumed by the specified group in this dataset. Space is charged to the group of each file, as displayed by \fBls\fR \fB-l\fR. See the \fBuserused@\fR\fIuser\fR property for more information.
-.sp
-Unprivileged users can only access their own groups' space usage. The root user, or a user who has been granted the \fBgroupused\fR privilege with \fBzfs allow\fR, can access all groups' usage.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBvolblocksize\fR=\fIblocksize\fR\fR
-.ad
-.sp .6
-.RS 4n
-For volumes, specifies the block size of the volume. The \fBblocksize\fR cannot be changed once the volume has been written, so it should be set at volume creation time. The default \fBblocksize\fR for volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid.
-.sp
-This property can also be referred to by its shortened column name, \fBvolblock\fR.
-.RE
-
.sp
.LP
The following native properties can be used to change the behavior of a \fBZFS\fR dataset.
@@ -728,28 +497,6 @@ Controls the mount point used for this file system. See the "Mount Points" secti
When the \fBmountpoint\fR property is changed for a file system, the file system and any children that inherit the mount point are unmounted. If the new value is \fBlegacy\fR, then they remain unmounted. Otherwise, they are automatically remounted in the new location if the property was previously \fBlegacy\fR or \fBnone\fR, or if they were mounted before the property was changed. In addition, any shared file systems are unshared and shared in the new location.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBnbmand\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the file system should be mounted with \fBnbmand\fR (Non Blocking mandatory locks). This is used for \fBCIFS\fR clients. Changes to this property only take effect when the file system is umounted and remounted. See \fBmount\fR(1M) for more information on \fBnbmand\fR mounts.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls what is cached in the primary cache (ARC). If this property is set to \fBall\fR, then both user data and metadata is cached. If this property is set to \fBnone\fR, then neither user data nor metadata is cached. If this property is set to \fBmetadata\fR, then only metadata is cached. The default value is \fBall\fR.
-.RE
-
.sp
.ne 2
.mk
@@ -763,60 +510,6 @@ Limits the amount of space a dataset and its descendents can consume. This prope
Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an implicit quota.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBuserquota@\fR\fIuser\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
-Limits the amount of space consumed by the specified user. User space consumption is identified by the \fBuserspace@\fR\fIuser\fR property.
-.sp
-Enforcement of user quotas may be delayed by several seconds. This delay means that a user might exceed their quota before the system notices that they are over quota and begins to refuse additional writes with the \fBEDQUOT\fR error message . See the \fBzfs userspace\fR subcommand for more information.
-.sp
-Unprivileged users can only access their own groups' space usage. The root user, or a user who has been granted the \fBuserquota\fR privilege with \fBzfs allow\fR, can get and set everyone's quota.
-.sp
-This property is not available on volumes, on file systems before version 4, or on pools before version 15. The \fBuserquota@\fR... properties are not displayed by \fBzfs get all\fR. The user's name must be appended after the \fB@\fR symbol, using one of the following forms:
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX name\fR (for example, \fBjoe\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fIPOSIX numeric ID\fR (for example, \fB789\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
-.RE
-.RS +4
-.TP
-.ie t \(bu
-.el o
-\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
-.RE
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBgroupquota@\fR\fIgroup\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
-Limits the amount of space consumed by the specified group. Group space consumption is identified by the \fBuserquota@\fR\fIuser\fR property.
-.sp
-Unprivileged users can access only their own groups' space usage. The root user, or a user who has been granted the \fBgroupquota\fR privilege with \fBzfs allow\fR, can get and set all groups' quotas.
-.RE
-
.sp
.ne 2
.mk
@@ -849,32 +542,6 @@ Changing the file system's \fBrecordsize\fR affects only files created afterward
This property can also be referred to by its shortened column name, \fBrecsize\fR.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
-Limits the amount of space a dataset can consume. This property enforces a hard limit on the amount of space used. This hard limit does not include space used by descendents, including file systems and snapshots.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
-The minimum amount of space guaranteed to a dataset, not including its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by \fBrefreservation\fR. The \fBrefreservation\fR reservation is accounted for in the parent datasets' space used, and counts against the parent datasets' quotas and reservations.
-.sp
-If \fBrefreservation\fR is set, a snapshot is only allowed if there is enough free pool space outside of this reservation to accommodate the current number of "referenced" bytes in the dataset.
-.sp
-This property can also be referred to by its shortened column name, \fBrefreserv\fR.
-.RE
-
.sp
.ne 2
.mk
@@ -888,17 +555,6 @@ The minimum amount of space guaranteed to a dataset and its descendents. When th
This property can also be referred to by its shortened column name, \fBreserv\fR.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls what is cached in the secondary cache (L2ARC). If this property is set to \fBall\fR, then both user data and metadata is cached. If this property is set to \fBnone\fR, then neither user data nor metadata is cached. If this property is set to \fBmetadata\fR, then only metadata is cached. The default value is \fBall\fR.
-.RE
-
.sp
.ne 2
.mk
@@ -923,23 +579,6 @@ Like the \fBsharenfs\fR property, \fBshareiscsi\fR indicates whether a \fBZFS\fR
You might want to set \fBshareiscsi=on\fR for a file system so that all \fBZFS\fR volumes within the file system are shared by default. However, setting this property on a file system has no direct effect.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether the file system is shared by using the Solaris \fBCIFS\fR service, and what options are to be used. A file system with the \fBsharesmb\fR property set to \fBoff\fR is managed through traditional tools such as \fBsharemgr\fR(1M). Otherwise, the file system is automatically shared and unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the property is set to \fBon\fR, the \fBsharemgr\fR(1M) command is invoked with no options. Otherwise, the \fBsharemgr\fR(1M) command is invoked with options equivalent to the contents of this property.
-.sp
-Because \fBSMB\fR shares requires a resource name, a unique resource name is constructed from the dataset name. The constructed name is a copy of the dataset name except that the characters in the dataset name, which would be illegal in the resource name, are replaced with underscore (\fB_\fR) characters. A pseudo property "name" is also supported that allows you to replace the data set name with a specified name. The specified name is then used to replace the prefix dataset in the case of inheritance. For example, if the dataset \fBdata/home/john\fR is set to \fBname=john\fR, then \fBdata/home/john\fR has a resource name of \fBjohn\fR. If a child dataset of \fBdata/home/john/backups\fR, it has a resource name of \fBjohn_backups\fR.
-.sp
-When SMB shares are created, the SMB share name appears as an entry in the \fB\&.zfs/shares\fR directory. You can use the \fBls\fR or \fBchmod\fR command to display the share-level ACLs on the entries in this directory.
-.sp
-When the \fBsharesmb\fR property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously set to \fBoff\fR, or if they were shared before the property was changed. If the new property is set to \fBoff\fR, the file systems are unshared.
-.RE
-
.sp
.ne 2
.mk
@@ -953,17 +592,6 @@ Controls whether the file system is shared via \fBNFS\fR, and what options are u
When the \fBsharenfs\fR property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously \fBoff\fR, or if they were shared before the property was changed. If the new property is \fBoff\fR, the file systems are unshared.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBlogbias\fR = \fBlatency\fR | \fBthroughput\fR\fR
-.ad
-.sp .6
-.RS 4n
-Provide a hint to ZFS about handling of synchronous requests in this dataset. If \fBlogbias\fR is set to \fBlatency\fR (the default), ZFS will use pool log devices (if configured) to handle the requests at low latency. If \fBlogbias\fR is set to \fBthroughput\fR, ZFS will not use configured pool log devices. ZFS will instead optimize synchronous operations for global pool throughput and efficient use of resources.
-.RE
-
.sp
.ne 2
.mk
@@ -986,32 +614,6 @@ Controls whether the \fB\&.zfs\fR directory is hidden or visible in the root of
The on-disk version of this file system, which is independent of the pool version. This property can only be set to later supported versions. See the \fBzfs upgrade\fR command.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBvolsize\fR=\fIsize\fR\fR
-.ad
-.sp .6
-.RS 4n
-For volumes, specifies the logical size of the volume. By default, creating a volume establishes a reservation of equal size. For storage pools with a version number of 9 or higher, a \fBrefreservation\fR is set instead. Any changes to \fBvolsize\fR are reflected in an equivalent change to the reservation (or \fBrefreservation\fR). The \fBvolsize\fR can only be set to a multiple of \fBvolblocksize\fR, and cannot be zero.
-.sp
-The reservation is kept equal to the volume's logical size to prevent unexpected behavior for consumers. Without the reservation, the volume could run out of space, resulting in undefined behavior or data corruption, depending on how the volume is used. These effects can also occur when the volume size is changed while it is in use (particularly when shrinking the size). Extreme care should be used when adjusting the volume size.
-.sp
-Though not recommended, a "sparse volume" (also known as "thin provisioning") can be created by specifying the \fB-s\fR option to the \fBzfs create -V\fR command, or by changing the reservation after the volume has been created. A "sparse volume" is a volume where the reservation is less then the volume size. Consequently, writes to a sparse volume can fail with \fBENOSPC\fR when the pool is low on space. For a sparse volume, changes to \fBvolsize\fR are not reflected in the reservation.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether regular files should be scanned for viruses when a file is opened and closed. In addition to enabling this property, the virus scan service must also be enabled for virus scanning to occur. The default value is \fBoff\fR.
-.RE
-
.sp
.ne 2
.mk
@@ -1031,50 +633,9 @@ Controls whether extended attributes are enabled for this file system. The defau
.ad
.sp .6
.RS 4n
-Controls whether the dataset is managed from a non-global zone. See the "Zones" section for more information. The default value is \fBoff\fR.
-.RE
-
-.sp
-.LP
-The following three properties cannot be changed after the file system is created, and therefore, should be set when the file system is created. If the properties are not set with the \fBzfs create\fR or \fBzpool create\fR commands, these properties are inherited from the parent dataset. If the parent dataset lacks these properties due to having been created prior to these features being supported, the new file system will have the default values for these properties.
-.sp
-.ne 2
-.mk
-.na
-\fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
-.ad
-.sp .6
-.RS 4n
-Indicates whether the file name matching algorithm used by the file system should be case-sensitive, case-insensitive, or allow a combination of both styles of matching. The default value for the \fBcasesensitivity\fR property is \fBsensitive\fR. Traditionally, UNIX and POSIX file systems have case-sensitive file names.
-.sp
-The \fBmixed\fR value for the \fBcasesensitivity\fR property indicates that the file system can support requests for both case-sensitive and case-insensitive matching behavior. Currently, case-insensitive matching behavior on a file system that supports mixed behavior is limited to the Solaris CIFS server product. For more information about the \fBmixed\fR value behavior, see the \fISolaris ZFS Administration Guide\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
-.ad
-.sp .6
-.RS 4n
-Indicates whether the file system should perform a \fBunicode\fR normalization of file names whenever two file names are compared, and which normalization algorithm should be used. File names are always stored unmodified, names are normalized as part of any comparison process. If this property is set to a legal value other than \fBnone\fR, and the \fButf8only\fR property was left unspecified, the \fButf8only\fR property is automatically set to \fBon\fR. The default value of the \fBnormalization\fR property is \fBnone\fR. This property cannot be changed after the file system is created.
+Controls whether the dataset is managed from a non-global zone. The default value is \fBoff\fR.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Indicates whether the file system should reject file names that include characters that are not present in the \fBUTF-8\fR character code set. If this property is explicitly set to \fBoff\fR, the normalization property must either not be explicitly set or be set to \fBnone\fR. The default value for the \fButf8only\fR property is \fBoff\fR. This property cannot be changed after the file system is created.
-.RE
-
-.sp
-.LP
-The \fBcasesensitivity\fR, \fBnormalization\fR, and \fButf8only\fR properties are also new permissions that can be assigned to non-privileged users by using the \fBZFS\fR delegated administration feature.
.SS "Temporary Mount Point Properties"
.sp
.LP
@@ -1100,80 +661,39 @@ In addition, these options can be set on a per-mount basis using the \fB-o\fR op
.LP
In addition to the standard native properties, \fBZFS\fR supports arbitrary user properties. User properties have no effect on \fBZFS\fR behavior, but applications or administrators can use them to annotate datasets (file systems, volumes, and snapshots).
.sp
-.LP
-User property names must contain a colon (\fB:\fR) character to distinguish them from native properties. They may contain lowercase letters, numbers, and the following punctuation characters: colon (\fB:\fR), dash (\fB-\fR), period (\fB\&.\fR), and underscore (\fB_\fR). The expected convention is that the property name is divided into two portions such as \fImodule\fR\fB:\fR\fIproperty\fR, but this namespace is not enforced by \fBZFS\fR. User property names can be at most 256 characters, and cannot begin with a dash (\fB-\fR).
-.sp
-.LP
-When making programmatic use of user properties, it is strongly suggested to use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property names to reduce the chance that two independently-developed packages use the same property name for different purposes. Property names beginning with \fBcom.sun\fR. are reserved for use by Sun Microsystems.
-.sp
-.LP
-The values of user properties are arbitrary strings, are always inherited, and are never validated. All of the commands that operate on properties (\fBzfs list\fR, \fBzfs get\fR, \fBzfs set\fR, and so forth) can be used to manipulate both native properties and user properties. Use the \fBzfs inherit\fR command to clear a user property . If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 1024 characters.
-.SS "ZFS Volumes as Swap or Dump Devices"
-.sp
-.LP
-During an initial installation or a live upgrade from a \fBUFS\fR file system, a swap device and dump device are created on \fBZFS\fR volumes in the \fBZFS\fR root pool. By default, the swap area size is based on 1/2 the size of physical memory up to 2 Gbytes. The size of the dump device depends on the kernel's requirements at installation time. Separate \fBZFS\fR volumes must be used for the swap area and dump devices. Do not swap to a file on a \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported.
-.sp
-.LP
-If you need to change your swap area or dump device after the system is installed or upgraded, use the \fBswap\fR(1M) and \fBdumpadm\fR(1M) commands. If you need to change the size of your swap area or dump device, see the \fISolaris ZFS Administration Guide\fR.
-.SH SUBCOMMANDS
-.sp
-.LP
-All subcommands that modify state are logged persistently to the pool in their original form.
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs ?\fR\fR
-.ad
-.sp .6
-.RS 4n
-Displays a help message.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR property inherited from the parent.
+.LP
+User property names must contain a colon (\fB:\fR) character to distinguish them from native properties. They may contain lowercase letters, numbers, and the following punctuation characters: colon (\fB:\fR), dash (\fB-\fR), period (\fB\&.\fR), and underscore (\fB_\fR). The expected convention is that the property name is divided into two portions such as \fImodule\fR\fB:\fR\fIproperty\fR, but this namespace is not enforced by \fBZFS\fR. User property names can be at most 256 characters, and cannot begin with a dash (\fB-\fR).
.sp
-.ne 2
-.mk
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent. Any property specified on the command line using the \fB-o\fR option is ignored. If the target filesystem already exists, the operation completes successfully.
-.RE
+.LP
+When making programmatic use of user properties, it is strongly suggested to use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property names to reduce the chance that two independently-developed packages use the same property name for different purposes. Property names beginning with \fBcom.sun\fR. are reserved for use by Sun Microsystems.
+.sp
+.LP
+The values of user properties are arbitrary strings, are always inherited, and are never validated. All of the commands that operate on properties (\fBzfs list\fR, \fBzfs get\fR, \fBzfs set\fR, and so forth) can be used to manipulate both native properties and user properties. Use the \fBzfs inherit\fR command to clear a user property . If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 1024 characters.
+.SH SUBCOMMANDS
+.sp
+.LP
+All subcommands that modify state are logged persistently to the pool in their original form.
.sp
.ne 2
.mk
.na
-\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
+\fB\fBzfs ?\fR\fR
.ad
.sp .6
.RS 4n
-Sets the specified property as if the command \fBzfs set\fR \fIproperty\fR=\fIvalue\fR was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options.
-.RE
-
+Displays a help message.
.RE
.sp
.ne 2
.mk
.na
-\fB\fBzfs create\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR\fR
+\fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
.ad
.sp .6
.RS 4n
-Creates a volume of the given size. The volume is exported as a block device in \fB/dev/zvol/{dsk,rdsk}/\fR\fIpath\fR, where \fIpath\fR is the name of the volume in the \fBZFS\fR namespace. The size represents the logical size as exported by the device. By default, a reservation of equal size is created.
-.sp
-\fIsize\fR is automatically rounded up to the nearest 128 Kbytes to ensure that the volume has an integral number of blocks regardless of \fIblocksize\fR.
+Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR property inherited from the parent.
.sp
.ne 2
.mk
@@ -1185,17 +705,6 @@ Creates a volume of the given size. The volume is exported as a block device in
Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent. Any property specified on the command line using the \fB-o\fR option is ignored. If the target filesystem already exists, the operation completes successfully.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-s\fR\fR
-.ad
-.sp .6
-.RS 4n
-Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native Properties section for more information about sparse volumes.
-.RE
-
.sp
.ne 2
.mk
@@ -1204,18 +713,7 @@ Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native Pro
.ad
.sp .6
.RS 4n
-Sets the specified property as if the \fBzfs set\fR \fIproperty\fR=\fIvalue\fR command was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-b\fR \fIblocksize\fR\fR
-.ad
-.sp .6
-.RS 4n
-Equivalent to \fB-o\fR \fBvolblocksize\fR=\fIblocksize\fR. If this option is specified in conjunction with \fB-o\fR \fBvolblocksize\fR, the resulting behavior is undefined.
+Sets the specified property as if the command \fBzfs set\fR \fIproperty\fR=\fIvalue\fR was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options.
.RE
.RE
@@ -1269,22 +767,12 @@ Extreme care should be taken when applying either the \fB-r\fR or the \fB-f\fR o
.ne 2
.mk
.na
-\fB\fBzfs destroy\fR [\fB-rRd\fR] \fIsnapshot\fR\fR
+\fB\fBzfs destroy\fR [\fB-rR\fR] \fIsnapshot\fR\fR
.ad
.sp .6
.RS 4n
The given snapshot is destroyed immediately if and only if the \fBzfs destroy\fR command without the \fB-d\fR option would have destroyed it. Such immediate destruction would occur, for example, if the snapshot had no clones and the user-initiated reference count were zero.
.sp
-If the snapshot does not qualify for immediate destruction, it is marked for deferred deletion. In this state, it exists as a usable, visible snapshot until both of the preconditions listed above are met, at which point it is destroyed.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-d\fR\fR
-.ad
-.sp .6
-.RS 4n
-Defer snapshot deletion.
.RE
.sp
@@ -1810,128 +1298,6 @@ Upgrade to the specified \fIversion\fR. If the \fB-V\fR flag is not specified, t
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs userspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR | \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Displays space consumed by, and quotas on, each user in the specified filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and \fBuserquota@\fR\fIuser\fR properties.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-n\fR\fR
-.ad
-.sp .6
-.RS 4n
-Print numeric ID instead of user/group name.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-H\fR\fR
-.ad
-.sp .6
-.RS 4n
-Do not print headers, use tab-delimited output.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-p\fR\fR
-.ad
-.sp .6
-.RS 4n
-Use exact (parseable) numeric output.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-o\fR \fIfield\fR[,...]\fR
-.ad
-.sp .6
-.RS 4n
-Display only the specified fields from the following set, \fBtype,name,used,quota\fR.The default is to display all fields.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-s\fR \fIfield\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified multiple times to sort first by one field, then by another. The default is \fB-s type\fR \fB-s name\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-S\fR \fIfield\fR\fR
-.ad
-.sp .6
-.RS 4n
-Sort by this field in reverse order. See \fB-s\fR.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-t\fR \fItype\fR[,...]\fR
-.ad
-.sp .6
-.RS 4n
-Print only the specified types from the following set, \fBall,posixuser,smbuser,posixgroup,smbgroup\fR.
-.sp
-The default is \fB-t posixuser,smbuser\fR
-.sp
-The default can be changed to include group types.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-i\fR\fR
-.ad
-.sp .6
-.RS 4n
-Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists. Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform this translation, so the \fB-i\fR option allows the output from \fBzfs userspace\fR to be compared directly with those utilities. However, \fB-i\fR may lead to confusion if some files were created by an SMB user before a SMB-to-POSIX name mapping was established. In such a case, some files are owned by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option will report that the POSIX entity has the total usage and quota for both.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs groupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR | \fIsnapshot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Displays space consumed by, and quotas on, each group in the specified filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR, except that the default types to display are \fB-t posixgroup,smbgroup\fR.
-.sp
-.in +2
-.nf
--
-.fi
-.in -2
-.sp
-
-.RE
-
.sp
.ne 2
.mk
@@ -2081,7 +1447,7 @@ Share all available \fBZFS\fR file systems. Invoked automatically as part of the
.ad
.sp .6
.RS 4n
-Share the specified filesystem according to the \fBsharenfs\fR and \fBsharesmb\fR properties. File systems are shared when the \fBsharenfs\fR or \fBsharesmb\fR property is set.
+Share the specified filesystem according to the \fBsharenfs\fR property. File systems are shared when the \fBsharenfs\fR property is set.
.RE
.RE
@@ -2123,7 +1489,7 @@ Unshare the specified filesystem. The command can also be given a path to a \fBZ
.ne 2
.mk
.na
-\fB\fBzfs send\fR [\fB-vR\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR\fR
+\fB\fBzfs send\fR [\fB-v\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR\fR
.ad
.sp .6
.RS 4n
@@ -2152,19 +1518,6 @@ If the destination is a clone, the source may be the origin snapshot, which must
Generate a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source snapshot may be specified as with the \fB-i\fR option.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-R\fR\fR
-.ad
-.sp .6
-.RS 4n
-Generate a replication stream package, which will replicate the specified filesystem, and all descendent file systems, up to the named snapshot. When received, all properties, snapshots, descendent file systems, and clones are preserved.
-.sp
-If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR flag, an incremental replication stream is generated. The current values of properties, and current snapshot and file system names are set when the stream is received. If the \fB-F\fR flag is specified when this stream is received, snapshots and file systems that do not exist on the sending side are destroyed.
-.RE
-
.sp
.ne 2
.mk
@@ -2195,8 +1548,6 @@ Creates a snapshot whose contents are as specified in the stream provided on sta
.sp
If an incremental stream is received, then the destination file system must already exist, and its most recent snapshot must match the incremental stream's source. For \fBzvols\fR, the destination device link is destroyed and recreated, which means the \fBzvol\fR cannot be accessed during the \fBreceive\fR operation.
.sp
-When a snapshot replication package stream that is generated by using the \fBzfs send\fR \fB-R\fR command is received, any snapshots that do not exist on the sending location are destroyed by using the \fBzfs destroy\fR \fB-d\fR command.
-.sp
The name of the snapshot (and file system, if a full stream is received) that this subcommand creates depends on the argument type and the \fB-d\fR option.
.sp
If the argument is a snapshot name, the specified \fIsnapshot\fR is created. If the argument is a file system or volume name, a snapshot with the same name as the sent snapshot is created within the specified \fIfilesystem\fR or \fIvolume\fR. If the \fB-d\fR option is specified, the snapshot name is determined by appending the sent snapshot's name to the specified \fIfilesystem\fR. If the \fB-d\fR option is specified, any required file systems within the specified one are created.
@@ -2252,7 +1603,7 @@ Do not actually receive the stream. This can be useful in conjunction with the \
.ad
.sp .6
.RS 4n
-Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by \fBzfs send -R -[iI]\fR), destroy snapshots and file systems that do not exist on the sending side.
+Force a rollback of the file system to the most recent snapshot before performing the receive operation.
.RE
.RE
@@ -2340,43 +1691,28 @@ send subcommand
share subcommand Allows sharing file systems over NFS or SMB
protocols
snapshot subcommand Must also have the 'mount' ability
-groupquota other Allows accessing any groupquota@... property
-groupused other Allows reading any groupused@... property
-userprop other Allows changing any user property
-userquota other Allows accessing any userquota@... property
-userused other Allows reading any userused@... property
aclinherit property
aclmode property
atime property
canmount property
-casesensitivity property
checksum property
compression property
copies property
devices property
exec property
mountpoint property
-nbmand property
-normalization property
-primarycache property
quota property
readonly property
recordsize property
-refquota property
-refreservation property
reservation property
-secondarycache property
setuid property
shareiscsi property
sharenfs property
-sharesmb property
snapdir property
-utf8only property
version property
volblocksize property
volsize property
-vscan property
xattr property
zoned property
.fi
@@ -2454,76 +1790,6 @@ Recursively remove the permissions from this file system and all descendents.
Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
-.ad
-.sp .6
-.RS 4n
-Adds a single reference, named with the \fItag\fR argument, to the specified snapshot or snapshots. Each snapshot has its own tag namespace, and tags must be unique within that space.
-.sp
-If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
-Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
-.ad
-.sp .6
-.RS 4n
-Lists all existing user references for the given snapshot or snapshots.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
-Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
-.ad
-.sp .6
-.RS 4n
-Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
-.sp
-If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-r\fR\fR
-.ad
-.sp .6
-.RS 4n
-Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
-.RE
-
-.RE
-
.SH EXAMPLES
.LP
\fBExample 1 \fRCreating a ZFS File System Hierarchy
@@ -2657,20 +1923,6 @@ pool/home/bob shareiscsi off default
pool/home/bob xattr on default
pool/home/bob copies 1 default
pool/home/bob version 4 -
-pool/home/bob utf8only off -
-pool/home/bob normalization none -
-pool/home/bob casesensitivity sensitive -
-pool/home/bob vscan off default
-pool/home/bob nbmand off default
-pool/home/bob sharesmb off default
-pool/home/bob refquota none default
-pool/home/bob refreservation none default
-pool/home/bob primarycache all default
-pool/home/bob secondarycache all default
-pool/home/bob usedbysnapshots 0 -
-pool/home/bob usedbydataset 21K -
-pool/home/bob usedbychildren 0 -
-pool/home/bob usedbyrefreservation 0 -
.fi
.in -2
.sp
@@ -2815,30 +2067,7 @@ The following example sets the user-defined \fBcom.example:department\fR propert
.sp
.LP
-\fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
-.sp
-.LP
-The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR target.
-
-.sp
-.in +2
-.nf
-# \fBzfs create -V 2g pool/volumes/vol1\fR
-# \fBzfs set shareiscsi=on pool/volumes/vol1\fR
-# \fBiscsitadm list target\fR
-Target: pool/volumes/vol1
- iSCSI Name:
- iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
- Connections: 0
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-After the \fBiSCSI\fR target is created, set up the \fBiSCSI\fR initiator. For more information about the Solaris \fBiSCSI\fR initiator, see \fBiscsitadm\fR(1M).
-.LP
-\fBExample 16 \fRPerforming a Rolling Snapshot
+\fBExample 15 \fRPerforming a Rolling Snapshot
.sp
.LP
The following example shows how to maintain a history of snapshots with a consistent naming scheme. To keep a week's worth of snapshots, the user destroys the oldest snapshot, renames the remaining snapshots, and then creates a new snapshot, as follows:
@@ -2860,25 +2089,7 @@ The following example shows how to maintain a history of snapshots with a consis
.sp
.LP
-\fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
-.sp
-.LP
-The following commands show how to set \fBsharenfs\fR property options to enable \fBrw\fR access for a set of \fBIP\fR addresses and to enable root access for system \fBneo\fR on the \fBtank/home\fR file system.
-
-.sp
-.in +2
-.nf
-# \fB# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-If you are using \fBDNS\fR for host name resolution, specify the fully qualified hostname.
-
-.LP
-\fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
+\fBExample 16 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
.sp
.LP
The following example shows how to set permissions so that user \fBcindys\fR can create, destroy, mount, and take snapshots on \fBtank/cindys\fR. The permissions on \fBtank/cindys\fR are also displayed.
@@ -2908,7 +2119,7 @@ Because the \fBtank/cindys\fR mount point permission is set to 755 by default, u
.sp
.LP
-\fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
+\fBExample 17 \fRDelegating Create Time Permissions on a ZFS Dataset
.sp
.LP
The following example shows how to grant anyone in the group \fBstaff\fR to create file systems in \fBtank/users\fR. This syntax also allows staff members to destroy their own file systems, but not destroy anyone else's file system. The permissions on \fBtank/users\fR are also displayed.
@@ -2930,7 +2141,7 @@ Local+Descendent permissions on (tank/users)
.sp
.LP
-\fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
+\fBExample 18 \fRDefining and Granting a Permission Set on a ZFS Dataset
.sp
.LP
The following example shows how to define and grant a permission set on the \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also displayed.
@@ -2954,7 +2165,7 @@ Local+Descendent permissions on (tank/users)
.sp
.LP
-\fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
+\fBExample 19 \fRDelegating Property Permissions on a ZFS Dataset
.sp
.LP
The following example shows to grant the ability to set quotas and reservations on the \fBusers/home\fR file system. The permissions on \fBusers/home\fR are also displayed.
@@ -2977,7 +2188,7 @@ users/home/marks quota 10G local
.sp
.LP
-\fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
+\fBExample 20 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
.sp
.LP
The following example shows how to remove the snapshot permission from the \fBstaff\fR group on the \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also displayed.
diff --git a/zfs_documentation/man8/zpool.8 b/zfs_documentation/man8/zpool.8
index 9c058a93..54ffec5e 100644
--- a/zfs_documentation/man8/zpool.8
+++ b/zfs_documentation/man8/zpool.8
@@ -67,20 +67,20 @@ zpool \- configures ZFS storage pools
.LP
.nf
\fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ...
- [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
+ [\fB-d\fR \fIdir\fR]
[\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fB-a\fR
.fi
.LP
.nf
\fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ...
- [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
+ [\fB-d\fR \fIdir\fR]
[\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR |\fIid\fR [\fInewpool\fR]
.fi
.LP
.nf
-\fBzpool iostat\fR [\fB-T\fR u | d ] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]
+\fBzpool iostat\fR [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]
.fi
.LP
@@ -193,18 +193,11 @@ A mirror of two or more devices. Data is replicated in an identical fashion acro
\fB\fBraidz1\fR\fR
.ad
.br
-.na
-\fB\fBraidz2\fR\fR
-.ad
-.br
-.na
-\fB\fBraidz3\fR\fR
-.ad
.RS 10n
.rt
A variation on \fBRAID-5\fR that allows for better distribution of parity and eliminates the "\fBRAID-5\fR write hole" (in which data and parity become inconsistent after a power loss). Data and parity is striped across all disks within a \fBraidz\fR group.
.sp
-A \fBraidz\fR group can have single-, double- , or triple parity, meaning that the \fBraidz\fR group can sustain one, two, or three failures, respectively, without losing any data. The \fBraidz1\fR \fBvdev\fR type specifies a single-parity \fBraidz\fR group; the \fBraidz2\fR \fBvdev\fR type specifies a double-parity \fBraidz\fR group; and the \fBraidz3\fR \fBvdev\fR type specifies a triple-parity \fBraidz\fR group. The \fBraidz\fR \fBvdev\fR type is an alias for \fBraidz1\fR.
+A \fBraidz\fR group can have single parity, meaning that the \fBraidz\fR group can sustain one failure without losing any data. The \fBraidz1\fR \fBvdev\fR type specifies a single-parity \fBraidz\fR group. The \fBraidz\fR \fBvdev\fR type is an alias for \fBraidz1\fR.
.sp
A \fBraidz\fR group with \fIN\fR disks of size \fIX\fR with \fIP\fR parity disks can hold approximately (\fIN-P\fR)*\fIX\fR bytes and can withstand \fIP\fR device(s) failing before data integrity is compromised. The minimum number of devices in a \fBraidz\fR group is one more than the number of parity disks. The recommended number is between 3 and 9 to help increase performance.
.RE
@@ -231,17 +224,6 @@ A special pseudo-\fBvdev\fR which keeps track of available hot spares for a pool
A separate-intent log device. If more than one log device is specified, then writes are load-balanced between devices. Log devices can be mirrored. However, \fBraidz\fR \fBvdev\fR types are not supported for the intent log. For more information, see the "Intent Log" section.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBcache\fR\fR
-.ad
-.RS 10n
-.rt
-A device used to cache storage pool data. A cache device cannot be cannot be configured as a mirror or \fBraidz\fR group. For more information, see the "Cache Devices" section.
-.RE
-
.sp
.LP
Virtual devices cannot be nested, so a mirror or \fBraidz\fR virtual device can only contain files or disks. Mirrors of mirrors (or other combinations) are not allowed.
@@ -411,128 +393,11 @@ Multiple log devices can also be specified, and they can be mirrored. See the EX
.sp
.LP
Log devices can be added, replaced, attached, detached, and imported and exported as part of the larger pool. Mirrored log devices can be removed by specifying the top-level mirror for the log.
-.SS "Cache Devices"
-.sp
-.LP
-Devices can be added to a storage pool as "cache devices." These devices provide an additional layer of caching between main memory and disk. For read-heavy workloads, where the working set size is much larger than what can be cached in main memory, using cache devices allow much more of this working set to be served from low latency media. Using cache devices provides the greatest performance improvement for random read-workloads of mostly static content.
-.sp
-.LP
-To create a pool with cache devices, specify a "cache" \fBvdev\fR with any number of devices. For example:
-.sp
-.in +2
-.nf
-\fB# zpool create pool disk1 disk2 cache disk3 disk4\fR
-.fi
-.in -2
-.sp
-.sp
-.LP
-Cache devices cannot be mirrored or part of a \fBraidz\fR configuration. If a read error is encountered on a cache device, that read \fBI/O\fR is reissued to the original storage pool device, which might be part of a mirrored or \fBraidz\fR configuration.
-.sp
-.LP
-The content of the cache devices is considered volatile, as is the case with other system caches.
.SS "Properties"
.sp
.LP
Each pool has several properties associated with it. Some properties are read-only statistics while others are configurable and change the behavior of the pool. The following are read-only properties:
-.sp
-.ne 2
-.mk
-.na
-\fB\fBavailable\fR\fR
-.ad
-.RS 20n
-.rt
-Amount of storage available within the pool. This property can also be referred to by its shortened column name, "avail".
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBcapacity\fR\fR
-.ad
-.RS 20n
-.rt
-Percentage of pool space used. This property can also be referred to by its shortened column name, "cap".
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBhealth\fR\fR
-.ad
-.RS 20n
-.rt
-The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR", "\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR".
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBguid\fR\fR
-.ad
-.RS 20n
-.rt
-A unique identifier for the pool.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBsize\fR\fR
-.ad
-.RS 20n
-.rt
-Total size of the storage pool.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBused\fR\fR
-.ad
-.RS 20n
-.rt
-Amount of storage space used within the pool.
-.RE
-
-.sp
-.LP
-These space usage properties report actual physical space available to the storage pool. The physical space can be different from the total amount of space that any contained datasets can actually use. The amount of space used in a \fBraidz\fR configuration depends on the characteristics of the data being written. In addition, \fBZFS\fR reserves some space for internal accounting that the \fBzfs\fR(8) command takes into account, but the \fBzpool\fR command does not. For non-full pools of a reasonable size, these effects should be invisible. For small pools, or pools that are close to being completely full, these discrepancies may become more noticeable.
-.sp
-.LP
-The following property can be set at creation time and import time:
-.sp
-.ne 2
-.mk
-.na
-\fB\fBaltroot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Alternate root directory. If set, this directory is prepended to any mount points within the pool. This can be used when examining an unknown pool where the mount points cannot be trusted, or in an alternate boot environment, where the typical paths are not valid. \fBaltroot\fR is not a persistent property. It is valid only while the system is up. Setting \fBaltroot\fR defaults to using \fBcachefile\fR=none, though this may be overridden using an explicit setting.
-.RE
-
-.sp
-.LP
-The following properties can be set at creation time and import time, and later changed with the \fBzpool set\fR command:
-.sp
-.ne 2
-.mk
-.na
-\fB\fBautoexpand\fR=\fBon\fR | \fBoff\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls automatic pool expansion when the underlying LUN is grown. If set to \fBon\fR, the pool will be resized according to the size of the expanded device. If the device is part of a mirror or \fBraidz\fR then all devices within that mirror/\fBraidz\fR group must be expanded before the new space is made available to the pool. The default behavior is \fBoff\fR. This property can also be referred to by its shortened column name, \fBexpand\fR.
-.RE
-
.sp
.ne 2
.mk
@@ -555,19 +420,6 @@ Controls automatic device replacement. If set to "\fBoff\fR", device replacement
Identifies the default bootable dataset for the root pool. This property is expected to be set mainly by the installation and upgrade programs.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBcachefile\fR=\fIpath\fR | \fBnone\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls the location of where the pool configuration is cached. Discovering all pools on system startup requires a cached copy of the configuration data that is stored on the root file system. All pools in this cache are automatically imported when the system boots. Some environments, such as install and clustering, need to cache this information in a different location so that pools are not automatically imported. Setting this property caches the pool configuration in a different location that can later be imported with "\fBzpool import -c\fR". Setting it to the special value "\fBnone\fR" creates a temporary pool that is never cached, and the special value \fB\&''\fR (empty string) uses the default location.
-.sp
-Multiple pools can share the same cache file. Because the kernel destroys and recreates this file when pools are added and removed, care should be taken when attempting to access this file. When the last pool using a \fBcachefile\fR is exported or destroyed, the file is removed.
-.RE
-
.sp
.ne 2
.mk
@@ -579,72 +431,6 @@ Multiple pools can share the same cache file. Because the kernel destroys and re
Controls whether a non-privileged user is granted access based on the dataset permissions defined on the dataset. See \fBzfs\fR(8) for more information on \fBZFS\fR delegated administration.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fBfailmode\fR=\fBwait\fR | \fBcontinue\fR | \fBpanic\fR\fR
-.ad
-.sp .6
-.RS 4n
-Controls the system behavior in the event of catastrophic pool failure. This condition is typically a result of a loss of connectivity to the underlying storage device(s) or a failure of all devices within the pool. The behavior of such an event is determined as follows:
-.sp
-.ne 2
-.mk
-.na
-\fB\fBwait\fR\fR
-.ad
-.RS 12n
-.rt
-Blocks all \fBI/O\fR access until the device connectivity is recovered and the errors are cleared. This is the default behavior.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBcontinue\fR\fR
-.ad
-.RS 12n
-.rt
-Returns \fBEIO\fR to any new write \fBI/O\fR requests but allows reads to any of the remaining healthy devices. Any write requests that have yet to be committed to disk would be blocked.
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBpanic\fR\fR
-.ad
-.RS 12n
-.rt
-Prints out a message to the console and generates a system crash dump.
-.RE
-
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBlistsnaps\fR=on | off\fR
-.ad
-.sp .6
-.RS 4n
-Controls whether information about snapshots associated with this pool is output when "\fBzfs list\fR" is run without the \fB-t\fR option. The default value is "off".
-.RE
-
-.sp
-.ne 2
-.mk
-.na
-\fB\fBversion\fR=\fIversion\fR\fR
-.ad
-.sp .6
-.RS 4n
-The current on-disk version of the pool. This can be increased, but never decreased. The preferred method of updating pools is with the "\fBzpool upgrade\fR" command, though this property can be used when a specific version is needed for backwards compatibility. This property can be any number between 1 and the current version reported by "\fBzpool upgrade -v\fR".
-.RE
-
.SS "Subcommands"
.sp
.LP
@@ -736,7 +522,7 @@ Clears device errors in a pool. If no arguments are specified, all device errors
.na
\fB\fBzpool create\fR [\fB-fn\fR] [\fB-o\fR \fIproperty=value\fR] ...
[\fB-O\fR \fIfile-system-property=value\fR] ...
- [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR \fIvdev\fR ...\fR
+ [\fB-m\fR \fImountpoint\fR] \fIpool\fR \fIvdev\fR ...\fR
.ad
.sp .6
.RS 4n
@@ -795,17 +581,6 @@ Sets the given pool properties. See the "Properties" section for a list of valid
Sets the given file system properties in the root file system of the pool. See the "Properties" section of \fBzfs\fR(8) for a list of valid properties that can be set.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-R\fR \fIroot\fR\fR
-.ad
-.sp .6
-.RS 4n
-Equivalent to "-o cachefile=none,altroot=\fIroot\fR"
-.RE
-
.sp
.ne 2
.mk
@@ -940,24 +715,13 @@ Displays log records in long format, which in addition to standard format includ
.ne 2
.mk
.na
-\fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR]\fR
+\fB\fBzpool import\fR [\fB-d\fR \fIdir\fR] [\fB-D\fR]\fR
.ad
.sp .6
.RS 4n
Lists pools available to import. If the \fB-d\fR option is not specified, this command searches for devices in "/dev". The \fB-d\fR option can be specified multiple times, and all directories are searched. If the device appears to be part of an exported pool, this command displays a summary of the pool with the name of the pool, a numeric identifier, as well as the \fIvdev\fR layout and current health of the device for each device or file. Destroyed pools, pools that were previously destroyed with the "\fBzpool destroy\fR" command, are not listed unless the \fB-D\fR option is specified.
.sp
The numeric identifier is unique, and can be used instead of the pool name when multiple exported pools of the same name are available.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-c\fR \fIcachefile\fR\fR
-.ad
-.RS 16n
-.rt
-Reads configuration from the given \fBcachefile\fR that was created with the "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of searching for devices.
-.RE
-
.sp
.ne 2
.mk
@@ -987,7 +751,7 @@ Lists destroyed pools only.
.mk
.na
\fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
- [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fB-a\fR\fR
+ [\fB-d\fR \fIdir\fR] [\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fB-a\fR\fR
.ad
.sp .6
.RS 4n
@@ -1014,17 +778,6 @@ Comma-separated list of mount options to use when mounting datasets within the p
Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-c\fR \fIcachefile\fR\fR
-.ad
-.RS 21n
-.rt
-Reads configuration from the given \fBcachefile\fR that was created with the "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of searching for devices.
-.RE
-
.sp
.ne 2
.mk
@@ -1087,7 +840,7 @@ Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" prop
.mk
.na
\fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
- [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR | \fIid\fR [\fInewpool\fR]\fR
+ [\fB-d\fR \fIdir\fR] [\fB-D\fR] [\fB-f\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR | \fIid\fR [\fInewpool\fR]\fR
.ad
.sp .6
.RS 4n
@@ -1116,17 +869,6 @@ Comma-separated list of mount options to use when mounting datasets within the p
Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
.RE
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-c\fR \fIcachefile\fR\fR
-.ad
-.sp .6
-.RS 4n
-Reads configuration from the given \fBcachefile\fR that was created with the "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of searching for devices.
-.RE
-
.sp
.ne 2
.mk
@@ -1177,24 +919,11 @@ Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" prop
.ne 2
.mk
.na
-\fB\fBzpool iostat\fR [\fB-T\fR \fBu\fR | \fBd\fR] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
+\fB\fBzpool iostat\fR [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
.ad
.sp .6
.RS 4n
Displays \fBI/O\fR statistics for the given pools. When given an interval, the statistics are printed every \fIinterval\fR seconds until \fBCtrl-C\fR is pressed. If no \fIpools\fR are specified, statistics for every pool in the system is shown. If \fIcount\fR is specified, the command exits after \fIcount\fR reports are printed.
-.sp
-.ne 2
-.mk
-.na
-\fB\fB-T\fR \fBu\fR | \fBd\fR\fR
-.ad
-.RS 12n
-.rt
-Display a time stamp.
-.sp
-Specify \fBu\fR for a printed representation of the internal representation of time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See \fBdate\fR(1).
-.RE
-
.sp
.ne 2
.mk
@@ -1675,33 +1404,7 @@ The following command creates a ZFS storage pool consisting of two, two-way mirr
.sp
.LP
-\fBExample 13 \fRAdding Cache Devices to a ZFS Pool
-.sp
-.LP
-The following command adds two disks for use as cache devices to a ZFS storage pool:
-
-.sp
-.in +2
-.nf
-# \fBzpool add pool cache disk3 disk4\fR
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-Once added, the cache devices gradually fill with content from main memory. Depending on the size of your cache devices, it could take over an hour for them to fill. Capacity and reads can be monitored using the \fBiostat\fR option as follows:
-
-.sp
-.in +2
-.nf
-# \fBzpool iostat -v pool 5\fR
-.fi
-.in -2
-.sp
-
-.LP
-\fBExample 14 \fRRemoving a Mirrored Log Device
+\fBExample 13 \fRRemoving a Mirrored Log Device
.sp
.LP
The following command removes the mirrored log device \fBmirror-2\fR.