diff options
author | Madhav Suresh <[email protected]> | 2013-05-10 14:17:03 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-06-19 15:14:10 -0700 |
commit | c99c90015ece64746e20b74245caca41d1dbefe1 (patch) | |
tree | cc4e993d3796f076a2dd1de43b4a2bd38ba10cc8 /module/zfs/space_map.c | |
parent | 9eaf0832ad945fb8584c39fb9aeb5e8578912aeb (diff) |
Illumos #3006
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first
argument is zero
Reviewed by Matt Ahrens <[email protected]>
Reviewed by George Wilson <[email protected]>
Approved by Eric Schrock <[email protected]>
References:
illumos/illumos-gate@fb09f5aad449c97fe309678f3f604982b563a96f
https://illumos.org/issues/3006
Requires:
zfsonlinux/spl@1c6d149feb4033e4a56fb987004edc5d45288bcb
Ported-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1509
Diffstat (limited to 'module/zfs/space_map.c')
-rw-r--r-- | module/zfs/space_map.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/zfs/space_map.c b/module/zfs/space_map.c index d99c7c0b3..ab7cb7a9a 100644 --- a/module/zfs/space_map.c +++ b/module/zfs/space_map.c @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ #include <sys/zfs_context.h> #include <sys/spa.h> @@ -90,7 +93,7 @@ void space_map_destroy(space_map_t *sm) { ASSERT(!sm->sm_loaded && !sm->sm_loading); - VERIFY3U(sm->sm_space, ==, 0); + VERIFY0(sm->sm_space); avl_destroy(&sm->sm_root); cv_destroy(&sm->sm_load_cv); } @@ -303,7 +306,7 @@ space_map_load(space_map_t *sm, space_map_ops_t *ops, uint8_t maptype, space = smo->smo_alloc; ASSERT(sm->sm_ops == NULL); - VERIFY3U(sm->sm_space, ==, 0); + VERIFY0(sm->sm_space); if (maptype == SM_FREE) { space_map_add(sm, sm->sm_start, sm->sm_size); @@ -501,7 +504,7 @@ space_map_sync(space_map_t *sm, uint8_t maptype, zio_buf_free(entry_map, bufsize); sm->sm_space -= delta; - VERIFY3U(sm->sm_space, ==, 0); + VERIFY0(sm->sm_space); } void |