usr/src/uts/common/fs/zfs/sys/zfs_debug.h
author ahrens
Mon, 09 Oct 2006 10:56:01 -0700
changeset 2885 c0259887ebbc
parent 789 b348f31ed315
child 3093 71525e4187d5
permissions -rw-r--r--
6460059 zfs destroy <snapshot> leaves behind kruft 6463788 'zfs recv -d' fails if some ancestors already exist 6464897 assertion failed: "BP_GET_COMPRESS(bp) == compress" zio.c, line:897 6472843 panic when write to zvol snapshot 6475506 panic in dmu_recvbackup due to NULL pointer dereference 6475942 need more assertions in dnode_destroy() 6477102 recvbackup ioctl does not advance file offset 6477103 read-only properties should be passed as nvlist 6477900 want more /etc/system tunables for ZFS performance analysis 6479497 ::abuf_find is broken
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     1
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     2
 * CDDL HEADER START
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     3
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     5
 * Common Development and Distribution License, Version 1.0 only
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     6
 * (the "License").  You may not use this file except in compliance
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
 * with the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
 * or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
 * See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
 * and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
 * When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
 * If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
 * fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
 * information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
 * CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    22
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
 * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
 * Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#ifndef _SYS_ZFS_DEBUG_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
#define	_SYS_ZFS_DEBUG_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
#pragma ident	"%Z%%M%	%I%	%E% SMI"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
extern "C" {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    35
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    36
#ifndef TRUE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    37
#define	TRUE 1
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    38
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    39
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    40
#ifndef FALSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    41
#define	FALSE 0
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    42
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    43
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    44
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    45
 * ZFS debugging
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    46
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    47
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    48
#if defined(DEBUG) || !defined(_KERNEL)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    49
#define	ZFS_DEBUG
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    50
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    51
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    52
extern int zfs_flags;
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    53
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    54
#define	ZFS_DEBUG_DPRINTF	0x0001
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    55
#define	ZFS_DEBUG_DBUF_VERIFY	0x0002
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    56
#define	ZFS_DEBUG_DNODE_VERIFY	0x0004
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    57
#define	ZFS_DEBUG_SNAPNAMES	0x0008
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    58
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    59
#ifdef ZFS_DEBUG
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    60
extern void __dprintf(const char *file, const char *func,
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    61
    int line, const char *fmt, ...);
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    62
#define	dprintf(...) \
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    63
	if (zfs_flags & ZFS_DEBUG_DPRINTF) \
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    64
		__dprintf(__FILE__, __func__, __LINE__, __VA_ARGS__)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    65
#else
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    66
#define	dprintf(...) ((void)0)
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    67
#endif /* ZFS_DEBUG */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    68
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    69
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    70
}
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    71
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    72
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    73
#endif	/* _SYS_ZFS_DEBUG_H */