mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Make use of ZFS_DEBUG consistent within kmod sources
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10623
This commit is contained in:
@@ -154,7 +154,7 @@ callb_add_common(boolean_t (*func)(void *arg, int code),
|
||||
cp->c_arg = arg;
|
||||
cp->c_class = (uchar_t)class;
|
||||
cp->c_flag |= CALLB_TAKEN;
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
if (strlen(name) > CB_MAXNAME)
|
||||
cmn_err(CE_WARN, "callb_add: name of callback function '%s' "
|
||||
"too long -- truncated to %d chars",
|
||||
@@ -217,7 +217,7 @@ callb_delete(callb_id_t id)
|
||||
while (*pp != NULL && *pp != me)
|
||||
pp = &(*pp)->c_next;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
if (*pp != me) {
|
||||
cmn_err(CE_WARN, "callb delete bogus entry 0x%p",
|
||||
(void *)me);
|
||||
|
||||
@@ -174,7 +174,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count,
|
||||
if (err != 0)
|
||||
return (err);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
IMPLY(last_size < PAGE_SIZE, *rahead == 0);
|
||||
if (dbp[0]->db_offset != 0 || numbufs > 1) {
|
||||
for (i = 0; i < numbufs; i++) {
|
||||
@@ -269,7 +269,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
/*
|
||||
* Three possibilities:
|
||||
* - last requested page ends at a buffer boundary and , thus,
|
||||
|
||||
@@ -839,7 +839,7 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t **xvpp, cred_t *cr)
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_sync(zfsvfs, tx);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
error = sa_lookup(xzp->z_sa_hdl, SA_ZPL_PARENT(zfsvfs),
|
||||
&parent, sizeof (parent));
|
||||
ASSERT(error == 0 && parent == zp->z_id);
|
||||
|
||||
@@ -1271,7 +1271,7 @@ zfs_get_done(zgd_t *zgd, int error)
|
||||
kmem_free(zgd, sizeof (zgd_t));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
static int zil_fault_io = 0;
|
||||
#endif
|
||||
|
||||
@@ -1354,7 +1354,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, struct lwb *lwb, zio_t *zio)
|
||||
/* test for truncation needs to be done while range locked */
|
||||
if (lr->lr_offset >= zp->z_size)
|
||||
error = SET_ERROR(ENOENT);
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
if (zil_fault_io) {
|
||||
error = SET_ERROR(EIO);
|
||||
zil_fault_io = 0;
|
||||
|
||||
@@ -76,7 +76,7 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, znode, CTLFLAG_RD,
|
||||
* Define ZNODE_STATS to turn on statistic gathering. By default, it is only
|
||||
* turned on when DEBUG is also defined.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
#define ZNODE_STATS
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
||||
@@ -1059,7 +1059,7 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t **xzpp, cred_t *cr)
|
||||
int error;
|
||||
zfs_acl_ids_t acl_ids;
|
||||
boolean_t fuid_dirtied;
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
uint64_t parent;
|
||||
#endif
|
||||
|
||||
@@ -1095,7 +1095,7 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t **xzpp, cred_t *cr)
|
||||
if (fuid_dirtied)
|
||||
zfs_fuid_sync(zfsvfs, tx);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
error = sa_lookup(xzp->z_sa_hdl, SA_ZPL_PARENT(zfsvfs),
|
||||
&parent, sizeof (parent));
|
||||
ASSERT(error == 0 && parent == zp->z_id);
|
||||
|
||||
@@ -265,7 +265,7 @@ zfsdev_detach(void)
|
||||
misc_deregister(&zfs_misc);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
#define ZFS_DEBUG_STR " (DEBUG mode)"
|
||||
#else
|
||||
#define ZFS_DEBUG_STR ""
|
||||
|
||||
@@ -1060,7 +1060,7 @@ zfs_get_done(zgd_t *zgd, int error)
|
||||
kmem_free(zgd, sizeof (zgd_t));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
static int zil_fault_io = 0;
|
||||
#endif
|
||||
|
||||
@@ -1142,7 +1142,7 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, struct lwb *lwb, zio_t *zio)
|
||||
/* test for truncation needs to be done while range locked */
|
||||
if (lr->lr_offset >= zp->z_size)
|
||||
error = SET_ERROR(ENOENT);
|
||||
#ifdef DEBUG
|
||||
#ifdef ZFS_DEBUG
|
||||
if (zil_fault_io) {
|
||||
error = SET_ERROR(EIO);
|
||||
zil_fault_io = 0;
|
||||
|
||||
Reference in New Issue
Block a user