Mercurial > illumos > illumos-gate
comparison usr/src/uts/common/fs/zfs/dsl_synctask.c @ 13980:d7059eb1884c
3598 want to dtrace when errors are generated in zfs
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
author | Matthew Ahrens <mahrens@delphix.com> |
---|---|
date | Fri, 08 Mar 2013 10:41:28 -0800 |
parents | 4972ab336f54 |
children |
comparison
equal
deleted
inserted
replaced
13979:b01a4832cdf9 | 13980:d7059eb1884c |
---|---|
18 * | 18 * |
19 * CDDL HEADER END | 19 * CDDL HEADER END |
20 */ | 20 */ |
21 /* | 21 /* |
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. | 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2012 by Delphix. All rights reserved. | 23 * Copyright (c) 2013 by Delphix. All rights reserved. |
24 */ | 24 */ |
25 | 25 |
26 #include <sys/dmu.h> | 26 #include <sys/dmu.h> |
27 #include <sys/dmu_tx.h> | 27 #include <sys/dmu_tx.h> |
28 #include <sys/dsl_pool.h> | 28 #include <sys/dsl_pool.h> |
153 quota = dsl_pool_adjustedsize(dp, B_FALSE) - | 153 quota = dsl_pool_adjustedsize(dp, B_FALSE) - |
154 metaslab_class_get_deferred(spa_normal_class(dp->dp_spa)); | 154 metaslab_class_get_deferred(spa_normal_class(dp->dp_spa)); |
155 used = dp->dp_root_dir->dd_phys->dd_used_bytes; | 155 used = dp->dp_root_dir->dd_phys->dd_used_bytes; |
156 /* MOS space is triple-dittoed, so we multiply by 3. */ | 156 /* MOS space is triple-dittoed, so we multiply by 3. */ |
157 if (dst->dst_space > 0 && used + dst->dst_space * 3 > quota) { | 157 if (dst->dst_space > 0 && used + dst->dst_space * 3 > quota) { |
158 dst->dst_error = ENOSPC; | 158 dst->dst_error = SET_ERROR(ENOSPC); |
159 if (dst->dst_nowaiter) | 159 if (dst->dst_nowaiter) |
160 kmem_free(dst, sizeof (*dst)); | 160 kmem_free(dst, sizeof (*dst)); |
161 return; | 161 return; |
162 } | 162 } |
163 | 163 |