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