diff options
author | delphij <delphij@FreeBSD.org> | 2014-05-09 07:12:31 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-05-09 07:12:31 +0000 |
commit | 7cb0f49ed2f136dd32fc5ce108ef3e244742098c (patch) | |
tree | f95691e1512ec1038738e6864508fb9da70312ea /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c | |
parent | 1b18a5ca9893b654bc9a4eaecc7a79c02c93d3ef (diff) | |
download | FreeBSD-src-7cb0f49ed2f136dd32fc5ce108ef3e244742098c.zip FreeBSD-src-7cb0f49ed2f136dd32fc5ce108ef3e244742098c.tar.gz |
MFC r264835 (MFV r264829):
3897 zfs filesystem and snapshot limits
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c index b5c0f5f..0c4fe26 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -758,9 +759,11 @@ dmu_objset_create_check(void *arg, dmu_tx_t *tx) dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, + doca->doca_cred); dsl_dir_rele(pdd, FTAG); - return (0); + return (error); } static void @@ -844,6 +847,12 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx) dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EXDEV)); } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, + doca->doca_cred); + if (error != 0) { + dsl_dir_rele(pdd, FTAG); + return (SET_ERROR(EDQUOT)); + } dsl_dir_rele(pdd, FTAG); error = dsl_dataset_hold(dp, doca->doca_origin, FTAG, &origin); |