diff --git a/support/MacZFS.pmdoc/index.xml b/support/MacZFS.pmdoc/index.xml
index 1e184cec..f818424e 100644
--- a/support/MacZFS.pmdoc/index.xml
+++ b/support/MacZFS.pmdoc/index.xml
@@ -11,6 +11,16 @@
+ 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,7 +69,7 @@
{\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.}]]>
@@ -67,12 +77,13 @@
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/release.sh b/support/release.sh
index 2e418437..41f20b1e 100755
--- a/support/release.sh
+++ b/support/release.sh
@@ -4,6 +4,8 @@
DIR=`dirname $0`
BUILD=build
+DEFAULT_IDENTIFIER=com.bandlem.mac
+
VERSION=`${DIR}/version.sh`
if [ -z "${VERSION}" ]
then
@@ -12,6 +14,7 @@ then
fi
CONFIG=Release
+IDENTIFIER=${DEFAULT_IDENTIFIER}
INSTALL=No
while [[ $1 == -* ]]; do
@@ -20,6 +23,7 @@ while [[ $1 == -* ]]; do
case $OPT in
--debug) CONFIG=Debug ;;
--install) INSTALL=Yes ;;
+ --id) IDENTIFIER="$1" ; shift ;;
--) break; ;;
*) echo "Unknown arguments $OPT $*"; exit 1; ;;
esac
@@ -36,17 +40,20 @@ USER=`whoami`
(
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}
sed -i~ -e "s/0\\.0\\.0/${VERSION}/g" ${DIR}/../${BUILD}/MacZFS.pmdoc/*
+if [ "${DEFAULT_IDENTIFIER}" != "${IDENTIFIER}" ] ; then
+ sed -i~ -e "s/${DEFAULT_IDENTIFIER}/${IDENTIFIER}/g" ${DIR}/../${BUILD}/MacZFS.pmdoc/* #${DIR}/../zfs_bundle/Info.plist
+fi
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 MODULE_NAME=${IDENTIFIER}.zfs.fs INSTALL_OWNER=${USER} SYMROOT=${BUILD}/${CONFIG}105 DSTROOT=${BUILD}/ZFS105 || exit 2
# 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 MODULE_NAME=${IDENTIFIER}.zfs.fs INSTALL_OWNER=${USER} SYMROOT=${BUILD}/${CONFIG}106 DSTROOT=${BUILD}/ZFS106 || exit 3
fi
cd ${BUILD}
diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c
index 66d578e9..6c42ada2 100644
--- a/usr/src/cmd/zpool/zpool_main.c
+++ b/usr/src/cmd/zpool/zpool_main.c
@@ -470,7 +470,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);
@@ -657,7 +657,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);
@@ -2264,7 +2264,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 f00a0bae..4a417647 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 956f95d4..e0114439 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 stat64 statbuf;
@@ -540,6 +540,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);
}
@@ -1180,7 +1194,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, **l2cache;
int t, toplevels, mindev, nspares, nlogs, nl2cache;
@@ -1269,7 +1283,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;
@@ -1318,7 +1332,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++;
@@ -1388,7 +1402,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;
@@ -1400,7 +1414,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/common/zfs/zfs_prop.c b/usr/src/common/zfs/zfs_prop.c
index d209eb27..621e9601 100644
--- a/usr/src/common/zfs/zfs_prop.c
+++ b/usr/src/common/zfs/zfs_prop.c
@@ -298,10 +298,15 @@ zfs_prop_init(void)
register_number(ZFS_PROP_COMPRESSRATIO, "compressratio", 0,
PROP_READONLY, ZFS_TYPE_DATASET,
"<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_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");
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c
index c14f202a..3cca8ee8 100644
--- a/usr/src/lib/libzfs/common/libzfs_pool.c
+++ b/usr/src/lib/libzfs/common/libzfs_pool.c
@@ -233,6 +233,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len,
case ZPOOL_PROP_SIZE:
case ZPOOL_PROP_USED:
case ZPOOL_PROP_AVAILABLE:
+ case ZPOOL_PROP_ASHIFT:
(void) zfs_nicenum(intval, buf, len);
break;
@@ -353,6 +354,23 @@ zpool_validate_properties(libzfs_handle_t *hdl, const char *poolname,
}
break;
+ case ZPOOL_PROP_ASHIFT:
+ if (!create_or_import) {
+ 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:
if (create_or_import) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
diff --git a/usr/src/lib/libzpool/common/kernel.c b/usr/src/lib/libzpool/common/kernel.c
index e8ce11b2..bec46aca 100644
--- a/usr/src/lib/libzpool/common/kernel.c
+++ b/usr/src/lib/libzpool/common/kernel.c
@@ -826,13 +826,13 @@ size_t u8_textprep_str(char *i, size_t *il, char *o, size_t *ol, int nf,
}
uid_t
-crgetuid(cred_t *cr)
+crgetuid(const cred_t *cr)
{
return (0);
}
gid_t
-crgetgid(cred_t *cr)
+crgetgid(const cred_t *cr)
{
return (0);
}
diff --git a/usr/src/maczfs/maczfs_vnode.h b/usr/src/maczfs/maczfs_vnode.h
index a79c01b7..68f1cd1a 100644
--- a/usr/src/maczfs/maczfs_vnode.h
+++ b/usr/src/maczfs/maczfs_vnode.h
@@ -1565,7 +1565,9 @@ typedef enum {
#define VTOZONE(vp) ((vp)->v_vfsp->vfs_zone)
+#ifndef NULLVP /* protect agianst redef' if /System/Library/Frameworks/Kernel.framework/Headers/sys/vnode.h is included. */
#define NULLVP ((struct vnode *)0)
+#endif
#define NULLVPP ((struct vnode **)0)
#ifdef __APPLE__
@@ -1600,6 +1602,48 @@ struct async_reqs {
page_destroy((pp), (dn)); \
}
+
+// Copied from /System/Library/Frameworks/Kernel.framework/Headers/miscfs/fifofs/fifo.h
+ /*
+ * Prototypes for fifo operations on vnodes.
+ */
+ int fifo_ebadf(void *);
+
+#define fifo_create (int (*) (struct vnop_create_args *))err_create
+#define fifo_mknod (int (*) (struct vnop_mknod_args *))err_mknod
+#define fifo_access (int (*) (struct vnop_access_args *))fifo_ebadf
+#define fifo_getattr (int (*) (struct vnop_getattr_args *))fifo_ebadf
+#define fifo_setattr (int (*) (struct vnop_setattr_args *))fifo_ebadf
+#define fifo_revoke nop_revoke
+#define fifo_mmap (int (*) (struct vnop_mmap_args *))err_mmap
+#define fifo_fsync (int (*) (struct vnop_fsync_args *))nullop
+#define fifo_remove (int (*) (struct vnop_remove_args *))err_remove
+#define fifo_link (int (*) (struct vnop_link_args *))err_link
+#define fifo_rename (int (*) (struct vnop_rename_args *))err_rename
+#define fifo_mkdir (int (*) (struct vnop_mkdir_args *))err_mkdir
+#define fifo_rmdir (int (*) (struct vnop_rmdir_args *))err_rmdir
+#define fifo_symlink (int (*) (struct vnop_symlink_args *))err_symlink
+#define fifo_readdir (int (*) (struct vnop_readdir_args *))err_readdir
+#define fifo_readlink (int (*) (struct vnop_readlink_args *))err_readlink
+#define fifo_reclaim (int (*) (struct vnop_reclaim_args *))nullop
+#define fifo_strategy (int (*) (struct vnop_strategy_args *))err_strategy
+#define fifo_valloc (int (*) (struct vnop_valloc_args *))err_valloc
+#define fifo_vfree (int (*) (struct vnop_vfree_args *))err_vfree
+#define fifo_bwrite (int (*) (struct vnop_bwrite_args *))nullop
+#define fifo_blktooff (int (*) (struct vnop_blktooff_args *))err_blktooff
+
+ int fifo_lookup (struct vnop_lookup_args *);
+ int fifo_open (struct vnop_open_args *);
+ int fifo_close (struct vnop_close_args *);
+ int fifo_read (struct vnop_read_args *);
+ int fifo_write (struct vnop_write_args *);
+ int fifo_ioctl (struct vnop_ioctl_args *);
+ int fifo_select (struct vnop_select_args *);
+ int fifo_inactive (struct vnop_inactive_args *);
+ int fifo_pathconf (struct vnop_pathconf_args *);
+ int fifo_advlock (struct vnop_advlock_args *);
+
+
#endif /* _KERNEL */
#endif /* !__APPLE__ */
diff --git a/usr/src/uts/common/fs/zfs/spa_misc.c b/usr/src/uts/common/fs/zfs/spa_misc.c
index 09553550..d352652a 100644
--- a/usr/src/uts/common/fs/zfs/spa_misc.c
+++ b/usr/src/uts/common/fs/zfs/spa_misc.c
@@ -268,6 +268,7 @@ spa_add(const char *name, const char *altroot)
cv_init(&spa->spa_async_cv, NULL, CV_DEFAULT, NULL);
cv_init(&spa->spa_scrub_cv, NULL, CV_DEFAULT, NULL);
cv_init(&spa->spa_scrub_io_cv, NULL, CV_DEFAULT, NULL);
+ cv_init(&spa->spa_zio_cv, NULL, CV_DEFAULT, NULL);
spa->spa_name = spa_strdup(name);
spa->spa_state = POOL_STATE_UNINITIALIZED;
@@ -331,6 +332,7 @@ spa_remove(spa_t *spa)
cv_destroy(&spa->spa_async_cv);
cv_destroy(&spa->spa_scrub_cv);
cv_destroy(&spa->spa_scrub_io_cv);
+ cv_destroy(&spa->spa_zio_cv);
mutex_destroy(&spa->spa_uberblock_lock);
mutex_destroy(&spa->spa_async_lock);
diff --git a/usr/src/uts/common/fs/zfs/space_map.c b/usr/src/uts/common/fs/zfs/space_map.c
index a15e5ff8..754535de 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/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/zap_micro.c b/usr/src/uts/common/fs/zfs/zap_micro.c
index 421e0473..487a78ec 100644
--- a/usr/src/uts/common/fs/zfs/zap_micro.c
+++ b/usr/src/uts/common/fs/zfs/zap_micro.c
@@ -680,8 +680,9 @@ zap_lookup_norm(objset_t *os, uint64_t zapobj, const char *name,
err = EINVAL;
} else {
*(uint64_t *)buf = mze->mze_phys.mze_value;
- (void) strlcpy(realname,
- mze->mze_phys.mze_name, rn_len);
+ if (rn_len > 0) /* strlcpy may not be called with size == 0 */
+ (void) strlcpy(realname,
+ mze->mze_phys.mze_name, rn_len);
if (ncp) {
*ncp = mzap_normalization_conflict(zap,
zn, mze);
diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
index af982a92..3aa328ba 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
@@ -155,8 +155,9 @@ extern struct vnodeopv_desc zfs_fvnodeop_opv_desc;
extern struct vnodeopv_desc zfs_symvnodeop_opv_desc;
extern struct vnodeopv_desc zfs_xdvnodeop_opv_desc;
extern struct vnodeopv_desc zfs_evnodeop_opv_desc;
+extern struct vnodeopv_desc zfs_fifoop_opv_desc;
-#define ZFS_VNOP_TBL_CNT 5
+#define ZFS_VNOP_TBL_CNT 6
static struct vnodeopv_desc *zfs_vnodeop_opv_desc_list[ZFS_VNOP_TBL_CNT] =
{
@@ -165,6 +166,7 @@ static struct vnodeopv_desc *zfs_vnodeop_opv_desc_list[ZFS_VNOP_TBL_CNT] =
&zfs_symvnodeop_opv_desc,
&zfs_xdvnodeop_opv_desc,
&zfs_evnodeop_opv_desc,
+ &zfs_fifoop_opv_desc,
};
static vfstable_t zfs_vfsconf;
diff --git a/usr/src/uts/common/fs/zfs/zfs_vnops.c b/usr/src/uts/common/fs/zfs/zfs_vnops.c
index 5fd2f920..c09b8fa8 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c
@@ -1671,8 +1671,13 @@ zfs_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl,
zflg |= ZCILOOK;
#endif
+#ifdef __APPLE__
+ error = zfs_dirent_lock(&dl, dzp, ct->componentname, &zp, zflg,
+ NULL, NULL);
+#else
error = zfs_dirent_lock(&dl, dzp, name, &zp, zflg,
NULL, NULL);
+#endif
if (error) {
if (strcmp(name, "..") == 0)
error = EISDIR;
@@ -7045,7 +7050,6 @@ int (**zfs_fifoops) (void *);
struct vnodeopv_entry_desc zfs_fifoops_template[] = {
{&vnop_default_desc, (VOPFUNC)vn_default_error},
// Issue 9
-#if 0
{&vnop_lookup_desc, (VOPFUNC)fifo_lookup},
{&vnop_open_desc, (VOPFUNC)fifo_open},
{&vnop_close_desc, (VOPFUNC)fifo_close},
@@ -7053,9 +7057,8 @@ struct vnodeopv_entry_desc zfs_fifoops_template[] = {
{&vnop_write_desc, (VOPFUNC)fifo_write},
{&vnop_ioctl_desc, (VOPFUNC)fifo_ioctl},
{&vnop_select_desc, (VOPFUNC)fifo_select},
- {&vnop_revoke_desc, (VOPFUNC)fifo_revoke},
+ {&vnop_revoke_desc, (VOPFUNC)zfs_vnop_revoke},
{&vnop_pathconf_desc, (VOPFUNC)fifo_pathconf},
-#endif
{&vnop_fsync_desc, (VOPFUNC)zfs_vnop_fsync},
{&vnop_getattr_desc, (VOPFUNC)zfs_vnop_getattr},
{&vnop_setattr_desc, (VOPFUNC)zfs_vnop_setattr},
diff --git a/usr/src/uts/common/fs/zfs/zio.c b/usr/src/uts/common/fs/zfs/zio.c
index e4f45c49..7cce153b 100644
--- a/usr/src/uts/common/fs/zfs/zio.c
+++ b/usr/src/uts/common/fs/zfs/zio.c
@@ -916,7 +916,8 @@ zio_ready(zio_t *zio)
&pio->io_children_notready);
if (zio->io_bp)
- zio->io_bp_copy = *zio->io_bp;
+ if (&zio->io_bp_copy != zio->io_bp) /* do not copy block over itself. */
+ zio->io_bp_copy = *zio->io_bp;
zio_next_stage(zio);
}
diff --git a/usr/src/uts/common/sys/fs/zfs.h b/usr/src/uts/common/sys/fs/zfs.h
index 29203629..a2af698a 100644
--- a/usr/src/uts/common/sys/fs/zfs.h
+++ b/usr/src/uts/common/sys/fs/zfs.h
@@ -137,6 +137,7 @@ typedef enum {
ZPOOL_PROP_AUTOREPLACE,
ZPOOL_PROP_CACHEFILE,
ZPOOL_PROP_FAILUREMODE,
+ ZPOOL_PROP_ASHIFT,
ZPOOL_NUM_PROPS
} zpool_prop_t;