mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Illumos #3006
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first
argument is zero
Reviewed by Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed by George Wilson <george.wilson@delphix.com>
Approved by Eric Schrock <eric.schrock@delphix.com>
References:
illumos/illumos-gate@fb09f5aad4
https://illumos.org/issues/3006
Requires:
zfsonlinux/spl@1c6d149feb
Ported-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1509
This commit is contained in:
committed by
Brian Behlendorf
parent
9eaf0832ad
commit
c99c90015e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user