ctree.h (1a9a8a71ed1d457d4f03284ebfd3e40fe1e217ac) | ctree.h (c0d19e2b9a521bbdc33049ad92c94b517afda1f0) |
---|---|
1/* 2 * Copyright (C) 2007 Oracle. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 4036 unchanged lines hidden (view full) --- 4045 btrfs_printk(fs_info, KERN_DEBUG fmt, ##args) 4046#else 4047#define btrfs_debug(fs_info, fmt, args...) \ 4048 no_printk(KERN_DEBUG fmt, ##args) 4049#endif 4050 4051#ifdef CONFIG_BTRFS_ASSERT 4052 | 1/* 2 * Copyright (C) 2007 Oracle. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 4036 unchanged lines hidden (view full) --- 4045 btrfs_printk(fs_info, KERN_DEBUG fmt, ##args) 4046#else 4047#define btrfs_debug(fs_info, fmt, args...) \ 4048 no_printk(KERN_DEBUG fmt, ##args) 4049#endif 4050 4051#ifdef CONFIG_BTRFS_ASSERT 4052 |
4053__cold |
|
4053static inline void assfail(char *expr, char *file, int line) 4054{ 4055 pr_err("BTRFS: assertion failed: %s, file: %s, line: %d", 4056 expr, file, line); 4057 BUG(); 4058} 4059 4060#define ASSERT(expr) \ 4061 (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 4062#else 4063#define ASSERT(expr) ((void)0) 4064#endif 4065 4066#define btrfs_assert() 4067__printf(5, 6) | 4054static inline void assfail(char *expr, char *file, int line) 4055{ 4056 pr_err("BTRFS: assertion failed: %s, file: %s, line: %d", 4057 expr, file, line); 4058 BUG(); 4059} 4060 4061#define ASSERT(expr) \ 4062 (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 4063#else 4064#define ASSERT(expr) ((void)0) 4065#endif 4066 4067#define btrfs_assert() 4068__printf(5, 6) |
4069__cold |
|
4068void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, 4069 unsigned int line, int errno, const char *fmt, ...); 4070 4071 | 4070void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, 4071 unsigned int line, int errno, const char *fmt, ...); 4072 4073 |
4074__cold |
|
4072void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, 4073 struct btrfs_root *root, const char *function, 4074 unsigned int line, int errno); 4075 4076#define btrfs_set_fs_incompat(__fs_info, opt) \ 4077 __btrfs_set_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt) 4078 4079static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, --- 53 unchanged lines hidden (view full) --- 4133 4134#define btrfs_error(fs_info, errno, fmt, args...) \ 4135do { \ 4136 __btrfs_std_error((fs_info), __func__, __LINE__, \ 4137 (errno), fmt, ##args); \ 4138} while (0) 4139 4140__printf(5, 6) | 4075void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, 4076 struct btrfs_root *root, const char *function, 4077 unsigned int line, int errno); 4078 4079#define btrfs_set_fs_incompat(__fs_info, opt) \ 4080 __btrfs_set_fs_incompat((__fs_info), BTRFS_FEATURE_INCOMPAT_##opt) 4081 4082static inline void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, --- 53 unchanged lines hidden (view full) --- 4136 4137#define btrfs_error(fs_info, errno, fmt, args...) \ 4138do { \ 4139 __btrfs_std_error((fs_info), __func__, __LINE__, \ 4140 (errno), fmt, ##args); \ 4141} while (0) 4142 4143__printf(5, 6) |
4144__cold |
|
4141void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function, 4142 unsigned int line, int errno, const char *fmt, ...); 4143 4144/* 4145 * If BTRFS_MOUNT_PANIC_ON_FATAL_ERROR is in mount_opt, __btrfs_panic 4146 * will panic(). Otherwise we BUG() here. 4147 */ 4148#define btrfs_panic(fs_info, errno, fmt, args...) \ --- 105 unchanged lines hidden --- | 4145void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function, 4146 unsigned int line, int errno, const char *fmt, ...); 4147 4148/* 4149 * If BTRFS_MOUNT_PANIC_ON_FATAL_ERROR is in mount_opt, __btrfs_panic 4150 * will panic(). Otherwise we BUG() here. 4151 */ 4152#define btrfs_panic(fs_info, errno, fmt, args...) \ --- 105 unchanged lines hidden --- |