Deleted Added
full compact
zfs_context.h (168498) zfs_context.h (168566)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *

--- 89 unchanged lines hidden (view full) ---

98#include <vm/vnode_pager.h>
99
100#define CPU_SEQID (curcpu)
101
102#ifdef __cplusplus
103}
104#endif
105
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *

--- 89 unchanged lines hidden (view full) ---

98#include <vm/vnode_pager.h>
99
100#define CPU_SEQID (curcpu)
101
102#ifdef __cplusplus
103}
104#endif
105
106#define physmem (vm_kmem_size / PAGE_SIZE)
107
108extern int zfs_debug_level;
109extern struct mtx zfs_debug_mtx;
110#define ZFS_LOG(lvl, ...) do { \
111 if (((lvl) & 0xff) <= zfs_debug_level) { \
112 mtx_lock(&zfs_debug_mtx); \
113 printf("%s:%u[%d]: ", __func__, __LINE__, (lvl)); \
114 printf(__VA_ARGS__); \
115 printf("\n"); \
116 if ((lvl) & 0x100) \
117 kdb_backtrace(); \
118 mtx_unlock(&zfs_debug_mtx); \
119 } \
120} while (0)
121
122#endif /* _SYS_ZFS_CONTEXT_H */
106extern int zfs_debug_level;
107extern struct mtx zfs_debug_mtx;
108#define ZFS_LOG(lvl, ...) do { \
109 if (((lvl) & 0xff) <= zfs_debug_level) { \
110 mtx_lock(&zfs_debug_mtx); \
111 printf("%s:%u[%d]: ", __func__, __LINE__, (lvl)); \
112 printf(__VA_ARGS__); \
113 printf("\n"); \
114 if ((lvl) & 0x100) \
115 kdb_backtrace(); \
116 mtx_unlock(&zfs_debug_mtx); \
117 } \
118} while (0)
119
120#endif /* _SYS_ZFS_CONTEXT_H */