Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM ext4 |
| 3 | |
Li Zefan | d0b6e04 | 2009-07-13 10:33:21 +0800 | [diff] [blame] | 4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_EXT4_H |
| 6 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 7 | #include <linux/writeback.h> |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 8 | #include <linux/tracepoint.h> |
| 9 | |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 10 | struct ext4_allocation_context; |
| 11 | struct ext4_allocation_request; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 12 | struct ext4_extent; |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 13 | struct ext4_prealloc_space; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 14 | struct ext4_inode_info; |
Josh Stone | 0ef1224 | 2009-09-30 00:51:22 -0400 | [diff] [blame] | 15 | struct mpage_da_data; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 16 | struct ext4_map_blocks; |
| 17 | struct ext4_extent; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 18 | |
| 19 | #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] | 20 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 21 | TRACE_EVENT(ext4_free_inode, |
| 22 | TP_PROTO(struct inode *inode), |
| 23 | |
| 24 | TP_ARGS(inode), |
| 25 | |
| 26 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 27 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 28 | __field( ino_t, ino ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 29 | __field( uid_t, uid ) |
| 30 | __field( gid_t, gid ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 31 | __field( __u64, blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 32 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 33 | ), |
| 34 | |
| 35 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 36 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 37 | __entry->ino = inode->i_ino; |
Eric W. Biederman | 08cefc7 | 2012-02-07 15:41:49 -0800 | [diff] [blame] | 38 | __entry->uid = i_uid_read(inode); |
| 39 | __entry->gid = i_gid_read(inode); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 40 | __entry->blocks = inode->i_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 41 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 42 | ), |
| 43 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 44 | 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] | 45 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 46 | (unsigned long) __entry->ino, __entry->mode, |
| 47 | __entry->uid, __entry->gid, __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 48 | ); |
| 49 | |
| 50 | TRACE_EVENT(ext4_request_inode, |
| 51 | TP_PROTO(struct inode *dir, int mode), |
| 52 | |
| 53 | TP_ARGS(dir, mode), |
| 54 | |
| 55 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 56 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 57 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 58 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 59 | ), |
| 60 | |
| 61 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 62 | __entry->dev = dir->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 63 | __entry->dir = dir->i_ino; |
| 64 | __entry->mode = mode; |
| 65 | ), |
| 66 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 67 | TP_printk("dev %d,%d dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 68 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 69 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 70 | ); |
| 71 | |
| 72 | TRACE_EVENT(ext4_allocate_inode, |
| 73 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 74 | |
| 75 | TP_ARGS(inode, dir, mode), |
| 76 | |
| 77 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 78 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 79 | __field( ino_t, ino ) |
| 80 | __field( ino_t, dir ) |
Theodore Ts'o | 59be8e7 | 2011-07-30 12:38:46 -0400 | [diff] [blame] | 81 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 82 | ), |
| 83 | |
| 84 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 85 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 86 | __entry->ino = inode->i_ino; |
| 87 | __entry->dir = dir->i_ino; |
| 88 | __entry->mode = mode; |
| 89 | ), |
| 90 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 91 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 92 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 93 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 94 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 95 | ); |
| 96 | |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 97 | TRACE_EVENT(ext4_evict_inode, |
| 98 | TP_PROTO(struct inode *inode), |
| 99 | |
| 100 | TP_ARGS(inode), |
| 101 | |
| 102 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 103 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 104 | __field( ino_t, ino ) |
| 105 | __field( int, nlink ) |
| 106 | ), |
| 107 | |
| 108 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 109 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 110 | __entry->ino = inode->i_ino; |
| 111 | __entry->nlink = inode->i_nlink; |
| 112 | ), |
| 113 | |
| 114 | TP_printk("dev %d,%d ino %lu nlink %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 115 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 116 | (unsigned long) __entry->ino, __entry->nlink) |
| 117 | ); |
| 118 | |
| 119 | TRACE_EVENT(ext4_drop_inode, |
| 120 | TP_PROTO(struct inode *inode, int drop), |
| 121 | |
| 122 | TP_ARGS(inode, drop), |
| 123 | |
| 124 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 125 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 126 | __field( ino_t, ino ) |
| 127 | __field( int, drop ) |
| 128 | ), |
| 129 | |
| 130 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 131 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 132 | __entry->ino = inode->i_ino; |
| 133 | __entry->drop = drop; |
| 134 | ), |
| 135 | |
| 136 | TP_printk("dev %d,%d ino %lu drop %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 137 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 138 | (unsigned long) __entry->ino, __entry->drop) |
| 139 | ); |
| 140 | |
| 141 | TRACE_EVENT(ext4_mark_inode_dirty, |
| 142 | TP_PROTO(struct inode *inode, unsigned long IP), |
| 143 | |
| 144 | TP_ARGS(inode, IP), |
| 145 | |
| 146 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 147 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 148 | __field( ino_t, ino ) |
| 149 | __field(unsigned long, ip ) |
| 150 | ), |
| 151 | |
| 152 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 153 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 154 | __entry->ino = inode->i_ino; |
| 155 | __entry->ip = IP; |
| 156 | ), |
| 157 | |
| 158 | TP_printk("dev %d,%d ino %lu caller %pF", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 159 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 160 | (unsigned long) __entry->ino, (void *)__entry->ip) |
| 161 | ); |
| 162 | |
| 163 | TRACE_EVENT(ext4_begin_ordered_truncate, |
| 164 | TP_PROTO(struct inode *inode, loff_t new_size), |
| 165 | |
| 166 | TP_ARGS(inode, new_size), |
| 167 | |
| 168 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 169 | __field( dev_t, dev ) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 170 | __field( ino_t, ino ) |
| 171 | __field( loff_t, new_size ) |
| 172 | ), |
| 173 | |
| 174 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 175 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 176 | __entry->ino = inode->i_ino; |
| 177 | __entry->new_size = new_size; |
| 178 | ), |
| 179 | |
| 180 | TP_printk("dev %d,%d ino %lu new_size %lld", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 181 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 182 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 183 | __entry->new_size) |
Theodore Ts'o | 7ff9c07 | 2010-11-08 13:51:33 -0500 | [diff] [blame] | 184 | ); |
| 185 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 186 | DECLARE_EVENT_CLASS(ext4__write_begin, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 187 | |
| 188 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 189 | unsigned int flags), |
| 190 | |
| 191 | TP_ARGS(inode, pos, len, flags), |
| 192 | |
| 193 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 194 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 195 | __field( ino_t, ino ) |
| 196 | __field( loff_t, pos ) |
| 197 | __field( unsigned int, len ) |
| 198 | __field( unsigned int, flags ) |
| 199 | ), |
| 200 | |
| 201 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 202 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 203 | __entry->ino = inode->i_ino; |
| 204 | __entry->pos = pos; |
| 205 | __entry->len = len; |
| 206 | __entry->flags = flags; |
| 207 | ), |
| 208 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 209 | 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] | 210 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 211 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 212 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 213 | ); |
| 214 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 215 | DEFINE_EVENT(ext4__write_begin, ext4_write_begin, |
| 216 | |
| 217 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 218 | unsigned int flags), |
| 219 | |
| 220 | TP_ARGS(inode, pos, len, flags) |
| 221 | ); |
| 222 | |
| 223 | DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, |
| 224 | |
| 225 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 226 | unsigned int flags), |
| 227 | |
| 228 | TP_ARGS(inode, pos, len, flags) |
| 229 | ); |
| 230 | |
| 231 | DECLARE_EVENT_CLASS(ext4__write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 232 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 233 | unsigned int copied), |
| 234 | |
| 235 | TP_ARGS(inode, pos, len, copied), |
| 236 | |
| 237 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 238 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 239 | __field( ino_t, ino ) |
| 240 | __field( loff_t, pos ) |
| 241 | __field( unsigned int, len ) |
| 242 | __field( unsigned int, copied ) |
| 243 | ), |
| 244 | |
| 245 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 246 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 247 | __entry->ino = inode->i_ino; |
| 248 | __entry->pos = pos; |
| 249 | __entry->len = len; |
| 250 | __entry->copied = copied; |
| 251 | ), |
| 252 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 253 | 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] | 254 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 255 | (unsigned long) __entry->ino, |
| 256 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 257 | ); |
| 258 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 259 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, |
| 260 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 261 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 262 | unsigned int copied), |
| 263 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 264 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 265 | ); |
| 266 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 267 | DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end, |
| 268 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 269 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 270 | unsigned int copied), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 271 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 272 | TP_ARGS(inode, pos, len, copied) |
| 273 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 274 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 275 | DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 276 | |
Li Zefan | b5eb34c | 2009-11-26 15:07:36 +0800 | [diff] [blame] | 277 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 278 | unsigned int copied), |
| 279 | |
| 280 | TP_ARGS(inode, pos, len, copied) |
| 281 | ); |
| 282 | |
| 283 | DEFINE_EVENT(ext4__write_end, ext4_da_write_end, |
| 284 | |
| 285 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 286 | unsigned int copied), |
| 287 | |
| 288 | TP_ARGS(inode, pos, len, copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 289 | ); |
| 290 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 291 | TRACE_EVENT(ext4_da_writepages, |
| 292 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 293 | |
| 294 | TP_ARGS(inode, wbc), |
| 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 | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 298 | __field( ino_t, ino ) |
| 299 | __field( long, nr_to_write ) |
| 300 | __field( long, pages_skipped ) |
| 301 | __field( loff_t, range_start ) |
| 302 | __field( loff_t, range_end ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 303 | __field( pgoff_t, writeback_index ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 304 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 305 | __field( char, for_kupdate ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 306 | __field( char, range_cyclic ) |
| 307 | ), |
| 308 | |
| 309 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 310 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 311 | __entry->ino = inode->i_ino; |
| 312 | __entry->nr_to_write = wbc->nr_to_write; |
| 313 | __entry->pages_skipped = wbc->pages_skipped; |
| 314 | __entry->range_start = wbc->range_start; |
| 315 | __entry->range_end = wbc->range_end; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 316 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 317 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 318 | __entry->for_kupdate = wbc->for_kupdate; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 319 | __entry->range_cyclic = wbc->range_cyclic; |
| 320 | ), |
| 321 | |
Theodore Ts'o | a107e5a | 2010-10-27 23:44:47 -0400 | [diff] [blame] | 322 | 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] | 323 | "range_start %lld range_end %lld sync_mode %d " |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 324 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
| 325 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 326 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 327 | __entry->pages_skipped, __entry->range_start, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 328 | __entry->range_end, __entry->sync_mode, |
| 329 | __entry->for_kupdate, __entry->range_cyclic, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 330 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 331 | ); |
| 332 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 333 | TRACE_EVENT(ext4_da_write_pages, |
| 334 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), |
| 335 | |
| 336 | TP_ARGS(inode, mpd), |
| 337 | |
| 338 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 339 | __field( dev_t, dev ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 340 | __field( ino_t, ino ) |
| 341 | __field( __u64, b_blocknr ) |
| 342 | __field( __u32, b_size ) |
| 343 | __field( __u32, b_state ) |
| 344 | __field( unsigned long, first_page ) |
| 345 | __field( int, io_done ) |
| 346 | __field( int, pages_written ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 347 | __field( int, sync_mode ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 348 | ), |
| 349 | |
| 350 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 351 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 352 | __entry->ino = inode->i_ino; |
| 353 | __entry->b_blocknr = mpd->b_blocknr; |
| 354 | __entry->b_size = mpd->b_size; |
| 355 | __entry->b_state = mpd->b_state; |
| 356 | __entry->first_page = mpd->first_page; |
| 357 | __entry->io_done = mpd->io_done; |
| 358 | __entry->pages_written = mpd->pages_written; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 359 | __entry->sync_mode = mpd->wbc->sync_mode; |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 360 | ), |
| 361 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 362 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " |
| 363 | "first_page %lu io_done %d pages_written %d sync_mode %d", |
| 364 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 365 | (unsigned long) __entry->ino, |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 366 | __entry->b_blocknr, __entry->b_size, |
| 367 | __entry->b_state, __entry->first_page, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 368 | __entry->io_done, __entry->pages_written, |
| 369 | __entry->sync_mode |
| 370 | ) |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 371 | ); |
| 372 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 373 | TRACE_EVENT(ext4_da_writepages_result, |
| 374 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 375 | int ret, int pages_written), |
| 376 | |
| 377 | TP_ARGS(inode, wbc, ret, pages_written), |
| 378 | |
| 379 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 380 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 381 | __field( ino_t, ino ) |
| 382 | __field( int, ret ) |
| 383 | __field( int, pages_written ) |
| 384 | __field( long, pages_skipped ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 385 | __field( pgoff_t, writeback_index ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 386 | __field( int, sync_mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 387 | ), |
| 388 | |
| 389 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 390 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 391 | __entry->ino = inode->i_ino; |
| 392 | __entry->ret = ret; |
| 393 | __entry->pages_written = pages_written; |
| 394 | __entry->pages_skipped = wbc->pages_skipped; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 395 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 396 | __entry->sync_mode = wbc->sync_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 397 | ), |
| 398 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 399 | 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] | 400 | "sync_mode %d writeback_index %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 401 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 402 | (unsigned long) __entry->ino, __entry->ret, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 403 | __entry->pages_written, __entry->pages_skipped, |
Wu Fengguang | b7a2441 | 2010-07-21 22:19:51 -0600 | [diff] [blame] | 404 | __entry->sync_mode, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 405 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 406 | ); |
| 407 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 408 | DECLARE_EVENT_CLASS(ext4__page_op, |
| 409 | TP_PROTO(struct page *page), |
| 410 | |
| 411 | TP_ARGS(page), |
| 412 | |
| 413 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 414 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 415 | __field( ino_t, ino ) |
| 416 | __field( pgoff_t, index ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 417 | |
| 418 | ), |
| 419 | |
| 420 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 421 | __entry->dev = page->mapping->host->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 422 | __entry->ino = page->mapping->host->i_ino; |
| 423 | __entry->index = page->index; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 424 | ), |
| 425 | |
| 426 | TP_printk("dev %d,%d ino %lu page_index %lu", |
| 427 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 428 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 429 | (unsigned long) __entry->index) |
| 430 | ); |
| 431 | |
| 432 | DEFINE_EVENT(ext4__page_op, ext4_writepage, |
| 433 | |
| 434 | TP_PROTO(struct page *page), |
| 435 | |
| 436 | TP_ARGS(page) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 437 | ); |
| 438 | |
| 439 | DEFINE_EVENT(ext4__page_op, ext4_readpage, |
| 440 | |
| 441 | TP_PROTO(struct page *page), |
| 442 | |
| 443 | TP_ARGS(page) |
| 444 | ); |
| 445 | |
| 446 | DEFINE_EVENT(ext4__page_op, ext4_releasepage, |
| 447 | |
| 448 | TP_PROTO(struct page *page), |
| 449 | |
| 450 | TP_ARGS(page) |
| 451 | ); |
| 452 | |
| 453 | TRACE_EVENT(ext4_invalidatepage, |
| 454 | TP_PROTO(struct page *page, unsigned long offset), |
| 455 | |
| 456 | TP_ARGS(page, offset), |
| 457 | |
| 458 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 459 | __field( dev_t, dev ) |
| 460 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 461 | __field( pgoff_t, index ) |
| 462 | __field( unsigned long, offset ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 463 | |
| 464 | ), |
| 465 | |
| 466 | TP_fast_assign( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 467 | __entry->dev = page->mapping->host->i_sb->s_dev; |
| 468 | __entry->ino = page->mapping->host->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 469 | __entry->index = page->index; |
| 470 | __entry->offset = offset; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 471 | ), |
| 472 | |
| 473 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", |
| 474 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 475 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 476 | (unsigned long) __entry->index, __entry->offset) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 477 | ); |
| 478 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 479 | TRACE_EVENT(ext4_discard_blocks, |
| 480 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 481 | unsigned long long count), |
| 482 | |
| 483 | TP_ARGS(sb, blk, count), |
| 484 | |
| 485 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 486 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 487 | __field( __u64, blk ) |
| 488 | __field( __u64, count ) |
| 489 | |
| 490 | ), |
| 491 | |
| 492 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 493 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 494 | __entry->blk = blk; |
| 495 | __entry->count = count; |
| 496 | ), |
| 497 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 498 | TP_printk("dev %d,%d blk %llu count %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 499 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 500 | __entry->blk, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 501 | ); |
| 502 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 503 | DECLARE_EVENT_CLASS(ext4__mb_new_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 504 | TP_PROTO(struct ext4_allocation_context *ac, |
| 505 | struct ext4_prealloc_space *pa), |
| 506 | |
| 507 | TP_ARGS(ac, pa), |
| 508 | |
| 509 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 510 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 511 | __field( ino_t, ino ) |
| 512 | __field( __u64, pa_pstart ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 513 | __field( __u64, pa_lstart ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 514 | __field( __u32, pa_len ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 515 | |
| 516 | ), |
| 517 | |
| 518 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 519 | __entry->dev = ac->ac_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 520 | __entry->ino = ac->ac_inode->i_ino; |
| 521 | __entry->pa_pstart = pa->pa_pstart; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 522 | __entry->pa_lstart = pa->pa_lstart; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 523 | __entry->pa_len = pa->pa_len; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 524 | ), |
| 525 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 526 | 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] | 527 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 528 | (unsigned long) __entry->ino, |
| 529 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 530 | ); |
| 531 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 532 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
| 533 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 534 | TP_PROTO(struct ext4_allocation_context *ac, |
| 535 | struct ext4_prealloc_space *pa), |
| 536 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 537 | TP_ARGS(ac, pa) |
| 538 | ); |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 539 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 540 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 541 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 542 | TP_PROTO(struct ext4_allocation_context *ac, |
| 543 | struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 544 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 545 | TP_ARGS(ac, pa) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 546 | ); |
| 547 | |
| 548 | TRACE_EVENT(ext4_mb_release_inode_pa, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 549 | TP_PROTO(struct ext4_prealloc_space *pa, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 550 | unsigned long long block, unsigned int count), |
| 551 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 552 | TP_ARGS(pa, block, count), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 553 | |
| 554 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 555 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 556 | __field( ino_t, ino ) |
| 557 | __field( __u64, block ) |
| 558 | __field( __u32, count ) |
| 559 | |
| 560 | ), |
| 561 | |
| 562 | TP_fast_assign( |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 563 | __entry->dev = pa->pa_inode->i_sb->s_dev; |
| 564 | __entry->ino = pa->pa_inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 565 | __entry->block = block; |
| 566 | __entry->count = count; |
| 567 | ), |
| 568 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 569 | TP_printk("dev %d,%d ino %lu block %llu count %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 570 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 571 | (unsigned long) __entry->ino, |
| 572 | __entry->block, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 573 | ); |
| 574 | |
| 575 | TRACE_EVENT(ext4_mb_release_group_pa, |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 576 | TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 577 | |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 578 | TP_ARGS(sb, pa), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 579 | |
| 580 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 581 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 582 | __field( __u64, pa_pstart ) |
| 583 | __field( __u32, pa_len ) |
| 584 | |
| 585 | ), |
| 586 | |
| 587 | TP_fast_assign( |
Yongqiang Yang | 60e07cf | 2011-12-18 15:49:54 -0500 | [diff] [blame] | 588 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 589 | __entry->pa_pstart = pa->pa_pstart; |
| 590 | __entry->pa_len = pa->pa_len; |
| 591 | ), |
| 592 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 593 | TP_printk("dev %d,%d pstart %llu len %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 594 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 595 | __entry->pa_pstart, __entry->pa_len) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 596 | ); |
| 597 | |
| 598 | TRACE_EVENT(ext4_discard_preallocations, |
| 599 | TP_PROTO(struct inode *inode), |
| 600 | |
| 601 | TP_ARGS(inode), |
| 602 | |
| 603 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 604 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 605 | __field( ino_t, ino ) |
| 606 | |
| 607 | ), |
| 608 | |
| 609 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 610 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 611 | __entry->ino = inode->i_ino; |
| 612 | ), |
| 613 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 614 | TP_printk("dev %d,%d ino %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 615 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 616 | (unsigned long) __entry->ino) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 617 | ); |
| 618 | |
| 619 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 620 | TP_PROTO(struct super_block *sb, int needed), |
| 621 | |
| 622 | TP_ARGS(sb, needed), |
| 623 | |
| 624 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 625 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 626 | __field( int, needed ) |
| 627 | |
| 628 | ), |
| 629 | |
| 630 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 631 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 632 | __entry->needed = needed; |
| 633 | ), |
| 634 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 635 | TP_printk("dev %d,%d needed %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 636 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 637 | __entry->needed) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 638 | ); |
| 639 | |
| 640 | TRACE_EVENT(ext4_request_blocks, |
| 641 | TP_PROTO(struct ext4_allocation_request *ar), |
| 642 | |
| 643 | TP_ARGS(ar), |
| 644 | |
| 645 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 646 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 647 | __field( ino_t, ino ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 648 | __field( unsigned int, len ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 649 | __field( __u32, logical ) |
| 650 | __field( __u32, lleft ) |
| 651 | __field( __u32, lright ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 652 | __field( __u64, goal ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 653 | __field( __u64, pleft ) |
| 654 | __field( __u64, pright ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 655 | __field( unsigned int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 656 | ), |
| 657 | |
| 658 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 659 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 660 | __entry->ino = ar->inode->i_ino; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 661 | __entry->len = ar->len; |
| 662 | __entry->logical = ar->logical; |
| 663 | __entry->goal = ar->goal; |
| 664 | __entry->lleft = ar->lleft; |
| 665 | __entry->lright = ar->lright; |
| 666 | __entry->pleft = ar->pleft; |
| 667 | __entry->pright = ar->pright; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 668 | __entry->flags = ar->flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 669 | ), |
| 670 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 671 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu " |
| 672 | "lleft %u lright %u pleft %llu pright %llu ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 673 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 674 | (unsigned long) __entry->ino, __entry->flags, |
| 675 | __entry->len, __entry->logical, __entry->goal, |
| 676 | __entry->lleft, __entry->lright, __entry->pleft, |
| 677 | __entry->pright) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 678 | ); |
| 679 | |
| 680 | TRACE_EVENT(ext4_allocate_blocks, |
| 681 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 682 | |
| 683 | TP_ARGS(ar, block), |
| 684 | |
| 685 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 686 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 687 | __field( ino_t, ino ) |
| 688 | __field( __u64, block ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 689 | __field( unsigned int, len ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 690 | __field( __u32, logical ) |
| 691 | __field( __u32, lleft ) |
| 692 | __field( __u32, lright ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 693 | __field( __u64, goal ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 694 | __field( __u64, pleft ) |
| 695 | __field( __u64, pright ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 696 | __field( unsigned int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 697 | ), |
| 698 | |
| 699 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 700 | __entry->dev = ar->inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 701 | __entry->ino = ar->inode->i_ino; |
| 702 | __entry->block = block; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 703 | __entry->len = ar->len; |
| 704 | __entry->logical = ar->logical; |
| 705 | __entry->goal = ar->goal; |
| 706 | __entry->lleft = ar->lleft; |
| 707 | __entry->lright = ar->lright; |
| 708 | __entry->pleft = ar->pleft; |
| 709 | __entry->pright = ar->pright; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 710 | __entry->flags = ar->flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 711 | ), |
| 712 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 713 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u " |
| 714 | "goal %llu lleft %u lright %u pleft %llu pright %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 715 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 716 | (unsigned long) __entry->ino, __entry->flags, |
| 717 | __entry->len, __entry->block, __entry->logical, |
| 718 | __entry->goal, __entry->lleft, __entry->lright, |
| 719 | __entry->pleft, __entry->pright) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 720 | ); |
| 721 | |
| 722 | TRACE_EVENT(ext4_free_blocks, |
| 723 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 724 | int flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 725 | |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 726 | TP_ARGS(inode, block, count, flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 727 | |
| 728 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 729 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 730 | __field( ino_t, ino ) |
| 731 | __field( __u64, block ) |
| 732 | __field( unsigned long, count ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 733 | __field( int, flags ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 734 | __field( __u16, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 735 | ), |
| 736 | |
| 737 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 738 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 739 | __entry->ino = inode->i_ino; |
| 740 | __entry->block = block; |
| 741 | __entry->count = count; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 742 | __entry->flags = flags; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 743 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 744 | ), |
| 745 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 746 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 747 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 748 | (unsigned long) __entry->ino, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame] | 749 | __entry->mode, __entry->block, __entry->count, |
| 750 | __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 751 | ); |
| 752 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 753 | TRACE_EVENT(ext4_sync_file_enter, |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 754 | TP_PROTO(struct file *file, int datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 755 | |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 756 | TP_ARGS(file, datasync), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 757 | |
| 758 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 759 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 760 | __field( ino_t, ino ) |
| 761 | __field( ino_t, parent ) |
| 762 | __field( int, datasync ) |
| 763 | ), |
| 764 | |
| 765 | TP_fast_assign( |
Christoph Hellwig | 7ea8085 | 2010-05-26 17:53:25 +0200 | [diff] [blame] | 766 | struct dentry *dentry = file->f_path.dentry; |
| 767 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 768 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 769 | __entry->ino = dentry->d_inode->i_ino; |
| 770 | __entry->datasync = datasync; |
| 771 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
| 772 | ), |
| 773 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 774 | TP_printk("dev %d,%d ino %lu parent %lu datasync %d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 775 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 776 | (unsigned long) __entry->ino, |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 777 | (unsigned long) __entry->parent, __entry->datasync) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 778 | ); |
| 779 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 780 | TRACE_EVENT(ext4_sync_file_exit, |
| 781 | TP_PROTO(struct inode *inode, int ret), |
| 782 | |
| 783 | TP_ARGS(inode, ret), |
| 784 | |
| 785 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 786 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 787 | __field( ino_t, ino ) |
| 788 | __field( int, ret ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 789 | ), |
| 790 | |
| 791 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 792 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 793 | __entry->ino = inode->i_ino; |
| 794 | __entry->ret = ret; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 795 | ), |
| 796 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 797 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 798 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 799 | (unsigned long) __entry->ino, |
| 800 | __entry->ret) |
| 801 | ); |
| 802 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 803 | TRACE_EVENT(ext4_sync_fs, |
| 804 | TP_PROTO(struct super_block *sb, int wait), |
| 805 | |
| 806 | TP_ARGS(sb, wait), |
| 807 | |
| 808 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 809 | __field( dev_t, dev ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 810 | __field( int, wait ) |
| 811 | |
| 812 | ), |
| 813 | |
| 814 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 815 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 816 | __entry->wait = wait; |
| 817 | ), |
| 818 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 819 | TP_printk("dev %d,%d wait %d", |
| 820 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 821 | __entry->wait) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 822 | ); |
| 823 | |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 824 | TRACE_EVENT(ext4_alloc_da_blocks, |
| 825 | TP_PROTO(struct inode *inode), |
| 826 | |
| 827 | TP_ARGS(inode), |
| 828 | |
| 829 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 830 | __field( dev_t, dev ) |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 831 | __field( ino_t, ino ) |
| 832 | __field( unsigned int, data_blocks ) |
| 833 | __field( unsigned int, meta_blocks ) |
| 834 | ), |
| 835 | |
| 836 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 837 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 838 | __entry->ino = inode->i_ino; |
| 839 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 840 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 841 | ), |
| 842 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 843 | TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 844 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 845 | (unsigned long) __entry->ino, |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 846 | __entry->data_blocks, __entry->meta_blocks) |
| 847 | ); |
| 848 | |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 849 | TRACE_EVENT(ext4_mballoc_alloc, |
| 850 | TP_PROTO(struct ext4_allocation_context *ac), |
| 851 | |
| 852 | TP_ARGS(ac), |
| 853 | |
| 854 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 855 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 856 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 857 | __field( __u32, orig_logical ) |
| 858 | __field( int, orig_start ) |
| 859 | __field( __u32, orig_group ) |
| 860 | __field( int, orig_len ) |
| 861 | __field( __u32, goal_logical ) |
| 862 | __field( int, goal_start ) |
| 863 | __field( __u32, goal_group ) |
| 864 | __field( int, goal_len ) |
| 865 | __field( __u32, result_logical ) |
| 866 | __field( int, result_start ) |
| 867 | __field( __u32, result_group ) |
| 868 | __field( int, result_len ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 869 | __field( __u16, found ) |
| 870 | __field( __u16, groups ) |
| 871 | __field( __u16, buddy ) |
| 872 | __field( __u16, flags ) |
| 873 | __field( __u16, tail ) |
| 874 | __field( __u8, cr ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 875 | ), |
| 876 | |
| 877 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 878 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 879 | __entry->ino = ac->ac_inode->i_ino; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 880 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 881 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 882 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 883 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 884 | __entry->goal_logical = ac->ac_g_ex.fe_logical; |
| 885 | __entry->goal_start = ac->ac_g_ex.fe_start; |
| 886 | __entry->goal_group = ac->ac_g_ex.fe_group; |
| 887 | __entry->goal_len = ac->ac_g_ex.fe_len; |
| 888 | __entry->result_logical = ac->ac_f_ex.fe_logical; |
| 889 | __entry->result_start = ac->ac_f_ex.fe_start; |
| 890 | __entry->result_group = ac->ac_f_ex.fe_group; |
| 891 | __entry->result_len = ac->ac_f_ex.fe_len; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 892 | __entry->found = ac->ac_found; |
| 893 | __entry->flags = ac->ac_flags; |
| 894 | __entry->groups = ac->ac_groups_scanned; |
| 895 | __entry->buddy = ac->ac_buddy; |
| 896 | __entry->tail = ac->ac_tail; |
| 897 | __entry->cr = ac->ac_criteria; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 898 | ), |
| 899 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 900 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 901 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " |
| 902 | "tail %u broken %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 903 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 904 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 905 | __entry->orig_group, __entry->orig_start, |
| 906 | __entry->orig_len, __entry->orig_logical, |
| 907 | __entry->goal_group, __entry->goal_start, |
| 908 | __entry->goal_len, __entry->goal_logical, |
| 909 | __entry->result_group, __entry->result_start, |
| 910 | __entry->result_len, __entry->result_logical, |
| 911 | __entry->found, __entry->groups, __entry->cr, |
| 912 | __entry->flags, __entry->tail, |
| 913 | __entry->buddy ? 1 << __entry->buddy : 0) |
| 914 | ); |
| 915 | |
| 916 | TRACE_EVENT(ext4_mballoc_prealloc, |
| 917 | TP_PROTO(struct ext4_allocation_context *ac), |
| 918 | |
| 919 | TP_ARGS(ac), |
| 920 | |
| 921 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 922 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 923 | __field( ino_t, ino ) |
| 924 | __field( __u32, orig_logical ) |
| 925 | __field( int, orig_start ) |
| 926 | __field( __u32, orig_group ) |
| 927 | __field( int, orig_len ) |
| 928 | __field( __u32, result_logical ) |
| 929 | __field( int, result_start ) |
| 930 | __field( __u32, result_group ) |
| 931 | __field( int, result_len ) |
| 932 | ), |
| 933 | |
| 934 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 935 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 936 | __entry->ino = ac->ac_inode->i_ino; |
| 937 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 938 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 939 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 940 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 941 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 942 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 943 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 944 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 945 | ), |
| 946 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 947 | 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] | 948 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 949 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 950 | __entry->orig_group, __entry->orig_start, |
| 951 | __entry->orig_len, __entry->orig_logical, |
| 952 | __entry->result_group, __entry->result_start, |
| 953 | __entry->result_len, __entry->result_logical) |
| 954 | ); |
| 955 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 956 | DECLARE_EVENT_CLASS(ext4__mballoc, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 957 | TP_PROTO(struct super_block *sb, |
| 958 | struct inode *inode, |
| 959 | ext4_group_t group, |
| 960 | ext4_grpblk_t start, |
| 961 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 962 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 963 | TP_ARGS(sb, inode, group, start, len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 964 | |
| 965 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 966 | __field( dev_t, dev ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 967 | __field( ino_t, ino ) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 968 | __field( int, result_start ) |
| 969 | __field( __u32, result_group ) |
| 970 | __field( int, result_len ) |
| 971 | ), |
| 972 | |
| 973 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 974 | __entry->dev = sb->s_dev; |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 975 | __entry->ino = inode ? inode->i_ino : 0; |
| 976 | __entry->result_start = start; |
| 977 | __entry->result_group = group; |
| 978 | __entry->result_len = len; |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 979 | ), |
| 980 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 981 | TP_printk("dev %d,%d inode %lu extent %u/%d/%d ", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 982 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 983 | (unsigned long) __entry->ino, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 984 | __entry->result_group, __entry->result_start, |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 985 | __entry->result_len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 986 | ); |
| 987 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 988 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, |
| 989 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 990 | TP_PROTO(struct super_block *sb, |
| 991 | struct inode *inode, |
| 992 | ext4_group_t group, |
| 993 | ext4_grpblk_t start, |
| 994 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 995 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 996 | TP_ARGS(sb, inode, group, start, len) |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 997 | ); |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 998 | |
Li Zefan | f084db9 | 2010-05-17 04:00:00 -0400 | [diff] [blame] | 999 | DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1000 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1001 | TP_PROTO(struct super_block *sb, |
| 1002 | struct inode *inode, |
| 1003 | ext4_group_t group, |
| 1004 | ext4_grpblk_t start, |
| 1005 | ext4_grpblk_t len), |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1006 | |
Eric Sandeen | 3e1e5f5 | 2010-10-27 21:30:07 -0400 | [diff] [blame] | 1007 | TP_ARGS(sb, inode, group, start, len) |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 1008 | ); |
| 1009 | |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1010 | TRACE_EVENT(ext4_forget, |
| 1011 | TP_PROTO(struct inode *inode, int is_metadata, __u64 block), |
| 1012 | |
| 1013 | TP_ARGS(inode, is_metadata, block), |
| 1014 | |
| 1015 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1016 | __field( dev_t, dev ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1017 | __field( ino_t, ino ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1018 | __field( __u64, block ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1019 | __field( int, is_metadata ) |
| 1020 | __field( __u16, mode ) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1021 | ), |
| 1022 | |
| 1023 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1024 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1025 | __entry->ino = inode->i_ino; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1026 | __entry->block = block; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1027 | __entry->is_metadata = is_metadata; |
| 1028 | __entry->mode = inode->i_mode; |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1029 | ), |
| 1030 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1031 | 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] | 1032 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1033 | (unsigned long) __entry->ino, |
| 1034 | __entry->mode, __entry->is_metadata, __entry->block) |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 1035 | ); |
| 1036 | |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1037 | TRACE_EVENT(ext4_da_update_reserve_space, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1038 | TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1039 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1040 | TP_ARGS(inode, used_blocks, quota_claim), |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1041 | |
| 1042 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1043 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1044 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1045 | __field( __u64, i_blocks ) |
| 1046 | __field( int, used_blocks ) |
| 1047 | __field( int, reserved_data_blocks ) |
| 1048 | __field( int, reserved_meta_blocks ) |
| 1049 | __field( int, allocated_meta_blocks ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1050 | __field( int, quota_claim ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1051 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1052 | ), |
| 1053 | |
| 1054 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1055 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1056 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1057 | __entry->i_blocks = inode->i_blocks; |
| 1058 | __entry->used_blocks = used_blocks; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1059 | __entry->reserved_data_blocks = |
| 1060 | EXT4_I(inode)->i_reserved_data_blocks; |
| 1061 | __entry->reserved_meta_blocks = |
| 1062 | EXT4_I(inode)->i_reserved_meta_blocks; |
| 1063 | __entry->allocated_meta_blocks = |
| 1064 | EXT4_I(inode)->i_allocated_meta_blocks; |
| 1065 | __entry->quota_claim = quota_claim; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1066 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1067 | ), |
| 1068 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1069 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
| 1070 | "reserved_data_blocks %d reserved_meta_blocks %d " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1071 | "allocated_meta_blocks %d quota_claim %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1072 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1073 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1074 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1075 | __entry->used_blocks, __entry->reserved_data_blocks, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1076 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks, |
| 1077 | __entry->quota_claim) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1078 | ); |
| 1079 | |
| 1080 | TRACE_EVENT(ext4_da_reserve_space, |
| 1081 | TP_PROTO(struct inode *inode, int md_needed), |
| 1082 | |
| 1083 | TP_ARGS(inode, md_needed), |
| 1084 | |
| 1085 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1086 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1087 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1088 | __field( __u64, i_blocks ) |
| 1089 | __field( int, md_needed ) |
| 1090 | __field( int, reserved_data_blocks ) |
| 1091 | __field( int, reserved_meta_blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1092 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1093 | ), |
| 1094 | |
| 1095 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1096 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1097 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1098 | __entry->i_blocks = inode->i_blocks; |
| 1099 | __entry->md_needed = md_needed; |
| 1100 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1101 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1102 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1103 | ), |
| 1104 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1105 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
| 1106 | "reserved_data_blocks %d reserved_meta_blocks %d", |
| 1107 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1108 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1109 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1110 | __entry->md_needed, __entry->reserved_data_blocks, |
| 1111 | __entry->reserved_meta_blocks) |
| 1112 | ); |
| 1113 | |
| 1114 | TRACE_EVENT(ext4_da_release_space, |
| 1115 | TP_PROTO(struct inode *inode, int freed_blocks), |
| 1116 | |
| 1117 | TP_ARGS(inode, freed_blocks), |
| 1118 | |
| 1119 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1120 | __field( dev_t, dev ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1121 | __field( ino_t, ino ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1122 | __field( __u64, i_blocks ) |
| 1123 | __field( int, freed_blocks ) |
| 1124 | __field( int, reserved_data_blocks ) |
| 1125 | __field( int, reserved_meta_blocks ) |
| 1126 | __field( int, allocated_meta_blocks ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1127 | __field( __u16, mode ) |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1128 | ), |
| 1129 | |
| 1130 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1131 | __entry->dev = inode->i_sb->s_dev; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1132 | __entry->ino = inode->i_ino; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1133 | __entry->i_blocks = inode->i_blocks; |
| 1134 | __entry->freed_blocks = freed_blocks; |
| 1135 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 1136 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 1137 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1138 | __entry->mode = inode->i_mode; |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1139 | ), |
| 1140 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1141 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
| 1142 | "reserved_data_blocks %d reserved_meta_blocks %d " |
| 1143 | "allocated_meta_blocks %d", |
| 1144 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1145 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1146 | __entry->mode, __entry->i_blocks, |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1147 | __entry->freed_blocks, __entry->reserved_data_blocks, |
| 1148 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
| 1149 | ); |
| 1150 | |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1151 | DECLARE_EVENT_CLASS(ext4__bitmap_load, |
| 1152 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1153 | |
| 1154 | TP_ARGS(sb, group), |
| 1155 | |
| 1156 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1157 | __field( dev_t, dev ) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1158 | __field( __u32, group ) |
| 1159 | |
| 1160 | ), |
| 1161 | |
| 1162 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1163 | __entry->dev = sb->s_dev; |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1164 | __entry->group = group; |
| 1165 | ), |
| 1166 | |
Theodore Ts'o | a269029 | 2010-10-27 22:08:50 -0400 | [diff] [blame] | 1167 | TP_printk("dev %d,%d group %u", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1168 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1169 | __entry->group) |
Theodore Ts'o | f307333 | 2010-05-17 03:00:00 -0400 | [diff] [blame] | 1170 | ); |
| 1171 | |
| 1172 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
| 1173 | |
| 1174 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1175 | |
| 1176 | TP_ARGS(sb, group) |
| 1177 | ); |
| 1178 | |
| 1179 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, |
| 1180 | |
| 1181 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1182 | |
| 1183 | TP_ARGS(sb, group) |
| 1184 | ); |
Theodore Ts'o | f8ec9d6 | 2010-01-01 01:00:21 -0500 | [diff] [blame] | 1185 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1186 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, |
| 1187 | |
| 1188 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1189 | |
| 1190 | TP_ARGS(sb, group) |
| 1191 | ); |
| 1192 | |
| 1193 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, |
| 1194 | |
| 1195 | TP_PROTO(struct super_block *sb, unsigned long group), |
| 1196 | |
| 1197 | TP_ARGS(sb, group) |
| 1198 | ); |
| 1199 | |
| 1200 | TRACE_EVENT(ext4_direct_IO_enter, |
| 1201 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), |
| 1202 | |
| 1203 | TP_ARGS(inode, offset, len, rw), |
| 1204 | |
| 1205 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1206 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1207 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1208 | __field( loff_t, pos ) |
| 1209 | __field( unsigned long, len ) |
| 1210 | __field( int, rw ) |
| 1211 | ), |
| 1212 | |
| 1213 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1214 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1215 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1216 | __entry->pos = offset; |
| 1217 | __entry->len = len; |
| 1218 | __entry->rw = rw; |
| 1219 | ), |
| 1220 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1221 | 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] | 1222 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1223 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1224 | __entry->pos, __entry->len, __entry->rw) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1225 | ); |
| 1226 | |
| 1227 | TRACE_EVENT(ext4_direct_IO_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1228 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, |
| 1229 | int rw, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1230 | |
| 1231 | TP_ARGS(inode, offset, len, rw, ret), |
| 1232 | |
| 1233 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1234 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1235 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1236 | __field( loff_t, pos ) |
| 1237 | __field( unsigned long, len ) |
| 1238 | __field( int, rw ) |
| 1239 | __field( int, ret ) |
| 1240 | ), |
| 1241 | |
| 1242 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1243 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1244 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1245 | __entry->pos = offset; |
| 1246 | __entry->len = len; |
| 1247 | __entry->rw = rw; |
| 1248 | __entry->ret = ret; |
| 1249 | ), |
| 1250 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1251 | 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] | 1252 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1253 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1254 | __entry->pos, __entry->len, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1255 | __entry->rw, __entry->ret) |
| 1256 | ); |
| 1257 | |
| 1258 | TRACE_EVENT(ext4_fallocate_enter, |
| 1259 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), |
| 1260 | |
| 1261 | TP_ARGS(inode, offset, len, mode), |
| 1262 | |
| 1263 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1264 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1265 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1266 | __field( loff_t, pos ) |
| 1267 | __field( loff_t, len ) |
| 1268 | __field( int, mode ) |
| 1269 | ), |
| 1270 | |
| 1271 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1272 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1273 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1274 | __entry->pos = offset; |
| 1275 | __entry->len = len; |
| 1276 | __entry->mode = mode; |
| 1277 | ), |
| 1278 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1279 | TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1280 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1281 | (unsigned long) __entry->ino, __entry->pos, |
| 1282 | __entry->len, __entry->mode) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1283 | ); |
| 1284 | |
| 1285 | TRACE_EVENT(ext4_fallocate_exit, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1286 | TP_PROTO(struct inode *inode, loff_t offset, |
| 1287 | unsigned int max_blocks, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1288 | |
| 1289 | TP_ARGS(inode, offset, max_blocks, ret), |
| 1290 | |
| 1291 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1292 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1293 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1294 | __field( loff_t, pos ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1295 | __field( unsigned int, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1296 | __field( int, ret ) |
| 1297 | ), |
| 1298 | |
| 1299 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1300 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1301 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1302 | __entry->pos = offset; |
| 1303 | __entry->blocks = max_blocks; |
| 1304 | __entry->ret = ret; |
| 1305 | ), |
| 1306 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1307 | 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] | 1308 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1309 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1310 | __entry->pos, __entry->blocks, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1311 | __entry->ret) |
| 1312 | ); |
| 1313 | |
| 1314 | TRACE_EVENT(ext4_unlink_enter, |
| 1315 | TP_PROTO(struct inode *parent, struct dentry *dentry), |
| 1316 | |
| 1317 | TP_ARGS(parent, dentry), |
| 1318 | |
| 1319 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1320 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1321 | __field( ino_t, ino ) |
| 1322 | __field( ino_t, parent ) |
| 1323 | __field( loff_t, size ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1324 | ), |
| 1325 | |
| 1326 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1327 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1328 | __entry->ino = dentry->d_inode->i_ino; |
| 1329 | __entry->parent = parent->i_ino; |
| 1330 | __entry->size = dentry->d_inode->i_size; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1331 | ), |
| 1332 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1333 | TP_printk("dev %d,%d ino %lu size %lld parent %lu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1334 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1335 | (unsigned long) __entry->ino, __entry->size, |
| 1336 | (unsigned long) __entry->parent) |
| 1337 | ); |
| 1338 | |
| 1339 | TRACE_EVENT(ext4_unlink_exit, |
| 1340 | TP_PROTO(struct dentry *dentry, int ret), |
| 1341 | |
| 1342 | TP_ARGS(dentry, ret), |
| 1343 | |
| 1344 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1345 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1346 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1347 | __field( int, ret ) |
| 1348 | ), |
| 1349 | |
| 1350 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1351 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1352 | __entry->ino = dentry->d_inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1353 | __entry->ret = ret; |
| 1354 | ), |
| 1355 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1356 | TP_printk("dev %d,%d ino %lu ret %d", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1357 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1358 | (unsigned long) __entry->ino, |
| 1359 | __entry->ret) |
| 1360 | ); |
| 1361 | |
| 1362 | DECLARE_EVENT_CLASS(ext4__truncate, |
| 1363 | TP_PROTO(struct inode *inode), |
| 1364 | |
| 1365 | TP_ARGS(inode), |
| 1366 | |
| 1367 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1368 | __field( dev_t, dev ) |
| 1369 | __field( ino_t, ino ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1370 | __field( __u64, blocks ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1371 | ), |
| 1372 | |
| 1373 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1374 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1375 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1376 | __entry->blocks = inode->i_blocks; |
| 1377 | ), |
| 1378 | |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1379 | TP_printk("dev %d,%d ino %lu blocks %llu", |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1380 | MAJOR(__entry->dev), MINOR(__entry->dev), |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1381 | (unsigned long) __entry->ino, __entry->blocks) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1382 | ); |
| 1383 | |
| 1384 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, |
| 1385 | |
| 1386 | TP_PROTO(struct inode *inode), |
| 1387 | |
| 1388 | TP_ARGS(inode) |
| 1389 | ); |
| 1390 | |
| 1391 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, |
| 1392 | |
| 1393 | TP_PROTO(struct inode *inode), |
| 1394 | |
| 1395 | TP_ARGS(inode) |
| 1396 | ); |
| 1397 | |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1398 | /* 'ux' is the uninitialized extent. */ |
| 1399 | TRACE_EVENT(ext4_ext_convert_to_initialized_enter, |
| 1400 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1401 | struct ext4_extent *ux), |
| 1402 | |
| 1403 | TP_ARGS(inode, map, ux), |
| 1404 | |
| 1405 | TP_STRUCT__entry( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1406 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1407 | __field( ino_t, ino ) |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1408 | __field( ext4_lblk_t, m_lblk ) |
| 1409 | __field( unsigned, m_len ) |
| 1410 | __field( ext4_lblk_t, u_lblk ) |
| 1411 | __field( unsigned, u_len ) |
| 1412 | __field( ext4_fsblk_t, u_pblk ) |
| 1413 | ), |
| 1414 | |
| 1415 | TP_fast_assign( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1416 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1417 | __entry->ino = inode->i_ino; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1418 | __entry->m_lblk = map->m_lblk; |
| 1419 | __entry->m_len = map->m_len; |
| 1420 | __entry->u_lblk = le32_to_cpu(ux->ee_block); |
| 1421 | __entry->u_len = ext4_ext_get_actual_len(ux); |
| 1422 | __entry->u_pblk = ext4_ext_pblock(ux); |
| 1423 | ), |
| 1424 | |
| 1425 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u " |
| 1426 | "u_pblk %llu", |
| 1427 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1428 | (unsigned long) __entry->ino, |
| 1429 | __entry->m_lblk, __entry->m_len, |
| 1430 | __entry->u_lblk, __entry->u_len, __entry->u_pblk) |
| 1431 | ); |
| 1432 | |
| 1433 | /* |
| 1434 | * 'ux' is the uninitialized extent. |
| 1435 | * 'ix' is the initialized extent to which blocks are transferred. |
| 1436 | */ |
| 1437 | TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath, |
| 1438 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, |
| 1439 | struct ext4_extent *ux, struct ext4_extent *ix), |
| 1440 | |
| 1441 | TP_ARGS(inode, map, ux, ix), |
| 1442 | |
| 1443 | TP_STRUCT__entry( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1444 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1445 | __field( ino_t, ino ) |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1446 | __field( ext4_lblk_t, m_lblk ) |
| 1447 | __field( unsigned, m_len ) |
| 1448 | __field( ext4_lblk_t, u_lblk ) |
| 1449 | __field( unsigned, u_len ) |
| 1450 | __field( ext4_fsblk_t, u_pblk ) |
| 1451 | __field( ext4_lblk_t, i_lblk ) |
| 1452 | __field( unsigned, i_len ) |
| 1453 | __field( ext4_fsblk_t, i_pblk ) |
| 1454 | ), |
| 1455 | |
| 1456 | TP_fast_assign( |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1457 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1458 | __entry->ino = inode->i_ino; |
Eric Gouriou | 6f91bc5 | 2011-10-27 11:43:23 -0400 | [diff] [blame] | 1459 | __entry->m_lblk = map->m_lblk; |
| 1460 | __entry->m_len = map->m_len; |
| 1461 | __entry->u_lblk = le32_to_cpu(ux->ee_block); |
| 1462 | __entry->u_len = ext4_ext_get_actual_len(ux); |
| 1463 | __entry->u_pblk = ext4_ext_pblock(ux); |
| 1464 | __entry->i_lblk = le32_to_cpu(ix->ee_block); |
| 1465 | __entry->i_len = ext4_ext_get_actual_len(ix); |
| 1466 | __entry->i_pblk = ext4_ext_pblock(ix); |
| 1467 | ), |
| 1468 | |
| 1469 | TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u " |
| 1470 | "u_lblk %u u_len %u u_pblk %llu " |
| 1471 | "i_lblk %u i_len %u i_pblk %llu ", |
| 1472 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1473 | (unsigned long) __entry->ino, |
| 1474 | __entry->m_lblk, __entry->m_len, |
| 1475 | __entry->u_lblk, __entry->u_len, __entry->u_pblk, |
| 1476 | __entry->i_lblk, __entry->i_len, __entry->i_pblk) |
| 1477 | ); |
| 1478 | |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1479 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, |
| 1480 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1481 | unsigned int len, unsigned int flags), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1482 | |
| 1483 | TP_ARGS(inode, lblk, len, flags), |
| 1484 | |
| 1485 | TP_STRUCT__entry( |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1486 | __field( dev_t, dev ) |
| 1487 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1488 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1489 | __field( unsigned int, len ) |
| 1490 | __field( unsigned int, flags ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1491 | ), |
| 1492 | |
| 1493 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1494 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1495 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1496 | __entry->lblk = lblk; |
| 1497 | __entry->len = len; |
| 1498 | __entry->flags = flags; |
| 1499 | ), |
| 1500 | |
| 1501 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", |
| 1502 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1503 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1504 | __entry->lblk, __entry->len, __entry->flags) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1505 | ); |
| 1506 | |
| 1507 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, |
| 1508 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1509 | unsigned len, unsigned flags), |
| 1510 | |
| 1511 | TP_ARGS(inode, lblk, len, flags) |
| 1512 | ); |
| 1513 | |
| 1514 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, |
| 1515 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1516 | unsigned len, unsigned flags), |
| 1517 | |
| 1518 | TP_ARGS(inode, lblk, len, flags) |
| 1519 | ); |
| 1520 | |
| 1521 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
| 1522 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1523 | ext4_fsblk_t pblk, unsigned int len, int ret), |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1524 | |
| 1525 | TP_ARGS(inode, lblk, pblk, len, ret), |
| 1526 | |
| 1527 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1528 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1529 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1530 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1531 | __field( ext4_lblk_t, lblk ) |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1532 | __field( unsigned int, len ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1533 | __field( int, ret ) |
| 1534 | ), |
| 1535 | |
| 1536 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1537 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1538 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1539 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1540 | __entry->lblk = lblk; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1541 | __entry->len = len; |
| 1542 | __entry->ret = ret; |
| 1543 | ), |
| 1544 | |
| 1545 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", |
| 1546 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1547 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1548 | __entry->lblk, __entry->pblk, |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1549 | __entry->len, __entry->ret) |
| 1550 | ); |
| 1551 | |
| 1552 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
| 1553 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1554 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1555 | |
| 1556 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1557 | ); |
| 1558 | |
| 1559 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
| 1560 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, |
| 1561 | ext4_fsblk_t pblk, unsigned len, int ret), |
| 1562 | |
| 1563 | TP_ARGS(inode, lblk, pblk, len, ret) |
| 1564 | ); |
| 1565 | |
| 1566 | TRACE_EVENT(ext4_ext_load_extent, |
| 1567 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), |
| 1568 | |
| 1569 | TP_ARGS(inode, lblk, pblk), |
| 1570 | |
| 1571 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1572 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1573 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1574 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1575 | __field( ext4_lblk_t, lblk ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1576 | ), |
| 1577 | |
| 1578 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1579 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1580 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1581 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1582 | __entry->lblk = lblk; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1583 | ), |
| 1584 | |
| 1585 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", |
| 1586 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1587 | (unsigned long) __entry->ino, |
Lukas Czerner | a9c667f | 2011-06-06 09:51:52 -0400 | [diff] [blame] | 1588 | __entry->lblk, __entry->pblk) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1589 | ); |
| 1590 | |
| 1591 | TRACE_EVENT(ext4_load_inode, |
| 1592 | TP_PROTO(struct inode *inode), |
| 1593 | |
| 1594 | TP_ARGS(inode), |
| 1595 | |
| 1596 | TP_STRUCT__entry( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1597 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1598 | __field( ino_t, ino ) |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1599 | ), |
| 1600 | |
| 1601 | TP_fast_assign( |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1602 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1603 | __entry->ino = inode->i_ino; |
Jiaying Zhang | 0562e0b | 2011-03-21 21:38:05 -0400 | [diff] [blame] | 1604 | ), |
| 1605 | |
| 1606 | TP_printk("dev %d,%d ino %ld", |
| 1607 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1608 | (unsigned long) __entry->ino) |
| 1609 | ); |
| 1610 | |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1611 | TRACE_EVENT(ext4_journal_start, |
| 1612 | TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP), |
| 1613 | |
| 1614 | TP_ARGS(sb, nblocks, IP), |
| 1615 | |
| 1616 | TP_STRUCT__entry( |
| 1617 | __field( dev_t, dev ) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1618 | __field(unsigned long, ip ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1619 | __field( int, nblocks ) |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1620 | ), |
| 1621 | |
| 1622 | TP_fast_assign( |
| 1623 | __entry->dev = sb->s_dev; |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1624 | __entry->ip = IP; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1625 | __entry->nblocks = nblocks; |
Theodore Ts'o | 1270639 | 2011-07-10 22:37:50 -0400 | [diff] [blame] | 1626 | ), |
| 1627 | |
| 1628 | TP_printk("dev %d,%d nblocks %d caller %pF", |
| 1629 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1630 | __entry->nblocks, (void *)__entry->ip) |
| 1631 | ); |
| 1632 | |
Tao Ma | b3d4c2b | 2011-07-11 00:01:52 -0400 | [diff] [blame] | 1633 | DECLARE_EVENT_CLASS(ext4__trim, |
| 1634 | TP_PROTO(struct super_block *sb, |
| 1635 | ext4_group_t group, |
| 1636 | ext4_grpblk_t start, |
| 1637 | ext4_grpblk_t len), |
| 1638 | |
| 1639 | TP_ARGS(sb, group, start, len), |
| 1640 | |
| 1641 | TP_STRUCT__entry( |
| 1642 | __field( int, dev_major ) |
| 1643 | __field( int, dev_minor ) |
| 1644 | __field( __u32, group ) |
| 1645 | __field( int, start ) |
| 1646 | __field( int, len ) |
| 1647 | ), |
| 1648 | |
| 1649 | TP_fast_assign( |
| 1650 | __entry->dev_major = MAJOR(sb->s_dev); |
| 1651 | __entry->dev_minor = MINOR(sb->s_dev); |
| 1652 | __entry->group = group; |
| 1653 | __entry->start = start; |
| 1654 | __entry->len = len; |
| 1655 | ), |
| 1656 | |
| 1657 | TP_printk("dev %d,%d group %u, start %d, len %d", |
| 1658 | __entry->dev_major, __entry->dev_minor, |
| 1659 | __entry->group, __entry->start, __entry->len) |
| 1660 | ); |
| 1661 | |
| 1662 | DEFINE_EVENT(ext4__trim, ext4_trim_extent, |
| 1663 | |
| 1664 | TP_PROTO(struct super_block *sb, |
| 1665 | ext4_group_t group, |
| 1666 | ext4_grpblk_t start, |
| 1667 | ext4_grpblk_t len), |
| 1668 | |
| 1669 | TP_ARGS(sb, group, start, len) |
| 1670 | ); |
| 1671 | |
| 1672 | DEFINE_EVENT(ext4__trim, ext4_trim_all_free, |
| 1673 | |
| 1674 | TP_PROTO(struct super_block *sb, |
| 1675 | ext4_group_t group, |
| 1676 | ext4_grpblk_t start, |
| 1677 | ext4_grpblk_t len), |
| 1678 | |
| 1679 | TP_ARGS(sb, group, start, len) |
| 1680 | ); |
| 1681 | |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1682 | TRACE_EVENT(ext4_ext_handle_uninitialized_extents, |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame^] | 1683 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags, |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1684 | unsigned int allocated, ext4_fsblk_t newblock), |
| 1685 | |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame^] | 1686 | TP_ARGS(inode, map, flags, allocated, newblock), |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1687 | |
| 1688 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1689 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1690 | __field( ino_t, ino ) |
| 1691 | __field( int, flags ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1692 | __field( ext4_lblk_t, lblk ) |
| 1693 | __field( ext4_fsblk_t, pblk ) |
| 1694 | __field( unsigned int, len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1695 | __field( unsigned int, allocated ) |
| 1696 | __field( ext4_fsblk_t, newblk ) |
| 1697 | ), |
| 1698 | |
| 1699 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1700 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1701 | __entry->ino = inode->i_ino; |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame^] | 1702 | __entry->flags = flags; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1703 | __entry->lblk = map->m_lblk; |
| 1704 | __entry->pblk = map->m_pblk; |
| 1705 | __entry->len = map->m_len; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1706 | __entry->allocated = allocated; |
| 1707 | __entry->newblk = newblock; |
| 1708 | ), |
| 1709 | |
Zheng Liu | b564553 | 2012-11-08 14:33:43 -0500 | [diff] [blame^] | 1710 | TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %x " |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1711 | "allocated %d newblock %llu", |
| 1712 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1713 | (unsigned long) __entry->ino, |
| 1714 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, |
| 1715 | __entry->len, __entry->flags, |
| 1716 | (unsigned int) __entry->allocated, |
| 1717 | (unsigned long long) __entry->newblk) |
| 1718 | ); |
| 1719 | |
| 1720 | TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, |
| 1721 | TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), |
| 1722 | |
| 1723 | TP_ARGS(sb, map, ret), |
| 1724 | |
| 1725 | TP_STRUCT__entry( |
| 1726 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1727 | __field( unsigned int, flags ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1728 | __field( ext4_lblk_t, lblk ) |
| 1729 | __field( ext4_fsblk_t, pblk ) |
| 1730 | __field( unsigned int, len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1731 | __field( int, ret ) |
| 1732 | ), |
| 1733 | |
| 1734 | TP_fast_assign( |
| 1735 | __entry->dev = sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1736 | __entry->flags = map->m_flags; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1737 | __entry->lblk = map->m_lblk; |
| 1738 | __entry->pblk = map->m_pblk; |
| 1739 | __entry->len = map->m_len; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1740 | __entry->ret = ret; |
| 1741 | ), |
| 1742 | |
| 1743 | TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d", |
| 1744 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1745 | __entry->lblk, (unsigned long long) __entry->pblk, |
| 1746 | __entry->len, __entry->flags, __entry->ret) |
| 1747 | ); |
| 1748 | |
| 1749 | TRACE_EVENT(ext4_ext_put_in_cache, |
| 1750 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, |
| 1751 | ext4_fsblk_t start), |
| 1752 | |
| 1753 | TP_ARGS(inode, lblk, len, start), |
| 1754 | |
| 1755 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1756 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1757 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1758 | __field( ext4_lblk_t, lblk ) |
| 1759 | __field( unsigned int, len ) |
| 1760 | __field( ext4_fsblk_t, start ) |
| 1761 | ), |
| 1762 | |
| 1763 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1764 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1765 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1766 | __entry->lblk = lblk; |
| 1767 | __entry->len = len; |
| 1768 | __entry->start = start; |
| 1769 | ), |
| 1770 | |
| 1771 | TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", |
| 1772 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1773 | (unsigned long) __entry->ino, |
| 1774 | (unsigned) __entry->lblk, |
| 1775 | __entry->len, |
| 1776 | (unsigned long long) __entry->start) |
| 1777 | ); |
| 1778 | |
| 1779 | TRACE_EVENT(ext4_ext_in_cache, |
| 1780 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), |
| 1781 | |
| 1782 | TP_ARGS(inode, lblk, ret), |
| 1783 | |
| 1784 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1785 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1786 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1787 | __field( ext4_lblk_t, lblk ) |
| 1788 | __field( int, ret ) |
| 1789 | ), |
| 1790 | |
| 1791 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1792 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1793 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1794 | __entry->lblk = lblk; |
| 1795 | __entry->ret = ret; |
| 1796 | ), |
| 1797 | |
| 1798 | TP_printk("dev %d,%d ino %lu lblk %u ret %d", |
| 1799 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1800 | (unsigned long) __entry->ino, |
| 1801 | (unsigned) __entry->lblk, |
| 1802 | __entry->ret) |
| 1803 | |
| 1804 | ); |
| 1805 | |
| 1806 | TRACE_EVENT(ext4_find_delalloc_range, |
| 1807 | TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, |
| 1808 | int reverse, int found, ext4_lblk_t found_blk), |
| 1809 | |
| 1810 | TP_ARGS(inode, from, to, reverse, found, found_blk), |
| 1811 | |
| 1812 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1813 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1814 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1815 | __field( ext4_lblk_t, from ) |
| 1816 | __field( ext4_lblk_t, to ) |
| 1817 | __field( int, reverse ) |
| 1818 | __field( int, found ) |
| 1819 | __field( ext4_lblk_t, found_blk ) |
| 1820 | ), |
| 1821 | |
| 1822 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1823 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1824 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1825 | __entry->from = from; |
| 1826 | __entry->to = to; |
| 1827 | __entry->reverse = reverse; |
| 1828 | __entry->found = found; |
| 1829 | __entry->found_blk = found_blk; |
| 1830 | ), |
| 1831 | |
| 1832 | TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " |
| 1833 | "(blk = %u)", |
| 1834 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1835 | (unsigned long) __entry->ino, |
| 1836 | (unsigned) __entry->from, (unsigned) __entry->to, |
| 1837 | __entry->reverse, __entry->found, |
| 1838 | (unsigned) __entry->found_blk) |
| 1839 | ); |
| 1840 | |
| 1841 | TRACE_EVENT(ext4_get_reserved_cluster_alloc, |
| 1842 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), |
| 1843 | |
| 1844 | TP_ARGS(inode, lblk, len), |
| 1845 | |
| 1846 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1847 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1848 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1849 | __field( ext4_lblk_t, lblk ) |
| 1850 | __field( unsigned int, len ) |
| 1851 | ), |
| 1852 | |
| 1853 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1854 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1855 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1856 | __entry->lblk = lblk; |
| 1857 | __entry->len = len; |
| 1858 | ), |
| 1859 | |
| 1860 | TP_printk("dev %d,%d ino %lu lblk %u len %u", |
| 1861 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1862 | (unsigned long) __entry->ino, |
| 1863 | (unsigned) __entry->lblk, |
| 1864 | __entry->len) |
| 1865 | ); |
| 1866 | |
| 1867 | TRACE_EVENT(ext4_ext_show_extent, |
| 1868 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, |
| 1869 | unsigned short len), |
| 1870 | |
| 1871 | TP_ARGS(inode, lblk, pblk, len), |
| 1872 | |
| 1873 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1874 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1875 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1876 | __field( ext4_fsblk_t, pblk ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1877 | __field( ext4_lblk_t, lblk ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1878 | __field( unsigned short, len ) |
| 1879 | ), |
| 1880 | |
| 1881 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1882 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1883 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1884 | __entry->pblk = pblk; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1885 | __entry->lblk = lblk; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1886 | __entry->len = len; |
| 1887 | ), |
| 1888 | |
| 1889 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", |
| 1890 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1891 | (unsigned long) __entry->ino, |
| 1892 | (unsigned) __entry->lblk, |
| 1893 | (unsigned long long) __entry->pblk, |
| 1894 | (unsigned short) __entry->len) |
| 1895 | ); |
| 1896 | |
| 1897 | TRACE_EVENT(ext4_remove_blocks, |
| 1898 | TP_PROTO(struct inode *inode, struct ext4_extent *ex, |
| 1899 | ext4_lblk_t from, ext4_fsblk_t to, |
| 1900 | ext4_fsblk_t partial_cluster), |
| 1901 | |
| 1902 | TP_ARGS(inode, ex, from, to, partial_cluster), |
| 1903 | |
| 1904 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1905 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1906 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1907 | __field( ext4_lblk_t, from ) |
| 1908 | __field( ext4_lblk_t, to ) |
| 1909 | __field( ext4_fsblk_t, partial ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1910 | __field( ext4_fsblk_t, ee_pblk ) |
| 1911 | __field( ext4_lblk_t, ee_lblk ) |
| 1912 | __field( unsigned short, ee_len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1913 | ), |
| 1914 | |
| 1915 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1916 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1917 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1918 | __entry->from = from; |
| 1919 | __entry->to = to; |
| 1920 | __entry->partial = partial_cluster; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1921 | __entry->ee_pblk = ext4_ext_pblock(ex); |
| 1922 | __entry->ee_lblk = cpu_to_le32(ex->ee_block); |
| 1923 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1924 | ), |
| 1925 | |
| 1926 | TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" |
| 1927 | "from %u to %u partial_cluster %u", |
| 1928 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1929 | (unsigned long) __entry->ino, |
| 1930 | (unsigned) __entry->ee_lblk, |
| 1931 | (unsigned long long) __entry->ee_pblk, |
| 1932 | (unsigned short) __entry->ee_len, |
| 1933 | (unsigned) __entry->from, |
| 1934 | (unsigned) __entry->to, |
| 1935 | (unsigned) __entry->partial) |
| 1936 | ); |
| 1937 | |
| 1938 | TRACE_EVENT(ext4_ext_rm_leaf, |
| 1939 | TP_PROTO(struct inode *inode, ext4_lblk_t start, |
| 1940 | struct ext4_extent *ex, ext4_fsblk_t partial_cluster), |
| 1941 | |
| 1942 | TP_ARGS(inode, start, ex, partial_cluster), |
| 1943 | |
| 1944 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1945 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1946 | __field( ino_t, ino ) |
| 1947 | __field( ext4_fsblk_t, partial ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1948 | __field( ext4_lblk_t, start ) |
| 1949 | __field( ext4_lblk_t, ee_lblk ) |
| 1950 | __field( ext4_fsblk_t, ee_pblk ) |
| 1951 | __field( short, ee_len ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1952 | ), |
| 1953 | |
| 1954 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1955 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1956 | __entry->ino = inode->i_ino; |
| 1957 | __entry->partial = partial_cluster; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1958 | __entry->start = start; |
| 1959 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
| 1960 | __entry->ee_pblk = ext4_ext_pblock(ex); |
| 1961 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1962 | ), |
| 1963 | |
| 1964 | TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" |
| 1965 | "partial_cluster %u", |
| 1966 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1967 | (unsigned long) __entry->ino, |
| 1968 | (unsigned) __entry->start, |
| 1969 | (unsigned) __entry->ee_lblk, |
| 1970 | (unsigned long long) __entry->ee_pblk, |
| 1971 | (unsigned short) __entry->ee_len, |
| 1972 | (unsigned) __entry->partial) |
| 1973 | ); |
| 1974 | |
| 1975 | TRACE_EVENT(ext4_ext_rm_idx, |
| 1976 | TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), |
| 1977 | |
| 1978 | TP_ARGS(inode, pblk), |
| 1979 | |
| 1980 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1981 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1982 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1983 | __field( ext4_fsblk_t, pblk ) |
| 1984 | ), |
| 1985 | |
| 1986 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1987 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 1988 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 1989 | __entry->pblk = pblk; |
| 1990 | ), |
| 1991 | |
| 1992 | TP_printk("dev %d,%d ino %lu index_pblk %llu", |
| 1993 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 1994 | (unsigned long) __entry->ino, |
| 1995 | (unsigned long long) __entry->pblk) |
| 1996 | ); |
| 1997 | |
| 1998 | TRACE_EVENT(ext4_ext_remove_space, |
| 1999 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), |
| 2000 | |
| 2001 | TP_ARGS(inode, start, depth), |
| 2002 | |
| 2003 | TP_STRUCT__entry( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2004 | __field( dev_t, dev ) |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2005 | __field( ino_t, ino ) |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2006 | __field( ext4_lblk_t, start ) |
| 2007 | __field( int, depth ) |
| 2008 | ), |
| 2009 | |
| 2010 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2011 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2012 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2013 | __entry->start = start; |
| 2014 | __entry->depth = depth; |
| 2015 | ), |
| 2016 | |
| 2017 | TP_printk("dev %d,%d ino %lu since %u depth %d", |
| 2018 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2019 | (unsigned long) __entry->ino, |
| 2020 | (unsigned) __entry->start, |
| 2021 | __entry->depth) |
| 2022 | ); |
| 2023 | |
| 2024 | TRACE_EVENT(ext4_ext_remove_space_done, |
| 2025 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, |
| 2026 | ext4_lblk_t partial, unsigned short eh_entries), |
| 2027 | |
| 2028 | TP_ARGS(inode, start, depth, partial, eh_entries), |
| 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, start ) |
| 2034 | __field( int, depth ) |
| 2035 | __field( ext4_lblk_t, partial ) |
| 2036 | __field( unsigned short, eh_entries ) |
| 2037 | ), |
| 2038 | |
| 2039 | TP_fast_assign( |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2040 | __entry->dev = inode->i_sb->s_dev; |
Anatol Pomozov | 210c052 | 2012-08-17 09:50:17 -0400 | [diff] [blame] | 2041 | __entry->ino = inode->i_ino; |
Aditya Kali | d899024 | 2011-09-09 19:18:51 -0400 | [diff] [blame] | 2042 | __entry->start = start; |
| 2043 | __entry->depth = depth; |
| 2044 | __entry->partial = partial; |
| 2045 | __entry->eh_entries = eh_entries; |
| 2046 | ), |
| 2047 | |
| 2048 | TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " |
| 2049 | "remaining_entries %u", |
| 2050 | MAJOR(__entry->dev), MINOR(__entry->dev), |
| 2051 | (unsigned long) __entry->ino, |
| 2052 | (unsigned) __entry->start, |
| 2053 | __entry->depth, |
| 2054 | (unsigned) __entry->partial, |
| 2055 | (unsigned short) __entry->eh_entries) |
| 2056 | ); |
| 2057 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 2058 | #endif /* _TRACE_EXT4_H */ |
| 2059 | |
| 2060 | /* This part must be outside protection */ |
| 2061 | #include <trace/define_trace.h> |