Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM ext4 |
| 4 | |
Li Zefan | d0b6e04 | 2009-07-13 10:33:21 +0800 | [diff] [blame] | 5 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define _TRACE_EXT4_H |
| 7 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 8 | #include <linux/writeback.h> |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 9 | #include <linux/tracepoint.h> |
| 10 | |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 11 | struct ext4_allocation_context; |
| 12 | struct ext4_allocation_request; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 13 | struct ext4_extent; |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 14 | struct ext4_prealloc_space; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 15 | struct ext4_inode_info; |
Josh Stone | 0ef1224 | 2009-09-30 00:51:22 -0400 | [diff] [blame] | 16 | struct mpage_da_data; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 17 | struct ext4_map_blocks; |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 18 | struct extent_status; |
Darrick J. Wong | 0c9ec4b | 2017-04-30 00:36:53 -0400 | [diff] [blame] | 19 | struct ext4_fsmap; |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 20 | struct partial_cluster; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 21 | |
| 22 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 23 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 24 | #define show_mballoc_flags(flags) __print_flags(flags, "|", \ |
| 25 | { EXT4_MB_HINT_MERGE, "HINT_MERGE" }, \ |
| 26 | { EXT4_MB_HINT_RESERVED, "HINT_RESV" }, \ |
| 27 | { EXT4_MB_HINT_METADATA, "HINT_MDATA" }, \ |
| 28 | { EXT4_MB_HINT_FIRST, "HINT_FIRST" }, \ |
| 29 | { EXT4_MB_HINT_BEST, "HINT_BEST" }, \ |
| 30 | { EXT4_MB_HINT_DATA, "HINT_DATA" }, \ |
| 31 | { EXT4_MB_HINT_NOPREALLOC, "HINT_NOPREALLOC" }, \ |
| 32 | { EXT4_MB_HINT_GROUP_ALLOC, "HINT_GRP_ALLOC" }, \ |
| 33 | { EXT4_MB_HINT_GOAL_ONLY, "HINT_GOAL_ONLY" }, \ |
| 34 | { EXT4_MB_HINT_TRY_GOAL, "HINT_TRY_GOAL" }, \ |
| 35 | { EXT4_MB_DELALLOC_RESERVED, "DELALLOC_RESV" }, \ |
| 36 | { EXT4_MB_STREAM_ALLOC, "STREAM_ALLOC" }, \ |
| 37 | { EXT4_MB_USE_ROOT_BLOCKS, "USE_ROOT_BLKS" }, \ |
| 38 | { EXT4_MB_USE_RESERVED, "USE_RESV" }) |
| 39 | |
| 40 | #define show_map_flags(flags) __print_flags(flags, "|", \ |
| 41 | { EXT4_GET_BLOCKS_CREATE, "CREATE" }, \ |
Lukas Czerner | 556615d | 2014-04-20 23:45:47 -0400 | [diff] [blame] | 42 | { EXT4_GET_BLOCKS_UNWRIT_EXT, "UNWRIT" }, \ |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 43 | { EXT4_GET_BLOCKS_DELALLOC_RESERVE, "DELALLOC" }, \ |
| 44 | { EXT4_GET_BLOCKS_PRE_IO, "PRE_IO" }, \ |
| 45 | { EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \ |
| 46 | { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \ |
| 47 | { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \ |
Jan Kara | c86d8db | 2015-12-07 15:10:26 -0500 | [diff] [blame] | 48 | { EXT4_GET_BLOCKS_ZERO, "ZERO" }) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 49 | |
Dmitry Monakhov | 459c807 | 2019-11-14 20:01:46 +0000 | [diff] [blame] | 50 | /* |
| 51 | * __print_flags() requires that all enum values be wrapped in the |
| 52 | * TRACE_DEFINE_ENUM macro so that the enum value can be encoded in the ftrace |
| 53 | * ring buffer. |
| 54 | */ |
| 55 | TRACE_DEFINE_ENUM(BH_New); |
| 56 | TRACE_DEFINE_ENUM(BH_Mapped); |
| 57 | TRACE_DEFINE_ENUM(BH_Unwritten); |
| 58 | TRACE_DEFINE_ENUM(BH_Boundary); |
| 59 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 60 | #define show_mflags(flags) __print_flags(flags, "", \ |
| 61 | { EXT4_MAP_NEW, "N" }, \ |
| 62 | { EXT4_MAP_MAPPED, "M" }, \ |
| 63 | { EXT4_MAP_UNWRITTEN, "U" }, \ |
Jan Kara | cbd7584 | 2014-11-25 11:41:49 -0500 | [diff] [blame] | 64 | { EXT4_MAP_BOUNDARY, "B" }) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 65 | |
| 66 | #define show_free_flags(flags) __print_flags(flags, "|", \ |
| 67 | { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \ |
| 68 | { EXT4_FREE_BLOCKS_FORGET, "FORGET" }, \ |
| 69 | { EXT4_FREE_BLOCKS_VALIDATED, "VALIDATED" }, \ |
| 70 | { EXT4_FREE_BLOCKS_NO_QUOT_UPDATE, "NO_QUOTA" }, \ |
| 71 | { EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER,"1ST_CLUSTER" },\ |
| 72 | { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" }) |
| 73 | |
Dmitry Monakhov | 459c807 | 2019-11-14 20:01:46 +0000 | [diff] [blame] | 74 | TRACE_DEFINE_ENUM(ES_WRITTEN_B); |
| 75 | TRACE_DEFINE_ENUM(ES_UNWRITTEN_B); |
| 76 | TRACE_DEFINE_ENUM(ES_DELAYED_B); |
| 77 | TRACE_DEFINE_ENUM(ES_HOLE_B); |
| 78 | TRACE_DEFINE_ENUM(ES_REFERENCED_B); |
| 79 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 80 | #define show_extent_status(status) __print_flags(status, "", \ |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 81 | { EXTENT_STATUS_WRITTEN, "W" }, \ |
| 82 | { EXTENT_STATUS_UNWRITTEN, "U" }, \ |
| 83 | { EXTENT_STATUS_DELAYED, "D" }, \ |
Dmitry Monakhov | 459c807 | 2019-11-14 20:01:46 +0000 | [diff] [blame] | 84 | { EXTENT_STATUS_HOLE, "H" }, \ |
| 85 | { EXTENT_STATUS_REFERENCED, "R" }) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 86 | |
Lukas Czerner | a633f5a | 2014-02-22 06:18:17 -0500 | [diff] [blame] | 87 | #define show_falloc_mode(mode) __print_flags(mode, "|", \ |
| 88 | { FALLOC_FL_KEEP_SIZE, "KEEP_SIZE"}, \ |
| 89 | { FALLOC_FL_PUNCH_HOLE, "PUNCH_HOLE"}, \ |
Namjae Jeon | 9eb7948 | 2014-02-23 15:18:59 -0500 | [diff] [blame] | 90 | { FALLOC_FL_NO_HIDE_STALE, "NO_HIDE_STALE"}, \ |
Lukas Czerner | b8a8684 | 2014-03-18 18:05:35 -0400 | [diff] [blame] | 91 | { FALLOC_FL_COLLAPSE_RANGE, "COLLAPSE_RANGE"}, \ |
| 92 | { FALLOC_FL_ZERO_RANGE, "ZERO_RANGE"}) |
Lukas Czerner | a633f5a | 2014-02-22 06:18:17 -0500 | [diff] [blame] | 93 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 94 | |
Theodore Ts'o | a26f499 | 2015-02-02 00:37:02 -0500 | [diff] [blame] | 95 | TRACE_EVENT(ext4_other_inode_update_time, |
| 96 | TP_PROTO(struct inode *inode, ino_t orig_ino), |
| 97 | |
| 98 | TP_ARGS(inode, orig_ino), |
| 99 | |
| 100 | TP_STRUCT__entry( |
| 101 | __field( dev_t, dev ) |
| 102 | __field( ino_t, ino ) |
| 103 | __field( ino_t, orig_ino ) |
| 104 | __field( uid_t, uid ) |
| 105 | __field( gid_t, gid ) |
| 106 | __field( __u16, mode ) |
| 107 | ), |
| 108 | |
| 109 | TP_fast_assign( |
| 110 | __entry->orig_ino = orig_ino; |
| 111 | __entry->dev = inode->i_sb->s_dev; |
| 112 | __entry->ino = inode->i_ino; |
| 113 | __entry->uid = i_uid_read(inode); |
| 114 | __entry->gid = i_gid_read(inode); |
| 115 | __entry->mode = inode->i_mode; |
| 116 | ), |
| 117 | |
| 118 | TP_printk("dev %d,%d orig_ino %lu ino %lu mode 0%o uid %u gid %u", |
| 119 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 120 | (unsigned long) __entry->orig_ino, |
| 121 | (unsigned long) __entry->ino, __entry->mode, |
| 122 | __entry->uid, __entry->gid) |
| 123 | ); |
| 124 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 125 | TRACE_EVENT(ext4_free_inode, |
| 126 | TP_PROTO(struct inode *inode), |
| 127 | |
| 128 | TP_ARGS(inode), |
| 129 | |
| 130 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 131 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 132 | __field( ino_t, ino ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 133 | __field( uid_t, uid ) |
| 134 | __field( gid_t, gid ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 135 | __field( __u64, blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 136 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 137 | ), |
| 138 | |
| 139 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 140 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 141 | __entry->ino = inode->i_ino; |
Eric W. Biederman | 08cefc7 | 2012-02-07 15:41:49 -0800 | [diff] [blame] | 142 | __entry->uid = i_uid_read(inode); |
| 143 | __entry->gid = i_gid_read(inode); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 144 | __entry->blocks = inode->i_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 145 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 146 | ), |
| 147 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 148 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 149 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 150 | (unsigned long) __entry->ino, __entry->mode, |
| 151 | __entry->uid, __entry->gid, __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 152 | ); |
| 153 | |
| 154 | TRACE_EVENT(ext4_request_inode, |
| 155 | TP_PROTO(struct inode *dir, int mode), |
| 156 | |
| 157 | TP_ARGS(dir, mode), |
| 158 | |
| 159 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 160 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 161 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 162 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 163 | ), |
| 164 | |
| 165 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 166 | __entry->dev = dir->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 167 | __entry->dir = dir->i_ino; |
| 168 | __entry->mode = mode; |
| 169 | ), |
| 170 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 171 | TP_printk("dev %d,%d dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 172 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 173 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 174 | ); |
| 175 | |
| 176 | TRACE_EVENT(ext4_allocate_inode, |
| 177 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 178 | |
| 179 | TP_ARGS(inode, dir, mode), |
| 180 | |
| 181 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 182 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 183 | __field( ino_t, ino ) |
| 184 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 185 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 186 | ), |
| 187 | |
| 188 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 189 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 190 | __entry->ino = inode->i_ino; |
| 191 | __entry->dir = dir->i_ino; |
| 192 | __entry->mode = mode; |
| 193 | ), |
| 194 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 195 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 196 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 197 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 198 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 199 | ); |
| 200 | |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 201 | TRACE_EVENT(ext4_evict_inode, |
| 202 | TP_PROTO(struct inode *inode), |
| 203 | |
| 204 | TP_ARGS(inode), |
| 205 | |
| 206 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 207 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 208 | __field( ino_t, ino ) |
| 209 | __field( int, nlink ) |
| 210 | ), |
| 211 | |
| 212 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 213 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 214 | __entry->ino = inode->i_ino; |
| 215 | __entry->nlink = inode->i_nlink; |
| 216 | ), |
| 217 | |
| 218 | TP_printk("dev %d,%d ino %lu nlink %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 219 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 220 | (unsigned long) __entry->ino, __entry->nlink) |
| 221 | ); |
| 222 | |
| 223 | TRACE_EVENT(ext4_drop_inode, |
| 224 | TP_PROTO(struct inode *inode, int drop), |
| 225 | |
| 226 | TP_ARGS(inode, drop), |
| 227 | |
| 228 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 229 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 230 | __field( ino_t, ino ) |
| 231 | __field( int, drop ) |
| 232 | ), |
| 233 | |
| 234 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 235 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 236 | __entry->ino = inode->i_ino; |
| 237 | __entry->drop = drop; |
| 238 | ), |
| 239 | |
| 240 | TP_printk("dev %d,%d ino %lu drop %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 241 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 242 | (unsigned long) __entry->ino, __entry->drop) |
| 243 | ); |
| 244 | |
Theodore Ts'o | fde8726 | 2018-12-19 14:07:58 -0500 | [diff] [blame] | 245 | TRACE_EVENT(ext4_nfs_commit_metadata, |
| 246 | TP_PROTO(struct inode *inode), |
| 247 | |
| 248 | TP_ARGS(inode), |
| 249 | |
| 250 | TP_STRUCT__entry( |
| 251 | __field( dev_t, dev ) |
| 252 | __field( ino_t, ino ) |
| 253 | ), |
| 254 | |
| 255 | TP_fast_assign( |
| 256 | __entry->dev = inode->i_sb->s_dev; |
| 257 | __entry->ino = inode->i_ino; |
| 258 | ), |
| 259 | |
| 260 | TP_printk("dev %d,%d ino %lu", |
| 261 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 262 | (unsigned long) __entry->ino) |
| 263 | ); |
| 264 | |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 265 | TRACE_EVENT(ext4_mark_inode_dirty, |
| 266 | TP_PROTO(struct inode *inode, unsigned long IP), |
| 267 | |
| 268 | TP_ARGS(inode, IP), |
| 269 | |
| 270 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 271 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 272 | __field( ino_t, ino ) |
| 273 | __field(unsigned long, ip ) |
| 274 | ), |
| 275 | |
| 276 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 277 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 278 | __entry->ino = inode->i_ino; |
| 279 | __entry->ip = IP; |
| 280 | ), |
| 281 | |
Scott Wood | bbedb17 | 2015-03-11 22:13:57 -0500 | [diff] [blame] | 282 | TP_printk("dev %d,%d ino %lu caller %pS", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 283 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 284 | (unsigned long) __entry->ino, (void *)__entry->ip) |
| 285 | ); |
| 286 | |
| 287 | TRACE_EVENT(ext4_begin_ordered_truncate, |
| 288 | TP_PROTO(struct inode *inode, loff_t new_size), |
| 289 | |
| 290 | TP_ARGS(inode, new_size), |
| 291 | |
| 292 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 293 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 294 | __field( ino_t, ino ) |
| 295 | __field( loff_t, new_size ) |
| 296 | ), |
| 297 | |
| 298 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 299 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 300 | __entry->ino = inode->i_ino; |
| 301 | __entry->new_size = new_size; |
| 302 | ), |
| 303 | |
| 304 | TP_printk("dev %d,%d ino %lu new_size %lld", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 305 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 306 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 307 | __entry->new_size) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 308 | ); |
| 309 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 310 | DECLARE_EVENT_CLASS(ext4__write_begin, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 311 | |
| 312 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 313 | unsigned int flags), |
| 314 | |
| 315 | TP_ARGS(inode, pos, len, flags), |
| 316 | |
| 317 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 318 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 319 | __field( ino_t, ino ) |
| 320 | __field( loff_t, pos ) |
| 321 | __field( unsigned int, len ) |
| 322 | __field( unsigned int, flags ) |
| 323 | ), |
| 324 | |
| 325 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 326 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 327 | __entry->ino = inode->i_ino; |
| 328 | __entry->pos = pos; |
| 329 | __entry->len = len; |
| 330 | __entry->flags = flags; |
| 331 | ), |
| 332 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 333 | TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 334 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 335 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 336 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 337 | ); |
| 338 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 339 | DEFINE_EVENT(ext4__write_begin, ext4_write_begin, |
| 340 | |
| 341 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 342 | unsigned int flags), |
| 343 | |
| 344 | TP_ARGS(inode, pos, len, flags) |
| 345 | ); |
| 346 | |
| 347 | DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, |
| 348 | |
| 349 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 350 | unsigned int flags), |
| 351 | |
| 352 | TP_ARGS(inode, pos, len, flags) |
| 353 | ); |
| 354 | |
| 355 | DECLARE_EVENT_CLASS(ext4__write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 356 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 357 | unsigned int copied), |
| 358 | |
| 359 | TP_ARGS(inode, pos, len, copied), |
| 360 | |
| 361 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 362 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 363 | __field( ino_t, ino ) |
| 364 | __field( loff_t, pos ) |
| 365 | __field( unsigned int, len ) |
| 366 | __field( unsigned int, copied ) |
| 367 | ), |
| 368 | |
| 369 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 370 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 371 | __entry->ino = inode->i_ino; |
| 372 | __entry->pos = pos; |
| 373 | __entry->len = len; |
| 374 | __entry->copied = copied; |
| 375 | ), |
| 376 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 377 | TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 378 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 379 | (unsigned long) __entry->ino, |
| 380 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 381 | ); |
| 382 | |
Theodore Ts'o | 74d553a | 2013-04-03 12:39:17 -0400 | [diff] [blame] | 383 | DEFINE_EVENT(ext4__write_end, ext4_write_end, |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 384 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 385 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 386 | unsigned int copied), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 387 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 388 | TP_ARGS(inode, pos, len, copied) |
| 389 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 390 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 391 | DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 392 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 393 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 394 | unsigned int copied), |
| 395 | |
| 396 | TP_ARGS(inode, pos, len, copied) |
| 397 | ); |
| 398 | |
| 399 | DEFINE_EVENT(ext4__write_end, ext4_da_write_end, |
| 400 | |
| 401 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 402 | unsigned int copied), |
| 403 | |
| 404 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 405 | ); |
| 406 | |
Theodore Ts'o | 20970ba | 2013-06-06 14:00:46 -0400 | [diff] [blame] | 407 | TRACE_EVENT(ext4_writepages, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 408 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 409 | |
| 410 | TP_ARGS(inode, wbc), |
| 411 | |
| 412 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 413 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 414 | __field( ino_t, ino ) |
| 415 | __field( long, nr_to_write ) |
| 416 | __field( long, pages_skipped ) |
| 417 | __field( loff_t, range_start ) |
| 418 | __field( loff_t, range_end ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 419 | __field( pgoff_t, writeback_index ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 420 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 421 | __field( char, for_kupdate ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 422 | __field( char, range_cyclic ) |
| 423 | ), |
| 424 | |
| 425 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 426 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 427 | __entry->ino = inode->i_ino; |
| 428 | __entry->nr_to_write = wbc->nr_to_write; |
| 429 | __entry->pages_skipped = wbc->pages_skipped; |
| 430 | __entry->range_start = wbc->range_start; |
| 431 | __entry->range_end = wbc->range_end; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 432 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 433 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 434 | __entry->for_kupdate = wbc->for_kupdate; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 435 | __entry->range_cyclic = wbc->range_cyclic; |
| 436 | ), |
| 437 | |
Theodore Ts'o | a107e5a | 2010-10-27 23:44:47 -0400 | [diff] [blame] | 438 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " |
Anatol Pomozov | 8137029 | 2012-08-17 09:52:17 -0400 | [diff] [blame] | 439 | "range_start %lld range_end %lld sync_mode %d " |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 440 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
| 441 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 442 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 443 | __entry->pages_skipped, __entry->range_start, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 444 | __entry->range_end, __entry->sync_mode, |
| 445 | __entry->for_kupdate, __entry->range_cyclic, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 446 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 447 | ); |
| 448 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 449 | TRACE_EVENT(ext4_da_write_pages, |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 450 | TP_PROTO(struct inode *inode, pgoff_t first_page, |
| 451 | struct writeback_control *wbc), |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 452 | |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 453 | TP_ARGS(inode, first_page, wbc), |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 454 | |
| 455 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 456 | __field( dev_t, dev ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 457 | __field( ino_t, ino ) |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 458 | __field( pgoff_t, first_page ) |
| 459 | __field( long, nr_to_write ) |
| 460 | __field( int, sync_mode ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 461 | ), |
| 462 | |
| 463 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 464 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 465 | __entry->ino = inode->i_ino; |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 466 | __entry->first_page = first_page; |
| 467 | __entry->nr_to_write = wbc->nr_to_write; |
| 468 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 469 | ), |
| 470 | |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 471 | TP_printk("dev %d,%d ino %lu first_page %lu nr_to_write %ld " |
| 472 | "sync_mode %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 473 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 474 | (unsigned long) __entry->ino, __entry->first_page, |
| 475 | __entry->nr_to_write, __entry->sync_mode) |
| 476 | ); |
| 477 | |
| 478 | TRACE_EVENT(ext4_da_write_pages_extent, |
| 479 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map), |
| 480 | |
| 481 | TP_ARGS(inode, map), |
| 482 | |
| 483 | TP_STRUCT__entry( |
| 484 | __field( dev_t, dev ) |
| 485 | __field( ino_t, ino ) |
| 486 | __field( __u64, lblk ) |
| 487 | __field( __u32, len ) |
| 488 | __field( __u32, flags ) |
| 489 | ), |
| 490 | |
| 491 | TP_fast_assign( |
| 492 | __entry->dev = inode->i_sb->s_dev; |
| 493 | __entry->ino = inode->i_ino; |
| 494 | __entry->lblk = map->m_lblk; |
| 495 | __entry->len = map->m_len; |
| 496 | __entry->flags = map->m_flags; |
| 497 | ), |
| 498 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 499 | TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s", |
Jan Kara | 4e7ea81 | 2013-06-04 13:17:40 -0400 | [diff] [blame] | 500 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 501 | (unsigned long) __entry->ino, __entry->lblk, __entry->len, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 502 | show_mflags(__entry->flags)) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 503 | ); |
| 504 | |
Theodore Ts'o | 20970ba | 2013-06-06 14:00:46 -0400 | [diff] [blame] | 505 | TRACE_EVENT(ext4_writepages_result, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 506 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 507 | int ret, int pages_written), |
| 508 | |
| 509 | TP_ARGS(inode, wbc, ret, pages_written), |
| 510 | |
| 511 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 512 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 513 | __field( ino_t, ino ) |
| 514 | __field( int, ret ) |
| 515 | __field( int, pages_written ) |
| 516 | __field( long, pages_skipped ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 517 | __field( pgoff_t, writeback_index ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 518 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 519 | ), |
| 520 | |
| 521 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 522 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 523 | __entry->ino = inode->i_ino; |
| 524 | __entry->ret = ret; |
| 525 | __entry->pages_written = pages_written; |
| 526 | __entry->pages_skipped = wbc->pages_skipped; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 527 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 528 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 529 | ), |
| 530 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 531 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 532 | "sync_mode %d writeback_index %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 533 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 534 | (unsigned long) __entry->ino, __entry->ret, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 535 | __entry->pages_written, __entry->pages_skipped, |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 536 | __entry->sync_mode, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 537 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 538 | ); |
| 539 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 540 | DECLARE_EVENT_CLASS(ext4__page_op, |
| 541 | TP_PROTO(struct page *page), |
| 542 | |
| 543 | TP_ARGS(page), |
| 544 | |
| 545 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 546 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 547 | __field( ino_t, ino ) |
| 548 | __field( pgoff_t, index ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 549 | |
| 550 | ), |
| 551 | |
| 552 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 553 | __entry->dev = page->mapping->host->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 554 | __entry->ino = page->mapping->host->i_ino; |
| 555 | __entry->index = page->index; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 556 | ), |
| 557 | |
| 558 | TP_printk("dev %d,%d ino %lu page_index %lu", |
| 559 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 560 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 561 | (unsigned long) __entry->index) |
| 562 | ); |
| 563 | |
| 564 | DEFINE_EVENT(ext4__page_op, ext4_writepage, |
| 565 | |
| 566 | TP_PROTO(struct page *page), |
| 567 | |
| 568 | TP_ARGS(page) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 569 | ); |
| 570 | |
| 571 | DEFINE_EVENT(ext4__page_op, ext4_readpage, |
| 572 | |
| 573 | TP_PROTO(struct page *page), |
| 574 | |
| 575 | TP_ARGS(page) |
| 576 | ); |
| 577 | |
| 578 | DEFINE_EVENT(ext4__page_op, ext4_releasepage, |
| 579 | |
| 580 | TP_PROTO(struct page *page), |
| 581 | |
| 582 | TP_ARGS(page) |
| 583 | ); |
| 584 | |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 585 | DECLARE_EVENT_CLASS(ext4_invalidatepage_op, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 586 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 587 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 588 | TP_ARGS(page, offset, length), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 589 | |
| 590 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 591 | __field( dev_t, dev ) |
| 592 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 593 | __field( pgoff_t, index ) |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 594 | __field( unsigned int, offset ) |
| 595 | __field( unsigned int, length ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 596 | ), |
| 597 | |
| 598 | TP_fast_assign( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 599 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 600 | __entry->ino = page->mapping->host->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 601 | __entry->index = page->index; |
| 602 | __entry->offset = offset; |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 603 | __entry->length = length; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 604 | ), |
| 605 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 606 | TP_printk("dev %d,%d ino %lu page_index %lu offset %u length %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 607 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 608 | (unsigned long) __entry->ino, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 609 | (unsigned long) __entry->index, |
| 610 | __entry->offset, __entry->length) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 611 | ); |
| 612 | |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 613 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 614 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 615 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 616 | TP_ARGS(page, offset, length) |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 617 | ); |
| 618 | |
| 619 | DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage, |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 620 | TP_PROTO(struct page *page, unsigned int offset, unsigned int length), |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 621 | |
Lukas Czerner | ca99fdd | 2013-05-21 23:25:01 -0400 | [diff] [blame] | 622 | TP_ARGS(page, offset, length) |
Jan Kara | 4520fb3 | 2012-12-25 13:28:54 -0500 | [diff] [blame] | 623 | ); |
| 624 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 625 | TRACE_EVENT(ext4_discard_blocks, |
| 626 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 627 | unsigned long long count), |
| 628 | |
| 629 | TP_ARGS(sb, blk, count), |
| 630 | |
| 631 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 632 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 633 | __field( __u64, blk ) |
| 634 | __field( __u64, count ) |
| 635 | |
| 636 | ), |
| 637 | |
| 638 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 639 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 640 | __entry->blk = blk; |
| 641 | __entry->count = count; |
| 642 | ), |
| 643 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 644 | TP_printk("dev %d,%d blk %llu count %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 645 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 646 | __entry->blk, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 647 | ); |
| 648 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 649 | DECLARE_EVENT_CLASS(ext4__mb_new_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 650 | TP_PROTO(struct ext4_allocation_context *ac, |
| 651 | struct ext4_prealloc_space *pa), |
| 652 | |
| 653 | TP_ARGS(ac, pa), |
| 654 | |
| 655 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 656 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 657 | __field( ino_t, ino ) |
| 658 | __field( __u64, pa_pstart ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 659 | __field( __u64, pa_lstart ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 660 | __field( __u32, pa_len ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 661 | |
| 662 | ), |
| 663 | |
| 664 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 665 | __entry->dev = ac->ac_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 666 | __entry->ino = ac->ac_inode->i_ino; |
| 667 | __entry->pa_pstart = pa->pa_pstart; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 668 | __entry->pa_lstart = pa->pa_lstart; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 669 | __entry->pa_len = pa->pa_len; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 670 | ), |
| 671 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 672 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 673 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 674 | (unsigned long) __entry->ino, |
| 675 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 676 | ); |
| 677 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 678 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
| 679 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 680 | TP_PROTO(struct ext4_allocation_context *ac, |
| 681 | struct ext4_prealloc_space *pa), |
| 682 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 683 | TP_ARGS(ac, pa) |
| 684 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 685 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 686 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 687 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 688 | TP_PROTO(struct ext4_allocation_context *ac, |
| 689 | struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 690 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 691 | TP_ARGS(ac, pa) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 692 | ); |
| 693 | |
| 694 | TRACE_EVENT(ext4_mb_release_inode_pa, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 695 | TP_PROTO(struct ext4_prealloc_space *pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 696 | unsigned long long block, unsigned int count), |
| 697 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 698 | TP_ARGS(pa, block, count), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 699 | |
| 700 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 701 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 702 | __field( ino_t, ino ) |
| 703 | __field( __u64, block ) |
| 704 | __field( __u32, count ) |
| 705 | |
| 706 | ), |
| 707 | |
| 708 | TP_fast_assign( |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 709 | __entry->dev = pa->pa_inode->i_sb->s_dev; |
| 710 | __entry->ino = pa->pa_inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 711 | __entry->block = block; |
| 712 | __entry->count = count; |
| 713 | ), |
| 714 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 715 | TP_printk("dev %d,%d ino %lu block %llu count %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 716 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 717 | (unsigned long) __entry->ino, |
| 718 | __entry->block, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 719 | ); |
| 720 | |
| 721 | TRACE_EVENT(ext4_mb_release_group_pa, |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 722 | TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 723 | |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 724 | TP_ARGS(sb, pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 725 | |
| 726 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 727 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 728 | __field( __u64, pa_pstart ) |
| 729 | __field( __u32, pa_len ) |
| 730 | |
| 731 | ), |
| 732 | |
| 733 | TP_fast_assign( |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 734 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 735 | __entry->pa_pstart = pa->pa_pstart; |
| 736 | __entry->pa_len = pa->pa_len; |
| 737 | ), |
| 738 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 739 | TP_printk("dev %d,%d pstart %llu len %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 740 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 741 | __entry->pa_pstart, __entry->pa_len) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 742 | ); |
| 743 | |
| 744 | TRACE_EVENT(ext4_discard_preallocations, |
| 745 | TP_PROTO(struct inode *inode), |
| 746 | |
| 747 | TP_ARGS(inode), |
| 748 | |
| 749 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 750 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 751 | __field( ino_t, ino ) |
| 752 | |
| 753 | ), |
| 754 | |
| 755 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 756 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 757 | __entry->ino = inode->i_ino; |
| 758 | ), |
| 759 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 760 | TP_printk("dev %d,%d ino %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 761 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 762 | (unsigned long) __entry->ino) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 763 | ); |
| 764 | |
| 765 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 766 | TP_PROTO(struct super_block *sb, int needed), |
| 767 | |
| 768 | TP_ARGS(sb, needed), |
| 769 | |
| 770 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 771 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 772 | __field( int, needed ) |
| 773 | |
| 774 | ), |
| 775 | |
| 776 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 777 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 778 | __entry->needed = needed; |
| 779 | ), |
| 780 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 781 | TP_printk("dev %d,%d needed %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 782 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 783 | __entry->needed) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 784 | ); |
| 785 | |
| 786 | TRACE_EVENT(ext4_request_blocks, |
| 787 | TP_PROTO(struct ext4_allocation_request *ar), |
| 788 | |
| 789 | TP_ARGS(ar), |
| 790 | |
| 791 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 792 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 793 | __field( ino_t, ino ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 794 | __field( unsigned int, len ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 795 | __field( __u32, logical ) |
| 796 | __field( __u32, lleft ) |
| 797 | __field( __u32, lright ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 798 | __field( __u64, goal ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 799 | __field( __u64, pleft ) |
| 800 | __field( __u64, pright ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 801 | __field( unsigned int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 802 | ), |
| 803 | |
| 804 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 805 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 806 | __entry->ino = ar->inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 807 | __entry->len = ar->len; |
| 808 | __entry->logical = ar->logical; |
| 809 | __entry->goal = ar->goal; |
| 810 | __entry->lleft = ar->lleft; |
| 811 | __entry->lright = ar->lright; |
| 812 | __entry->pleft = ar->pleft; |
| 813 | __entry->pright = ar->pright; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 814 | __entry->flags = ar->flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 815 | ), |
| 816 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 817 | TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu " |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 818 | "lleft %u lright %u pleft %llu pright %llu ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 819 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 820 | (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 821 | __entry->len, __entry->logical, __entry->goal, |
| 822 | __entry->lleft, __entry->lright, __entry->pleft, |
| 823 | __entry->pright) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 824 | ); |
| 825 | |
| 826 | TRACE_EVENT(ext4_allocate_blocks, |
| 827 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 828 | |
| 829 | TP_ARGS(ar, block), |
| 830 | |
| 831 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 832 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 833 | __field( ino_t, ino ) |
| 834 | __field( __u64, block ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 835 | __field( unsigned int, len ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 836 | __field( __u32, logical ) |
| 837 | __field( __u32, lleft ) |
| 838 | __field( __u32, lright ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 839 | __field( __u64, goal ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 840 | __field( __u64, pleft ) |
| 841 | __field( __u64, pright ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 842 | __field( unsigned int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 843 | ), |
| 844 | |
| 845 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 846 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 847 | __entry->ino = ar->inode->i_ino; |
| 848 | __entry->block = block; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 849 | __entry->len = ar->len; |
| 850 | __entry->logical = ar->logical; |
| 851 | __entry->goal = ar->goal; |
| 852 | __entry->lleft = ar->lleft; |
| 853 | __entry->lright = ar->lright; |
| 854 | __entry->pleft = ar->pleft; |
| 855 | __entry->pright = ar->pright; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 856 | __entry->flags = ar->flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 857 | ), |
| 858 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 859 | TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u " |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 860 | "goal %llu lleft %u lright %u pleft %llu pright %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 861 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 862 | (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 863 | __entry->len, __entry->block, __entry->logical, |
| 864 | __entry->goal, __entry->lleft, __entry->lright, |
| 865 | __entry->pleft, __entry->pright) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 866 | ); |
| 867 | |
| 868 | TRACE_EVENT(ext4_free_blocks, |
| 869 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 870 | int flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 871 | |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 872 | TP_ARGS(inode, block, count, flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 873 | |
| 874 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 875 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 876 | __field( ino_t, ino ) |
| 877 | __field( __u64, block ) |
| 878 | __field( unsigned long, count ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 879 | __field( int, flags ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 880 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 881 | ), |
| 882 | |
| 883 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 884 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 885 | __entry->ino = inode->i_ino; |
| 886 | __entry->block = block; |
| 887 | __entry->count = count; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 888 | __entry->flags = flags; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 889 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 890 | ), |
| 891 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 892 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 893 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 894 | (unsigned long) __entry->ino, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 895 | __entry->mode, __entry->block, __entry->count, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 896 | show_free_flags(__entry->flags)) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 897 | ); |
| 898 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 899 | TRACE_EVENT(ext4_sync_file_enter, |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 900 | TP_PROTO(struct file *file, int datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 901 | |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 902 | TP_ARGS(file, datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 903 | |
| 904 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 905 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 906 | __field( ino_t, ino ) |
| 907 | __field( ino_t, parent ) |
| 908 | __field( int, datasync ) |
| 909 | ), |
| 910 | |
| 911 | TP_fast_assign( |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 912 | struct dentry *dentry = file->f_path.dentry; |
| 913 | |
Al Viro | fc64005 | 2016-04-10 01:33:30 -0400 | [diff] [blame] | 914 | __entry->dev = dentry->d_sb->s_dev; |
David Howells | 2b0143b | 2015-03-17 22:25:59 +0000 | [diff] [blame] | 915 | __entry->ino = d_inode(dentry)->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 916 | __entry->datasync = datasync; |
David Howells | 2b0143b | 2015-03-17 22:25:59 +0000 | [diff] [blame] | 917 | __entry->parent = d_inode(dentry->d_parent)->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 918 | ), |
| 919 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 920 | TP_printk("dev %d,%d ino %lu parent %lu datasync %d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 921 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 922 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 923 | (unsigned long) __entry->parent, __entry->datasync) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 924 | ); |
| 925 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 926 | TRACE_EVENT(ext4_sync_file_exit, |
| 927 | TP_PROTO(struct inode *inode, int ret), |
| 928 | |
| 929 | TP_ARGS(inode, ret), |
| 930 | |
| 931 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 932 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 933 | __field( ino_t, ino ) |
| 934 | __field( int, ret ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 935 | ), |
| 936 | |
| 937 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 938 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 939 | __entry->ino = inode->i_ino; |
| 940 | __entry->ret = ret; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 941 | ), |
| 942 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 943 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 944 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 945 | (unsigned long) __entry->ino, |
| 946 | __entry->ret) |
| 947 | ); |
| 948 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 949 | TRACE_EVENT(ext4_sync_fs, |
| 950 | TP_PROTO(struct super_block *sb, int wait), |
| 951 | |
| 952 | TP_ARGS(sb, wait), |
| 953 | |
| 954 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 955 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 956 | __field( int, wait ) |
| 957 | |
| 958 | ), |
| 959 | |
| 960 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 961 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 962 | __entry->wait = wait; |
| 963 | ), |
| 964 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 965 | TP_printk("dev %d,%d wait %d", |
| 966 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 967 | __entry->wait) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 968 | ); |
| 969 | |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 970 | TRACE_EVENT(ext4_alloc_da_blocks, |
| 971 | TP_PROTO(struct inode *inode), |
| 972 | |
| 973 | TP_ARGS(inode), |
| 974 | |
| 975 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 976 | __field( dev_t, dev ) |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 977 | __field( ino_t, ino ) |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 978 | __field( unsigned int, data_blocks ) |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 979 | ), |
| 980 | |
| 981 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 982 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 983 | __entry->ino = inode->i_ino; |
| 984 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 985 | ), |
| 986 | |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 987 | TP_printk("dev %d,%d ino %lu reserved_data_blocks %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 988 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 989 | (unsigned long) __entry->ino, |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 990 | __entry->data_blocks) |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 991 | ); |
| 992 | |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 993 | TRACE_EVENT(ext4_mballoc_alloc, |
| 994 | TP_PROTO(struct ext4_allocation_context *ac), |
| 995 | |
| 996 | TP_ARGS(ac), |
| 997 | |
| 998 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 999 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1000 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1001 | __field( __u32, orig_logical ) |
| 1002 | __field( int, orig_start ) |
| 1003 | __field( __u32, orig_group ) |
| 1004 | __field( int, orig_len ) |
| 1005 | __field( __u32, goal_logical ) |
| 1006 | __field( int, goal_start ) |
| 1007 | __field( __u32, goal_group ) |
| 1008 | __field( int, goal_len ) |
| 1009 | __field( __u32, result_logical ) |
| 1010 | __field( int, result_start ) |
| 1011 | __field( __u32, result_group ) |
| 1012 | __field( int, result_len ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1013 | __field( __u16, found ) |
| 1014 | __field( __u16, groups ) |
| 1015 | __field( __u16, buddy ) |
| 1016 | __field( __u16, flags ) |
| 1017 | __field( __u16, tail ) |
| 1018 | __field( __u8, cr ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1019 | ), |
| 1020 | |
| 1021 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1022 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1023 | __entry->ino = ac->ac_inode->i_ino; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1024 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 1025 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 1026 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 1027 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 1028 | __entry->goal_logical = ac->ac_g_ex.fe_logical; |
| 1029 | __entry->goal_start = ac->ac_g_ex.fe_start; |
| 1030 | __entry->goal_group = ac->ac_g_ex.fe_group; |
| 1031 | __entry->goal_len = ac->ac_g_ex.fe_len; |
| 1032 | __entry->result_logical = ac->ac_f_ex.fe_logical; |
| 1033 | __entry->result_start = ac->ac_f_ex.fe_start; |
| 1034 | __entry->result_group = ac->ac_f_ex.fe_group; |
| 1035 | __entry->result_len = ac->ac_f_ex.fe_len; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1036 | __entry->found = ac->ac_found; |
| 1037 | __entry->flags = ac->ac_flags; |
| 1038 | __entry->groups = ac->ac_groups_scanned; |
| 1039 | __entry->buddy = ac->ac_buddy; |
| 1040 | __entry->tail = ac->ac_tail; |
| 1041 | __entry->cr = ac->ac_criteria; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1042 | ), |
| 1043 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1044 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1045 | "result %u/%d/%u@%u blks %u grps %u cr %u flags %s " |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1046 | "tail %u broken %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1047 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1048 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1049 | __entry->orig_group, __entry->orig_start, |
| 1050 | __entry->orig_len, __entry->orig_logical, |
| 1051 | __entry->goal_group, __entry->goal_start, |
| 1052 | __entry->goal_len, __entry->goal_logical, |
| 1053 | __entry->result_group, __entry->result_start, |
| 1054 | __entry->result_len, __entry->result_logical, |
| 1055 | __entry->found, __entry->groups, __entry->cr, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1056 | show_mballoc_flags(__entry->flags), __entry->tail, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1057 | __entry->buddy ? 1 << __entry->buddy : 0) |
| 1058 | ); |
| 1059 | |
| 1060 | TRACE_EVENT(ext4_mballoc_prealloc, |
| 1061 | TP_PROTO(struct ext4_allocation_context *ac), |
| 1062 | |
| 1063 | TP_ARGS(ac), |
| 1064 | |
| 1065 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1066 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1067 | __field( ino_t, ino ) |
| 1068 | __field( __u32, orig_logical ) |
| 1069 | __field( int, orig_start ) |
| 1070 | __field( __u32, orig_group ) |
| 1071 | __field( int, orig_len ) |
| 1072 | __field( __u32, result_logical ) |
| 1073 | __field( int, result_start ) |
| 1074 | __field( __u32, result_group ) |
| 1075 | __field( int, result_len ) |
| 1076 | ), |
| 1077 | |
| 1078 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1079 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1080 | __entry->ino = ac->ac_inode->i_ino; |
| 1081 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 1082 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 1083 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 1084 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 1085 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 1086 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 1087 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 1088 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 1089 | ), |
| 1090 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1091 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1092 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1093 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1094 | __entry->orig_group, __entry->orig_start, |
| 1095 | __entry->orig_len, __entry->orig_logical, |
| 1096 | __entry->result_group, __entry->result_start, |
| 1097 | __entry->result_len, __entry->result_logical) |
| 1098 | ); |
| 1099 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1100 | DECLARE_EVENT_CLASS(ext4__mballoc, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1101 | TP_PROTO(struct super_block *sb, |
| 1102 | struct inode *inode, |
| 1103 | ext4_group_t group, |
| 1104 | ext4_grpblk_t start, |
| 1105 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1106 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1107 | TP_ARGS(sb, inode, group, start, len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1108 | |
| 1109 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1110 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1111 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1112 | __field( int, result_start ) |
| 1113 | __field( __u32, result_group ) |
| 1114 | __field( int, result_len ) |
| 1115 | ), |
| 1116 | |
| 1117 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1118 | __entry->dev = sb->s_dev; |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1119 | __entry->ino = inode ? inode->i_ino : 0; |
| 1120 | __entry->result_start = start; |
| 1121 | __entry->result_group = group; |
| 1122 | __entry->result_len = len; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1123 | ), |
| 1124 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1125 | TP_printk("dev %d,%d inode %lu extent %u/%d/%d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1126 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1127 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1128 | __entry->result_group, __entry->result_start, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1129 | __entry->result_len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1130 | ); |
| 1131 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1132 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, |
| 1133 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1134 | TP_PROTO(struct super_block *sb, |
| 1135 | struct inode *inode, |
| 1136 | ext4_group_t group, |
| 1137 | ext4_grpblk_t start, |
| 1138 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1139 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1140 | TP_ARGS(sb, inode, group, start, len) |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1141 | ); |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1142 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 1143 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1144 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1145 | TP_PROTO(struct super_block *sb, |
| 1146 | struct inode *inode, |
| 1147 | ext4_group_t group, |
| 1148 | ext4_grpblk_t start, |
| 1149 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1150 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1151 | TP_ARGS(sb, inode, group, start, len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1152 | ); |
| 1153 | |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1154 | TRACE_EVENT(ext4_forget, |
| 1155 | TP_PROTO(struct inode *inode, int is_metadata, __u64 block), |
| 1156 | |
| 1157 | TP_ARGS(inode, is_metadata, block), |
| 1158 | |
| 1159 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1160 | __field( dev_t, dev ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1161 | __field( ino_t, ino ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1162 | __field( __u64, block ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1163 | __field( int, is_metadata ) |
| 1164 | __field( __u16, mode ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1165 | ), |
| 1166 | |
| 1167 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1168 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1169 | __entry->ino = inode->i_ino; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1170 | __entry->block = block; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1171 | __entry->is_metadata = is_metadata; |
| 1172 | __entry->mode = inode->i_mode; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1173 | ), |
| 1174 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1175 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1176 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1177 | (unsigned long) __entry->ino, |
| 1178 | __entry->mode, __entry->is_metadata, __entry->block) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1179 | ); |
| 1180 | |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1181 | TRACE_EVENT(ext4_da_update_reserve_space, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1182 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1183 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1184 | TP_ARGS(inode, used_blocks, quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1185 | |
| 1186 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1187 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1188 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1189 | __field( __u64, i_blocks ) |
| 1190 | __field( int, used_blocks ) |
| 1191 | __field( int, reserved_data_blocks ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1192 | __field( int, quota_claim ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1193 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1194 | ), |
| 1195 | |
| 1196 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1197 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1198 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1199 | __entry->i_blocks = inode->i_blocks; |
| 1200 | __entry->used_blocks = used_blocks; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1201 | __entry->reserved_data_blocks = |
| 1202 | EXT4_I(inode)->i_reserved_data_blocks; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1203 | __entry->quota_claim = quota_claim; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1204 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1205 | ), |
| 1206 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1207 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 1208 | "reserved_data_blocks %d quota_claim %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1209 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1210 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1211 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1212 | __entry->used_blocks, __entry->reserved_data_blocks, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1213 | __entry->quota_claim) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1214 | ); |
| 1215 | |
| 1216 | TRACE_EVENT(ext4_da_reserve_space, |
Eric Whitney | c27e43a | 2015-06-21 21:37:05 -0400 | [diff] [blame] | 1217 | TP_PROTO(struct inode *inode), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1218 | |
Eric Whitney | c27e43a | 2015-06-21 21:37:05 -0400 | [diff] [blame] | 1219 | TP_ARGS(inode), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1220 | |
| 1221 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1222 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1223 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1224 | __field( __u64, i_blocks ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1225 | __field( int, reserved_data_blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1226 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1227 | ), |
| 1228 | |
| 1229 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1230 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1231 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1232 | __entry->i_blocks = inode->i_blocks; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1233 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1234 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1235 | ), |
| 1236 | |
Eric Whitney | c27e43a | 2015-06-21 21:37:05 -0400 | [diff] [blame] | 1237 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu " |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 1238 | "reserved_data_blocks %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1239 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1240 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1241 | __entry->mode, __entry->i_blocks, |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 1242 | __entry->reserved_data_blocks) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1243 | ); |
| 1244 | |
| 1245 | TRACE_EVENT(ext4_da_release_space, |
| 1246 | TP_PROTO(struct inode *inode, int freed_blocks), |
| 1247 | |
| 1248 | TP_ARGS(inode, freed_blocks), |
| 1249 | |
| 1250 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1251 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1252 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1253 | __field( __u64, i_blocks ) |
| 1254 | __field( int, freed_blocks ) |
| 1255 | __field( int, reserved_data_blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1256 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1257 | ), |
| 1258 | |
| 1259 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1260 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1261 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1262 | __entry->i_blocks = inode->i_blocks; |
| 1263 | __entry->freed_blocks = freed_blocks; |
| 1264 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1265 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1266 | ), |
| 1267 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1268 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 1269 | "reserved_data_blocks %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1270 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1271 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1272 | __entry->mode, __entry->i_blocks, |
Eric Whitney | a627b0a | 2017-07-30 22:30:11 -0400 | [diff] [blame] | 1273 | __entry->freed_blocks, __entry->reserved_data_blocks) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1274 | ); |
| 1275 | |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1276 | DECLARE_EVENT_CLASS(ext4__bitmap_load, |
| 1277 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1278 | |
| 1279 | TP_ARGS(sb, group), |
| 1280 | |
| 1281 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1282 | __field( dev_t, dev ) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1283 | __field( __u32, group ) |
| 1284 | |
| 1285 | ), |
| 1286 | |
| 1287 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1288 | __entry->dev = sb->s_dev; |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1289 | __entry->group = group; |
| 1290 | ), |
| 1291 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1292 | TP_printk("dev %d,%d group %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1293 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1294 | __entry->group) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1295 | ); |
| 1296 | |
| 1297 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
| 1298 | |
| 1299 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1300 | |
| 1301 | TP_ARGS(sb, group) |
| 1302 | ); |
| 1303 | |
| 1304 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, |
| 1305 | |
| 1306 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1307 | |
| 1308 | TP_ARGS(sb, group) |
| 1309 | ); |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1310 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1311 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, |
| 1312 | |
| 1313 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1314 | |
| 1315 | TP_ARGS(sb, group) |
| 1316 | ); |
| 1317 | |
| 1318 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, |
| 1319 | |
| 1320 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1321 | |
| 1322 | TP_ARGS(sb, group) |
| 1323 | ); |
| 1324 | |
| 1325 | TRACE_EVENT(ext4_direct_IO_enter, |
| 1326 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
| 1327 | |
| 1328 | TP_ARGS(inode, offset, len, rw), |
| 1329 | |
| 1330 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1331 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1332 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1333 | __field( loff_t, pos ) |
| 1334 | __field( unsigned long, len ) |
| 1335 | __field( int, rw ) |
| 1336 | ), |
| 1337 | |
| 1338 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1339 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1340 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1341 | __entry->pos = offset; |
| 1342 | __entry->len = len; |
| 1343 | __entry->rw = rw; |
| 1344 | ), |
| 1345 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1346 | TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1347 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1348 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1349 | __entry->pos, __entry->len, __entry->rw) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1350 | ); |
| 1351 | |
| 1352 | TRACE_EVENT(ext4_direct_IO_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1353 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, |
| 1354 | int rw, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1355 | |
| 1356 | TP_ARGS(inode, offset, len, rw, ret), |
| 1357 | |
| 1358 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1359 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1360 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1361 | __field( loff_t, pos ) |
| 1362 | __field( unsigned long, len ) |
| 1363 | __field( int, rw ) |
| 1364 | __field( int, ret ) |
| 1365 | ), |
| 1366 | |
| 1367 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1368 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1369 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1370 | __entry->pos = offset; |
| 1371 | __entry->len = len; |
| 1372 | __entry->rw = rw; |
| 1373 | __entry->ret = ret; |
| 1374 | ), |
| 1375 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1376 | TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1377 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1378 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1379 | __entry->pos, __entry->len, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1380 | __entry->rw, __entry->ret) |
| 1381 | ); |
| 1382 | |
Lukas Czerner | b8a8684 | 2014-03-18 18:05:35 -0400 | [diff] [blame] | 1383 | DECLARE_EVENT_CLASS(ext4__fallocate_mode, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1384 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1385 | |
| 1386 | TP_ARGS(inode, offset, len, mode), |
| 1387 | |
| 1388 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1389 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1390 | __field( ino_t, ino ) |
Lukas Czerner | b8a8684 | 2014-03-18 18:05:35 -0400 | [diff] [blame] | 1391 | __field( loff_t, offset ) |
| 1392 | __field( loff_t, len ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1393 | __field( int, mode ) |
| 1394 | ), |
| 1395 | |
| 1396 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1397 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1398 | __entry->ino = inode->i_ino; |
Lukas Czerner | b8a8684 | 2014-03-18 18:05:35 -0400 | [diff] [blame] | 1399 | __entry->offset = offset; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1400 | __entry->len = len; |
| 1401 | __entry->mode = mode; |
| 1402 | ), |
| 1403 | |
Lukas Czerner | b8a8684 | 2014-03-18 18:05:35 -0400 | [diff] [blame] | 1404 | TP_printk("dev %d,%d ino %lu offset %lld len %lld mode %s", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1405 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | b8a8684 | 2014-03-18 18:05:35 -0400 | [diff] [blame] | 1406 | (unsigned long) __entry->ino, |
| 1407 | __entry->offset, __entry->len, |
| 1408 | show_falloc_mode(__entry->mode)) |
| 1409 | ); |
| 1410 | |
| 1411 | DEFINE_EVENT(ext4__fallocate_mode, ext4_fallocate_enter, |
| 1412 | |
| 1413 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1414 | |
| 1415 | TP_ARGS(inode, offset, len, mode) |
| 1416 | ); |
| 1417 | |
| 1418 | DEFINE_EVENT(ext4__fallocate_mode, ext4_punch_hole, |
| 1419 | |
| 1420 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1421 | |
| 1422 | TP_ARGS(inode, offset, len, mode) |
| 1423 | ); |
| 1424 | |
| 1425 | DEFINE_EVENT(ext4__fallocate_mode, ext4_zero_range, |
| 1426 | |
| 1427 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1428 | |
| 1429 | TP_ARGS(inode, offset, len, mode) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1430 | ); |
| 1431 | |
| 1432 | TRACE_EVENT(ext4_fallocate_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1433 | TP_PROTO(struct inode *inode, loff_t offset, |
| 1434 | unsigned int max_blocks, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1435 | |
| 1436 | TP_ARGS(inode, offset, max_blocks, ret), |
| 1437 | |
| 1438 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1439 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1440 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1441 | __field( loff_t, pos ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1442 | __field( unsigned int, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1443 | __field( int, ret ) |
| 1444 | ), |
| 1445 | |
| 1446 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1447 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1448 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1449 | __entry->pos = offset; |
| 1450 | __entry->blocks = max_blocks; |
| 1451 | __entry->ret = ret; |
| 1452 | ), |
| 1453 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1454 | TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1455 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1456 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1457 | __entry->pos, __entry->blocks, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1458 | __entry->ret) |
| 1459 | ); |
| 1460 | |
| 1461 | TRACE_EVENT(ext4_unlink_enter, |
| 1462 | TP_PROTO(struct inode *parent, struct dentry *dentry), |
| 1463 | |
| 1464 | TP_ARGS(parent, dentry), |
| 1465 | |
| 1466 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1467 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1468 | __field( ino_t, ino ) |
| 1469 | __field( ino_t, parent ) |
| 1470 | __field( loff_t, size ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1471 | ), |
| 1472 | |
| 1473 | TP_fast_assign( |
Al Viro | fc64005 | 2016-04-10 01:33:30 -0400 | [diff] [blame] | 1474 | __entry->dev = dentry->d_sb->s_dev; |
David Howells | 2b0143b | 2015-03-17 22:25:59 +0000 | [diff] [blame] | 1475 | __entry->ino = d_inode(dentry)->i_ino; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1476 | __entry->parent = parent->i_ino; |
David Howells | 2b0143b | 2015-03-17 22:25:59 +0000 | [diff] [blame] | 1477 | __entry->size = d_inode(dentry)->i_size; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1478 | ), |
| 1479 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1480 | TP_printk("dev %d,%d ino %lu size %lld parent %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1481 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1482 | (unsigned long) __entry->ino, __entry->size, |
| 1483 | (unsigned long) __entry->parent) |
| 1484 | ); |
| 1485 | |
| 1486 | TRACE_EVENT(ext4_unlink_exit, |
| 1487 | TP_PROTO(struct dentry *dentry, int ret), |
| 1488 | |
| 1489 | TP_ARGS(dentry, ret), |
| 1490 | |
| 1491 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1492 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1493 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1494 | __field( int, ret ) |
| 1495 | ), |
| 1496 | |
| 1497 | TP_fast_assign( |
Al Viro | fc64005 | 2016-04-10 01:33:30 -0400 | [diff] [blame] | 1498 | __entry->dev = dentry->d_sb->s_dev; |
David Howells | 2b0143b | 2015-03-17 22:25:59 +0000 | [diff] [blame] | 1499 | __entry->ino = d_inode(dentry)->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1500 | __entry->ret = ret; |
| 1501 | ), |
| 1502 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1503 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1504 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1505 | (unsigned long) __entry->ino, |
| 1506 | __entry->ret) |
| 1507 | ); |
| 1508 | |
| 1509 | DECLARE_EVENT_CLASS(ext4__truncate, |
| 1510 | TP_PROTO(struct inode *inode), |
| 1511 | |
| 1512 | TP_ARGS(inode), |
| 1513 | |
| 1514 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1515 | __field( dev_t, dev ) |
| 1516 | __field( ino_t, ino ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1517 | __field( __u64, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1518 | ), |
| 1519 | |
| 1520 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1521 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1522 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1523 | __entry->blocks = inode->i_blocks; |
| 1524 | ), |
| 1525 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1526 | TP_printk("dev %d,%d ino %lu blocks %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1527 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1528 | (unsigned long) __entry->ino, __entry->blocks) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1529 | ); |
| 1530 | |
| 1531 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, |
| 1532 | |
| 1533 | TP_PROTO(struct inode *inode), |
| 1534 | |
| 1535 | TP_ARGS(inode) |
| 1536 | ); |
| 1537 | |
| 1538 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, |
| 1539 | |
| 1540 | TP_PROTO(struct inode *inode), |
| 1541 | |
| 1542 | TP_ARGS(inode) |
| 1543 | ); |
| 1544 | |
Lukas Czerner | 556615d | 2014-04-20 23:45:47 -0400 | [diff] [blame] | 1545 | /* 'ux' is the unwritten extent. */ |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1546 | TRACE_EVENT(ext4_ext_convert_to_initialized_enter, |
| 1547 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1548 | struct ext4_extent *ux), |
| 1549 | |
| 1550 | TP_ARGS(inode, map, ux), |
| 1551 | |
| 1552 | TP_STRUCT__entry( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1553 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1554 | __field( ino_t, ino ) |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1555 | __field( ext4_lblk_t, m_lblk ) |
| 1556 | __field( unsigned, m_len ) |
| 1557 | __field( ext4_lblk_t, u_lblk ) |
| 1558 | __field( unsigned, u_len ) |
| 1559 | __field( ext4_fsblk_t, u_pblk ) |
| 1560 | ), |
| 1561 | |
| 1562 | TP_fast_assign( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1563 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1564 | __entry->ino = inode->i_ino; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1565 | __entry->m_lblk = map->m_lblk; |
| 1566 | __entry->m_len = map->m_len; |
| 1567 | __entry->u_lblk = le32_to_cpu(ux->ee_block); |
| 1568 | __entry->u_len = ext4_ext_get_actual_len(ux); |
| 1569 | __entry->u_pblk = ext4_ext_pblock(ux); |
| 1570 | ), |
| 1571 | |
| 1572 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u " |
| 1573 | "u_pblk %llu", |
| 1574 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1575 | (unsigned long) __entry->ino, |
| 1576 | __entry->m_lblk, __entry->m_len, |
| 1577 | __entry->u_lblk, __entry->u_len, __entry->u_pblk) |
| 1578 | ); |
| 1579 | |
| 1580 | /* |
Lukas Czerner | 556615d | 2014-04-20 23:45:47 -0400 | [diff] [blame] | 1581 | * 'ux' is the unwritten extent. |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1582 | * 'ix' is the initialized extent to which blocks are transferred. |
| 1583 | */ |
| 1584 | TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath, |
| 1585 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1586 | struct ext4_extent *ux, struct ext4_extent *ix), |
| 1587 | |
| 1588 | TP_ARGS(inode, map, ux, ix), |
| 1589 | |
| 1590 | TP_STRUCT__entry( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1591 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1592 | __field( ino_t, ino ) |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1593 | __field( ext4_lblk_t, m_lblk ) |
| 1594 | __field( unsigned, m_len ) |
| 1595 | __field( ext4_lblk_t, u_lblk ) |
| 1596 | __field( unsigned, u_len ) |
| 1597 | __field( ext4_fsblk_t, u_pblk ) |
| 1598 | __field( ext4_lblk_t, i_lblk ) |
| 1599 | __field( unsigned, i_len ) |
| 1600 | __field( ext4_fsblk_t, i_pblk ) |
| 1601 | ), |
| 1602 | |
| 1603 | TP_fast_assign( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1604 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1605 | __entry->ino = inode->i_ino; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1606 | __entry->m_lblk = map->m_lblk; |
| 1607 | __entry->m_len = map->m_len; |
| 1608 | __entry->u_lblk = le32_to_cpu(ux->ee_block); |
| 1609 | __entry->u_len = ext4_ext_get_actual_len(ux); |
| 1610 | __entry->u_pblk = ext4_ext_pblock(ux); |
| 1611 | __entry->i_lblk = le32_to_cpu(ix->ee_block); |
| 1612 | __entry->i_len = ext4_ext_get_actual_len(ix); |
| 1613 | __entry->i_pblk = ext4_ext_pblock(ix); |
| 1614 | ), |
| 1615 | |
| 1616 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u " |
| 1617 | "u_lblk %u u_len %u u_pblk %llu " |
| 1618 | "i_lblk %u i_len %u i_pblk %llu ", |
| 1619 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1620 | (unsigned long) __entry->ino, |
| 1621 | __entry->m_lblk, __entry->m_len, |
| 1622 | __entry->u_lblk, __entry->u_len, __entry->u_pblk, |
| 1623 | __entry->i_lblk, __entry->i_len, __entry->i_pblk) |
| 1624 | ); |
| 1625 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1626 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, |
| 1627 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1628 | unsigned int len, unsigned int flags), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1629 | |
| 1630 | TP_ARGS(inode, lblk, len, flags), |
| 1631 | |
| 1632 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1633 | __field( dev_t, dev ) |
| 1634 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1635 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1636 | __field( unsigned int, len ) |
| 1637 | __field( unsigned int, flags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1638 | ), |
| 1639 | |
| 1640 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1641 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1642 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1643 | __entry->lblk = lblk; |
| 1644 | __entry->len = len; |
| 1645 | __entry->flags = flags; |
| 1646 | ), |
| 1647 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1648 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1649 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1650 | (unsigned long) __entry->ino, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1651 | __entry->lblk, __entry->len, show_map_flags(__entry->flags)) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1652 | ); |
| 1653 | |
| 1654 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, |
| 1655 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1656 | unsigned len, unsigned flags), |
| 1657 | |
| 1658 | TP_ARGS(inode, lblk, len, flags) |
| 1659 | ); |
| 1660 | |
| 1661 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, |
| 1662 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1663 | unsigned len, unsigned flags), |
| 1664 | |
| 1665 | TP_ARGS(inode, lblk, len, flags) |
| 1666 | ); |
| 1667 | |
| 1668 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1669 | TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map, |
| 1670 | int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1671 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1672 | TP_ARGS(inode, flags, map, ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1673 | |
| 1674 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1675 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1676 | __field( ino_t, ino ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1677 | __field( unsigned int, flags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1678 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1679 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1680 | __field( unsigned int, len ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1681 | __field( unsigned int, mflags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1682 | __field( int, ret ) |
| 1683 | ), |
| 1684 | |
| 1685 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1686 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1687 | __entry->ino = inode->i_ino; |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1688 | __entry->flags = flags; |
Zheng Liu | 19b303d | 2012-11-08 14:34:04 -0500 | [diff] [blame] | 1689 | __entry->pblk = map->m_pblk; |
| 1690 | __entry->lblk = map->m_lblk; |
| 1691 | __entry->len = map->m_len; |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1692 | __entry->mflags = map->m_flags; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1693 | __entry->ret = ret; |
| 1694 | ), |
| 1695 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1696 | TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u " |
| 1697 | "mflags %s ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1698 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1699 | (unsigned long) __entry->ino, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1700 | show_map_flags(__entry->flags), __entry->lblk, __entry->pblk, |
| 1701 | __entry->len, show_mflags(__entry->mflags), __entry->ret) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1702 | ); |
| 1703 | |
| 1704 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1705 | TP_PROTO(struct inode *inode, unsigned flags, |
| 1706 | struct ext4_map_blocks *map, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1707 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1708 | TP_ARGS(inode, flags, map, ret) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1709 | ); |
| 1710 | |
| 1711 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1712 | TP_PROTO(struct inode *inode, unsigned flags, |
| 1713 | struct ext4_map_blocks *map, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1714 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1715 | TP_ARGS(inode, flags, map, ret) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1716 | ); |
| 1717 | |
| 1718 | TRACE_EVENT(ext4_ext_load_extent, |
| 1719 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), |
| 1720 | |
| 1721 | TP_ARGS(inode, lblk, pblk), |
| 1722 | |
| 1723 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1724 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1725 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1726 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1727 | __field( ext4_lblk_t, lblk ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1728 | ), |
| 1729 | |
| 1730 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1731 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1732 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1733 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1734 | __entry->lblk = lblk; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1735 | ), |
| 1736 | |
| 1737 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", |
| 1738 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1739 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1740 | __entry->lblk, __entry->pblk) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1741 | ); |
| 1742 | |
| 1743 | TRACE_EVENT(ext4_load_inode, |
| 1744 | TP_PROTO(struct inode *inode), |
| 1745 | |
| 1746 | TP_ARGS(inode), |
| 1747 | |
| 1748 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1749 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1750 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1751 | ), |
| 1752 | |
| 1753 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1754 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1755 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1756 | ), |
| 1757 | |
| 1758 | TP_printk("dev %d,%d ino %ld", |
| 1759 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1760 | (unsigned long) __entry->ino) |
| 1761 | ); |
| 1762 | |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1763 | TRACE_EVENT(ext4_journal_start, |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1764 | TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks, |
Jan Kara | 83448bd | 2019-11-05 17:44:29 +0100 | [diff] [blame] | 1765 | int revoke_creds, unsigned long IP), |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1766 | |
Jan Kara | 83448bd | 2019-11-05 17:44:29 +0100 | [diff] [blame] | 1767 | TP_ARGS(sb, blocks, rsv_blocks, revoke_creds, IP), |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1768 | |
| 1769 | TP_STRUCT__entry( |
| 1770 | __field( dev_t, dev ) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1771 | __field(unsigned long, ip ) |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1772 | __field( int, blocks ) |
| 1773 | __field( int, rsv_blocks ) |
Jan Kara | 83448bd | 2019-11-05 17:44:29 +0100 | [diff] [blame] | 1774 | __field( int, revoke_creds ) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1775 | ), |
| 1776 | |
| 1777 | TP_fast_assign( |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1778 | __entry->dev = sb->s_dev; |
| 1779 | __entry->ip = IP; |
| 1780 | __entry->blocks = blocks; |
| 1781 | __entry->rsv_blocks = rsv_blocks; |
Jan Kara | 83448bd | 2019-11-05 17:44:29 +0100 | [diff] [blame] | 1782 | __entry->revoke_creds = revoke_creds; |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1783 | ), |
| 1784 | |
Jan Kara | 83448bd | 2019-11-05 17:44:29 +0100 | [diff] [blame] | 1785 | TP_printk("dev %d,%d blocks %d, rsv_blocks %d, revoke_creds %d, " |
| 1786 | "caller %pS", MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1787 | __entry->blocks, __entry->rsv_blocks, __entry->revoke_creds, |
| 1788 | (void *)__entry->ip) |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1789 | ); |
| 1790 | |
| 1791 | TRACE_EVENT(ext4_journal_start_reserved, |
| 1792 | TP_PROTO(struct super_block *sb, int blocks, unsigned long IP), |
| 1793 | |
| 1794 | TP_ARGS(sb, blocks, IP), |
| 1795 | |
| 1796 | TP_STRUCT__entry( |
| 1797 | __field( dev_t, dev ) |
| 1798 | __field(unsigned long, ip ) |
| 1799 | __field( int, blocks ) |
| 1800 | ), |
| 1801 | |
| 1802 | TP_fast_assign( |
| 1803 | __entry->dev = sb->s_dev; |
| 1804 | __entry->ip = IP; |
| 1805 | __entry->blocks = blocks; |
| 1806 | ), |
| 1807 | |
Scott Wood | bbedb17 | 2015-03-11 22:13:57 -0500 | [diff] [blame] | 1808 | TP_printk("dev %d,%d blocks, %d caller %pS", |
Jan Kara | 5fe2fe8 | 2013-06-04 12:37:50 -0400 | [diff] [blame] | 1809 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1810 | __entry->blocks, (void *)__entry->ip) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1811 | ); |
| 1812 | |
Tao Ma | b3d4c2b | 2011-07-11 00:01:52 -0400 | [diff] [blame] | 1813 | DECLARE_EVENT_CLASS(ext4__trim, |
| 1814 | TP_PROTO(struct super_block *sb, |
| 1815 | ext4_group_t group, |
| 1816 | ext4_grpblk_t start, |
| 1817 | ext4_grpblk_t len), |
| 1818 | |
| 1819 | TP_ARGS(sb, group, start, len), |
| 1820 | |
| 1821 | TP_STRUCT__entry( |
| 1822 | __field( int, dev_major ) |
| 1823 | __field( int, dev_minor ) |
| 1824 | __field( __u32, group ) |
| 1825 | __field( int, start ) |
| 1826 | __field( int, len ) |
| 1827 | ), |
| 1828 | |
| 1829 | TP_fast_assign( |
| 1830 | __entry->dev_major = MAJOR(sb->s_dev); |
| 1831 | __entry->dev_minor = MINOR(sb->s_dev); |
| 1832 | __entry->group = group; |
| 1833 | __entry->start = start; |
| 1834 | __entry->len = len; |
| 1835 | ), |
| 1836 | |
| 1837 | TP_printk("dev %d,%d group %u, start %d, len %d", |
| 1838 | __entry->dev_major, __entry->dev_minor, |
| 1839 | __entry->group, __entry->start, __entry->len) |
| 1840 | ); |
| 1841 | |
| 1842 | DEFINE_EVENT(ext4__trim, ext4_trim_extent, |
| 1843 | |
| 1844 | TP_PROTO(struct super_block *sb, |
| 1845 | ext4_group_t group, |
| 1846 | ext4_grpblk_t start, |
| 1847 | ext4_grpblk_t len), |
| 1848 | |
| 1849 | TP_ARGS(sb, group, start, len) |
| 1850 | ); |
| 1851 | |
| 1852 | DEFINE_EVENT(ext4__trim, ext4_trim_all_free, |
| 1853 | |
| 1854 | TP_PROTO(struct super_block *sb, |
| 1855 | ext4_group_t group, |
| 1856 | ext4_grpblk_t start, |
| 1857 | ext4_grpblk_t len), |
| 1858 | |
| 1859 | TP_ARGS(sb, group, start, len) |
| 1860 | ); |
| 1861 | |
Lukas Czerner | 556615d | 2014-04-20 23:45:47 -0400 | [diff] [blame] | 1862 | TRACE_EVENT(ext4_ext_handle_unwritten_extents, |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame] | 1863 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1864 | unsigned int allocated, ext4_fsblk_t newblock), |
| 1865 | |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame] | 1866 | TP_ARGS(inode, map, flags, allocated, newblock), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1867 | |
| 1868 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1869 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1870 | __field( ino_t, ino ) |
| 1871 | __field( int, flags ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1872 | __field( ext4_lblk_t, lblk ) |
| 1873 | __field( ext4_fsblk_t, pblk ) |
| 1874 | __field( unsigned int, len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1875 | __field( unsigned int, allocated ) |
| 1876 | __field( ext4_fsblk_t, newblk ) |
| 1877 | ), |
| 1878 | |
| 1879 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1880 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1881 | __entry->ino = inode->i_ino; |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame] | 1882 | __entry->flags = flags; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1883 | __entry->lblk = map->m_lblk; |
| 1884 | __entry->pblk = map->m_pblk; |
| 1885 | __entry->len = map->m_len; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1886 | __entry->allocated = allocated; |
| 1887 | __entry->newblk = newblock; |
| 1888 | ), |
| 1889 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1890 | TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1891 | "allocated %d newblock %llu", |
| 1892 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1893 | (unsigned long) __entry->ino, |
| 1894 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1895 | __entry->len, show_map_flags(__entry->flags), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1896 | (unsigned int) __entry->allocated, |
| 1897 | (unsigned long long) __entry->newblk) |
| 1898 | ); |
| 1899 | |
| 1900 | TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, |
| 1901 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), |
| 1902 | |
| 1903 | TP_ARGS(sb, map, ret), |
| 1904 | |
| 1905 | TP_STRUCT__entry( |
| 1906 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1907 | __field( unsigned int, flags ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1908 | __field( ext4_lblk_t, lblk ) |
| 1909 | __field( ext4_fsblk_t, pblk ) |
| 1910 | __field( unsigned int, len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1911 | __field( int, ret ) |
| 1912 | ), |
| 1913 | |
| 1914 | TP_fast_assign( |
| 1915 | __entry->dev = sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1916 | __entry->flags = map->m_flags; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1917 | __entry->lblk = map->m_lblk; |
| 1918 | __entry->pblk = map->m_pblk; |
| 1919 | __entry->len = map->m_len; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1920 | __entry->ret = ret; |
| 1921 | ), |
| 1922 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1923 | TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %s ret %d", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1924 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1925 | __entry->lblk, (unsigned long long) __entry->pblk, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 1926 | __entry->len, show_mflags(__entry->flags), __entry->ret) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1927 | ); |
| 1928 | |
| 1929 | TRACE_EVENT(ext4_ext_put_in_cache, |
| 1930 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, |
| 1931 | ext4_fsblk_t start), |
| 1932 | |
| 1933 | TP_ARGS(inode, lblk, len, start), |
| 1934 | |
| 1935 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1936 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1937 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1938 | __field( ext4_lblk_t, lblk ) |
| 1939 | __field( unsigned int, len ) |
| 1940 | __field( ext4_fsblk_t, start ) |
| 1941 | ), |
| 1942 | |
| 1943 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1944 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1945 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1946 | __entry->lblk = lblk; |
| 1947 | __entry->len = len; |
| 1948 | __entry->start = start; |
| 1949 | ), |
| 1950 | |
| 1951 | TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", |
| 1952 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1953 | (unsigned long) __entry->ino, |
| 1954 | (unsigned) __entry->lblk, |
| 1955 | __entry->len, |
| 1956 | (unsigned long long) __entry->start) |
| 1957 | ); |
| 1958 | |
| 1959 | TRACE_EVENT(ext4_ext_in_cache, |
| 1960 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), |
| 1961 | |
| 1962 | TP_ARGS(inode, lblk, ret), |
| 1963 | |
| 1964 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1965 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1966 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1967 | __field( ext4_lblk_t, lblk ) |
| 1968 | __field( int, ret ) |
| 1969 | ), |
| 1970 | |
| 1971 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1972 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1973 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1974 | __entry->lblk = lblk; |
| 1975 | __entry->ret = ret; |
| 1976 | ), |
| 1977 | |
| 1978 | TP_printk("dev %d,%d ino %lu lblk %u ret %d", |
| 1979 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1980 | (unsigned long) __entry->ino, |
| 1981 | (unsigned) __entry->lblk, |
| 1982 | __entry->ret) |
| 1983 | |
| 1984 | ); |
| 1985 | |
| 1986 | TRACE_EVENT(ext4_find_delalloc_range, |
| 1987 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, |
| 1988 | int reverse, int found, ext4_lblk_t found_blk), |
| 1989 | |
| 1990 | TP_ARGS(inode, from, to, reverse, found, found_blk), |
| 1991 | |
| 1992 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1993 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1994 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1995 | __field( ext4_lblk_t, from ) |
| 1996 | __field( ext4_lblk_t, to ) |
| 1997 | __field( int, reverse ) |
| 1998 | __field( int, found ) |
| 1999 | __field( ext4_lblk_t, found_blk ) |
| 2000 | ), |
| 2001 | |
| 2002 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2003 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2004 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2005 | __entry->from = from; |
| 2006 | __entry->to = to; |
| 2007 | __entry->reverse = reverse; |
| 2008 | __entry->found = found; |
| 2009 | __entry->found_blk = found_blk; |
| 2010 | ), |
| 2011 | |
| 2012 | TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " |
| 2013 | "(blk = %u)", |
| 2014 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2015 | (unsigned long) __entry->ino, |
| 2016 | (unsigned) __entry->from, (unsigned) __entry->to, |
| 2017 | __entry->reverse, __entry->found, |
| 2018 | (unsigned) __entry->found_blk) |
| 2019 | ); |
| 2020 | |
| 2021 | TRACE_EVENT(ext4_get_reserved_cluster_alloc, |
| 2022 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), |
| 2023 | |
| 2024 | TP_ARGS(inode, lblk, len), |
| 2025 | |
| 2026 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2027 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2028 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2029 | __field( ext4_lblk_t, lblk ) |
| 2030 | __field( unsigned int, len ) |
| 2031 | ), |
| 2032 | |
| 2033 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2034 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2035 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2036 | __entry->lblk = lblk; |
| 2037 | __entry->len = len; |
| 2038 | ), |
| 2039 | |
| 2040 | TP_printk("dev %d,%d ino %lu lblk %u len %u", |
| 2041 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2042 | (unsigned long) __entry->ino, |
| 2043 | (unsigned) __entry->lblk, |
| 2044 | __entry->len) |
| 2045 | ); |
| 2046 | |
| 2047 | TRACE_EVENT(ext4_ext_show_extent, |
| 2048 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, |
| 2049 | unsigned short len), |
| 2050 | |
| 2051 | TP_ARGS(inode, lblk, pblk, len), |
| 2052 | |
| 2053 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2054 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2055 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2056 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2057 | __field( ext4_lblk_t, lblk ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2058 | __field( unsigned short, len ) |
| 2059 | ), |
| 2060 | |
| 2061 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2062 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2063 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2064 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2065 | __entry->lblk = lblk; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2066 | __entry->len = len; |
| 2067 | ), |
| 2068 | |
| 2069 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", |
| 2070 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2071 | (unsigned long) __entry->ino, |
| 2072 | (unsigned) __entry->lblk, |
| 2073 | (unsigned long long) __entry->pblk, |
| 2074 | (unsigned short) __entry->len) |
| 2075 | ); |
| 2076 | |
| 2077 | TRACE_EVENT(ext4_remove_blocks, |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2078 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, |
| 2079 | ext4_lblk_t from, ext4_fsblk_t to, |
| 2080 | struct partial_cluster *pc), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2081 | |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2082 | TP_ARGS(inode, ex, from, to, pc), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2083 | |
| 2084 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2085 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2086 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2087 | __field( ext4_lblk_t, from ) |
| 2088 | __field( ext4_lblk_t, to ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2089 | __field( ext4_fsblk_t, ee_pblk ) |
| 2090 | __field( ext4_lblk_t, ee_lblk ) |
| 2091 | __field( unsigned short, ee_len ) |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2092 | __field( ext4_fsblk_t, pc_pclu ) |
| 2093 | __field( ext4_lblk_t, pc_lblk ) |
| 2094 | __field( int, pc_state) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2095 | ), |
| 2096 | |
| 2097 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2098 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2099 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2100 | __entry->from = from; |
| 2101 | __entry->to = to; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2102 | __entry->ee_pblk = ext4_ext_pblock(ex); |
Theodore Ts'o | d6a7710 | 2013-04-09 23:59:55 -0400 | [diff] [blame] | 2103 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2104 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2105 | __entry->pc_pclu = pc->pclu; |
| 2106 | __entry->pc_lblk = pc->lblk; |
| 2107 | __entry->pc_state = pc->state; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2108 | ), |
| 2109 | |
| 2110 | TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2111 | "from %u to %u partial [pclu %lld lblk %u state %d]", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2112 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2113 | (unsigned long) __entry->ino, |
| 2114 | (unsigned) __entry->ee_lblk, |
| 2115 | (unsigned long long) __entry->ee_pblk, |
| 2116 | (unsigned short) __entry->ee_len, |
| 2117 | (unsigned) __entry->from, |
| 2118 | (unsigned) __entry->to, |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2119 | (long long) __entry->pc_pclu, |
| 2120 | (unsigned int) __entry->pc_lblk, |
| 2121 | (int) __entry->pc_state) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2122 | ); |
| 2123 | |
| 2124 | TRACE_EVENT(ext4_ext_rm_leaf, |
| 2125 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
Lukas Czerner | d23142c | 2013-05-27 23:33:35 -0400 | [diff] [blame] | 2126 | struct ext4_extent *ex, |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2127 | struct partial_cluster *pc), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2128 | |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2129 | TP_ARGS(inode, start, ex, pc), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2130 | |
| 2131 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2132 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2133 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2134 | __field( ext4_lblk_t, start ) |
| 2135 | __field( ext4_lblk_t, ee_lblk ) |
| 2136 | __field( ext4_fsblk_t, ee_pblk ) |
| 2137 | __field( short, ee_len ) |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2138 | __field( ext4_fsblk_t, pc_pclu ) |
| 2139 | __field( ext4_lblk_t, pc_lblk ) |
| 2140 | __field( int, pc_state) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2141 | ), |
| 2142 | |
| 2143 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2144 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2145 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2146 | __entry->start = start; |
| 2147 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
| 2148 | __entry->ee_pblk = ext4_ext_pblock(ex); |
| 2149 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2150 | __entry->pc_pclu = pc->pclu; |
| 2151 | __entry->pc_lblk = pc->lblk; |
| 2152 | __entry->pc_state = pc->state; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2153 | ), |
| 2154 | |
| 2155 | TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2156 | "partial [pclu %lld lblk %u state %d]", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2157 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2158 | (unsigned long) __entry->ino, |
| 2159 | (unsigned) __entry->start, |
| 2160 | (unsigned) __entry->ee_lblk, |
| 2161 | (unsigned long long) __entry->ee_pblk, |
| 2162 | (unsigned short) __entry->ee_len, |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2163 | (long long) __entry->pc_pclu, |
| 2164 | (unsigned int) __entry->pc_lblk, |
| 2165 | (int) __entry->pc_state) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2166 | ); |
| 2167 | |
| 2168 | TRACE_EVENT(ext4_ext_rm_idx, |
| 2169 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), |
| 2170 | |
| 2171 | TP_ARGS(inode, pblk), |
| 2172 | |
| 2173 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2174 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2175 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2176 | __field( ext4_fsblk_t, pblk ) |
| 2177 | ), |
| 2178 | |
| 2179 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2180 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2181 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2182 | __entry->pblk = pblk; |
| 2183 | ), |
| 2184 | |
| 2185 | TP_printk("dev %d,%d ino %lu index_pblk %llu", |
| 2186 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2187 | (unsigned long) __entry->ino, |
| 2188 | (unsigned long long) __entry->pblk) |
| 2189 | ); |
| 2190 | |
| 2191 | TRACE_EVENT(ext4_ext_remove_space, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2192 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
| 2193 | ext4_lblk_t end, int depth), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2194 | |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2195 | TP_ARGS(inode, start, end, depth), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2196 | |
| 2197 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2198 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2199 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2200 | __field( ext4_lblk_t, start ) |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2201 | __field( ext4_lblk_t, end ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2202 | __field( int, depth ) |
| 2203 | ), |
| 2204 | |
| 2205 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2206 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2207 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2208 | __entry->start = start; |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2209 | __entry->end = end; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2210 | __entry->depth = depth; |
| 2211 | ), |
| 2212 | |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2213 | TP_printk("dev %d,%d ino %lu since %u end %u depth %d", |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2214 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2215 | (unsigned long) __entry->ino, |
| 2216 | (unsigned) __entry->start, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2217 | (unsigned) __entry->end, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2218 | __entry->depth) |
| 2219 | ); |
| 2220 | |
| 2221 | TRACE_EVENT(ext4_ext_remove_space_done, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2222 | TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end, |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2223 | int depth, struct partial_cluster *pc, __le16 eh_entries), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2224 | |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2225 | TP_ARGS(inode, start, end, depth, pc, eh_entries), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2226 | |
| 2227 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2228 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2229 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2230 | __field( ext4_lblk_t, start ) |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2231 | __field( ext4_lblk_t, end ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2232 | __field( int, depth ) |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2233 | __field( ext4_fsblk_t, pc_pclu ) |
| 2234 | __field( ext4_lblk_t, pc_lblk ) |
| 2235 | __field( int, pc_state ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2236 | __field( unsigned short, eh_entries ) |
| 2237 | ), |
| 2238 | |
| 2239 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2240 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2241 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2242 | __entry->start = start; |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2243 | __entry->end = end; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2244 | __entry->depth = depth; |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2245 | __entry->pc_pclu = pc->pclu; |
| 2246 | __entry->pc_lblk = pc->lblk; |
| 2247 | __entry->pc_state = pc->state; |
Theodore Ts'o | d6a7710 | 2013-04-09 23:59:55 -0400 | [diff] [blame] | 2248 | __entry->eh_entries = le16_to_cpu(eh_entries); |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2249 | ), |
| 2250 | |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2251 | TP_printk("dev %d,%d ino %lu since %u end %u depth %d " |
| 2252 | "partial [pclu %lld lblk %u state %d] " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2253 | "remaining_entries %u", |
| 2254 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2255 | (unsigned long) __entry->ino, |
| 2256 | (unsigned) __entry->start, |
Lukas Czerner | 6180132 | 2013-05-27 23:32:35 -0400 | [diff] [blame] | 2257 | (unsigned) __entry->end, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2258 | __entry->depth, |
Eric Whitney | 9fe6714 | 2018-10-01 14:25:08 -0400 | [diff] [blame] | 2259 | (long long) __entry->pc_pclu, |
| 2260 | (unsigned int) __entry->pc_lblk, |
| 2261 | (int) __entry->pc_state, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2262 | (unsigned short) __entry->eh_entries) |
| 2263 | ); |
| 2264 | |
Theodore Ts'o | 107a7bd | 2013-08-16 21:23:41 -0400 | [diff] [blame] | 2265 | DECLARE_EVENT_CLASS(ext4__es_extent, |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2266 | TP_PROTO(struct inode *inode, struct extent_status *es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2267 | |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2268 | TP_ARGS(inode, es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2269 | |
| 2270 | TP_STRUCT__entry( |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2271 | __field( dev_t, dev ) |
| 2272 | __field( ino_t, ino ) |
| 2273 | __field( ext4_lblk_t, lblk ) |
| 2274 | __field( ext4_lblk_t, len ) |
| 2275 | __field( ext4_fsblk_t, pblk ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2276 | __field( char, status ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2277 | ), |
| 2278 | |
| 2279 | TP_fast_assign( |
| 2280 | __entry->dev = inode->i_sb->s_dev; |
| 2281 | __entry->ino = inode->i_ino; |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2282 | __entry->lblk = es->es_lblk; |
| 2283 | __entry->len = es->es_len; |
Dmitry Monakhov | 52144d8 | 2019-11-14 20:01:47 +0000 | [diff] [blame] | 2284 | __entry->pblk = ext4_es_show_pblock(es); |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 2285 | __entry->status = ext4_es_status(es); |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2286 | ), |
| 2287 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2288 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2289 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2290 | (unsigned long) __entry->ino, |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2291 | __entry->lblk, __entry->len, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2292 | __entry->pblk, show_extent_status(__entry->status)) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2293 | ); |
| 2294 | |
Theodore Ts'o | 107a7bd | 2013-08-16 21:23:41 -0400 | [diff] [blame] | 2295 | DEFINE_EVENT(ext4__es_extent, ext4_es_insert_extent, |
| 2296 | TP_PROTO(struct inode *inode, struct extent_status *es), |
| 2297 | |
| 2298 | TP_ARGS(inode, es) |
| 2299 | ); |
| 2300 | |
| 2301 | DEFINE_EVENT(ext4__es_extent, ext4_es_cache_extent, |
| 2302 | TP_PROTO(struct inode *inode, struct extent_status *es), |
| 2303 | |
| 2304 | TP_ARGS(inode, es) |
| 2305 | ); |
| 2306 | |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2307 | TRACE_EVENT(ext4_es_remove_extent, |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2308 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2309 | |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2310 | TP_ARGS(inode, lblk, len), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2311 | |
| 2312 | TP_STRUCT__entry( |
| 2313 | __field( dev_t, dev ) |
| 2314 | __field( ino_t, ino ) |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2315 | __field( loff_t, lblk ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2316 | __field( loff_t, len ) |
| 2317 | ), |
| 2318 | |
| 2319 | TP_fast_assign( |
| 2320 | __entry->dev = inode->i_sb->s_dev; |
| 2321 | __entry->ino = inode->i_ino; |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2322 | __entry->lblk = lblk; |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2323 | __entry->len = len; |
| 2324 | ), |
| 2325 | |
| 2326 | TP_printk("dev %d,%d ino %lu es [%lld/%lld)", |
| 2327 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2328 | (unsigned long) __entry->ino, |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2329 | __entry->lblk, __entry->len) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2330 | ); |
| 2331 | |
Eric Whitney | ad43102 | 2018-10-01 14:10:39 -0400 | [diff] [blame] | 2332 | TRACE_EVENT(ext4_es_find_extent_range_enter, |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2333 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2334 | |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2335 | TP_ARGS(inode, lblk), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2336 | |
| 2337 | TP_STRUCT__entry( |
| 2338 | __field( dev_t, dev ) |
| 2339 | __field( ino_t, ino ) |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2340 | __field( ext4_lblk_t, lblk ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2341 | ), |
| 2342 | |
| 2343 | TP_fast_assign( |
| 2344 | __entry->dev = inode->i_sb->s_dev; |
| 2345 | __entry->ino = inode->i_ino; |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2346 | __entry->lblk = lblk; |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2347 | ), |
| 2348 | |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2349 | TP_printk("dev %d,%d ino %lu lblk %u", |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2350 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2351 | (unsigned long) __entry->ino, __entry->lblk) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2352 | ); |
| 2353 | |
Eric Whitney | ad43102 | 2018-10-01 14:10:39 -0400 | [diff] [blame] | 2354 | TRACE_EVENT(ext4_es_find_extent_range_exit, |
Zheng Liu | be40136 | 2013-02-18 00:27:26 -0500 | [diff] [blame] | 2355 | TP_PROTO(struct inode *inode, struct extent_status *es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2356 | |
Zheng Liu | be40136 | 2013-02-18 00:27:26 -0500 | [diff] [blame] | 2357 | TP_ARGS(inode, es), |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2358 | |
| 2359 | TP_STRUCT__entry( |
| 2360 | __field( dev_t, dev ) |
| 2361 | __field( ino_t, ino ) |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2362 | __field( ext4_lblk_t, lblk ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2363 | __field( ext4_lblk_t, len ) |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2364 | __field( ext4_fsblk_t, pblk ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2365 | __field( char, status ) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2366 | ), |
| 2367 | |
| 2368 | TP_fast_assign( |
| 2369 | __entry->dev = inode->i_sb->s_dev; |
| 2370 | __entry->ino = inode->i_ino; |
Zheng Liu | 06b0c88 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2371 | __entry->lblk = es->es_lblk; |
| 2372 | __entry->len = es->es_len; |
Dmitry Monakhov | 52144d8 | 2019-11-14 20:01:47 +0000 | [diff] [blame] | 2373 | __entry->pblk = ext4_es_show_pblock(es); |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 2374 | __entry->status = ext4_es_status(es); |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2375 | ), |
| 2376 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2377 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2378 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2379 | (unsigned long) __entry->ino, |
Zheng Liu | fdc0212 | 2013-02-18 00:26:51 -0500 | [diff] [blame] | 2380 | __entry->lblk, __entry->len, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2381 | __entry->pblk, show_extent_status(__entry->status)) |
Zheng Liu | 992e9fd | 2012-11-08 21:57:33 -0500 | [diff] [blame] | 2382 | ); |
| 2383 | |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2384 | TRACE_EVENT(ext4_es_lookup_extent_enter, |
| 2385 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk), |
| 2386 | |
| 2387 | TP_ARGS(inode, lblk), |
| 2388 | |
| 2389 | TP_STRUCT__entry( |
| 2390 | __field( dev_t, dev ) |
| 2391 | __field( ino_t, ino ) |
| 2392 | __field( ext4_lblk_t, lblk ) |
| 2393 | ), |
| 2394 | |
| 2395 | TP_fast_assign( |
| 2396 | __entry->dev = inode->i_sb->s_dev; |
| 2397 | __entry->ino = inode->i_ino; |
| 2398 | __entry->lblk = lblk; |
| 2399 | ), |
| 2400 | |
| 2401 | TP_printk("dev %d,%d ino %lu lblk %u", |
| 2402 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2403 | (unsigned long) __entry->ino, __entry->lblk) |
| 2404 | ); |
| 2405 | |
| 2406 | TRACE_EVENT(ext4_es_lookup_extent_exit, |
| 2407 | TP_PROTO(struct inode *inode, struct extent_status *es, |
| 2408 | int found), |
| 2409 | |
| 2410 | TP_ARGS(inode, es, found), |
| 2411 | |
| 2412 | TP_STRUCT__entry( |
| 2413 | __field( dev_t, dev ) |
| 2414 | __field( ino_t, ino ) |
| 2415 | __field( ext4_lblk_t, lblk ) |
| 2416 | __field( ext4_lblk_t, len ) |
| 2417 | __field( ext4_fsblk_t, pblk ) |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2418 | __field( char, status ) |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2419 | __field( int, found ) |
| 2420 | ), |
| 2421 | |
| 2422 | TP_fast_assign( |
| 2423 | __entry->dev = inode->i_sb->s_dev; |
| 2424 | __entry->ino = inode->i_ino; |
| 2425 | __entry->lblk = es->es_lblk; |
| 2426 | __entry->len = es->es_len; |
Dmitry Monakhov | 52144d8 | 2019-11-14 20:01:47 +0000 | [diff] [blame] | 2427 | __entry->pblk = ext4_es_show_pblock(es); |
Theodore Ts'o | 3be78c7 | 2013-08-16 21:22:41 -0400 | [diff] [blame] | 2428 | __entry->status = ext4_es_status(es); |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2429 | __entry->found = found; |
| 2430 | ), |
| 2431 | |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2432 | TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s", |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2433 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2434 | (unsigned long) __entry->ino, __entry->found, |
| 2435 | __entry->lblk, __entry->len, |
| 2436 | __entry->found ? __entry->pblk : 0, |
Theodore Ts'o | 21ddd56 | 2013-07-01 08:12:40 -0400 | [diff] [blame] | 2437 | show_extent_status(__entry->found ? __entry->status : 0)) |
Zheng Liu | d100eef | 2013-02-18 00:29:59 -0500 | [diff] [blame] | 2438 | ); |
| 2439 | |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2440 | DECLARE_EVENT_CLASS(ext4__es_shrink_enter, |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2441 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2442 | |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2443 | TP_ARGS(sb, nr_to_scan, cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2444 | |
| 2445 | TP_STRUCT__entry( |
| 2446 | __field( dev_t, dev ) |
| 2447 | __field( int, nr_to_scan ) |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2448 | __field( int, cache_cnt ) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2449 | ), |
| 2450 | |
| 2451 | TP_fast_assign( |
| 2452 | __entry->dev = sb->s_dev; |
| 2453 | __entry->nr_to_scan = nr_to_scan; |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2454 | __entry->cache_cnt = cache_cnt; |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2455 | ), |
| 2456 | |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2457 | TP_printk("dev %d,%d nr_to_scan %d cache_cnt %d", |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2458 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2459 | __entry->nr_to_scan, __entry->cache_cnt) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2460 | ); |
| 2461 | |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2462 | DEFINE_EVENT(ext4__es_shrink_enter, ext4_es_shrink_count, |
| 2463 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2464 | |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2465 | TP_ARGS(sb, nr_to_scan, cache_cnt) |
| 2466 | ); |
| 2467 | |
| 2468 | DEFINE_EVENT(ext4__es_shrink_enter, ext4_es_shrink_scan_enter, |
| 2469 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
| 2470 | |
| 2471 | TP_ARGS(sb, nr_to_scan, cache_cnt) |
| 2472 | ); |
| 2473 | |
| 2474 | TRACE_EVENT(ext4_es_shrink_scan_exit, |
| 2475 | TP_PROTO(struct super_block *sb, int nr_shrunk, int cache_cnt), |
| 2476 | |
| 2477 | TP_ARGS(sb, nr_shrunk, cache_cnt), |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2478 | |
| 2479 | TP_STRUCT__entry( |
| 2480 | __field( dev_t, dev ) |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2481 | __field( int, nr_shrunk ) |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2482 | __field( int, cache_cnt ) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2483 | ), |
| 2484 | |
| 2485 | TP_fast_assign( |
| 2486 | __entry->dev = sb->s_dev; |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2487 | __entry->nr_shrunk = nr_shrunk; |
Theodore Ts'o | 2463077 | 2013-02-28 23:58:56 -0500 | [diff] [blame] | 2488 | __entry->cache_cnt = cache_cnt; |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2489 | ), |
| 2490 | |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2491 | TP_printk("dev %d,%d nr_shrunk %d cache_cnt %d", |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2492 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Zheng Liu | e963bb1 | 2014-09-01 22:22:13 -0400 | [diff] [blame] | 2493 | __entry->nr_shrunk, __entry->cache_cnt) |
Zheng Liu | 74cd15c | 2013-02-18 00:32:55 -0500 | [diff] [blame] | 2494 | ); |
| 2495 | |
Namjae Jeon | 9eb7948 | 2014-02-23 15:18:59 -0500 | [diff] [blame] | 2496 | TRACE_EVENT(ext4_collapse_range, |
| 2497 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len), |
| 2498 | |
| 2499 | TP_ARGS(inode, offset, len), |
| 2500 | |
| 2501 | TP_STRUCT__entry( |
| 2502 | __field(dev_t, dev) |
| 2503 | __field(ino_t, ino) |
| 2504 | __field(loff_t, offset) |
| 2505 | __field(loff_t, len) |
| 2506 | ), |
| 2507 | |
| 2508 | TP_fast_assign( |
| 2509 | __entry->dev = inode->i_sb->s_dev; |
| 2510 | __entry->ino = inode->i_ino; |
| 2511 | __entry->offset = offset; |
| 2512 | __entry->len = len; |
| 2513 | ), |
| 2514 | |
| 2515 | TP_printk("dev %d,%d ino %lu offset %lld len %lld", |
| 2516 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2517 | (unsigned long) __entry->ino, |
| 2518 | __entry->offset, __entry->len) |
| 2519 | ); |
| 2520 | |
Namjae Jeon | 331573f | 2015-06-09 01:55:03 -0400 | [diff] [blame] | 2521 | TRACE_EVENT(ext4_insert_range, |
| 2522 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len), |
| 2523 | |
| 2524 | TP_ARGS(inode, offset, len), |
| 2525 | |
| 2526 | TP_STRUCT__entry( |
| 2527 | __field(dev_t, dev) |
| 2528 | __field(ino_t, ino) |
| 2529 | __field(loff_t, offset) |
| 2530 | __field(loff_t, len) |
| 2531 | ), |
| 2532 | |
| 2533 | TP_fast_assign( |
| 2534 | __entry->dev = inode->i_sb->s_dev; |
| 2535 | __entry->ino = inode->i_ino; |
| 2536 | __entry->offset = offset; |
| 2537 | __entry->len = len; |
| 2538 | ), |
| 2539 | |
| 2540 | TP_printk("dev %d,%d ino %lu offset %lld len %lld", |
| 2541 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2542 | (unsigned long) __entry->ino, |
| 2543 | __entry->offset, __entry->len) |
| 2544 | ); |
| 2545 | |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2546 | TRACE_EVENT(ext4_es_shrink, |
| 2547 | TP_PROTO(struct super_block *sb, int nr_shrunk, u64 scan_time, |
Zheng Liu | edaa53c | 2014-11-25 11:45:37 -0500 | [diff] [blame] | 2548 | int nr_skipped, int retried), |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2549 | |
Zheng Liu | edaa53c | 2014-11-25 11:45:37 -0500 | [diff] [blame] | 2550 | TP_ARGS(sb, nr_shrunk, scan_time, nr_skipped, retried), |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2551 | |
| 2552 | TP_STRUCT__entry( |
| 2553 | __field( dev_t, dev ) |
| 2554 | __field( int, nr_shrunk ) |
| 2555 | __field( unsigned long long, scan_time ) |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2556 | __field( int, nr_skipped ) |
| 2557 | __field( int, retried ) |
| 2558 | ), |
| 2559 | |
| 2560 | TP_fast_assign( |
| 2561 | __entry->dev = sb->s_dev; |
| 2562 | __entry->nr_shrunk = nr_shrunk; |
| 2563 | __entry->scan_time = div_u64(scan_time, 1000); |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2564 | __entry->nr_skipped = nr_skipped; |
| 2565 | __entry->retried = retried; |
| 2566 | ), |
| 2567 | |
Zheng Liu | edaa53c | 2014-11-25 11:45:37 -0500 | [diff] [blame] | 2568 | TP_printk("dev %d,%d nr_shrunk %d, scan_time %llu " |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2569 | "nr_skipped %d retried %d", |
| 2570 | MAJOR(__entry->dev), MINOR(__entry->dev), __entry->nr_shrunk, |
Zheng Liu | edaa53c | 2014-11-25 11:45:37 -0500 | [diff] [blame] | 2571 | __entry->scan_time, __entry->nr_skipped, __entry->retried) |
Zheng Liu | eb68d0e | 2014-09-01 22:26:49 -0400 | [diff] [blame] | 2572 | ); |
| 2573 | |
Eric Whitney | 0b02f4c | 2018-10-01 14:19:37 -0400 | [diff] [blame] | 2574 | TRACE_EVENT(ext4_es_insert_delayed_block, |
| 2575 | TP_PROTO(struct inode *inode, struct extent_status *es, |
| 2576 | bool allocated), |
| 2577 | |
| 2578 | TP_ARGS(inode, es, allocated), |
| 2579 | |
| 2580 | TP_STRUCT__entry( |
| 2581 | __field( dev_t, dev ) |
| 2582 | __field( ino_t, ino ) |
| 2583 | __field( ext4_lblk_t, lblk ) |
| 2584 | __field( ext4_lblk_t, len ) |
| 2585 | __field( ext4_fsblk_t, pblk ) |
| 2586 | __field( char, status ) |
| 2587 | __field( bool, allocated ) |
| 2588 | ), |
| 2589 | |
| 2590 | TP_fast_assign( |
| 2591 | __entry->dev = inode->i_sb->s_dev; |
| 2592 | __entry->ino = inode->i_ino; |
| 2593 | __entry->lblk = es->es_lblk; |
| 2594 | __entry->len = es->es_len; |
Dmitry Monakhov | 52144d8 | 2019-11-14 20:01:47 +0000 | [diff] [blame] | 2595 | __entry->pblk = ext4_es_show_pblock(es); |
Eric Whitney | 0b02f4c | 2018-10-01 14:19:37 -0400 | [diff] [blame] | 2596 | __entry->status = ext4_es_status(es); |
| 2597 | __entry->allocated = allocated; |
| 2598 | ), |
| 2599 | |
| 2600 | TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s " |
| 2601 | "allocated %d", |
| 2602 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2603 | (unsigned long) __entry->ino, |
| 2604 | __entry->lblk, __entry->len, |
| 2605 | __entry->pblk, show_extent_status(__entry->status), |
| 2606 | __entry->allocated) |
| 2607 | ); |
| 2608 | |
Darrick J. Wong | 0c9ec4b | 2017-04-30 00:36:53 -0400 | [diff] [blame] | 2609 | /* fsmap traces */ |
| 2610 | DECLARE_EVENT_CLASS(ext4_fsmap_class, |
| 2611 | TP_PROTO(struct super_block *sb, u32 keydev, u32 agno, u64 bno, u64 len, |
| 2612 | u64 owner), |
| 2613 | TP_ARGS(sb, keydev, agno, bno, len, owner), |
| 2614 | TP_STRUCT__entry( |
| 2615 | __field(dev_t, dev) |
| 2616 | __field(dev_t, keydev) |
| 2617 | __field(u32, agno) |
| 2618 | __field(u64, bno) |
| 2619 | __field(u64, len) |
| 2620 | __field(u64, owner) |
| 2621 | ), |
| 2622 | TP_fast_assign( |
| 2623 | __entry->dev = sb->s_bdev->bd_dev; |
| 2624 | __entry->keydev = new_decode_dev(keydev); |
| 2625 | __entry->agno = agno; |
| 2626 | __entry->bno = bno; |
| 2627 | __entry->len = len; |
| 2628 | __entry->owner = owner; |
| 2629 | ), |
| 2630 | TP_printk("dev %d:%d keydev %d:%d agno %u bno %llu len %llu owner %lld\n", |
| 2631 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2632 | MAJOR(__entry->keydev), MINOR(__entry->keydev), |
| 2633 | __entry->agno, |
| 2634 | __entry->bno, |
| 2635 | __entry->len, |
| 2636 | __entry->owner) |
| 2637 | ) |
| 2638 | #define DEFINE_FSMAP_EVENT(name) \ |
| 2639 | DEFINE_EVENT(ext4_fsmap_class, name, \ |
| 2640 | TP_PROTO(struct super_block *sb, u32 keydev, u32 agno, u64 bno, u64 len, \ |
| 2641 | u64 owner), \ |
| 2642 | TP_ARGS(sb, keydev, agno, bno, len, owner)) |
| 2643 | DEFINE_FSMAP_EVENT(ext4_fsmap_low_key); |
| 2644 | DEFINE_FSMAP_EVENT(ext4_fsmap_high_key); |
| 2645 | DEFINE_FSMAP_EVENT(ext4_fsmap_mapping); |
| 2646 | |
| 2647 | DECLARE_EVENT_CLASS(ext4_getfsmap_class, |
| 2648 | TP_PROTO(struct super_block *sb, struct ext4_fsmap *fsmap), |
| 2649 | TP_ARGS(sb, fsmap), |
| 2650 | TP_STRUCT__entry( |
| 2651 | __field(dev_t, dev) |
| 2652 | __field(dev_t, keydev) |
| 2653 | __field(u64, block) |
| 2654 | __field(u64, len) |
| 2655 | __field(u64, owner) |
| 2656 | __field(u64, flags) |
| 2657 | ), |
| 2658 | TP_fast_assign( |
| 2659 | __entry->dev = sb->s_bdev->bd_dev; |
| 2660 | __entry->keydev = new_decode_dev(fsmap->fmr_device); |
| 2661 | __entry->block = fsmap->fmr_physical; |
| 2662 | __entry->len = fsmap->fmr_length; |
| 2663 | __entry->owner = fsmap->fmr_owner; |
| 2664 | __entry->flags = fsmap->fmr_flags; |
| 2665 | ), |
| 2666 | TP_printk("dev %d:%d keydev %d:%d block %llu len %llu owner %lld flags 0x%llx\n", |
| 2667 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2668 | MAJOR(__entry->keydev), MINOR(__entry->keydev), |
| 2669 | __entry->block, |
| 2670 | __entry->len, |
| 2671 | __entry->owner, |
| 2672 | __entry->flags) |
| 2673 | ) |
| 2674 | #define DEFINE_GETFSMAP_EVENT(name) \ |
| 2675 | DEFINE_EVENT(ext4_getfsmap_class, name, \ |
| 2676 | TP_PROTO(struct super_block *sb, struct ext4_fsmap *fsmap), \ |
| 2677 | TP_ARGS(sb, fsmap)) |
| 2678 | DEFINE_GETFSMAP_EVENT(ext4_getfsmap_low_key); |
| 2679 | DEFINE_GETFSMAP_EVENT(ext4_getfsmap_high_key); |
| 2680 | DEFINE_GETFSMAP_EVENT(ext4_getfsmap_mapping); |
| 2681 | |
Theodore Ts'o | ccf0f32 | 2018-02-18 20:53:23 -0500 | [diff] [blame] | 2682 | TRACE_EVENT(ext4_shutdown, |
| 2683 | TP_PROTO(struct super_block *sb, unsigned long flags), |
| 2684 | |
| 2685 | TP_ARGS(sb, flags), |
| 2686 | |
| 2687 | TP_STRUCT__entry( |
| 2688 | __field( dev_t, dev ) |
| 2689 | __field( unsigned, flags ) |
| 2690 | ), |
| 2691 | |
| 2692 | TP_fast_assign( |
| 2693 | __entry->dev = sb->s_dev; |
| 2694 | __entry->flags = flags; |
| 2695 | ), |
| 2696 | |
| 2697 | TP_printk("dev %d,%d flags %u", |
| 2698 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2699 | __entry->flags) |
| 2700 | ); |
| 2701 | |
| 2702 | TRACE_EVENT(ext4_error, |
| 2703 | TP_PROTO(struct super_block *sb, const char *function, |
| 2704 | unsigned int line), |
| 2705 | |
| 2706 | TP_ARGS(sb, function, line), |
| 2707 | |
| 2708 | TP_STRUCT__entry( |
| 2709 | __field( dev_t, dev ) |
| 2710 | __field( const char *, function ) |
| 2711 | __field( unsigned, line ) |
| 2712 | ), |
| 2713 | |
| 2714 | TP_fast_assign( |
| 2715 | __entry->dev = sb->s_dev; |
| 2716 | __entry->function = function; |
| 2717 | __entry->line = line; |
| 2718 | ), |
| 2719 | |
| 2720 | TP_printk("dev %d,%d function %s line %u", |
| 2721 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2722 | __entry->function, __entry->line) |
| 2723 | ); |
| 2724 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 2725 | #endif /* _TRACE_EXT4_H */ |
| 2726 | |
| 2727 | /* This part must be outside protection */ |
| 2728 | #include <trace/define_trace.h> |