Mercurial > illumos > illumos-gate
diff usr/src/uts/common/fs/zfs/dsl_dataset.c @ 10951:56fd5475e8fe
6896756 assertion failed: 0 == dsl_pool_user_hold(dp, ds->ds_object, htag, &now, tx)
6897005 zfs holds broken on 32-bit i86pc
author | Chris Kirby <Chris.Kirby@sun.com> |
---|---|
date | Wed, 04 Nov 2009 09:10:12 -0700 |
parents | e2081f502306 |
children | 63ab26072e41 |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c Wed Nov 04 07:57:07 2009 -0700 +++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c Wed Nov 04 09:10:12 2009 -0700 @@ -3239,6 +3239,12 @@ char failed[MAXPATHLEN]; }; +/* + * The max length of a temporary tag prefix is the number of hex digits + * required to express UINT64_MAX plus one for the hyphen. + */ +#define MAX_TAG_PREFIX_LEN 17 + static int dsl_dataset_user_hold_check(void *arg1, void *arg2, dmu_tx_t *tx) { @@ -3266,6 +3272,10 @@ } mutex_exit(&ds->ds_lock); + if (error == 0 && ha->temphold && + strlen(htag) + MAX_TAG_PREFIX_LEN >= MAXNAMELEN) + error = E2BIG; + return (error); } @@ -3277,7 +3287,7 @@ char *htag = ha->htag; dsl_pool_t *dp = ds->ds_dir->dd_pool; objset_t *mos = dp->dp_meta_objset; - time_t now = gethrestime_sec(); + uint64_t now = gethrestime_sec(); uint64_t zapobj; mutex_enter(&ds->ds_lock);