mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
Clean up CSTYLEDs
69 CSTYLED BEGINs remain, appx. 30 of which can be removed if cstyle(1) had a useful policy regarding CALL(ARG1, ARG2, ARG3); above 2 lines. As it stands, it spits out *both* sysctl_os.c: 385: continuation line should be indented by 4 spaces sysctl_os.c: 385: indent by spaces instead of tabs which is very cool Another >10 could be fixed by removing "ulong" &al. handling. I don't foresee anyone actually using it intentionally (does it even exist in modern headers? why did it in the first place?). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12993
This commit is contained in:
parent
a3fecf4f10
commit
7ada752a93
@ -126,6 +126,8 @@ cstyle:
|
||||
! -name 'zfs_config.*' ! -name '*.mod.c' \
|
||||
! -name 'opt_global.h' ! -name '*_if*.h' \
|
||||
! -path './module/zstd/lib/*' \
|
||||
! -path './include/sys/lua/*' \
|
||||
! -path './module/lua/l*.[ch]' \
|
||||
! -path './module/zfs/lz4.c' \
|
||||
$(cstyle_line)
|
||||
|
||||
|
@ -82,18 +82,17 @@ typedef struct {
|
||||
volatile int counter;
|
||||
} atomic_t;
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define hlist_for_each(p, head) \
|
||||
for (p = (head)->first; p; p = (p)->next)
|
||||
|
||||
#define hlist_entry(ptr, type, field) container_of(ptr, type, field)
|
||||
|
||||
#define container_of(ptr, type, member) \
|
||||
/* CSTYLED */ \
|
||||
({ \
|
||||
const __typeof(((type *)0)->member) *__p = (ptr); \
|
||||
(type *)((uintptr_t)__p - offsetof(type, member)); \
|
||||
const __typeof(((type *)0)->member) *__p = (ptr); \
|
||||
(type *)((uintptr_t)__p - offsetof(type, member)); \
|
||||
})
|
||||
/* END CSTYLED */
|
||||
|
||||
static inline void
|
||||
hlist_add_head(struct hlist_node *n, struct hlist_head *h)
|
||||
|
@ -34,12 +34,10 @@
|
||||
#define isalnum(ch) (isalpha(ch) || isdigit(ch))
|
||||
#define iscntrl(C) (uchar(C) <= 0x1f || uchar(C) == 0x7f)
|
||||
#define isgraph(C) ((C) >= 0x21 && (C) <= 0x7E)
|
||||
/* BEGIN CSTYLED */
|
||||
#define ispunct(C) \
|
||||
(((C) >= 0x21 && (C) <= 0x2F) || \
|
||||
((C) >= 0x3A && (C) <= 0x40) || \
|
||||
((C) >= 0x5B && (C) <= 0x60) || \
|
||||
((C) >= 0x7B && (C) <= 0x7E))
|
||||
/* END CSTYLED */
|
||||
#define ispunct(C) \
|
||||
(((C) >= 0x21 && (C) <= 0x2F) || \
|
||||
((C) >= 0x3A && (C) <= 0x40) || \
|
||||
((C) >= 0x5B && (C) <= 0x60) || \
|
||||
((C) >= 0x7B && (C) <= 0x7E))
|
||||
|
||||
#endif
|
||||
|
@ -64,69 +64,68 @@ void spl_dumpstack(void);
|
||||
#define likely(expr) expect((expr) != 0, 1)
|
||||
#define unlikely(expr) expect((expr) != 0, 0)
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define PANIC(fmt, a...) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a)
|
||||
|
||||
#define VERIFY(cond) \
|
||||
(void) (unlikely(!(cond)) && \
|
||||
#define VERIFY(cond) \
|
||||
(void) (unlikely(!(cond)) && \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"%s", "VERIFY(" #cond ") failed\n"))
|
||||
|
||||
#define VERIFY3B(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3B(LEFT, OP, RIGHT) do { \
|
||||
const boolean_t _verify3_left = (boolean_t)(LEFT); \
|
||||
const boolean_t _verify3_right = (boolean_t)(RIGHT);\
|
||||
const boolean_t _verify3_right = (boolean_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%d " #OP " %d)\n", \
|
||||
(boolean_t) (_verify3_left), \
|
||||
(boolean_t) (_verify3_right)); \
|
||||
"failed (%d " #OP " %d)\n", \
|
||||
(boolean_t)(_verify3_left), \
|
||||
(boolean_t)(_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY3S(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3S(LEFT, OP, RIGHT) do { \
|
||||
const int64_t _verify3_left = (int64_t)(LEFT); \
|
||||
const int64_t _verify3_right = (int64_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%lld " #OP " %lld)\n", \
|
||||
(long long) (_verify3_left), \
|
||||
(long long) (_verify3_right)); \
|
||||
"failed (%lld " #OP " %lld)\n", \
|
||||
(long long) (_verify3_left), \
|
||||
(long long) (_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY3U(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3U(LEFT, OP, RIGHT) do { \
|
||||
const uint64_t _verify3_left = (uint64_t)(LEFT); \
|
||||
const uint64_t _verify3_right = (uint64_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%llu " #OP " %llu)\n", \
|
||||
(unsigned long long) (_verify3_left), \
|
||||
(unsigned long long) (_verify3_right)); \
|
||||
"failed (%llu " #OP " %llu)\n", \
|
||||
(unsigned long long) (_verify3_left), \
|
||||
(unsigned long long) (_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY3P(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3P(LEFT, OP, RIGHT) do { \
|
||||
const uintptr_t _verify3_left = (uintptr_t)(LEFT); \
|
||||
const uintptr_t _verify3_right = (uintptr_t)(RIGHT);\
|
||||
const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%px " #OP " %px)\n", \
|
||||
(void *) (_verify3_left), \
|
||||
(void *) (_verify3_right)); \
|
||||
"failed (%px " #OP " %px)\n", \
|
||||
(void *) (_verify3_left), \
|
||||
(void *) (_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY0(RIGHT) do { \
|
||||
const int64_t _verify3_left = (int64_t)(0); \
|
||||
#define VERIFY0(RIGHT) do { \
|
||||
const int64_t _verify3_left = (int64_t)(0); \
|
||||
const int64_t _verify3_right = (int64_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left == _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(0 == " #RIGHT ") " \
|
||||
"failed (0 == %lld)\n", \
|
||||
(long long) (_verify3_right)); \
|
||||
"VERIFY3(0 == " #RIGHT ") " \
|
||||
"failed (0 == %lld)\n", \
|
||||
(long long) (_verify3_right)); \
|
||||
} while (0)
|
||||
#define CTASSERT_GLOBAL(x) CTASSERT(x)
|
||||
#define CTASSERT_GLOBAL(x) CTASSERT(x)
|
||||
|
||||
/*
|
||||
* Debugging disabled (--disable-debug)
|
||||
@ -167,7 +166,6 @@ void spl_dumpstack(void);
|
||||
((void)(likely(!!(A) == !!(B)) || \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"(" #A ") is equivalent to (" #B ")")))
|
||||
/* END CSTYLED */
|
||||
|
||||
#endif /* NDEBUG */
|
||||
|
||||
|
@ -43,10 +43,10 @@
|
||||
#define ZMOD_RW CTLFLAG_RWTUN
|
||||
#define ZMOD_RD CTLFLAG_RDTUN
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define ZFS_MODULE_PARAM(scope_prefix, name_prefix, name, type, perm, desc) \
|
||||
SYSCTL_DECL(_vfs_ ## scope_prefix); \
|
||||
SYSCTL_##type(_vfs_ ## scope_prefix, OID_AUTO, name, perm, &name_prefix ## name, 0, desc)
|
||||
SYSCTL_##type(_vfs_ ## scope_prefix, OID_AUTO, name, perm, \
|
||||
&name_prefix ## name, 0, desc)
|
||||
|
||||
#define ZFS_MODULE_PARAM_ARGS SYSCTL_HANDLER_ARGS
|
||||
|
||||
@ -54,8 +54,10 @@
|
||||
SYSCTL_DECL(parent); \
|
||||
SYSCTL_PROC(parent, OID_AUTO, name, perm | args, desc)
|
||||
|
||||
#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, func, _, perm, desc) \
|
||||
ZFS_MODULE_PARAM_CALL_IMPL(_vfs_ ## scope_prefix, name, perm, func ## _args(name_prefix ## name), desc)
|
||||
#define ZFS_MODULE_PARAM_CALL( \
|
||||
scope_prefix, name_prefix, name, func, _, perm, desc) \
|
||||
ZFS_MODULE_PARAM_CALL_IMPL(_vfs_ ## scope_prefix, name, perm, \
|
||||
func ## _args(name_prefix ## name), desc)
|
||||
|
||||
#define ZFS_MODULE_VIRTUAL_PARAM_CALL ZFS_MODULE_PARAM_CALL
|
||||
|
||||
@ -96,29 +98,28 @@
|
||||
CTLTYPE_STRING, NULL, 0, fletcher_4_param, "A"
|
||||
|
||||
#include <sys/kernel.h>
|
||||
#define module_init(fn) \
|
||||
#define module_init(fn) \
|
||||
static void \
|
||||
wrap_ ## fn(void *dummy __unused) \
|
||||
{ \
|
||||
fn(); \
|
||||
} \
|
||||
{ \
|
||||
fn(); \
|
||||
} \
|
||||
SYSINIT(zfs_ ## fn, SI_SUB_LAST, SI_ORDER_FIRST, wrap_ ## fn, NULL)
|
||||
|
||||
#define module_init_early(fn) \
|
||||
#define module_init_early(fn) \
|
||||
static void \
|
||||
wrap_ ## fn(void *dummy __unused) \
|
||||
{ \
|
||||
fn(); \
|
||||
} \
|
||||
{ \
|
||||
fn(); \
|
||||
} \
|
||||
SYSINIT(zfs_ ## fn, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_FIRST, wrap_ ## fn, NULL)
|
||||
|
||||
#define module_exit(fn) \
|
||||
#define module_exit(fn) \
|
||||
static void \
|
||||
wrap_ ## fn(void *dummy __unused) \
|
||||
{ \
|
||||
fn(); \
|
||||
} \
|
||||
{ \
|
||||
fn(); \
|
||||
} \
|
||||
SYSUNINIT(zfs_ ## fn, SI_SUB_LAST, SI_ORDER_FIRST, wrap_ ## fn, NULL)
|
||||
/* END CSTYLED */
|
||||
|
||||
#endif /* SPL_MOD_H */
|
||||
|
@ -57,13 +57,12 @@ typedef struct sx krwlock_t;
|
||||
#define RW_WRITE_HELD(x) (rw_write_held((x)))
|
||||
#define RW_LOCK_HELD(x) (rw_lock_held((x)))
|
||||
#define RW_ISWRITER(x) (rw_iswriter(x))
|
||||
/* BEGIN CSTYLED */
|
||||
#define rw_init(lock, desc, type, arg) do { \
|
||||
const char *_name; \
|
||||
ASSERT((type) == 0 || (type) == RW_DEFAULT); \
|
||||
KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
|
||||
LO_EXPECTED, ("lock %s already initialized", #lock)); \
|
||||
bzero((lock), sizeof(struct sx)); \
|
||||
bzero((lock), sizeof (struct sx)); \
|
||||
for (_name = #lock; *_name != '\0'; _name++) { \
|
||||
if (*_name >= 'a' && *_name <= 'z') \
|
||||
break; \
|
||||
@ -87,11 +86,10 @@ typedef struct sx krwlock_t;
|
||||
#define rw_tryupgrade(lock) sx_try_upgrade(lock)
|
||||
#define rw_read_held(lock) \
|
||||
((lock)->sx_lock != SX_LOCK_UNLOCKED && \
|
||||
((lock)->sx_lock & SX_LOCK_SHARED))
|
||||
((lock)->sx_lock & SX_LOCK_SHARED))
|
||||
#define rw_write_held(lock) sx_xlocked(lock)
|
||||
#define rw_lock_held(lock) (rw_read_held(lock) || rw_write_held(lock))
|
||||
#define rw_iswriter(lock) sx_xlocked(lock)
|
||||
#define rw_owner(lock) sx_xholder(lock)
|
||||
|
||||
/* END CSTYLED */
|
||||
#endif /* _OPENSOLARIS_SYS_RWLOCK_H_ */
|
||||
|
@ -30,8 +30,8 @@
|
||||
#define _OPENSOLARIS_SYS_SDT_H_
|
||||
|
||||
#include_next <sys/sdt.h>
|
||||
/* BEGIN CSTYLED */
|
||||
#ifdef KDTRACE_HOOKS
|
||||
/* CSTYLED */
|
||||
SDT_PROBE_DECLARE(sdt, , , set__error);
|
||||
|
||||
#define SET_ERROR(err) \
|
||||
|
@ -64,8 +64,8 @@ typedef u_int uint_t;
|
||||
typedef u_char uchar_t;
|
||||
typedef u_short ushort_t;
|
||||
typedef u_long ulong_t;
|
||||
typedef int minor_t;
|
||||
/* END CSTYLED */
|
||||
typedef int minor_t;
|
||||
#ifndef _OFF64_T_DECLARED
|
||||
#define _OFF64_T_DECLARED
|
||||
typedef off_t off64_t;
|
||||
|
@ -40,13 +40,13 @@ typedef struct kernel_param zfs_kernel_param_t;
|
||||
#define ZMOD_RW 0644
|
||||
#define ZMOD_RD 0444
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define INT int
|
||||
#define LONG long
|
||||
/* BEGIN CSTYLED */
|
||||
#define UINT uint
|
||||
#define ULONG ulong
|
||||
#define LONG long
|
||||
#define STRING charp
|
||||
/* END CSTYLED */
|
||||
#define STRING charp
|
||||
|
||||
enum scope_prefix_types {
|
||||
zfs,
|
||||
@ -108,12 +108,11 @@ enum scope_prefix_types {
|
||||
* on Linux:
|
||||
* dmu_prefetch_max
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
#define ZFS_MODULE_PARAM(scope_prefix, name_prefix, name, type, perm, desc) \
|
||||
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
|
||||
CTASSERT_GLOBAL( \
|
||||
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
|
||||
module_param(name_prefix ## name, type, perm); \
|
||||
MODULE_PARM_DESC(name_prefix ## name, desc)
|
||||
/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* Declare a module parameter / sysctl node
|
||||
@ -137,23 +136,24 @@ enum scope_prefix_types {
|
||||
* on Linux:
|
||||
* spa_slop_shift
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
|
||||
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
|
||||
module_param_call(name_prefix ## name, setfunc, getfunc, &name_prefix ## name, perm); \
|
||||
#define ZFS_MODULE_PARAM_CALL( \
|
||||
scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
|
||||
CTASSERT_GLOBAL( \
|
||||
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
|
||||
module_param_call(name_prefix ## name, setfunc, getfunc, \
|
||||
&name_prefix ## name, perm); \
|
||||
MODULE_PARM_DESC(name_prefix ## name, desc)
|
||||
/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* As above, but there is no variable with the name name_prefix ## name,
|
||||
* so NULL is passed to module_param_call instead.
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
#define ZFS_MODULE_VIRTUAL_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
|
||||
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
|
||||
#define ZFS_MODULE_VIRTUAL_PARAM_CALL( \
|
||||
scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
|
||||
CTASSERT_GLOBAL(\
|
||||
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
|
||||
module_param_call(name_prefix ## name, setfunc, getfunc, NULL, perm); \
|
||||
MODULE_PARM_DESC(name_prefix ## name, desc)
|
||||
/* END CSTYLED */
|
||||
|
||||
#define ZFS_MODULE_PARAM_ARGS const char *buf, zfs_kernel_param_t *kp
|
||||
|
||||
|
@ -102,13 +102,11 @@ typedef struct ace_object {
|
||||
|
||||
#define ACE_TYPE_FLAGS (ACE_OWNER|ACE_GROUP|ACE_EVERYONE|ACE_IDENTIFIER_GROUP)
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define ACE_ALL_PERMS (ACE_READ_DATA|ACE_LIST_DIRECTORY|ACE_WRITE_DATA| \
|
||||
ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS| \
|
||||
ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES| \
|
||||
ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \
|
||||
ACE_WRITE_OWNER|ACE_SYNCHRONIZE)
|
||||
/* END CSTYLED */
|
||||
ACE_ADD_FILE|ACE_APPEND_DATA|ACE_ADD_SUBDIRECTORY|ACE_READ_NAMED_ATTRS|\
|
||||
ACE_WRITE_NAMED_ATTRS|ACE_EXECUTE|ACE_DELETE_CHILD|ACE_READ_ATTRIBUTES|\
|
||||
ACE_WRITE_ATTRIBUTES|ACE_DELETE|ACE_READ_ACL|ACE_WRITE_ACL| \
|
||||
ACE_WRITE_OWNER|ACE_SYNCHRONIZE)
|
||||
|
||||
#define VSA_ACE 0x0010
|
||||
#define VSA_ACECNT 0x0020
|
||||
|
@ -58,74 +58,73 @@ int spl_panic(const char *file, const char *func, int line,
|
||||
const char *fmt, ...);
|
||||
void spl_dumpstack(void);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define PANIC(fmt, a...) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, fmt, ## a)
|
||||
|
||||
#define VERIFY(cond) \
|
||||
(void) (unlikely(!(cond)) && \
|
||||
#define VERIFY(cond) \
|
||||
(void) (unlikely(!(cond)) && \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"%s", "VERIFY(" #cond ") failed\n"))
|
||||
|
||||
#define VERIFY3B(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3B(LEFT, OP, RIGHT) do { \
|
||||
const boolean_t _verify3_left = (boolean_t)(LEFT); \
|
||||
const boolean_t _verify3_right = (boolean_t)(RIGHT);\
|
||||
const boolean_t _verify3_right = (boolean_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%d " #OP " %d)\n", \
|
||||
(boolean_t) (_verify3_left), \
|
||||
(boolean_t) (_verify3_right)); \
|
||||
"failed (%d " #OP " %d)\n", \
|
||||
(boolean_t)(_verify3_left), \
|
||||
(boolean_t)(_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY3S(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3S(LEFT, OP, RIGHT) do { \
|
||||
const int64_t _verify3_left = (int64_t)(LEFT); \
|
||||
const int64_t _verify3_right = (int64_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%lld " #OP " %lld)\n", \
|
||||
(long long) (_verify3_left), \
|
||||
(long long) (_verify3_right)); \
|
||||
"failed (%lld " #OP " %lld)\n", \
|
||||
(long long)(_verify3_left), \
|
||||
(long long)(_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY3U(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3U(LEFT, OP, RIGHT) do { \
|
||||
const uint64_t _verify3_left = (uint64_t)(LEFT); \
|
||||
const uint64_t _verify3_right = (uint64_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%llu " #OP " %llu)\n", \
|
||||
(unsigned long long) (_verify3_left), \
|
||||
(unsigned long long) (_verify3_right)); \
|
||||
"failed (%llu " #OP " %llu)\n", \
|
||||
(unsigned long long)(_verify3_left), \
|
||||
(unsigned long long)(_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY3P(LEFT, OP, RIGHT) do { \
|
||||
#define VERIFY3P(LEFT, OP, RIGHT) do { \
|
||||
const uintptr_t _verify3_left = (uintptr_t)(LEFT); \
|
||||
const uintptr_t _verify3_right = (uintptr_t)(RIGHT);\
|
||||
const uintptr_t _verify3_right = (uintptr_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left OP _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \
|
||||
"failed (%px " #OP " %px)\n", \
|
||||
(void *) (_verify3_left), \
|
||||
(void *) (_verify3_right)); \
|
||||
"failed (%px " #OP " %px)\n", \
|
||||
(void *) (_verify3_left), \
|
||||
(void *) (_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY0(RIGHT) do { \
|
||||
const int64_t _verify3_left = (int64_t)(0); \
|
||||
#define VERIFY0(RIGHT) do { \
|
||||
const int64_t _verify3_left = (int64_t)(0); \
|
||||
const int64_t _verify3_right = (int64_t)(RIGHT); \
|
||||
if (unlikely(!(_verify3_left == _verify3_right))) \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"VERIFY3(0 == " #RIGHT ") " \
|
||||
"failed (0 == %lld)\n", \
|
||||
(long long) (_verify3_right)); \
|
||||
"VERIFY3(0 == " #RIGHT ") " \
|
||||
"failed (0 == %lld)\n", \
|
||||
(long long) (_verify3_right)); \
|
||||
} while (0)
|
||||
|
||||
#define CTASSERT_GLOBAL(x) _CTASSERT(x, __LINE__)
|
||||
#define CTASSERT(x) { _CTASSERT(x, __LINE__); }
|
||||
#define _CTASSERT(x, y) __CTASSERT(x, y)
|
||||
#define __CTASSERT(x, y) \
|
||||
typedef char __attribute__ ((unused)) \
|
||||
typedef char __attribute__((unused)) \
|
||||
__compile_time_assertion__ ## y[(x) ? 1 : -1]
|
||||
|
||||
/*
|
||||
@ -167,7 +166,6 @@ void spl_dumpstack(void);
|
||||
((void)(likely(!!(A) == !!(B)) || \
|
||||
spl_panic(__FILE__, __FUNCTION__, __LINE__, \
|
||||
"(" #A ") is equivalent to (" #B ")")))
|
||||
/* END CSTYLED */
|
||||
|
||||
#endif /* NDEBUG */
|
||||
|
||||
|
@ -113,8 +113,8 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \
|
||||
VERIFY3P(mutex_owner(mp), ==, NULL); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define mutex_tryenter(mp) \
|
||||
/* CSTYLED */ \
|
||||
({ \
|
||||
int _rc_; \
|
||||
\
|
||||
@ -125,7 +125,6 @@ spl_mutex_lockdep_on_maybe(kmutex_t *mp) \
|
||||
\
|
||||
_rc_; \
|
||||
})
|
||||
/* END CSTYLED */
|
||||
|
||||
#define NESTED_SINGLE 1
|
||||
|
||||
|
@ -116,8 +116,7 @@ RW_READ_HELD(krwlock_t *rwp)
|
||||
* will be correctly located in the users code which is important
|
||||
* for the built in kernel lock analysis tools
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
#define rw_init(rwp, name, type, arg) \
|
||||
#define rw_init(rwp, name, type, arg) /* CSTYLED */ \
|
||||
({ \
|
||||
static struct lock_class_key __key; \
|
||||
ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \
|
||||
@ -138,7 +137,7 @@ RW_READ_HELD(krwlock_t *rwp)
|
||||
*/
|
||||
#define rw_tryupgrade(rwp) RW_WRITE_HELD(rwp)
|
||||
|
||||
#define rw_tryenter(rwp, rw) \
|
||||
#define rw_tryenter(rwp, rw) /* CSTYLED */ \
|
||||
({ \
|
||||
int _rc_ = 0; \
|
||||
\
|
||||
@ -158,7 +157,7 @@ RW_READ_HELD(krwlock_t *rwp)
|
||||
_rc_; \
|
||||
})
|
||||
|
||||
#define rw_enter(rwp, rw) \
|
||||
#define rw_enter(rwp, rw) /* CSTYLED */ \
|
||||
({ \
|
||||
spl_rw_lockdep_off_maybe(rwp); \
|
||||
switch (rw) { \
|
||||
@ -175,7 +174,7 @@ RW_READ_HELD(krwlock_t *rwp)
|
||||
spl_rw_lockdep_on_maybe(rwp); \
|
||||
})
|
||||
|
||||
#define rw_exit(rwp) \
|
||||
#define rw_exit(rwp) /* CSTYLED */ \
|
||||
({ \
|
||||
spl_rw_lockdep_off_maybe(rwp); \
|
||||
if (RW_WRITE_HELD(rwp)) { \
|
||||
@ -188,13 +187,12 @@ RW_READ_HELD(krwlock_t *rwp)
|
||||
spl_rw_lockdep_on_maybe(rwp); \
|
||||
})
|
||||
|
||||
#define rw_downgrade(rwp) \
|
||||
#define rw_downgrade(rwp) /* CSTYLED */ \
|
||||
({ \
|
||||
spl_rw_lockdep_off_maybe(rwp); \
|
||||
spl_rw_clear_owner(rwp); \
|
||||
downgrade_write(SEM(rwp)); \
|
||||
spl_rw_lockdep_on_maybe(rwp); \
|
||||
})
|
||||
/* END CSTYLED */
|
||||
|
||||
#endif /* _SPL_RWLOCK_H */
|
||||
|
@ -49,11 +49,9 @@ typedef void (*thread_func_t)(void *);
|
||||
__thread_create(stk, stksize, (thread_func_t)func, \
|
||||
name, arg, len, pp, state, pri)
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
|
||||
__thread_create(stk, stksize, (thread_func_t)func, \
|
||||
#func, arg, len, pp, state, pri)
|
||||
/* END CSTYLED */
|
||||
__thread_create(stk, stksize, (thread_func_t)func, #func, \
|
||||
arg, len, pp, state, pri)
|
||||
|
||||
#define thread_exit() __thread_exit()
|
||||
#define thread_join(t) VERIFY(0)
|
||||
|
@ -40,26 +40,20 @@
|
||||
* DTRACE_PROBE1(...,
|
||||
* taskq_ent_t *, ...);
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
DECLARE_EVENT_CLASS(zfs_taskq_ent_class,
|
||||
TP_PROTO(taskq_ent_t *taskq_ent),
|
||||
TP_ARGS(taskq_ent),
|
||||
TP_STRUCT__entry(
|
||||
__field(taskq_ent_t *, taskq_ent)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->taskq_ent = taskq_ent;
|
||||
),
|
||||
TP_printk("taskq_ent %p", __entry->taskq_ent)
|
||||
TP_PROTO(taskq_ent_t *taskq_ent),
|
||||
TP_ARGS(taskq_ent),
|
||||
TP_STRUCT__entry(__field(taskq_ent_t *, taskq_ent)),
|
||||
TP_fast_assign(
|
||||
__entry->taskq_ent = taskq_ent;
|
||||
),
|
||||
TP_printk("taskq_ent %p", __entry->taskq_ent)
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_TASKQ_EVENT(name) \
|
||||
#define DEFINE_TASKQ_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_taskq_ent_class, name, \
|
||||
TP_PROTO(taskq_ent_t *taskq_ent), \
|
||||
TP_ARGS(taskq_ent))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(taskq_ent_t *taskq_ent), \
|
||||
TP_ARGS(taskq_ent))
|
||||
DEFINE_TASKQ_EVENT(zfs_taskq_ent__birth);
|
||||
DEFINE_TASKQ_EVENT(zfs_taskq_ent__start);
|
||||
DEFINE_TASKQ_EVENT(zfs_taskq_ent__finish);
|
||||
|
@ -135,12 +135,10 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_ACE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_ace_class, name, \
|
||||
TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \
|
||||
TP_ARGS(zn, ace, mask_matched))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(znode_t *zn, zfs_ace_hdr_t *ace, uint32_t mask_matched), \
|
||||
TP_ARGS(zn, ace, mask_matched))
|
||||
DEFINE_ACE_EVENT(zfs_zfs__ace__denies);
|
||||
DEFINE_ACE_EVENT(zfs_zfs__ace__allows);
|
||||
|
||||
|
@ -98,12 +98,10 @@ DECLARE_EVENT_CLASS(zfs_arc_buf_hdr_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_ARC_BUF_HDR_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_arc_buf_hdr_class, name, \
|
||||
TP_PROTO(arc_buf_hdr_t *ab), \
|
||||
TP_ARGS(ab))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(arc_buf_hdr_t *ab), \
|
||||
TP_ARGS(ab))
|
||||
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__hit);
|
||||
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__evict);
|
||||
DEFINE_ARC_BUF_HDR_EVENT(zfs_arc__delete);
|
||||
@ -143,12 +141,10 @@ DECLARE_EVENT_CLASS(zfs_l2arc_rw_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_L2ARC_RW_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_l2arc_rw_class, name, \
|
||||
TP_PROTO(vdev_t *vd, zio_t *zio), \
|
||||
TP_ARGS(vd, zio))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(vdev_t *vd, zio_t *zio), \
|
||||
TP_ARGS(vd, zio))
|
||||
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__read);
|
||||
DEFINE_L2ARC_RW_EVENT(zfs_l2arc__write);
|
||||
|
||||
@ -170,12 +166,10 @@ DECLARE_EVENT_CLASS(zfs_l2arc_iodone_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_L2ARC_IODONE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_l2arc_iodone_class, name, \
|
||||
TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \
|
||||
TP_ARGS(zio, cb))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(zio_t *zio, l2arc_write_callback_t *cb), \
|
||||
TP_ARGS(zio, cb))
|
||||
DEFINE_L2ARC_IODONE_EVENT(zfs_l2arc__iodone);
|
||||
|
||||
|
||||
@ -284,13 +278,11 @@ DECLARE_EVENT_CLASS(zfs_arc_miss_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_ARC_MISS_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_arc_miss_class, name, \
|
||||
TP_PROTO(arc_buf_hdr_t *hdr, \
|
||||
const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \
|
||||
TP_ARGS(hdr, bp, size, zb))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(arc_buf_hdr_t *hdr, \
|
||||
const blkptr_t *bp, uint64_t size, const zbookmark_phys_t *zb), \
|
||||
TP_ARGS(hdr, bp, size, zb))
|
||||
DEFINE_ARC_MISS_EVENT(zfs_arc__miss);
|
||||
|
||||
/*
|
||||
@ -345,13 +337,10 @@ DECLARE_EVENT_CLASS(zfs_l2arc_evict_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_L2ARC_EVICT_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_l2arc_evict_class, name, \
|
||||
TP_PROTO(l2arc_dev_t *dev, \
|
||||
list_t *buflist, uint64_t taddr, boolean_t all), \
|
||||
TP_ARGS(dev, buflist, taddr, all))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(l2arc_dev_t *dev, list_t *buflist, uint64_t taddr, boolean_t all),\
|
||||
TP_ARGS(dev, buflist, taddr, all))
|
||||
DEFINE_L2ARC_EVICT_EVENT(zfs_l2arc__evict);
|
||||
|
||||
/*
|
||||
@ -381,12 +370,10 @@ DECLARE_EVENT_CLASS(zfs_arc_wait_for_eviction_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_ARC_WAIT_FOR_EVICTION_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_arc_wait_for_eviction_class, name, \
|
||||
TP_PROTO(uint64_t amount, uint64_t arc_evict_count, uint64_t aew_count), \
|
||||
TP_ARGS(amount, arc_evict_count, aew_count))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(uint64_t amount, uint64_t arc_evict_count, uint64_t aew_count), \
|
||||
TP_ARGS(amount, arc_evict_count, aew_count))
|
||||
DEFINE_ARC_WAIT_FOR_EVICTION_EVENT(zfs_arc__wait__for__eviction);
|
||||
|
||||
#endif /* _TRACE_ARC_H */
|
||||
|
@ -65,12 +65,10 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_DPRINTF_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_dprintf_class, name, \
|
||||
TP_PROTO(const char *msg), \
|
||||
TP_ARGS(msg))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(const char *msg), \
|
||||
TP_ARGS(msg))
|
||||
DEFINE_DPRINTF_EVENT(zfs_zfs__dprintf);
|
||||
|
||||
#endif /* _TRACE_DBGMSG_H */
|
||||
|
@ -117,20 +117,16 @@ DECLARE_EVENT_CLASS(zfs_dbuf_state_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_DBUF_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_dbuf_class, name, \
|
||||
TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \
|
||||
TP_ARGS(db, zio))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(dmu_buf_impl_t *db, zio_t *zio), \
|
||||
TP_ARGS(db, zio))
|
||||
DEFINE_DBUF_EVENT(zfs_blocked__read);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_DBUF_STATE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_dbuf_state_class, name, \
|
||||
TP_PROTO(dmu_buf_impl_t *db, const char *why), \
|
||||
TP_ARGS(db, why))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(dmu_buf_impl_t *db, const char *why), \
|
||||
TP_ARGS(db, why))
|
||||
DEFINE_DBUF_STATE_EVENT(zfs_dbuf__state_change);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
@ -143,12 +139,10 @@ DECLARE_EVENT_CLASS(zfs_dbuf_evict_one_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_DBUF_EVICT_ONE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_dbuf_evict_one_class, name, \
|
||||
TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \
|
||||
TP_ARGS(db, mls))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(dmu_buf_impl_t *db, multilist_sublist_t *mls), \
|
||||
TP_ARGS(db, mls))
|
||||
DEFINE_DBUF_EVICT_ONE_EVENT(zfs_dbuf__evict__one);
|
||||
|
||||
#endif /* _TRACE_DBUF_H */
|
||||
|
@ -81,12 +81,10 @@ DECLARE_EVENT_CLASS(zfs_delay_mintime_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_DELAY_MINTIME_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_delay_mintime_class, name, \
|
||||
TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
|
||||
TP_ARGS(tx, dirty, min_tx_time))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), \
|
||||
TP_ARGS(tx, dirty, min_tx_time))
|
||||
DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
@ -110,13 +108,11 @@ DECLARE_EVENT_CLASS(zfs_free_long_range_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_FREE_LONG_RANGE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_free_long_range_class, name, \
|
||||
TP_PROTO(uint64_t long_free_dirty_all_txgs, \
|
||||
uint64_t chunk_len, uint64_t txg), \
|
||||
TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(uint64_t long_free_dirty_all_txgs, \
|
||||
uint64_t chunk_len, uint64_t txg), \
|
||||
TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
|
||||
DEFINE_FREE_LONG_RANGE_EVENT(zfs_free__long__range);
|
||||
|
||||
#endif /* _TRACE_DMU_H */
|
||||
|
@ -105,12 +105,10 @@ DECLARE_EVENT_CLASS(zfs_dnode_move_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_DNODE_MOVE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_dnode_move_class, name, \
|
||||
TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
|
||||
TP_ARGS(dn, refcount, dbufs))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(dnode_t *dn, int64_t refcount, uint32_t dbufs), \
|
||||
TP_ARGS(dn, refcount, dbufs))
|
||||
DEFINE_DNODE_MOVE_EVENT(zfs_dnode__move);
|
||||
|
||||
#endif /* _TRACE_DNODE_H */
|
||||
|
@ -63,12 +63,10 @@ DECLARE_EVENT_CLASS(zfs_multilist_insert_remove_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_MULTILIST_INSERT_REMOVE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_multilist_insert_remove_class, name, \
|
||||
TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \
|
||||
TP_ARGS(ml, sublist_idx, obj))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(multilist_t *ml, unsigned int sublist_idx, void *obj), \
|
||||
TP_ARGS(ml, sublist_idx, obj))
|
||||
DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__insert);
|
||||
DEFINE_MULTILIST_INSERT_REMOVE_EVENT(zfs_multilist__remove);
|
||||
|
||||
|
@ -55,12 +55,10 @@ DECLARE_EVENT_CLASS(zfs_txg_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_TXG_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_txg_class, name, \
|
||||
TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
|
||||
TP_ARGS(dp, txg))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(dsl_pool_t *dp, uint64_t txg), \
|
||||
TP_ARGS(dp, txg))
|
||||
DEFINE_TXG_EVENT(zfs_dsl_pool_sync__done);
|
||||
DEFINE_TXG_EVENT(zfs_txg__quiescing);
|
||||
DEFINE_TXG_EVENT(zfs_txg__opened);
|
||||
|
@ -68,12 +68,10 @@ DECLARE_EVENT_CLASS(zfs_removing_class_3,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_REMOVE_FREE_EVENT(name) \
|
||||
#define DEFINE_REMOVE_FREE_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_removing_class_3, name, \
|
||||
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), \
|
||||
TP_ARGS(spa, offset, size))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size), \
|
||||
TP_ARGS(spa, offset, size))
|
||||
DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__synced);
|
||||
DEFINE_REMOVE_FREE_EVENT(zfs_remove__free__unvisited);
|
||||
|
||||
@ -107,12 +105,10 @@ DECLARE_EVENT_CLASS(zfs_removing_class_4,
|
||||
__entry->vdev_size, __entry->vdev_txg)
|
||||
);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_REMOVE_FREE_EVENT_TXG(name) \
|
||||
DEFINE_EVENT(zfs_removing_class_4, name, \
|
||||
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \
|
||||
TP_ARGS(spa, offset, size, txg))
|
||||
/* END CSTYLED */
|
||||
TP_PROTO(spa_t *spa, uint64_t offset, uint64_t size,uint64_t txg), \
|
||||
TP_ARGS(spa, offset, size, txg))
|
||||
DEFINE_REMOVE_FREE_EVENT_TXG(zfs_remove__free__inflight);
|
||||
|
||||
#endif /* _TRACE_VDEV_H */
|
||||
|
@ -170,14 +170,12 @@ DECLARE_EVENT_CLASS(zfs_zil_process_itx_class,
|
||||
);
|
||||
/* END CSTYLED */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_ZIL_PROCESS_ITX_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_zil_process_itx_class, name, \
|
||||
TP_PROTO(zilog_t *zilog, itx_t *itx), \
|
||||
TP_ARGS(zilog, itx))
|
||||
TP_PROTO(zilog_t *zilog, itx_t *itx), \
|
||||
TP_ARGS(zilog, itx))
|
||||
DEFINE_ZIL_PROCESS_ITX_EVENT(zfs_zil__process__commit__itx);
|
||||
DEFINE_ZIL_PROCESS_ITX_EVENT(zfs_zil__process__normal__itx);
|
||||
/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* Generic support for two argument tracepoints of the form:
|
||||
@ -203,13 +201,11 @@ DECLARE_EVENT_CLASS(zfs_zil_commit_io_error_class,
|
||||
ZILOG_TP_PRINTK_ARGS, ZCW_TP_PRINTK_ARGS)
|
||||
);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define DEFINE_ZIL_COMMIT_IO_ERROR_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_zil_commit_io_error_class, name, \
|
||||
TP_PROTO(zilog_t *zilog, zil_commit_waiter_t *zcw), \
|
||||
TP_ARGS(zilog, zcw))
|
||||
TP_PROTO(zilog_t *zilog, zil_commit_waiter_t *zcw), \
|
||||
TP_ARGS(zilog, zcw))
|
||||
DEFINE_ZIL_COMMIT_IO_ERROR_EVENT(zfs_zil__commit__io__error);
|
||||
/* END CSTYLED */
|
||||
|
||||
#endif /* _TRACE_ZIL_H */
|
||||
|
||||
|
@ -70,12 +70,12 @@ DECLARE_EVENT_CLASS(zfs_zrlock_class,
|
||||
__entry->refcount, __entry->n)
|
||||
#endif
|
||||
);
|
||||
/* END_CSTYLED */
|
||||
/* END CSTYLED */
|
||||
|
||||
#define DEFINE_ZRLOCK_EVENT(name) \
|
||||
DEFINE_EVENT(zfs_zrlock_class, name, \
|
||||
TP_PROTO(zrlock_t *zrl, kthread_t *owner, uint32_t n), \
|
||||
TP_ARGS(zrl, owner, n))
|
||||
TP_PROTO(zrlock_t *zrl, kthread_t *owner, uint32_t n), \
|
||||
TP_ARGS(zrl, owner, n))
|
||||
DEFINE_ZRLOCK_EVENT(zfs_zrlock__reentry);
|
||||
|
||||
#endif /* _TRACE_ZRLOCK_H */
|
||||
|
@ -1185,11 +1185,9 @@ typedef struct vdev_stat {
|
||||
uint64_t vs_noalloc; /* allocations halted? */
|
||||
} vdev_stat_t;
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#define VDEV_STAT_VALID(field, uint64_t_field_count) \
|
||||
((uint64_t_field_count * sizeof (uint64_t)) >= \
|
||||
(offsetof(vdev_stat_t, field) + sizeof (((vdev_stat_t *)NULL)->field)))
|
||||
/* END CSTYLED */
|
||||
((uint64_t_field_count * sizeof (uint64_t)) >= \
|
||||
(offsetof(vdev_stat_t, field) + sizeof (((vdev_stat_t *)NULL)->field)))
|
||||
|
||||
/*
|
||||
* Extended stats
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lauxlib.h,v 1.120.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
@ -171,5 +170,3 @@ LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname,
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lua.h,v 1.285.1.4 2015/02/21 14:04:50 roberto Exp $
|
||||
** Lua - A Scripting Language
|
||||
@ -442,4 +441,3 @@ struct lua_Debug {
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: luaconf.h,v 1.176.1.2 2013/11/21 17:26:16 roberto Exp $
|
||||
** Configuration file for Lua
|
||||
@ -555,4 +554,3 @@ extern int lcompat_hashnum(int64_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lualib.h,v 1.43.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua standard libraries
|
||||
@ -54,4 +53,3 @@ LUALIB_API void (luaL_openlibs) (lua_State *L);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -29,21 +29,22 @@
|
||||
/*
|
||||
* These are the void returning variants
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
#define ATOMIC_INC(name, type) \
|
||||
void atomic_inc_##name(volatile type *target) \
|
||||
{ \
|
||||
(void) __atomic_add_fetch(target, 1, __ATOMIC_SEQ_CST); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_INC(8, uint8_t)
|
||||
ATOMIC_INC(uchar, uchar_t)
|
||||
ATOMIC_INC(16, uint16_t)
|
||||
ATOMIC_INC(ushort, ushort_t)
|
||||
ATOMIC_INC(32, uint32_t)
|
||||
ATOMIC_INC(64, uint64_t)
|
||||
ATOMIC_INC(uchar, uchar_t)
|
||||
ATOMIC_INC(ushort, ushort_t)
|
||||
ATOMIC_INC(uint, uint_t)
|
||||
ATOMIC_INC(ulong, ulong_t)
|
||||
ATOMIC_INC(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_DEC(name, type) \
|
||||
@ -52,14 +53,16 @@ ATOMIC_INC(64, uint64_t)
|
||||
(void) __atomic_sub_fetch(target, 1, __ATOMIC_SEQ_CST); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_DEC(8, uint8_t)
|
||||
ATOMIC_DEC(uchar, uchar_t)
|
||||
ATOMIC_DEC(16, uint16_t)
|
||||
ATOMIC_DEC(ushort, ushort_t)
|
||||
ATOMIC_DEC(32, uint32_t)
|
||||
ATOMIC_DEC(64, uint64_t)
|
||||
ATOMIC_DEC(uchar, uchar_t)
|
||||
ATOMIC_DEC(ushort, ushort_t)
|
||||
ATOMIC_DEC(uint, uint_t)
|
||||
ATOMIC_DEC(ulong, ulong_t)
|
||||
ATOMIC_DEC(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_ADD(name, type1, type2) \
|
||||
@ -68,21 +71,23 @@ ATOMIC_DEC(64, uint64_t)
|
||||
(void) __atomic_add_fetch(target, bits, __ATOMIC_SEQ_CST); \
|
||||
}
|
||||
|
||||
ATOMIC_ADD(8, uint8_t, int8_t)
|
||||
ATOMIC_ADD(char, uchar_t, signed char)
|
||||
ATOMIC_ADD(16, uint16_t, int16_t)
|
||||
ATOMIC_ADD(short, ushort_t, short)
|
||||
ATOMIC_ADD(32, uint32_t, int32_t)
|
||||
ATOMIC_ADD(int, uint_t, int)
|
||||
ATOMIC_ADD(long, ulong_t, long)
|
||||
ATOMIC_ADD(64, uint64_t, int64_t)
|
||||
|
||||
void
|
||||
atomic_add_ptr(volatile void *target, ssize_t bits)
|
||||
{
|
||||
(void) __atomic_add_fetch((void **)target, bits, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_ADD(8, uint8_t, int8_t)
|
||||
ATOMIC_ADD(16, uint16_t, int16_t)
|
||||
ATOMIC_ADD(32, uint32_t, int32_t)
|
||||
ATOMIC_ADD(64, uint64_t, int64_t)
|
||||
ATOMIC_ADD(char, uchar_t, signed char)
|
||||
ATOMIC_ADD(short, ushort_t, short)
|
||||
ATOMIC_ADD(int, uint_t, int)
|
||||
ATOMIC_ADD(long, ulong_t, long)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_SUB(name, type1, type2) \
|
||||
void atomic_sub_##name(volatile type1 *target, type2 bits) \
|
||||
@ -90,21 +95,23 @@ atomic_add_ptr(volatile void *target, ssize_t bits)
|
||||
(void) __atomic_sub_fetch(target, bits, __ATOMIC_SEQ_CST); \
|
||||
}
|
||||
|
||||
ATOMIC_SUB(8, uint8_t, int8_t)
|
||||
ATOMIC_SUB(char, uchar_t, signed char)
|
||||
ATOMIC_SUB(16, uint16_t, int16_t)
|
||||
ATOMIC_SUB(short, ushort_t, short)
|
||||
ATOMIC_SUB(32, uint32_t, int32_t)
|
||||
ATOMIC_SUB(int, uint_t, int)
|
||||
ATOMIC_SUB(long, ulong_t, long)
|
||||
ATOMIC_SUB(64, uint64_t, int64_t)
|
||||
|
||||
void
|
||||
atomic_sub_ptr(volatile void *target, ssize_t bits)
|
||||
{
|
||||
(void) __atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_SUB(8, uint8_t, int8_t)
|
||||
ATOMIC_SUB(16, uint16_t, int16_t)
|
||||
ATOMIC_SUB(32, uint32_t, int32_t)
|
||||
ATOMIC_SUB(64, uint64_t, int64_t)
|
||||
ATOMIC_SUB(char, uchar_t, signed char)
|
||||
ATOMIC_SUB(short, ushort_t, short)
|
||||
ATOMIC_SUB(int, uint_t, int)
|
||||
ATOMIC_SUB(long, ulong_t, long)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_OR(name, type) \
|
||||
void atomic_or_##name(volatile type *target, type bits) \
|
||||
@ -112,14 +119,16 @@ atomic_sub_ptr(volatile void *target, ssize_t bits)
|
||||
(void) __atomic_or_fetch(target, bits, __ATOMIC_SEQ_CST); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_OR(8, uint8_t)
|
||||
ATOMIC_OR(uchar, uchar_t)
|
||||
ATOMIC_OR(16, uint16_t)
|
||||
ATOMIC_OR(ushort, ushort_t)
|
||||
ATOMIC_OR(32, uint32_t)
|
||||
ATOMIC_OR(64, uint64_t)
|
||||
ATOMIC_OR(uchar, uchar_t)
|
||||
ATOMIC_OR(ushort, ushort_t)
|
||||
ATOMIC_OR(uint, uint_t)
|
||||
ATOMIC_OR(ulong, ulong_t)
|
||||
ATOMIC_OR(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_AND(name, type) \
|
||||
@ -128,14 +137,16 @@ ATOMIC_OR(64, uint64_t)
|
||||
(void) __atomic_and_fetch(target, bits, __ATOMIC_SEQ_CST); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_AND(8, uint8_t)
|
||||
ATOMIC_AND(uchar, uchar_t)
|
||||
ATOMIC_AND(16, uint16_t)
|
||||
ATOMIC_AND(ushort, ushort_t)
|
||||
ATOMIC_AND(32, uint32_t)
|
||||
ATOMIC_AND(64, uint64_t)
|
||||
ATOMIC_AND(uchar, uchar_t)
|
||||
ATOMIC_AND(ushort, ushort_t)
|
||||
ATOMIC_AND(uint, uint_t)
|
||||
ATOMIC_AND(ulong, ulong_t)
|
||||
ATOMIC_AND(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
/*
|
||||
@ -148,14 +159,16 @@ ATOMIC_AND(64, uint64_t)
|
||||
return (__atomic_add_fetch(target, 1, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_INC_NV(8, uint8_t)
|
||||
ATOMIC_INC_NV(uchar, uchar_t)
|
||||
ATOMIC_INC_NV(16, uint16_t)
|
||||
ATOMIC_INC_NV(ushort, ushort_t)
|
||||
ATOMIC_INC_NV(32, uint32_t)
|
||||
ATOMIC_INC_NV(64, uint64_t)
|
||||
ATOMIC_INC_NV(uchar, uchar_t)
|
||||
ATOMIC_INC_NV(ushort, ushort_t)
|
||||
ATOMIC_INC_NV(uint, uint_t)
|
||||
ATOMIC_INC_NV(ulong, ulong_t)
|
||||
ATOMIC_INC_NV(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_DEC_NV(name, type) \
|
||||
@ -164,14 +177,16 @@ ATOMIC_INC_NV(64, uint64_t)
|
||||
return (__atomic_sub_fetch(target, 1, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_DEC_NV(8, uint8_t)
|
||||
ATOMIC_DEC_NV(uchar, uchar_t)
|
||||
ATOMIC_DEC_NV(16, uint16_t)
|
||||
ATOMIC_DEC_NV(ushort, ushort_t)
|
||||
ATOMIC_DEC_NV(32, uint32_t)
|
||||
ATOMIC_DEC_NV(64, uint64_t)
|
||||
ATOMIC_DEC_NV(uchar, uchar_t)
|
||||
ATOMIC_DEC_NV(ushort, ushort_t)
|
||||
ATOMIC_DEC_NV(uint, uint_t)
|
||||
ATOMIC_DEC_NV(ulong, ulong_t)
|
||||
ATOMIC_DEC_NV(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_ADD_NV(name, type1, type2) \
|
||||
@ -180,21 +195,23 @@ ATOMIC_DEC_NV(64, uint64_t)
|
||||
return (__atomic_add_fetch(target, bits, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
ATOMIC_ADD_NV(8, uint8_t, int8_t)
|
||||
ATOMIC_ADD_NV(char, uchar_t, signed char)
|
||||
ATOMIC_ADD_NV(16, uint16_t, int16_t)
|
||||
ATOMIC_ADD_NV(short, ushort_t, short)
|
||||
ATOMIC_ADD_NV(32, uint32_t, int32_t)
|
||||
ATOMIC_ADD_NV(int, uint_t, int)
|
||||
ATOMIC_ADD_NV(long, ulong_t, long)
|
||||
ATOMIC_ADD_NV(64, uint64_t, int64_t)
|
||||
|
||||
void *
|
||||
atomic_add_ptr_nv(volatile void *target, ssize_t bits)
|
||||
{
|
||||
return (__atomic_add_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_ADD_NV(8, uint8_t, int8_t)
|
||||
ATOMIC_ADD_NV(16, uint16_t, int16_t)
|
||||
ATOMIC_ADD_NV(32, uint32_t, int32_t)
|
||||
ATOMIC_ADD_NV(64, uint64_t, int64_t)
|
||||
ATOMIC_ADD_NV(char, uchar_t, signed char)
|
||||
ATOMIC_ADD_NV(short, ushort_t, short)
|
||||
ATOMIC_ADD_NV(int, uint_t, int)
|
||||
ATOMIC_ADD_NV(long, ulong_t, long)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_SUB_NV(name, type1, type2) \
|
||||
type1 atomic_sub_##name##_nv(volatile type1 *target, type2 bits) \
|
||||
@ -202,6 +219,13 @@ atomic_add_ptr_nv(volatile void *target, ssize_t bits)
|
||||
return (__atomic_sub_fetch(target, bits, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
void *
|
||||
atomic_sub_ptr_nv(volatile void *target, ssize_t bits)
|
||||
{
|
||||
return (__atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_SUB_NV(8, uint8_t, int8_t)
|
||||
ATOMIC_SUB_NV(char, uchar_t, signed char)
|
||||
ATOMIC_SUB_NV(16, uint16_t, int16_t)
|
||||
@ -210,12 +234,7 @@ ATOMIC_SUB_NV(32, uint32_t, int32_t)
|
||||
ATOMIC_SUB_NV(int, uint_t, int)
|
||||
ATOMIC_SUB_NV(long, ulong_t, long)
|
||||
ATOMIC_SUB_NV(64, uint64_t, int64_t)
|
||||
|
||||
void *
|
||||
atomic_sub_ptr_nv(volatile void *target, ssize_t bits)
|
||||
{
|
||||
return (__atomic_sub_fetch((void **)target, bits, __ATOMIC_SEQ_CST));
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_OR_NV(name, type) \
|
||||
@ -224,14 +243,16 @@ atomic_sub_ptr_nv(volatile void *target, ssize_t bits)
|
||||
return (__atomic_or_fetch(target, bits, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_OR_NV(8, uint8_t)
|
||||
ATOMIC_OR_NV(uchar, uchar_t)
|
||||
ATOMIC_OR_NV(16, uint16_t)
|
||||
ATOMIC_OR_NV(ushort, ushort_t)
|
||||
ATOMIC_OR_NV(32, uint32_t)
|
||||
ATOMIC_OR_NV(64, uint64_t)
|
||||
ATOMIC_OR_NV(uchar, uchar_t)
|
||||
ATOMIC_OR_NV(ushort, ushort_t)
|
||||
ATOMIC_OR_NV(uint, uint_t)
|
||||
ATOMIC_OR_NV(ulong, ulong_t)
|
||||
ATOMIC_OR_NV(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
#define ATOMIC_AND_NV(name, type) \
|
||||
@ -240,14 +261,16 @@ ATOMIC_OR_NV(64, uint64_t)
|
||||
return (__atomic_and_fetch(target, bits, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_AND_NV(8, uint8_t)
|
||||
ATOMIC_AND_NV(uchar, uchar_t)
|
||||
ATOMIC_AND_NV(16, uint16_t)
|
||||
ATOMIC_AND_NV(ushort, ushort_t)
|
||||
ATOMIC_AND_NV(32, uint32_t)
|
||||
ATOMIC_AND_NV(64, uint64_t)
|
||||
ATOMIC_AND_NV(uchar, uchar_t)
|
||||
ATOMIC_AND_NV(ushort, ushort_t)
|
||||
ATOMIC_AND_NV(uint, uint_t)
|
||||
ATOMIC_AND_NV(ulong, ulong_t)
|
||||
ATOMIC_AND_NV(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
/*
|
||||
@ -268,15 +291,6 @@ ATOMIC_AND_NV(64, uint64_t)
|
||||
return (exp); \
|
||||
}
|
||||
|
||||
ATOMIC_CAS(8, uint8_t)
|
||||
ATOMIC_CAS(uchar, uchar_t)
|
||||
ATOMIC_CAS(16, uint16_t)
|
||||
ATOMIC_CAS(ushort, ushort_t)
|
||||
ATOMIC_CAS(32, uint32_t)
|
||||
ATOMIC_CAS(uint, uint_t)
|
||||
ATOMIC_CAS(ulong, ulong_t)
|
||||
ATOMIC_CAS(64, uint64_t)
|
||||
|
||||
void *
|
||||
atomic_cas_ptr(volatile void *target, void *exp, void *des)
|
||||
{
|
||||
@ -286,6 +300,17 @@ atomic_cas_ptr(volatile void *target, void *exp, void *des)
|
||||
return (exp);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_CAS(8, uint8_t)
|
||||
ATOMIC_CAS(16, uint16_t)
|
||||
ATOMIC_CAS(32, uint32_t)
|
||||
ATOMIC_CAS(64, uint64_t)
|
||||
ATOMIC_CAS(uchar, uchar_t)
|
||||
ATOMIC_CAS(ushort, ushort_t)
|
||||
ATOMIC_CAS(uint, uint_t)
|
||||
ATOMIC_CAS(ulong, ulong_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
|
||||
/*
|
||||
* Swap target and return old value
|
||||
@ -297,14 +322,15 @@ atomic_cas_ptr(volatile void *target, void *exp, void *des)
|
||||
return (__atomic_exchange_n(target, bits, __ATOMIC_SEQ_CST)); \
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ATOMIC_SWAP(8, uint8_t)
|
||||
ATOMIC_SWAP(uchar, uchar_t)
|
||||
ATOMIC_SWAP(16, uint16_t)
|
||||
ATOMIC_SWAP(ushort, ushort_t)
|
||||
ATOMIC_SWAP(32, uint32_t)
|
||||
ATOMIC_SWAP(64, uint64_t)
|
||||
ATOMIC_SWAP(uchar, uchar_t)
|
||||
ATOMIC_SWAP(ushort, ushort_t)
|
||||
ATOMIC_SWAP(uint, uint_t)
|
||||
ATOMIC_SWAP(ulong, ulong_t)
|
||||
ATOMIC_SWAP(64, uint64_t)
|
||||
/* END CSTYLED */
|
||||
|
||||
void *
|
||||
|
@ -319,7 +319,6 @@ avl_rotation(avl_tree_t *tree, avl_node_t *node, int balance)
|
||||
int which_child = AVL_XCHILD(node);
|
||||
int child_bal = AVL_XBALANCE(child);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
* case 1 : node is overly left heavy, the left child is balanced or
|
||||
* also left heavy. This requires the following rotation.
|
||||
@ -345,7 +344,6 @@ avl_rotation(avl_tree_t *tree, avl_node_t *node, int balance)
|
||||
* we detect this situation by noting that child's balance is not
|
||||
* right_heavy.
|
||||
*/
|
||||
/* END CSTYLED */
|
||||
if (child_bal != right_heavy) {
|
||||
|
||||
/*
|
||||
@ -388,7 +386,6 @@ avl_rotation(avl_tree_t *tree, avl_node_t *node, int balance)
|
||||
return (child_bal == 0);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
* case 2 : When node is left heavy, but child is right heavy we use
|
||||
* a different rotation.
|
||||
@ -420,7 +417,6 @@ avl_rotation(avl_tree_t *tree, avl_node_t *node, int balance)
|
||||
* if gchild was right_heavy, then child is now left heavy
|
||||
* else it is balanced
|
||||
*/
|
||||
/* END CSTYLED */
|
||||
gchild = child->avl_child[right];
|
||||
gleft = gchild->avl_child[left];
|
||||
gright = gchild->avl_child[right];
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lapi.c,v 2.171.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua API
|
||||
@ -1296,7 +1295,6 @@ module_init(lua_init);
|
||||
module_exit(lua_fini);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
||||
ZFS_MODULE_DESCRIPTION("Lua Interpreter for ZFS");
|
||||
ZFS_MODULE_AUTHOR("Lua.org");
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Auxiliary functions from Lua API
|
||||
@ -23,4 +22,3 @@
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lauxlib.c,v 1.248.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Auxiliary functions for building Lua libraries
|
||||
@ -797,4 +796,3 @@ EXPORT_SYMBOL(luaL_newmetatable);
|
||||
EXPORT_SYMBOL(luaL_traceback);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lbaselib.c,v 1.276.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Basic library
|
||||
@ -293,4 +292,3 @@ LUAMOD_API int luaopen_base (lua_State *L) {
|
||||
EXPORT_SYMBOL(luaopen_base);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lcode.c,v 2.62.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Code generator for Lua
|
||||
@ -885,4 +884,3 @@ void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) {
|
||||
luaX_syntaxerror(fs->ls, "constructor too long");
|
||||
fs->freereg = base + 1; /* free registers with list values */
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lcode.h,v 1.58.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Code generator for Lua
|
||||
@ -82,4 +81,3 @@ LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lcorolib.c,v 1.5.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Coroutine Library
|
||||
@ -156,4 +155,3 @@ LUAMOD_API int luaopen_coroutine (lua_State *L) {
|
||||
EXPORT_SYMBOL(luaopen_coroutine);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lctype.c,v 1.11.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** 'ctype' functions for Lua
|
||||
@ -49,4 +48,3 @@ LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = {
|
||||
};
|
||||
|
||||
#endif /* } */
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lctype.h,v 1.12.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** 'ctype' functions for Lua
|
||||
@ -91,4 +90,3 @@ LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2];
|
||||
#endif /* } */
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ldebug.c,v 2.90.1.4 2015/02/19 17:05:13 roberto Exp $
|
||||
** Debug Interface
|
||||
@ -605,4 +604,3 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
|
||||
luaG_errormsg(L);
|
||||
L->runerror--;
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ldebug.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Auxiliary functions from Debug Interface module
|
||||
@ -33,4 +32,3 @@ LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
|
||||
LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ldo.c,v 2.108.1.3 2013/11/08 18:22:50 roberto Exp $
|
||||
** Stack and Call structure of Lua
|
||||
@ -746,4 +745,3 @@ int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
|
||||
L->nny--;
|
||||
return status;
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ldo.h,v 2.20.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Stack and Call structure of Lua
|
||||
@ -44,4 +43,3 @@ LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode);
|
||||
LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lfunc.c,v 2.30.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Auxiliary functions to manipulate prototypes and closures
|
||||
@ -157,4 +156,3 @@ const char *luaF_getlocalname (const Proto *f, int local_number, int pc) {
|
||||
}
|
||||
return NULL; /* not found */
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lfunc.h,v 2.8.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Auxiliary functions to manipulate prototypes and closures
|
||||
@ -32,4 +31,3 @@ LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lgc.c,v 2.140.1.3 2014/09/01 16:55:08 roberto Exp $
|
||||
** Garbage Collector
|
||||
@ -1215,4 +1214,3 @@ void luaC_fullgc (lua_State *L, int isemergency) {
|
||||
}
|
||||
|
||||
/* }====================================================== */
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lgc.h,v 2.58.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Garbage Collector
|
||||
@ -156,4 +155,3 @@ LUAI_FUNC void luaC_checkupvalcolor (global_State *g, UpVal *uv);
|
||||
LUAI_FUNC void luaC_changemode (lua_State *L, int mode);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: llex.c,v 2.63.1.3 2015/02/09 17:56:34 roberto Exp $
|
||||
** Lexical Analyzer
|
||||
@ -528,4 +527,3 @@ int luaX_lookahead (LexState *ls) {
|
||||
ls->lookahead.token = llex(ls, &ls->lookahead.seminfo);
|
||||
return ls->lookahead.token;
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: llex.h,v 1.72.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lexical Analyzer
|
||||
@ -80,4 +79,3 @@ LUAI_FUNC const char *luaX_token2str (LexState *ls, int token);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: llimits.h,v 1.103.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Limits, basic types, and some other `installation-dependent' definitions
|
||||
@ -311,4 +310,3 @@ union luai_Cast { double l_d; LUA_INT32 l_p[2]; };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lmem.c,v 1.84.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Interface to Memory Manager
|
||||
@ -95,4 +94,3 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) {
|
||||
g->GCdebt = (g->GCdebt + nsize) - realosize;
|
||||
return newblock;
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lmem.h,v 1.40.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Interface to Memory Manager
|
||||
@ -53,4 +52,3 @@ LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
|
||||
const char *what);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lobject.c,v 2.58.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Some generic functions over Lua objects
|
||||
@ -279,4 +278,3 @@ void luaO_chunkid (char *out, const char *source, size_t bufflen) {
|
||||
memcpy(out, POS, (LL(POS) + 1) * sizeof(char));
|
||||
}
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lobject.h,v 2.71.1.2 2014/05/07 14:14:58 roberto Exp $
|
||||
** Type definitions for Lua objects
|
||||
@ -602,4 +601,3 @@ LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lopcodes.c,v 1.49.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Opcodes for Lua virtual machine
|
||||
@ -105,4 +104,3 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
|
||||
,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_VARARG */
|
||||
,opmode(0, 0, OpArgU, OpArgU, iAx) /* OP_EXTRAARG */
|
||||
};
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lopcodes.h,v 1.142.1.2 2014/10/20 18:32:09 roberto Exp $
|
||||
** Opcodes for Lua virtual machine
|
||||
@ -287,4 +286,3 @@ LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lparser.c,v 2.130.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua Parser
|
||||
@ -1640,4 +1639,3 @@ Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
|
||||
lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0);
|
||||
return cl; /* it's on the stack too */
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lparser.h,v 1.70.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua Parser
|
||||
@ -118,4 +117,3 @@ LUAI_FUNC Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lstate.c,v 2.99.1.2 2013/11/08 17:45:31 roberto Exp $
|
||||
** Global State
|
||||
@ -317,4 +316,3 @@ LUA_API void lua_close (lua_State *L) {
|
||||
lua_lock(L);
|
||||
close_state(L);
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lstate.h,v 2.82.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Global State
|
||||
@ -227,4 +226,3 @@ LUAI_FUNC void luaE_freeCI (lua_State *L);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lstring.c,v 2.26.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** String table (keeps all strings handled by Lua)
|
||||
@ -183,4 +182,3 @@ Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
|
||||
u->uv.env = e;
|
||||
return u;
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lstring.h,v 1.49.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** String table (keep all strings handled by Lua)
|
||||
@ -45,4 +44,3 @@ LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lstrlib.c,v 1.178.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Standard library for string operations and pattern-matching
|
||||
@ -1037,4 +1036,3 @@ LUAMOD_API int luaopen_string (lua_State *L) {
|
||||
EXPORT_SYMBOL(luaopen_string);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ltable.c,v 2.72.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua tables (hash)
|
||||
@ -589,4 +588,3 @@ Node *luaH_mainposition (const Table *t, const TValue *key) {
|
||||
int luaH_isdummy (Node *n) { return isdummy(n); }
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $
|
||||
** Lua tables (hash)
|
||||
@ -44,4 +43,3 @@ LUAI_FUNC int luaH_isdummy (Node *n);
|
||||
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ltablib.c,v 1.65.1.2 2014/05/07 16:32:55 roberto Exp $
|
||||
** Library for Table Manipulation
|
||||
@ -286,4 +285,3 @@ LUAMOD_API int luaopen_table (lua_State *L) {
|
||||
EXPORT_SYMBOL(luaopen_table);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ltm.c,v 2.14.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Tag methods
|
||||
@ -73,4 +72,3 @@ const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
|
||||
}
|
||||
return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: ltm.h,v 2.11.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Tag methods
|
||||
@ -56,4 +55,3 @@ LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,
|
||||
LUAI_FUNC void luaT_init (lua_State *L);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lvm.c,v 2.155.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua virtual machine
|
||||
@ -928,5 +927,3 @@ void luaV_execute (lua_State *L) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lvm.h,v 2.18.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Lua virtual machine
|
||||
@ -43,4 +42,3 @@ LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb,
|
||||
LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lzio.c,v 1.35.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Buffered streams
|
||||
@ -71,4 +70,3 @@ char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) {
|
||||
}
|
||||
return buff->buffer;
|
||||
}
|
||||
/* END CSTYLED */
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
** $Id: lzio.h,v 1.26.1.1 2013/04/12 18:48:47 roberto Exp $
|
||||
** Buffered streams
|
||||
@ -64,4 +63,3 @@ struct Zio {
|
||||
LUAI_FUNC int luaZ_fill (ZIO *z);
|
||||
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
@ -93,12 +93,10 @@ sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
SYSCTL_DECL(_vfs_zfs);
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_free_target,
|
||||
CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof (uint_t),
|
||||
sysctl_vfs_zfs_arc_free_target, "IU",
|
||||
"Desired number of free pages below which ARC triggers reclaim");
|
||||
/* END CSTYLED */
|
||||
"Desired number of free pages below which ARC triggers reclaim");
|
||||
|
||||
int64_t
|
||||
arc_available_memory(void)
|
||||
|
@ -92,12 +92,13 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/dsl_pool.h>
|
||||
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_DECL(_vfs_zfs);
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, arc, CTLFLAG_RW, 0, "ZFS adaptive replacement cache");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, arc, CTLFLAG_RW, 0,
|
||||
"ZFS adaptive replacement cache");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, condense, CTLFLAG_RW, 0, "ZFS condense");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dbuf, CTLFLAG_RW, 0, "ZFS disk buf cache");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dbuf_cache, CTLFLAG_RW, 0, "ZFS disk buf cache");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dbuf_cache, CTLFLAG_RW, 0,
|
||||
"ZFS disk buf cache");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, deadman, CTLFLAG_RW, 0, "ZFS deadman");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, dedup, CTLFLAG_RW, 0, "ZFS dedup");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, l2arc, CTLFLAG_RW, 0, "ZFS l2arc");
|
||||
@ -105,7 +106,8 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, livelist, CTLFLAG_RW, 0, "ZFS livelist");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, lua, CTLFLAG_RW, 0, "ZFS lua");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 0, "ZFS metaslab");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, mg, CTLFLAG_RW, 0, "ZFS metaslab group");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, multihost, CTLFLAG_RW, 0, "ZFS multihost protection");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, multihost, CTLFLAG_RW, 0,
|
||||
"ZFS multihost protection");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, prefetch, CTLFLAG_RW, 0, "ZFS prefetch");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, reconstruct, CTLFLAG_RW, 0, "ZFS reconstruct");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, recv, CTLFLAG_RW, 0, "ZFS receive");
|
||||
@ -120,15 +122,15 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, zil, CTLFLAG_RW, 0, "ZFS ZIL");
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, "ZFS ZIO");
|
||||
|
||||
SYSCTL_NODE(_vfs_zfs_livelist, OID_AUTO, condense, CTLFLAG_RW, 0,
|
||||
"ZFS livelist condense");
|
||||
"ZFS livelist condense");
|
||||
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW, 0, "ZFS VDEV Cache");
|
||||
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, file, CTLFLAG_RW, 0, "ZFS VDEV file");
|
||||
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0,
|
||||
"ZFS VDEV mirror");
|
||||
"ZFS VDEV mirror");
|
||||
|
||||
SYSCTL_DECL(_vfs_zfs_version);
|
||||
SYSCTL_CONST_STRING(_vfs_zfs_version, OID_AUTO, module, CTLFLAG_RD,
|
||||
(ZFS_META_VERSION "-" ZFS_META_RELEASE), "OpenZFS module version");
|
||||
(ZFS_META_VERSION "-" ZFS_META_RELEASE), "OpenZFS module version");
|
||||
|
||||
extern arc_state_t ARC_anon;
|
||||
extern arc_state_t ARC_mru;
|
||||
@ -204,76 +206,73 @@ extern int l2arc_noprefetch; /* don't cache prefetch bufs */
|
||||
extern int l2arc_feed_again; /* turbo warmup */
|
||||
extern int l2arc_norw; /* no reads during writes */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW,
|
||||
&l2arc_write_max, 0, "max write size (LEGACY)");
|
||||
&l2arc_write_max, 0, "max write size (LEGACY)");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW,
|
||||
&l2arc_write_boost, 0, "extra write during warmup (LEGACY)");
|
||||
&l2arc_write_boost, 0, "extra write during warmup (LEGACY)");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW,
|
||||
&l2arc_headroom, 0, "number of dev writes (LEGACY)");
|
||||
&l2arc_headroom, 0, "number of dev writes (LEGACY)");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW,
|
||||
&l2arc_feed_secs, 0, "interval seconds (LEGACY)");
|
||||
&l2arc_feed_secs, 0, "interval seconds (LEGACY)");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW,
|
||||
&l2arc_feed_min_ms, 0, "min interval milliseconds (LEGACY)");
|
||||
&l2arc_feed_min_ms, 0, "min interval milliseconds (LEGACY)");
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW,
|
||||
&l2arc_noprefetch, 0, "don't cache prefetch bufs (LEGACY)");
|
||||
&l2arc_noprefetch, 0, "don't cache prefetch bufs (LEGACY)");
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again, CTLFLAG_RW,
|
||||
&l2arc_feed_again, 0, "turbo warmup (LEGACY)");
|
||||
&l2arc_feed_again, 0, "turbo warmup (LEGACY)");
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW,
|
||||
&l2arc_norw, 0, "no reads during writes (LEGACY)");
|
||||
#if 0
|
||||
extern int zfs_compressed_arc_enabled;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, compressed_arc_enabled, CTLFLAG_RW,
|
||||
&zfs_compressed_arc_enabled, 1, "compressed arc buffers (LEGACY)");
|
||||
#endif
|
||||
&l2arc_norw, 0, "no reads during writes (LEGACY)");
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_size.rc_count, 0, "size of anonymous state");
|
||||
&ARC_anon.arcs_size.rc_count, 0, "size of anonymous state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of anonymous state");
|
||||
&ARC_anon.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of anonymous state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_esize, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of anonymous state");
|
||||
&ARC_anon.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of anonymous state");
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_size.rc_count, 0, "size of mru state");
|
||||
&ARC_mru.arcs_size.rc_count, 0, "size of mru state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mru state");
|
||||
&ARC_mru.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mru state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_data_esize, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mru state");
|
||||
&ARC_mru.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mru state");
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_size, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_size.rc_count, 0, "size of mru ghost state");
|
||||
&ARC_mru_ghost.arcs_size.rc_count, 0, "size of mru ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mru ghost state");
|
||||
&ARC_mru_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mru ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_esize, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mru ghost state");
|
||||
&ARC_mru_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mru ghost state");
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_size, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_size.rc_count, 0, "size of mfu state");
|
||||
&ARC_mfu.arcs_size.rc_count, 0, "size of mfu state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mfu state");
|
||||
&ARC_mfu.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mfu state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_data_esize, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mfu state");
|
||||
&ARC_mfu.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mfu state");
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_size, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_size.rc_count, 0, "size of mfu ghost state");
|
||||
&ARC_mfu_ghost.arcs_size.rc_count, 0, "size of mfu ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mfu ghost state");
|
||||
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of metadata in mfu ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_esize, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mfu ghost state");
|
||||
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of data in mfu ghost state");
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD,
|
||||
&ARC_l2c_only.arcs_size.rc_count, 0, "size of mru state");
|
||||
&ARC_l2c_only.arcs_size.rc_count, 0, "size of mru state");
|
||||
/* END CSTYLED */
|
||||
|
||||
static int
|
||||
sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
||||
@ -285,7 +284,7 @@ sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
if (val < 0 || val >= arc_shrink_shift)
|
||||
if (val < 0 || val >= arc_shrink_shift)
|
||||
return (EINVAL);
|
||||
|
||||
arc_no_grow_shift = val;
|
||||
@ -295,7 +294,7 @@ sysctl_vfs_zfs_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift,
|
||||
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, NULL, sizeof (int),
|
||||
sysctl_vfs_zfs_arc_no_grow_shift, "I",
|
||||
"log2(fraction of ARC which must be free to allow growing)");
|
||||
"log2(fraction of ARC which must be free to allow growing)");
|
||||
|
||||
int
|
||||
param_set_arc_long(SYSCTL_HANDLER_ARGS)
|
||||
@ -325,14 +324,16 @@ param_set_arc_int(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min,
|
||||
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_arc_min, sizeof (zfs_arc_min), param_set_arc_min, "LU",
|
||||
"min arc size (LEGACY)");
|
||||
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_arc_min, sizeof (zfs_arc_min), param_set_arc_min, "LU",
|
||||
"min arc size (LEGACY)");
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max,
|
||||
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_arc_max, sizeof (zfs_arc_max), param_set_arc_max, "LU",
|
||||
"max arc size (LEGACY)");
|
||||
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_arc_max, sizeof (zfs_arc_max), param_set_arc_max, "LU",
|
||||
"max arc size (LEGACY)");
|
||||
/* END CSTYLED */
|
||||
|
||||
/* dbuf.c */
|
||||
|
||||
@ -345,30 +346,33 @@ SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW, 0, "ZFS ZFETCH (LEGACY)");
|
||||
/* max bytes to prefetch per stream (default 8MB) */
|
||||
extern uint32_t zfetch_max_distance;
|
||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_distance, CTLFLAG_RWTUN,
|
||||
&zfetch_max_distance, 0, "Max bytes to prefetch per stream (LEGACY)");
|
||||
&zfetch_max_distance, 0, "Max bytes to prefetch per stream (LEGACY)");
|
||||
|
||||
/* max bytes to prefetch indirects for per stream (default 64MB) */
|
||||
extern uint32_t zfetch_max_idistance;
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_idistance, CTLFLAG_RWTUN,
|
||||
&zfetch_max_idistance, 0,
|
||||
"Max bytes to prefetch indirects for per stream (LEGACY)");
|
||||
&zfetch_max_idistance, 0,
|
||||
"Max bytes to prefetch indirects for per stream (LEGACY)");
|
||||
/* END CSTYLED */
|
||||
|
||||
/* dsl_pool.c */
|
||||
|
||||
/* dnode.c */
|
||||
extern int zfs_default_bs;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, default_bs, CTLFLAG_RWTUN,
|
||||
&zfs_default_bs, 0, "Default dnode block shift");
|
||||
&zfs_default_bs, 0, "Default dnode block shift");
|
||||
|
||||
extern int zfs_default_ibs;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, default_ibs, CTLFLAG_RWTUN,
|
||||
&zfs_default_ibs, 0, "Default dnode indirect block shift");
|
||||
&zfs_default_ibs, 0, "Default dnode indirect block shift");
|
||||
|
||||
|
||||
/* dsl_scan.c */
|
||||
|
||||
/* metaslab.c */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
* In pools where the log space map feature is not enabled we touch
|
||||
* multiple metaslabs (and their respective space maps) with each
|
||||
@ -379,9 +383,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, default_ibs, CTLFLAG_RWTUN,
|
||||
*/
|
||||
extern int zfs_metaslab_sm_blksz_no_log;
|
||||
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_no_log, CTLFLAG_RDTUN,
|
||||
&zfs_metaslab_sm_blksz_no_log, 0,
|
||||
"Block size for space map in pools with log space map disabled. "
|
||||
"Power of 2 and greater than 4096.");
|
||||
&zfs_metaslab_sm_blksz_no_log, 0,
|
||||
"Block size for space map in pools with log space map disabled. "
|
||||
"Power of 2 greater than 4096.");
|
||||
|
||||
/*
|
||||
* When the log space map feature is enabled, we accumulate a lot of
|
||||
@ -390,9 +394,9 @@ SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_no_log, CTLFLAG_RDTUN,
|
||||
*/
|
||||
extern int zfs_metaslab_sm_blksz_with_log;
|
||||
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_with_log, CTLFLAG_RDTUN,
|
||||
&zfs_metaslab_sm_blksz_with_log, 0,
|
||||
"Block size for space map in pools with log space map enabled. "
|
||||
"Power of 2 and greater than 4096.");
|
||||
&zfs_metaslab_sm_blksz_with_log, 0,
|
||||
"Block size for space map in pools with log space map enabled. "
|
||||
"Power of 2 greater than 4096.");
|
||||
|
||||
/*
|
||||
* The in-core space map representation is more compact than its on-disk form.
|
||||
@ -402,19 +406,19 @@ SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, sm_blksz_with_log, CTLFLAG_RDTUN,
|
||||
*/
|
||||
extern int zfs_condense_pct;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, condense_pct, CTLFLAG_RWTUN,
|
||||
&zfs_condense_pct, 0,
|
||||
"Condense on-disk spacemap when it is more than this many percents"
|
||||
" of in-memory counterpart");
|
||||
&zfs_condense_pct, 0,
|
||||
"Condense on-disk spacemap when it is more than this many percents"
|
||||
" of in-memory counterpart");
|
||||
|
||||
extern int zfs_remove_max_segment;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, remove_max_segment, CTLFLAG_RWTUN,
|
||||
&zfs_remove_max_segment, 0, "Largest contiguous segment ZFS will attempt to"
|
||||
" allocate when removing a device");
|
||||
&zfs_remove_max_segment, 0, "Largest contiguous segment ZFS will"
|
||||
" attempt to allocate when removing a device");
|
||||
|
||||
extern int zfs_removal_suspend_progress;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, removal_suspend_progress, CTLFLAG_RWTUN,
|
||||
&zfs_removal_suspend_progress, 0, "Ensures certain actions can happen while"
|
||||
" in the middle of a removal");
|
||||
&zfs_removal_suspend_progress, 0,
|
||||
"Ensures certain actions can happen while in the middle of a removal");
|
||||
|
||||
|
||||
/*
|
||||
@ -425,8 +429,8 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, removal_suspend_progress, CTLFLAG_RWTUN,
|
||||
*/
|
||||
extern uint64_t metaslab_df_alloc_threshold;
|
||||
SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, df_alloc_threshold, CTLFLAG_RWTUN,
|
||||
&metaslab_df_alloc_threshold, 0,
|
||||
"Minimum size which forces the dynamic allocator to change it's allocation strategy");
|
||||
&metaslab_df_alloc_threshold, 0, "Minimum size which forces the dynamic"
|
||||
" allocator to change its allocation strategy");
|
||||
|
||||
/*
|
||||
* The minimum free space, in percent, which must be available
|
||||
@ -436,41 +440,42 @@ SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, df_alloc_threshold, CTLFLAG_RWTUN,
|
||||
*/
|
||||
extern int metaslab_df_free_pct;
|
||||
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, df_free_pct, CTLFLAG_RWTUN,
|
||||
&metaslab_df_free_pct, 0,
|
||||
"The minimum free space, in percent, which must be available in a "
|
||||
"space map to continue allocations in a first-fit fashion");
|
||||
&metaslab_df_free_pct, 0,
|
||||
"The minimum free space, in percent, which must be available in a"
|
||||
" space map to continue allocations in a first-fit fashion");
|
||||
|
||||
/*
|
||||
* Percentage of all cpus that can be used by the metaslab taskq.
|
||||
*/
|
||||
extern int metaslab_load_pct;
|
||||
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, load_pct, CTLFLAG_RWTUN,
|
||||
&metaslab_load_pct, 0,
|
||||
"Percentage of cpus that can be used by the metaslab taskq");
|
||||
&metaslab_load_pct, 0,
|
||||
"Percentage of cpus that can be used by the metaslab taskq");
|
||||
|
||||
/*
|
||||
* Max number of metaslabs per group to preload.
|
||||
*/
|
||||
extern int metaslab_preload_limit;
|
||||
SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, preload_limit, CTLFLAG_RWTUN,
|
||||
&metaslab_preload_limit, 0,
|
||||
"Max number of metaslabs per group to preload");
|
||||
&metaslab_preload_limit, 0,
|
||||
"Max number of metaslabs per group to preload");
|
||||
|
||||
/* spa.c */
|
||||
extern int zfs_ccw_retry_interval;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, ccw_retry_interval, CTLFLAG_RWTUN,
|
||||
&zfs_ccw_retry_interval, 0,
|
||||
"Configuration cache file write, retry after failure, interval (seconds)");
|
||||
&zfs_ccw_retry_interval, 0, "Configuration cache file write,"
|
||||
" retry after failure, interval (seconds)");
|
||||
|
||||
extern uint64_t zfs_max_missing_tvds_cachefile;
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_cachefile, CTLFLAG_RWTUN,
|
||||
&zfs_max_missing_tvds_cachefile, 0,
|
||||
"allow importing pools with missing top-level vdevs in cache file");
|
||||
&zfs_max_missing_tvds_cachefile, 0,
|
||||
"allow importing pools with missing top-level vdevs in cache file");
|
||||
|
||||
extern uint64_t zfs_max_missing_tvds_scan;
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, max_missing_tvds_scan, CTLFLAG_RWTUN,
|
||||
&zfs_max_missing_tvds_scan, 0,
|
||||
"allow importing pools with missing top-level vdevs during scan");
|
||||
&zfs_max_missing_tvds_scan, 0,
|
||||
"allow importing pools with missing top-level vdevs during scan");
|
||||
/* END CSTYLED */
|
||||
|
||||
/* spa_misc.c */
|
||||
extern int zfs_flags;
|
||||
@ -497,9 +502,11 @@ sysctl_vfs_zfs_debug_flags(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, debugflags,
|
||||
CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, NULL, 0,
|
||||
sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing.");
|
||||
CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, NULL, 0,
|
||||
sysctl_vfs_zfs_debug_flags, "IU", "Debug flags for ZFS testing.");
|
||||
/* END CSTYLED */
|
||||
|
||||
int
|
||||
param_set_deadman_synctime(SYSCTL_HANDLER_ARGS)
|
||||
@ -549,11 +556,11 @@ param_set_deadman_failmode(SYSCTL_HANDLER_ARGS)
|
||||
return (rc);
|
||||
if (strcmp(buf, zfs_deadman_failmode) == 0)
|
||||
return (0);
|
||||
if (!strcmp(buf, "wait"))
|
||||
if (strcmp(buf, "wait") == 0)
|
||||
zfs_deadman_failmode = "wait";
|
||||
if (!strcmp(buf, "continue"))
|
||||
if (strcmp(buf, "continue") == 0)
|
||||
zfs_deadman_failmode = "continue";
|
||||
if (!strcmp(buf, "panic"))
|
||||
if (strcmp(buf, "panic") == 0)
|
||||
zfs_deadman_failmode = "panic";
|
||||
|
||||
return (-param_set_deadman_failmode_common(buf));
|
||||
@ -563,7 +570,7 @@ param_set_deadman_failmode(SYSCTL_HANDLER_ARGS)
|
||||
/* spacemap.c */
|
||||
extern int space_map_ibs;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, space_map_ibs, CTLFLAG_RWTUN,
|
||||
&space_map_ibs, 0, "Space map indirect block shift");
|
||||
&space_map_ibs, 0, "Space map indirect block shift");
|
||||
|
||||
|
||||
/* vdev.c */
|
||||
@ -605,17 +612,18 @@ param_set_max_auto_ashift(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift,
|
||||
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift),
|
||||
param_set_min_auto_ashift, "QU",
|
||||
"Min ashift used when creating new top-level vdev. (LEGACY)");
|
||||
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift),
|
||||
param_set_min_auto_ashift, "QU",
|
||||
"Min ashift used when creating new top-level vdev. (LEGACY)");
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift,
|
||||
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift),
|
||||
param_set_max_auto_ashift, "QU",
|
||||
"Max ashift used when optimizing for logical -> physical sector size on "
|
||||
"new top-level vdevs. (LEGACY)");
|
||||
CTLTYPE_U64 | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift),
|
||||
param_set_max_auto_ashift, "QU",
|
||||
"Max ashift used when optimizing for logical -> physical sector size on"
|
||||
" new top-level vdevs. (LEGACY)");
|
||||
|
||||
/*
|
||||
* Since the DTL space map of a vdev is not expected to have a lot of
|
||||
@ -623,8 +631,8 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift,
|
||||
*/
|
||||
extern int zfs_vdev_dtl_sm_blksz;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, dtl_sm_blksz, CTLFLAG_RDTUN,
|
||||
&zfs_vdev_dtl_sm_blksz, 0,
|
||||
"Block size for DTL space map. Power of 2 and greater than 4096.");
|
||||
&zfs_vdev_dtl_sm_blksz, 0,
|
||||
"Block size for DTL space map. Power of 2 greater than 4096.");
|
||||
|
||||
/*
|
||||
* vdev-wide space maps that have lots of entries written to them at
|
||||
@ -633,13 +641,13 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, dtl_sm_blksz, CTLFLAG_RDTUN,
|
||||
*/
|
||||
extern int zfs_vdev_standard_sm_blksz;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, standard_sm_blksz, CTLFLAG_RDTUN,
|
||||
&zfs_vdev_standard_sm_blksz, 0,
|
||||
"Block size for standard space map. Power of 2 and greater than 4096.");
|
||||
&zfs_vdev_standard_sm_blksz, 0,
|
||||
"Block size for standard space map. Power of 2 greater than 4096.");
|
||||
/* END CSTYLED */
|
||||
|
||||
extern int vdev_validate_skip;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, validate_skip, CTLFLAG_RDTUN,
|
||||
&vdev_validate_skip, 0,
|
||||
"Enable to bypass vdev_validate().");
|
||||
&vdev_validate_skip, 0, "Enable to bypass vdev_validate().");
|
||||
|
||||
|
||||
/* vdev_cache.c */
|
||||
@ -657,55 +665,23 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, validate_skip, CTLFLAG_RDTUN,
|
||||
|
||||
|
||||
/* vdev_queue.c */
|
||||
#define ZFS_VDEV_QUEUE_KNOB_MIN(name) \
|
||||
extern uint32_t zfs_vdev_ ## name ## _min_active; \
|
||||
SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _min_active, CTLFLAG_RWTUN,\
|
||||
&zfs_vdev_ ## name ## _min_active, 0, \
|
||||
"Initial number of I/O requests of type " #name \
|
||||
" active for each device");
|
||||
|
||||
#define ZFS_VDEV_QUEUE_KNOB_MAX(name) \
|
||||
extern uint32_t zfs_vdev_ ## name ## _max_active; \
|
||||
SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _max_active, CTLFLAG_RWTUN, \
|
||||
&zfs_vdev_ ## name ## _max_active, 0, \
|
||||
"Maximum number of I/O requests of type " #name \
|
||||
" active for each device");
|
||||
|
||||
|
||||
#undef ZFS_VDEV_QUEUE_KNOB
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
extern uint32_t zfs_vdev_max_active;
|
||||
SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RWTUN,
|
||||
&zfs_vdev_max_active, 0,
|
||||
"The maximum number of I/Os of all types active for each device. (LEGACY)");
|
||||
&zfs_vdev_max_active, 0,
|
||||
"The maximum number of I/Os of all types active for each device."
|
||||
" (LEGACY)");
|
||||
|
||||
extern int zfs_vdev_def_queue_depth;
|
||||
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, def_queue_depth, CTLFLAG_RWTUN,
|
||||
&zfs_vdev_def_queue_depth, 0,
|
||||
"Default queue depth for each allocator");
|
||||
|
||||
/*extern uint64_t zfs_multihost_history;
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, multihost_history, CTLFLAG_RWTUN,
|
||||
&zfs_multihost_history, 0,
|
||||
"Historical staticists for the last N multihost updates");*/
|
||||
|
||||
#ifdef notyet
|
||||
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, trim_on_init, CTLFLAG_RW,
|
||||
&vdev_trim_on_init, 0, "Enable/disable full vdev trim on initialisation");
|
||||
#endif
|
||||
&zfs_vdev_def_queue_depth, 0,
|
||||
"Default queue depth for each allocator");
|
||||
|
||||
|
||||
/* zio.c */
|
||||
#if defined(__LP64__)
|
||||
int zio_use_uma = 1;
|
||||
#else
|
||||
int zio_use_uma = 0;
|
||||
#endif
|
||||
|
||||
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0,
|
||||
"Use uma(9) for ZIO allocations");
|
||||
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN, &zio_exclude_metadata, 0,
|
||||
"Exclude metadata buffers from dumps as well");
|
||||
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata, CTLFLAG_RDTUN,
|
||||
&zio_exclude_metadata, 0,
|
||||
"Exclude metadata buffers from dumps as well");
|
||||
/* END CSTYLED */
|
||||
|
||||
int
|
||||
param_set_slop_shift(SYSCTL_HANDLER_ARGS)
|
||||
|
@ -63,9 +63,9 @@ struct consumer_vdev_elem {
|
||||
};
|
||||
|
||||
SLIST_HEAD(consumer_priv_t, consumer_vdev_elem);
|
||||
/* BEGIN CSTYLED */
|
||||
_Static_assert(sizeof (((struct g_consumer *)NULL)->private)
|
||||
== sizeof (struct consumer_priv_t*),
|
||||
_Static_assert(
|
||||
sizeof (((struct g_consumer *)NULL)->private) ==
|
||||
sizeof (struct consumer_priv_t *),
|
||||
"consumer_priv_t* can't be stored in g_consumer.private");
|
||||
|
||||
DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev);
|
||||
@ -74,12 +74,11 @@ SYSCTL_DECL(_vfs_zfs_vdev);
|
||||
/* Don't send BIO_FLUSH. */
|
||||
static int vdev_geom_bio_flush_disable;
|
||||
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_flush_disable, CTLFLAG_RWTUN,
|
||||
&vdev_geom_bio_flush_disable, 0, "Disable BIO_FLUSH");
|
||||
&vdev_geom_bio_flush_disable, 0, "Disable BIO_FLUSH");
|
||||
/* Don't send BIO_DELETE. */
|
||||
static int vdev_geom_bio_delete_disable;
|
||||
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_delete_disable, CTLFLAG_RWTUN,
|
||||
&vdev_geom_bio_delete_disable, 0, "Disable BIO_DELETE");
|
||||
/* END CSTYLED */
|
||||
&vdev_geom_bio_delete_disable, 0, "Disable BIO_DELETE");
|
||||
|
||||
/* Declare local functions */
|
||||
static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read);
|
||||
|
@ -245,10 +245,8 @@ zfs_dbgmsg_print(const char *tag)
|
||||
}
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dbgmsg_enable, INT, ZMOD_RW,
|
||||
"Enable ZFS debug message log");
|
||||
"Enable ZFS debug message log");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dbgmsg_maxsize, INT, ZMOD_RW,
|
||||
"Maximum ZFS debug log size");
|
||||
/* END CSTYLED */
|
||||
"Maximum ZFS debug log size");
|
||||
|
@ -76,7 +76,6 @@
|
||||
#define MNTK_NOMSYNC 8
|
||||
#endif
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
struct mtx zfs_debug_mtx;
|
||||
MTX_SYSINIT(zfs_debug_mtx, &zfs_debug_mtx, "zfs_debug", MTX_DEF);
|
||||
|
||||
@ -84,7 +83,7 @@ SYSCTL_NODE(_vfs, OID_AUTO, zfs, CTLFLAG_RW, 0, "ZFS file system");
|
||||
|
||||
int zfs_super_owner;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, super_owner, CTLFLAG_RW, &zfs_super_owner, 0,
|
||||
"File system owner can perform privileged operation on his file systems");
|
||||
"File system owners can perform privileged operation on file systems");
|
||||
|
||||
int zfs_debug_level;
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, debug, CTLFLAG_RWTUN, &zfs_debug_level, 0,
|
||||
@ -93,14 +92,13 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, debug, CTLFLAG_RWTUN, &zfs_debug_level, 0,
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions");
|
||||
static int zfs_version_acl = ZFS_ACL_VERSION;
|
||||
SYSCTL_INT(_vfs_zfs_version, OID_AUTO, acl, CTLFLAG_RD, &zfs_version_acl, 0,
|
||||
"ZFS_ACL_VERSION");
|
||||
"ZFS_ACL_VERSION");
|
||||
static int zfs_version_spa = SPA_VERSION;
|
||||
SYSCTL_INT(_vfs_zfs_version, OID_AUTO, spa, CTLFLAG_RD, &zfs_version_spa, 0,
|
||||
"SPA_VERSION");
|
||||
"SPA_VERSION");
|
||||
static int zfs_version_zpl = ZPL_VERSION;
|
||||
SYSCTL_INT(_vfs_zfs_version, OID_AUTO, zpl, CTLFLAG_RD, &zfs_version_zpl, 0,
|
||||
"ZPL_VERSION");
|
||||
/* END CSTYLED */
|
||||
"ZPL_VERSION");
|
||||
|
||||
#if __FreeBSD_version >= 1400018
|
||||
static int zfs_quotactl(vfs_t *vfsp, int cmds, uid_t id, void *arg,
|
||||
|
@ -1821,9 +1821,8 @@ error:
|
||||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
/* BEGIN CSTYLED */
|
||||
/* CSTYLED */
|
||||
module_param(zfs_key_max_salt_uses, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_key_max_salt_uses, "Max number of times a salt value "
|
||||
"can be used for generating encryption keys before it is rotated");
|
||||
/* END CSTYLED */
|
||||
#endif
|
||||
|
@ -32,11 +32,10 @@
|
||||
* analysis and other such goodies.
|
||||
* But we would still default to the current default of not to do that.
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
unsigned int spl_panic_halt;
|
||||
/* CSTYLED */
|
||||
module_param(spl_panic_halt, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_panic_halt, "Cause kernel panic on assertion failures");
|
||||
/* END CSTYLED */
|
||||
|
||||
void
|
||||
spl_dumpstack(void)
|
||||
|
@ -48,13 +48,12 @@
|
||||
#include <sys/cred.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
unsigned long spl_hostid = 0;
|
||||
EXPORT_SYMBOL(spl_hostid);
|
||||
|
||||
/* CSTYLED */
|
||||
module_param(spl_hostid, ulong, 0644);
|
||||
MODULE_PARM_DESC(spl_hostid, "The system hostid.");
|
||||
/* END CSTYLED */
|
||||
|
||||
proc_t p0;
|
||||
EXPORT_SYMBOL(p0);
|
||||
@ -268,11 +267,10 @@ __udivdi3(uint64_t u, uint64_t v)
|
||||
}
|
||||
EXPORT_SYMBOL(__udivdi3);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
#ifndef abs64
|
||||
/* CSTYLED */
|
||||
#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; })
|
||||
#endif
|
||||
/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* Implementation of 64-bit signed division for 32-bit machines.
|
||||
@ -384,11 +382,9 @@ __aeabi_uldivmod(uint64_t u, uint64_t v)
|
||||
register uint32_t r2 asm("r2") = (mod & 0xFFFFFFFF);
|
||||
register uint32_t r3 asm("r3") = (mod >> 32);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
asm volatile(""
|
||||
: "+r"(r0), "+r"(r1), "+r"(r2),"+r"(r3) /* output */
|
||||
: "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */
|
||||
/* END CSTYLED */
|
||||
: "+r"(r0), "+r"(r1), "+r"(r2), "+r"(r3) /* output */
|
||||
: "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */
|
||||
|
||||
return; /* r0; */
|
||||
}
|
||||
@ -409,11 +405,9 @@ __aeabi_ldivmod(int64_t u, int64_t v)
|
||||
register uint32_t r2 asm("r2") = (mod & 0xFFFFFFFF);
|
||||
register uint32_t r3 asm("r3") = (mod >> 32);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
asm volatile(""
|
||||
: "+r"(r0), "+r"(r1), "+r"(r2),"+r"(r3) /* output */
|
||||
: "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */
|
||||
/* END CSTYLED */
|
||||
: "+r"(r0), "+r"(r1), "+r"(r2), "+r"(r3) /* output */
|
||||
: "r"(r0), "r"(r1), "r"(r2), "r"(r3)); /* input */
|
||||
|
||||
return; /* r0; */
|
||||
}
|
||||
|
@ -57,7 +57,6 @@
|
||||
#endif
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
|
||||
/*
|
||||
* Cache magazines are an optimization designed to minimize the cost of
|
||||
* allocating memory. They do this by keeping a per-cpu cache of recently
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/vmem.h>
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/*
|
||||
* As a general rule kmem_alloc() allocations should be small, preferably
|
||||
* just a few pages since they must by physically contiguous. Therefore, a
|
||||
@ -41,7 +42,6 @@
|
||||
* allocations are quickly caught. These warnings may be disabled by setting
|
||||
* the threshold to zero.
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
unsigned int spl_kmem_alloc_warn = MIN(16 * PAGE_SIZE, 64 * 1024);
|
||||
module_param(spl_kmem_alloc_warn, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_kmem_alloc_warn,
|
||||
|
@ -180,11 +180,10 @@ taskq_seq_show_headers(struct seq_file *f)
|
||||
#define LHEAD_ACTIVE 4
|
||||
#define LHEAD_SIZE 5
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
static unsigned int spl_max_show_tasks = 512;
|
||||
/* CSTYLED */
|
||||
module_param(spl_max_show_tasks, uint, 0644);
|
||||
MODULE_PARM_DESC(spl_max_show_tasks, "Max number of tasks shown in taskq proc");
|
||||
/* END CSTYLED */
|
||||
|
||||
static int
|
||||
taskq_seq_show_impl(struct seq_file *f, void *p, boolean_t allflag)
|
||||
|
@ -536,7 +536,5 @@ arc_prune_async(int64_t adjust)
|
||||
mutex_exit(&arc_prune_mtx);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, shrinker_limit, INT, ZMOD_RW,
|
||||
"Limit on number of pages that ARC shrinker can reclaim at once");
|
||||
/* END CSTYLED */
|
||||
|
@ -3995,9 +3995,8 @@ EXPORT_SYMBOL(zfs_putpage);
|
||||
EXPORT_SYMBOL(zfs_dirty_inode);
|
||||
EXPORT_SYMBOL(zfs_map);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/* CSTYLED */
|
||||
module_param(zfs_delete_blocks, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_delete_blocks, "Delete files larger than N blocks async");
|
||||
/* END CSTYLED */
|
||||
|
||||
#endif
|
||||
|
@ -2051,9 +2051,8 @@ error:
|
||||
}
|
||||
|
||||
#if defined(_KERNEL)
|
||||
/* BEGIN CSTYLED */
|
||||
/* CSTYLED */
|
||||
module_param(zfs_key_max_salt_uses, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_key_max_salt_uses, "Max number of times a salt value "
|
||||
"can be used for generating encryption keys before it is rotated");
|
||||
/* END CSTYLED */
|
||||
#endif
|
||||
|
@ -1100,8 +1100,7 @@ const struct file_operations zpl_dir_file_operations = {
|
||||
#endif
|
||||
};
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/* CSTYLED */
|
||||
module_param(zfs_fallocate_reserve_percent, uint, 0644);
|
||||
MODULE_PARM_DESC(zfs_fallocate_reserve_percent,
|
||||
"Percentage of length to use for the available capacity check");
|
||||
/* END CSTYLED */
|
||||
"Percentage of length to use for the available capacity check");
|
||||
|
@ -968,11 +968,9 @@ fletcher_4_param(ZFS_MODULE_PARAM_ARGS)
|
||||
* Users can choose "cycle" to exercise all implementations, but this is
|
||||
* for testing purpose therefore it can only be set in user space.
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_VIRTUAL_PARAM_CALL(zfs, zfs_, fletcher_4_impl,
|
||||
fletcher_4_param_set, fletcher_4_param_get, ZMOD_RW,
|
||||
fletcher_4_param_set, fletcher_4_param_get, ZMOD_RW,
|
||||
"Select fletcher 4 implementation.");
|
||||
/* END CSTYLED */
|
||||
|
||||
EXPORT_SYMBOL(fletcher_init);
|
||||
EXPORT_SYMBOL(fletcher_2_incremental_native);
|
||||
|
@ -11043,7 +11043,6 @@ EXPORT_SYMBOL(arc_getbuf_func);
|
||||
EXPORT_SYMBOL(arc_add_prune_callback);
|
||||
EXPORT_SYMBOL(arc_remove_prune_callback);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, min, param_set_arc_min,
|
||||
param_get_long, ZMOD_RW, "Min arc size");
|
||||
|
||||
@ -11054,7 +11053,7 @@ ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, meta_limit, param_set_arc_long,
|
||||
param_get_long, ZMOD_RW, "Metadata limit for arc size");
|
||||
|
||||
ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, meta_limit_percent,
|
||||
param_set_arc_long, param_get_long, ZMOD_RW,
|
||||
param_set_arc_long, param_get_long, ZMOD_RW,
|
||||
"Percent of arc size for arc meta limit");
|
||||
|
||||
ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, meta_min, param_set_arc_long,
|
||||
@ -11094,7 +11093,7 @@ ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, min_prefetch_ms, param_set_arc_int,
|
||||
param_get_int, ZMOD_RW, "Min life of prefetch block in ms");
|
||||
|
||||
ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, min_prescient_prefetch_ms,
|
||||
param_set_arc_int, param_get_int, ZMOD_RW,
|
||||
param_set_arc_int, param_get_int, ZMOD_RW,
|
||||
"Min life of prescient prefetched block in ms");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, write_max, ULONG, ZMOD_RW,
|
||||
@ -11140,8 +11139,7 @@ ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, mfuonly, INT, ZMOD_RW,
|
||||
"Cache only MFU data from ARC into L2ARC");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, exclude_special, INT, ZMOD_RW,
|
||||
"If set to 1 exclude dbufs on special vdevs from being cached to "
|
||||
"L2ARC.");
|
||||
"Exclude dbufs on special vdevs from being cached to L2ARC if set.");
|
||||
|
||||
ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, lotsfree_percent, param_set_arc_int,
|
||||
param_get_int, ZMOD_RW, "System free memory I/O throttle in bytes");
|
||||
@ -11153,7 +11151,7 @@ ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, dnode_limit, param_set_arc_long,
|
||||
param_get_long, ZMOD_RW, "Minimum bytes of dnodes in arc");
|
||||
|
||||
ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, dnode_limit_percent,
|
||||
param_set_arc_long, param_get_long, ZMOD_RW,
|
||||
param_set_arc_long, param_get_long, ZMOD_RW,
|
||||
"Percent of ARC meta buffers for dnodes");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, dnode_reduce_percent, ULONG, ZMOD_RW,
|
||||
@ -11167,4 +11165,3 @@ ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, evict_batch_limit, INT, ZMOD_RW,
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_arc, zfs_arc_, prune_task_threads, INT, ZMOD_RW,
|
||||
"Number of arc_prune threads");
|
||||
/* END CSTYLED */
|
||||
|
@ -822,7 +822,7 @@ dbuf_evict_thread(void *unused)
|
||||
/*
|
||||
* Wake up the dbuf eviction thread if the dbuf cache is at its max size.
|
||||
* If the dbuf cache is at its high water mark, then evict a dbuf from the
|
||||
* dbuf cache using the callers context.
|
||||
* dbuf cache using the caller's context.
|
||||
*/
|
||||
static void
|
||||
dbuf_evict_notify(uint64_t size)
|
||||
@ -5096,25 +5096,20 @@ EXPORT_SYMBOL(dmu_buf_set_user_ie);
|
||||
EXPORT_SYMBOL(dmu_buf_get_user);
|
||||
EXPORT_SYMBOL(dmu_buf_get_blkptr);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_dbuf_cache, dbuf_cache_, max_bytes, ULONG, ZMOD_RW,
|
||||
"Maximum size in bytes of the dbuf cache.");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_dbuf_cache, dbuf_cache_, hiwater_pct, UINT, ZMOD_RW,
|
||||
"Percentage over dbuf_cache_max_bytes when dbufs must be evicted "
|
||||
"directly.");
|
||||
"Percentage over dbuf_cache_max_bytes for direct dbuf eviction.");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_dbuf_cache, dbuf_cache_, lowater_pct, UINT, ZMOD_RW,
|
||||
"Percentage below dbuf_cache_max_bytes when the evict thread stops "
|
||||
"evicting dbufs.");
|
||||
"Percentage below dbuf_cache_max_bytes when dbuf eviction stops.");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_dbuf, dbuf_, metadata_cache_max_bytes, ULONG, ZMOD_RW,
|
||||
"Maximum size in bytes of the dbuf metadata cache.");
|
||||
"Maximum size in bytes of dbuf metadata cache.");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_dbuf, dbuf_, cache_shift, INT, ZMOD_RW,
|
||||
"Set the size of the dbuf cache to a log2 fraction of arc size.");
|
||||
"Set size of dbuf cache to log2 fraction of arc size.");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_dbuf, dbuf_, metadata_cache_shift, INT, ZMOD_RW,
|
||||
"Set the size of the dbuf metadata cache to a log2 fraction of arc "
|
||||
"size.");
|
||||
/* END CSTYLED */
|
||||
"Set size of dbuf metadata cache to log2 fraction of arc size.");
|
||||
|
@ -226,7 +226,5 @@ dbuf_stats_destroy(void)
|
||||
dbuf_stats_hash_table_destroy();
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dbuf_state_index, INT, ZMOD_RW,
|
||||
"Calculate arc header index");
|
||||
/* END CSTYLED */
|
||||
|
@ -1180,7 +1180,5 @@ ddt_walk(spa_t *spa, ddt_bookmark_t *ddb, ddt_entry_t *dde)
|
||||
return (SET_ERROR(ENOENT));
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_dedup, zfs_dedup_, prefetch, INT, ZMOD_RW,
|
||||
"Enable prefetching dedup-ed blks");
|
||||
/* END CSTYLED */
|
||||
|
@ -2346,7 +2346,6 @@ EXPORT_SYMBOL(dmu_assign_arcbuf_by_dbuf);
|
||||
EXPORT_SYMBOL(dmu_buf_hold);
|
||||
EXPORT_SYMBOL(dmu_ot);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, nopwrite_enabled, INT, ZMOD_RW,
|
||||
"Enable NOP writes");
|
||||
|
||||
@ -2356,6 +2355,6 @@ ZFS_MODULE_PARAM(zfs, zfs_, per_txg_dirty_frees_percent, ULONG, ZMOD_RW,
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dmu_offset_next_sync, INT, ZMOD_RW,
|
||||
"Enable forcing txg sync to find holes");
|
||||
|
||||
/* CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs, , dmu_prefetch_max, INT, ZMOD_RW,
|
||||
"Limit one prefetch call to this size");
|
||||
/* END CSTYLED */
|
||||
|
@ -3389,7 +3389,6 @@ dmu_objset_is_receiving(objset_t *os)
|
||||
os->os_dsl_dataset->ds_owner == dmu_recv_tag);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_recv, zfs_recv_, queue_length, INT, ZMOD_RW,
|
||||
"Maximum receive queue length");
|
||||
|
||||
@ -3398,4 +3397,3 @@ ZFS_MODULE_PARAM(zfs_recv, zfs_recv_, queue_ff, INT, ZMOD_RW,
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_recv, zfs_recv_, write_batch_size, INT, ZMOD_RW,
|
||||
"Maximum amount of writes to batch into one transaction");
|
||||
/* END CSTYLED */
|
||||
|
@ -3084,7 +3084,6 @@ out:
|
||||
return (err);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_send, zfs_send_, corrupt_data, INT, ZMOD_RW,
|
||||
"Allow sending corrupt data");
|
||||
|
||||
@ -3105,4 +3104,3 @@ ZFS_MODULE_PARAM(zfs_send, zfs_send_, no_prefetch_queue_ff, INT, ZMOD_RW,
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_send, zfs_, override_estimate_recordsize, INT, ZMOD_RW,
|
||||
"Override block size estimate with fixed size");
|
||||
/* END CSTYLED */
|
||||
|
@ -809,7 +809,6 @@ traverse_pool(spa_t *spa, uint64_t txg_start, int flags,
|
||||
EXPORT_SYMBOL(traverse_dataset);
|
||||
EXPORT_SYMBOL(traverse_pool);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, pd_bytes_max, INT, ZMOD_RW,
|
||||
"Max number of bytes to prefetch");
|
||||
|
||||
@ -822,6 +821,6 @@ MODULE_PARM_DESC(ignore_hole_birth,
|
||||
"Alias for send_holes_without_birth_time");
|
||||
#endif
|
||||
|
||||
/* CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs, , send_holes_without_birth_time, INT, ZMOD_RW,
|
||||
"Ignore hole_birth txg for zfs send");
|
||||
/* END CSTYLED */
|
||||
|
@ -531,7 +531,6 @@ dmu_zfetch(zfetch_t *zf, uint64_t blkid, uint64_t nblks, boolean_t fetch_data,
|
||||
dmu_zfetch_run(zs, missed, have_lock);
|
||||
}
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
ZFS_MODULE_PARAM(zfs_prefetch, zfs_prefetch_, disable, INT, ZMOD_RW,
|
||||
"Disable all ZFS prefetching");
|
||||
|
||||
@ -549,4 +548,3 @@ ZFS_MODULE_PARAM(zfs_prefetch, zfetch_, max_idistance, UINT, ZMOD_RW,
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_prefetch, zfetch_, array_rd_sz, ULONG, ZMOD_RW,
|
||||
"Number of bytes in a array_read");
|
||||
/* END CSTYLED */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user