svn commit: r250950 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/lib/libzfs/common
Martin Matuska
mm at FreeBSD.org
Thu May 23 22:52:22 UTC 2013
Author: mm
Date: Thu May 23 22:52:21 2013
New Revision: 250950
URL: http://svnweb.freebsd.org/changeset/base/250950
Log:
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14031:e4eb37f33d60
Illumos ZFS issues:
3699 zfs hold or release of a non-existent snapshot does not output error
3739 cannot set zfs quota or reservation on pool version < 22
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c
vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c
Changes in other areas also in this revision:
Modified:
vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Thu May 23 22:51:56 2013 (r250949)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Thu May 23 22:52:21 2013 (r250950)
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2013 Martin Matuska. All rights reserved.
*/
#include <sys/dmu.h>
@@ -967,12 +968,18 @@ dsl_dir_set_quota_sync(void *arg, dmu_tx
VERIFY0(dsl_dataset_hold(dp, ddsqra->ddsqra_name, FTAG, &ds));
- dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_QUOTA),
- ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1,
- &ddsqra->ddsqra_value, tx);
+ if (spa_version(dp->dp_spa) >= SPA_VERSION_RECVD_PROPS) {
+ dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_QUOTA),
+ ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1,
+ &ddsqra->ddsqra_value, tx);
- VERIFY0(dsl_prop_get_int_ds(ds,
- zfs_prop_to_name(ZFS_PROP_QUOTA), &newval));
+ VERIFY0(dsl_prop_get_int_ds(ds,
+ zfs_prop_to_name(ZFS_PROP_QUOTA), &newval));
+ } else {
+ newval = ddsqra->ddsqra_value;
+ spa_history_log_internal_ds(ds, "set", tx, "%s=%lld",
+ zfs_prop_to_name(ZFS_PROP_QUOTA), (longlong_t)newval);
+ }
dmu_buf_will_dirty(ds->ds_dir->dd_dbuf, tx);
mutex_enter(&ds->ds_dir->dd_lock);
@@ -1083,12 +1090,20 @@ dsl_dir_set_reservation_sync(void *arg,
VERIFY0(dsl_dataset_hold(dp, ddsqra->ddsqra_name, FTAG, &ds));
- dsl_prop_set_sync_impl(ds, zfs_prop_to_name(ZFS_PROP_RESERVATION),
- ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1,
- &ddsqra->ddsqra_value, tx);
+ if (spa_version(dp->dp_spa) >= SPA_VERSION_RECVD_PROPS) {
+ dsl_prop_set_sync_impl(ds,
+ zfs_prop_to_name(ZFS_PROP_RESERVATION),
+ ddsqra->ddsqra_source, sizeof (ddsqra->ddsqra_value), 1,
+ &ddsqra->ddsqra_value, tx);
- VERIFY0(dsl_prop_get_int_ds(ds,
- zfs_prop_to_name(ZFS_PROP_RESERVATION), &newval));
+ VERIFY0(dsl_prop_get_int_ds(ds,
+ zfs_prop_to_name(ZFS_PROP_RESERVATION), &newval));
+ } else {
+ newval = ddsqra->ddsqra_value;
+ spa_history_log_internal_ds(ds, "set", tx, "%s=%lld",
+ zfs_prop_to_name(ZFS_PROP_RESERVATION),
+ (longlong_t)newval);
+ }
dsl_dir_set_reservation_sync_impl(ds->ds_dir, newval, tx);
dsl_dataset_rele(ds, FTAG);
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c Thu May 23 22:51:56 2013 (r250949)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c Thu May 23 22:52:21 2013 (r250950)
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2013 Martin Matuska. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -557,10 +558,6 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds
}
if (version < SPA_VERSION_RECVD_PROPS) {
- zfs_prop_t prop = zfs_name_to_prop(propname);
- if (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_RESERVATION)
- return;
-
if (source & ZPROP_SRC_NONE)
source = ZPROP_SRC_NONE;
else if (source & ZPROP_SRC_RECEIVED)
More information about the svn-src-vendor
mailing list