1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM btrfs
5 #if !defined(LTTNG_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_BTRFS_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <linux/version.h>
12 #ifndef _TRACE_BTRFS_DEF_
13 #define _TRACE_BTRFS_DEF_
18 struct btrfs_ordered_extent
;
19 struct btrfs_delayed_ref_node
;
20 struct btrfs_delayed_tree_ref
;
21 struct btrfs_delayed_data_ref
;
22 struct btrfs_delayed_ref_head
;
23 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
24 struct btrfs_block_group_cache
;
25 struct btrfs_free_cluster
;
29 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
34 #define BTRFS_UUID_SIZE 16
36 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
37 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
38 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
40 TP_PROTO(const struct btrfs_root
*root
),
45 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
46 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
50 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
52 TP_PROTO(const struct inode
*inode
),
57 ctf_integer(ino_t
, ino
, inode
->i_ino
)
58 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
59 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
60 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
61 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
62 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
63 ctf_integer(u64
, root_objectid
,
64 BTRFS_I(inode
)->root
->root_key
.objectid
)
68 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
70 TP_PROTO(const struct inode
*inode
),
75 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
77 TP_PROTO(const struct inode
*inode
),
82 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
84 TP_PROTO(const struct inode
*inode
),
89 LTTNG_TRACEPOINT_EVENT(btrfs_transaction_commit
,
91 TP_PROTO(struct btrfs_root
*root
),
96 ctf_integer(u64
, generation
, root
->fs_info
->generation
)
97 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
101 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__inode
,
103 TP_PROTO(struct inode
*inode
),
108 ctf_integer(ino_t
, ino
, inode
->i_ino
)
109 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
110 ctf_integer(u64
, disk_i_size
, BTRFS_I(inode
)->disk_i_size
)
111 ctf_integer(u64
, generation
, BTRFS_I(inode
)->generation
)
112 ctf_integer(u64
, last_trans
, BTRFS_I(inode
)->last_trans
)
113 ctf_integer(u64
, logged_trans
, BTRFS_I(inode
)->logged_trans
)
114 ctf_integer(u64
, root_objectid
,
115 BTRFS_I(inode
)->root
->root_key
.objectid
)
119 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_new
,
121 TP_PROTO(struct inode
*inode
),
126 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_request
,
128 TP_PROTO(struct inode
*inode
),
133 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__inode
, btrfs_inode_evict
,
135 TP_PROTO(struct inode
*inode
),
141 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
143 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
145 TP_PROTO(const struct btrfs_root
*root
, const struct btrfs_inode
*inode
,
146 const struct extent_map
*map
),
148 TP_ARGS(root
, inode
, map
),
151 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
152 ctf_integer(u64
, ino
, btrfs_ino(inode
))
153 ctf_integer(u64
, start
, map
->start
)
154 ctf_integer(u64
, len
, map
->len
)
155 ctf_integer(u64
, orig_start
, map
->orig_start
)
156 ctf_integer(u64
, block_start
, map
->block_start
)
157 ctf_integer(u64
, block_len
, map
->block_len
)
158 ctf_integer(unsigned long, flags
, map
->flags
)
159 ctf_integer(int, refs
, refcount_read(&map
->refs
))
160 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
164 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
166 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
168 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
169 struct extent_map
*map
),
171 TP_ARGS(root
, inode
, map
),
174 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
175 ctf_integer(u64
, ino
, btrfs_ino(inode
))
176 ctf_integer(u64
, start
, map
->start
)
177 ctf_integer(u64
, len
, map
->len
)
178 ctf_integer(u64
, orig_start
, map
->orig_start
)
179 ctf_integer(u64
, block_start
, map
->block_start
)
180 ctf_integer(u64
, block_len
, map
->block_len
)
181 ctf_integer(unsigned long, flags
, map
->flags
)
182 ctf_integer(int, refs
, refcount_read(&map
->refs
))
183 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
187 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
189 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
191 TP_PROTO(struct btrfs_root
*root
, struct btrfs_inode
*inode
,
192 struct extent_map
*map
),
194 TP_ARGS(root
, inode
, map
),
197 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
198 ctf_integer(u64
, ino
, btrfs_ino(inode
))
199 ctf_integer(u64
, start
, map
->start
)
200 ctf_integer(u64
, len
, map
->len
)
201 ctf_integer(u64
, orig_start
, map
->orig_start
)
202 ctf_integer(u64
, block_start
, map
->block_start
)
203 ctf_integer(u64
, block_len
, map
->block_len
)
204 ctf_integer(unsigned long, flags
, map
->flags
)
205 ctf_integer(int, refs
, atomic_read(&map
->refs
))
206 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
210 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
212 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
214 TP_PROTO(struct btrfs_root
*root
, struct inode
*inode
,
215 struct extent_map
*map
),
217 TP_ARGS(root
, inode
, map
),
220 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
221 ctf_integer(u64
, ino
, btrfs_ino(inode
))
222 ctf_integer(u64
, start
, map
->start
)
223 ctf_integer(u64
, len
, map
->len
)
224 ctf_integer(u64
, orig_start
, map
->orig_start
)
225 ctf_integer(u64
, block_start
, map
->block_start
)
226 ctf_integer(u64
, block_len
, map
->block_len
)
227 ctf_integer(unsigned long, flags
, map
->flags
)
228 ctf_integer(int, refs
, atomic_read(&map
->refs
))
229 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
233 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
235 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
237 TP_PROTO(const struct btrfs_root
*root
, const struct extent_map
*map
),
242 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
243 ctf_integer(u64
, start
, map
->start
)
244 ctf_integer(u64
, len
, map
->len
)
245 ctf_integer(u64
, orig_start
, map
->orig_start
)
246 ctf_integer(u64
, block_start
, map
->block_start
)
247 ctf_integer(u64
, block_len
, map
->block_len
)
248 ctf_integer(unsigned long, flags
, map
->flags
)
249 ctf_integer(int, refs
, atomic_read(&map
->refs
))
250 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
254 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
256 LTTNG_TRACEPOINT_EVENT(btrfs_get_extent
,
258 TP_PROTO(struct btrfs_root
*root
, struct extent_map
*map
),
263 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
264 ctf_integer(u64
, start
, map
->start
)
265 ctf_integer(u64
, len
, map
->len
)
266 ctf_integer(u64
, orig_start
, map
->orig_start
)
267 ctf_integer(u64
, block_start
, map
->block_start
)
268 ctf_integer(u64
, block_len
, map
->block_len
)
269 ctf_integer(unsigned long, flags
, map
->flags
)
270 ctf_integer(int, refs
, atomic_read(&map
->refs
))
271 ctf_integer(unsigned int, compress_type
, map
->compress_type
)
275 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
277 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
278 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
280 TP_PROTO(struct btrfs_fs_info
*fs_info
,
281 const struct extent_map
*existing
, const struct extent_map
*map
,
284 TP_ARGS(fs_info
, existing
, map
, start
, len
),
287 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
288 ctf_integer(u64
, e_start
, existing
->start
)
289 ctf_integer(u64
, e_len
, existing
->len
)
290 ctf_integer(u64
, map_start
, map
->start
)
291 ctf_integer(u64
, map_len
, map
->len
)
292 ctf_integer(u64
, start
, start
)
293 ctf_integer(u64
, len
, len
)
296 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
297 LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist
,
299 TP_PROTO(const struct extent_map
*existing
, const struct extent_map
*map
, u64 start
, u64 len
),
301 TP_ARGS(existing
, map
, start
, len
),
304 ctf_integer(u64
, e_start
, existing
->start
)
305 ctf_integer(u64
, e_len
, existing
->len
)
306 ctf_integer(u64
, map_start
, map
->start
)
307 ctf_integer(u64
, map_len
, map
->len
)
308 ctf_integer(u64
, start
, start
)
309 ctf_integer(u64
, len
, len
)
314 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
315 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
317 TP_PROTO(const struct inode
*inode
,
318 const struct btrfs_ordered_extent
*ordered
),
320 TP_ARGS(inode
, ordered
),
323 ctf_integer(ino_t
, ino
, inode
->i_ino
)
324 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
325 ctf_integer(u64
, start
, ordered
->start
)
326 ctf_integer(u64
, len
, ordered
->len
)
327 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
328 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
329 ctf_integer(unsigned long, flags
, ordered
->flags
)
330 ctf_integer(int, compress_type
, ordered
->compress_type
)
331 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
332 ctf_integer(u64
, root_objectid
,
333 BTRFS_I(inode
)->root
->root_key
.objectid
)
336 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
337 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
339 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
341 TP_ARGS(inode
, ordered
),
344 ctf_integer(ino_t
, ino
, inode
->i_ino
)
345 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
346 ctf_integer(u64
, start
, ordered
->start
)
347 ctf_integer(u64
, len
, ordered
->len
)
348 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
349 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
350 ctf_integer(unsigned long, flags
, ordered
->flags
)
351 ctf_integer(int, compress_type
, ordered
->compress_type
)
352 ctf_integer(int, refs
, refcount_read(&ordered
->refs
))
353 ctf_integer(u64
, root_objectid
,
354 BTRFS_I(inode
)->root
->root_key
.objectid
)
357 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
358 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
360 TP_PROTO(const struct inode
*inode
, const struct btrfs_ordered_extent
*ordered
),
362 TP_ARGS(inode
, ordered
),
365 ctf_integer(ino_t
, ino
, inode
->i_ino
)
366 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
367 ctf_integer(u64
, start
, ordered
->start
)
368 ctf_integer(u64
, len
, ordered
->len
)
369 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
370 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
371 ctf_integer(unsigned long, flags
, ordered
->flags
)
372 ctf_integer(int, compress_type
, ordered
->compress_type
)
373 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
374 ctf_integer(u64
, root_objectid
,
375 BTRFS_I(inode
)->root
->root_key
.objectid
)
379 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent
,
381 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
383 TP_ARGS(inode
, ordered
),
386 ctf_integer(ino_t
, ino
, inode
->i_ino
)
387 ctf_integer(u64
, file_offset
, ordered
->file_offset
)
388 ctf_integer(u64
, start
, ordered
->start
)
389 ctf_integer(u64
, len
, ordered
->len
)
390 ctf_integer(u64
, disk_len
, ordered
->disk_len
)
391 ctf_integer(u64
, bytes_left
, ordered
->bytes_left
)
392 ctf_integer(unsigned long, flags
, ordered
->flags
)
393 ctf_integer(int, compress_type
, ordered
->compress_type
)
394 ctf_integer(int, refs
, atomic_read(&ordered
->refs
))
395 ctf_integer(u64
, root_objectid
,
396 BTRFS_I(inode
)->root
->root_key
.objectid
)
401 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
402 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
403 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
405 TP_PROTO(const struct inode
*inode
,
406 const struct btrfs_ordered_extent
*ordered
),
408 TP_ARGS(inode
, ordered
)
411 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
413 TP_PROTO(const struct inode
*inode
,
414 const struct btrfs_ordered_extent
*ordered
),
416 TP_ARGS(inode
, ordered
)
419 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
421 TP_PROTO(const struct inode
*inode
,
422 const struct btrfs_ordered_extent
*ordered
),
424 TP_ARGS(inode
, ordered
)
427 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
429 TP_PROTO(const struct inode
*inode
,
430 const struct btrfs_ordered_extent
*ordered
),
432 TP_ARGS(inode
, ordered
)
435 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
437 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
438 const struct writeback_control
*wbc
),
440 TP_ARGS(page
, inode
, wbc
),
443 ctf_integer(ino_t
, ino
, inode
->i_ino
)
444 ctf_integer(pgoff_t
, index
, page
->index
)
445 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
446 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
447 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
448 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
449 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
450 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
451 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
452 ctf_integer(pgoff_t
, writeback_index
,
453 inode
->i_mapping
->writeback_index
)
454 ctf_integer(u64
, root_objectid
,
455 BTRFS_I(inode
)->root
->root_key
.objectid
)
459 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
463 btrfs__extent_writepage
,
465 TP_PROTO(const struct page
*page
, const struct inode
*inode
,
466 const struct writeback_control
*wbc
),
468 TP_ARGS(page
, inode
, wbc
)
471 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
473 TP_PROTO(const struct page
*page
, u64 start
, u64 end
, int uptodate
),
475 TP_ARGS(page
, start
, end
, uptodate
),
478 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
479 ctf_integer(pgoff_t
, index
, page
->index
)
480 ctf_integer(u64
, start
, start
)
481 ctf_integer(u64
, end
, end
)
482 ctf_integer(int, uptodate
, uptodate
)
483 ctf_integer(u64
, root_objectid
,
484 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
488 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
490 TP_PROTO(const struct file
*file
, int datasync
),
492 TP_ARGS(file
, datasync
),
495 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
496 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
497 ctf_integer(int, datasync
, datasync
)
498 ctf_integer(u64
, root_objectid
,
499 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
503 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_add
,
505 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
507 TP_ARGS(inode
, ordered
)
510 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_remove
,
512 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
514 TP_ARGS(inode
, ordered
)
517 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_start
,
519 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
521 TP_ARGS(inode
, ordered
)
524 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__ordered_extent
, btrfs_ordered_extent_put
,
526 TP_PROTO(struct inode
*inode
, struct btrfs_ordered_extent
*ordered
),
528 TP_ARGS(inode
, ordered
)
531 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage
,
533 TP_PROTO(struct page
*page
, struct inode
*inode
,
534 struct writeback_control
*wbc
),
536 TP_ARGS(page
, inode
, wbc
),
539 ctf_integer(ino_t
, ino
, inode
->i_ino
)
540 ctf_integer(pgoff_t
, index
, page
->index
)
541 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
542 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
543 ctf_integer(loff_t
, range_start
, wbc
->range_start
)
544 ctf_integer(loff_t
, range_end
, wbc
->range_end
)
545 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
546 ctf_integer(char, nonblocking
, wbc
->nonblocking
)
548 ctf_integer(char, for_kupdate
, wbc
->for_kupdate
)
549 ctf_integer(char, for_reclaim
, wbc
->for_reclaim
)
550 ctf_integer(char, range_cyclic
, wbc
->range_cyclic
)
551 ctf_integer(pgoff_t
, writeback_index
,
552 inode
->i_mapping
->writeback_index
)
553 ctf_integer(u64
, root_objectid
,
554 BTRFS_I(inode
)->root
->root_key
.objectid
)
558 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage
,
562 btrfs__extent_writepage
,
564 TP_PROTO(struct page
*page
, struct inode
*inode
,
565 struct writeback_control
*wbc
),
567 TP_ARGS(page
, inode
, wbc
)
570 LTTNG_TRACEPOINT_EVENT(btrfs_writepage_end_io_hook
,
572 TP_PROTO(struct page
*page
, u64 start
, u64 end
, int uptodate
),
574 TP_ARGS(page
, start
, end
, uptodate
),
577 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
578 ctf_integer(pgoff_t
, index
, page
->index
)
579 ctf_integer(u64
, start
, start
)
580 ctf_integer(u64
, end
, end
)
581 ctf_integer(int, uptodate
, uptodate
)
582 ctf_integer(u64
, root_objectid
,
583 BTRFS_I(page
->mapping
->host
)->root
->root_key
.objectid
)
587 LTTNG_TRACEPOINT_EVENT(btrfs_sync_file
,
589 TP_PROTO(struct file
*file
, int datasync
),
591 TP_ARGS(file
, datasync
),
594 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
595 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
596 ctf_integer(int, datasync
, datasync
)
597 ctf_integer(u64
, root_objectid
,
598 BTRFS_I(file
->f_path
.dentry
->d_inode
)->root
->root_key
.objectid
)
603 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
604 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
605 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
607 TP_PROTO(const struct btrfs_fs_info
*fs_info
, int wait
),
609 TP_ARGS(fs_info
, wait
),
612 ctf_integer(int, wait
, wait
)
615 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
616 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
618 TP_PROTO(struct btrfs_fs_info
*fs_info
, int wait
),
620 TP_ARGS(fs_info
, wait
),
623 ctf_integer(int, wait
, wait
)
627 LTTNG_TRACEPOINT_EVENT(btrfs_sync_fs
,
634 ctf_integer(int, wait
, wait
)
639 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
640 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
641 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
643 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
644 const struct btrfs_block_group_cache
*block_group
, int create
),
646 TP_ARGS(fs_info
, block_group
, create
),
649 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
650 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
651 ctf_integer(u64
, size
, block_group
->key
.offset
)
652 ctf_integer(u64
, flags
, block_group
->flags
)
653 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
654 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
655 ctf_integer(int, create
, create
)
659 LTTNG_TRACEPOINT_EVENT(btrfs_add_block_group
,
661 TP_PROTO(struct btrfs_fs_info
*fs_info
,
662 struct btrfs_block_group_cache
*block_group
, int create
),
664 TP_ARGS(fs_info
, block_group
, create
),
667 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
668 ctf_integer(u64
, offset
, block_group
->key
.objectid
)
669 ctf_integer(u64
, size
, block_group
->key
.offset
)
670 ctf_integer(u64
, flags
, block_group
->flags
)
671 ctf_integer(u64
, bytes_used
, btrfs_block_group_used(&block_group
->item
))
672 ctf_integer(u64
, bytes_super
, block_group
->bytes_super
)
673 ctf_integer(int, create
, create
)
678 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
679 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
681 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
682 const struct btrfs_delayed_ref_node
*ref
,
683 const struct btrfs_delayed_tree_ref
*full_ref
,
686 TP_ARGS(fs_info
, ref
, full_ref
, action
),
689 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
690 ctf_integer(u64
, bytenr
, ref
->bytenr
)
691 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
692 ctf_integer(int, action
, action
)
693 ctf_integer(u64
, parent
, full_ref
->parent
)
694 ctf_integer(u64
, ref_root
, full_ref
->root
)
695 ctf_integer(int, level
, full_ref
->level
)
696 ctf_integer(int, type
, ref
->type
)
697 ctf_integer(u64
, seq
, ref
->seq
)
701 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
703 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
704 const struct btrfs_delayed_ref_node
*ref
,
705 const struct btrfs_delayed_tree_ref
*full_ref
,
708 TP_ARGS(fs_info
, ref
, full_ref
, action
)
711 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
713 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
714 const struct btrfs_delayed_ref_node
*ref
,
715 const struct btrfs_delayed_tree_ref
*full_ref
,
718 TP_ARGS(fs_info
, ref
, full_ref
, action
)
720 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
721 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
723 TP_PROTO(struct btrfs_fs_info
*fs_info
,
724 struct btrfs_delayed_ref_node
*ref
,
725 struct btrfs_delayed_tree_ref
*full_ref
,
728 TP_ARGS(fs_info
, ref
, full_ref
, action
),
731 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
732 ctf_integer(u64
, bytenr
, ref
->bytenr
)
733 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
734 ctf_integer(int, action
, action
)
735 ctf_integer(u64
, parent
, full_ref
->parent
)
736 ctf_integer(u64
, ref_root
, full_ref
->root
)
737 ctf_integer(int, level
, full_ref
->level
)
738 ctf_integer(int, type
, ref
->type
)
739 ctf_integer(u64
, seq
, ref
->seq
)
743 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
745 TP_PROTO(struct btrfs_fs_info
*fs_info
,
746 struct btrfs_delayed_ref_node
*ref
,
747 struct btrfs_delayed_tree_ref
*full_ref
,
750 TP_ARGS(fs_info
, ref
, full_ref
, action
)
753 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
755 TP_PROTO(struct btrfs_fs_info
*fs_info
,
756 struct btrfs_delayed_ref_node
*ref
,
757 struct btrfs_delayed_tree_ref
*full_ref
,
760 TP_ARGS(fs_info
, ref
, full_ref
, action
)
762 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
763 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_tree_ref
,
765 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
766 struct btrfs_delayed_tree_ref
*full_ref
,
769 TP_ARGS(ref
, full_ref
, action
),
772 ctf_integer(u64
, bytenr
, ref
->bytenr
)
773 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
774 ctf_integer(int, action
, action
)
775 ctf_integer(u64
, parent
, full_ref
->parent
)
776 ctf_integer(u64
, ref_root
, full_ref
->root
)
777 ctf_integer(int, level
, full_ref
->level
)
778 ctf_integer(int, type
, ref
->type
)
779 ctf_integer(u64
, seq
, ref
->seq
)
783 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, add_delayed_tree_ref
,
785 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
786 struct btrfs_delayed_tree_ref
*full_ref
,
789 TP_ARGS(ref
, full_ref
, action
)
792 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_tree_ref
, run_delayed_tree_ref
,
794 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
795 struct btrfs_delayed_tree_ref
*full_ref
,
798 TP_ARGS(ref
, full_ref
, action
)
800 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
801 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
803 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
804 struct btrfs_delayed_tree_ref
*full_ref
,
807 TP_ARGS(ref
, full_ref
, action
),
810 ctf_integer(u64
, bytenr
, ref
->bytenr
)
811 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
812 ctf_integer(int, action
, action
)
813 ctf_integer(u64
, parent
, full_ref
->parent
)
814 ctf_integer(u64
, ref_root
, full_ref
->root
)
815 ctf_integer(int, level
, full_ref
->level
)
816 ctf_integer(int, type
, ref
->type
)
817 ctf_integer(u64
, seq
, ref
->seq
)
821 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_tree_ref
,
823 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
824 struct btrfs_delayed_tree_ref
*full_ref
,
827 TP_ARGS(ref
, full_ref
, action
),
830 ctf_integer(u64
, bytenr
, ref
->bytenr
)
831 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
832 ctf_integer(int, action
, action
)
833 ctf_integer(u64
, parent
, full_ref
->parent
)
834 ctf_integer(u64
, ref_root
, full_ref
->root
)
835 ctf_integer(int, level
, full_ref
->level
)
836 ctf_integer(int, type
, ref
->type
)
841 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
842 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
844 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
845 const struct btrfs_delayed_ref_node
*ref
,
846 const struct btrfs_delayed_data_ref
*full_ref
,
849 TP_ARGS(fs_info
, ref
, full_ref
, action
),
852 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
853 ctf_integer(u64
, bytenr
, ref
->bytenr
)
854 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
855 ctf_integer(int, action
, action
)
856 ctf_integer(u64
, parent
, full_ref
->parent
)
857 ctf_integer(u64
, ref_root
, full_ref
->root
)
858 ctf_integer(u64
, owner
, full_ref
->objectid
)
859 ctf_integer(u64
, offset
, full_ref
->offset
)
860 ctf_integer(int, type
, ref
->type
)
861 ctf_integer(u64
, seq
, ref
->seq
)
865 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
867 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
868 const struct btrfs_delayed_ref_node
*ref
,
869 const struct btrfs_delayed_data_ref
*full_ref
,
872 TP_ARGS(fs_info
, ref
, full_ref
, action
)
875 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
877 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
878 const struct btrfs_delayed_ref_node
*ref
,
879 const struct btrfs_delayed_data_ref
*full_ref
,
882 TP_ARGS(fs_info
, ref
, full_ref
, action
)
884 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
885 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
887 TP_PROTO(struct btrfs_fs_info
*fs_info
,
888 struct btrfs_delayed_ref_node
*ref
,
889 struct btrfs_delayed_data_ref
*full_ref
,
892 TP_ARGS(fs_info
, ref
, full_ref
, action
),
895 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
896 ctf_integer(u64
, bytenr
, ref
->bytenr
)
897 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
898 ctf_integer(int, action
, action
)
899 ctf_integer(u64
, parent
, full_ref
->parent
)
900 ctf_integer(u64
, ref_root
, full_ref
->root
)
901 ctf_integer(u64
, owner
, full_ref
->objectid
)
902 ctf_integer(u64
, offset
, full_ref
->offset
)
903 ctf_integer(int, type
, ref
->type
)
904 ctf_integer(u64
, seq
, ref
->seq
)
908 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
910 TP_PROTO(struct btrfs_fs_info
*fs_info
,
911 struct btrfs_delayed_ref_node
*ref
,
912 struct btrfs_delayed_data_ref
*full_ref
,
915 TP_ARGS(fs_info
, ref
, full_ref
, action
)
918 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
920 TP_PROTO(struct btrfs_fs_info
*fs_info
,
921 struct btrfs_delayed_ref_node
*ref
,
922 struct btrfs_delayed_data_ref
*full_ref
,
925 TP_ARGS(fs_info
, ref
, full_ref
, action
)
927 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
928 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_data_ref
,
930 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
931 struct btrfs_delayed_data_ref
*full_ref
,
934 TP_ARGS(ref
, full_ref
, action
),
937 ctf_integer(u64
, bytenr
, ref
->bytenr
)
938 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
939 ctf_integer(int, action
, action
)
940 ctf_integer(u64
, parent
, full_ref
->parent
)
941 ctf_integer(u64
, ref_root
, full_ref
->root
)
942 ctf_integer(u64
, owner
, full_ref
->objectid
)
943 ctf_integer(u64
, offset
, full_ref
->offset
)
944 ctf_integer(int, type
, ref
->type
)
945 ctf_integer(u64
, seq
, ref
->seq
)
949 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, add_delayed_data_ref
,
951 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
952 struct btrfs_delayed_data_ref
*full_ref
,
955 TP_ARGS(fs_info
, ref
, full_ref
, action
)
958 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs_delayed_data_ref
, run_delayed_data_ref
,
960 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
961 struct btrfs_delayed_data_ref
*full_ref
,
964 TP_ARGS(fs_info
, ref
, full_ref
, action
)
966 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
967 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
969 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
970 struct btrfs_delayed_data_ref
*full_ref
,
973 TP_ARGS(ref
, full_ref
, action
),
976 ctf_integer(u64
, bytenr
, ref
->bytenr
)
977 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
978 ctf_integer(int, action
, action
)
979 ctf_integer(u64
, parent
, full_ref
->parent
)
980 ctf_integer(u64
, ref_root
, full_ref
->root
)
981 ctf_integer(u64
, owner
, full_ref
->objectid
)
982 ctf_integer(u64
, offset
, full_ref
->offset
)
983 ctf_integer(int, type
, ref
->type
)
984 ctf_integer(u64
, seq
, ref
->seq
)
988 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_data_ref
,
990 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
991 struct btrfs_delayed_data_ref
*full_ref
,
994 TP_ARGS(ref
, full_ref
, action
),
997 ctf_integer(u64
, bytenr
, ref
->bytenr
)
998 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
999 ctf_integer(int, action
, action
)
1000 ctf_integer(u64
, parent
, full_ref
->parent
)
1001 ctf_integer(u64
, ref_root
, full_ref
->root
)
1002 ctf_integer(u64
, owner
, full_ref
->objectid
)
1003 ctf_integer(u64
, offset
, full_ref
->offset
)
1004 ctf_integer(int, type
, ref
->type
)
1009 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
1010 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1012 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1013 const struct btrfs_delayed_ref_head
*head_ref
,
1016 TP_ARGS(fs_info
, head_ref
, action
),
1019 ctf_integer(u64
, bytenr
, head_ref
->bytenr
)
1020 ctf_integer(u64
, num_bytes
, head_ref
->num_bytes
)
1021 ctf_integer(int, action
, action
)
1022 ctf_integer(int, is_data
, head_ref
->is_data
)
1026 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1028 add_delayed_ref_head
,
1030 btrfs_add_delayed_ref_head
,
1032 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1033 const struct btrfs_delayed_ref_head
*head_ref
,
1036 TP_ARGS(fs_info
, head_ref
, action
)
1039 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1041 run_delayed_ref_head
,
1043 btrfs_run_delayed_ref_head
,
1045 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1046 const struct btrfs_delayed_ref_head
*head_ref
,
1049 TP_ARGS(fs_info
, head_ref
, action
)
1052 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1053 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,4,114,92,0,0))
1054 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1056 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1057 const struct btrfs_delayed_ref_node
*ref
,
1058 const struct btrfs_delayed_ref_head
*head_ref
,
1061 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1064 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1065 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1066 ctf_integer(int, action
, action
)
1067 ctf_integer(int, is_data
, head_ref
->is_data
)
1071 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1073 add_delayed_ref_head
,
1075 btrfs_add_delayed_ref_head
,
1077 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1078 const struct btrfs_delayed_ref_node
*ref
,
1079 const struct btrfs_delayed_ref_head
*head_ref
,
1082 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1085 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1087 run_delayed_ref_head
,
1089 btrfs_run_delayed_ref_head
,
1091 TP_PROTO(const struct btrfs_fs_info
*fs_info
,
1092 const struct btrfs_delayed_ref_node
*ref
,
1093 const struct btrfs_delayed_ref_head
*head_ref
,
1096 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1099 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
1100 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1102 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1103 struct btrfs_delayed_ref_node
*ref
,
1104 struct btrfs_delayed_ref_head
*head_ref
,
1107 TP_ARGS(fs_info
, ref
, head_ref
, action
),
1110 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1111 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1112 ctf_integer(int, action
, action
)
1113 ctf_integer(int, is_data
, head_ref
->is_data
)
1117 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1119 add_delayed_ref_head
,
1121 btrfs_add_delayed_ref_head
,
1123 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1124 struct btrfs_delayed_ref_node
*ref
,
1125 struct btrfs_delayed_ref_head
*head_ref
,
1128 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1131 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1133 run_delayed_ref_head
,
1135 btrfs_run_delayed_ref_head
,
1137 TP_PROTO(struct btrfs_fs_info
*fs_info
,
1138 struct btrfs_delayed_ref_node
*ref
,
1139 struct btrfs_delayed_ref_head
*head_ref
,
1142 TP_ARGS(fs_info
, ref
, head_ref
, action
)
1145 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,114,92,0,0, 4,5,0,0,0,0))
1146 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1148 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1149 const struct btrfs_delayed_ref_head
*head_ref
,
1152 TP_ARGS(ref
, head_ref
, action
),
1155 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1156 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1157 ctf_integer(int, action
, action
)
1158 ctf_integer(int, is_data
, head_ref
->is_data
)
1162 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1164 add_delayed_ref_head
,
1166 btrfs_add_delayed_ref_head
,
1168 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1169 const struct btrfs_delayed_ref_head
*head_ref
,
1172 TP_ARGS(ref
, head_ref
, action
)
1175 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1177 run_delayed_ref_head
,
1179 btrfs_run_delayed_ref_head
,
1181 TP_PROTO(const struct btrfs_delayed_ref_node
*ref
,
1182 const struct btrfs_delayed_ref_head
*head_ref
,
1185 TP_ARGS(ref
, head_ref
, action
)
1188 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1189 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs_delayed_ref_head
,
1191 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1192 struct btrfs_delayed_ref_head
*head_ref
,
1195 TP_ARGS(ref
, head_ref
, action
),
1198 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1199 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1200 ctf_integer(int, action
, action
)
1201 ctf_integer(int, is_data
, head_ref
->is_data
)
1205 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1207 add_delayed_ref_head
,
1209 btrfs_add_delayed_ref_head
,
1211 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1212 struct btrfs_delayed_ref_head
*head_ref
,
1215 TP_ARGS(ref
, head_ref
, action
)
1218 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs_delayed_ref_head
,
1220 run_delayed_ref_head
,
1222 btrfs_run_delayed_ref_head
,
1224 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1225 struct btrfs_delayed_ref_head
*head_ref
,
1228 TP_ARGS(ref
, head_ref
, action
)
1232 LTTNG_TRACEPOINT_EVENT(btrfs_delayed_ref_head
,
1234 TP_PROTO(struct btrfs_delayed_ref_node
*ref
,
1235 struct btrfs_delayed_ref_head
*head_ref
,
1238 TP_ARGS(ref
, head_ref
, action
),
1241 ctf_integer(u64
, bytenr
, ref
->bytenr
)
1242 ctf_integer(u64
, num_bytes
, ref
->num_bytes
)
1243 ctf_integer(int, action
, action
)
1244 ctf_integer(int, is_data
, head_ref
->is_data
)
1249 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1251 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1253 TP_PROTO(const struct btrfs_fs_info
*fs_info
, const struct map_lookup
*map
,
1254 u64 offset
, u64 size
),
1256 TP_ARGS(fs_info
, map
, offset
, size
),
1259 ctf_integer(int, num_stripes
, map
->num_stripes
)
1260 ctf_integer(u64
, type
, map
->type
)
1261 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1262 ctf_integer(u64
, offset
, offset
)
1263 ctf_integer(u64
, size
, size
)
1264 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1268 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1270 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1271 u64 offset
, u64 size
),
1273 TP_ARGS(info
, map
, offset
, size
)
1276 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1278 TP_PROTO(const struct btrfs_fs_info
*info
, const struct map_lookup
*map
,
1279 u64 offset
, u64 size
),
1281 TP_ARGS(info
, map
, offset
, size
)
1284 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1286 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1288 TP_PROTO(struct btrfs_fs_info
*fs_info
, struct map_lookup
*map
,
1289 u64 offset
, u64 size
),
1291 TP_ARGS(fs_info
, map
, offset
, size
),
1294 ctf_integer(int, num_stripes
, map
->num_stripes
)
1295 ctf_integer(u64
, type
, map
->type
)
1296 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1297 ctf_integer(u64
, offset
, offset
)
1298 ctf_integer(u64
, size
, size
)
1299 ctf_integer(u64
, root_objectid
, fs_info
->chunk_root
->root_key
.objectid
)
1303 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1305 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1306 u64 offset
, u64 size
),
1308 TP_ARGS(info
, map
, offset
, size
)
1311 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1313 TP_PROTO(struct btrfs_fs_info
*info
, struct map_lookup
*map
,
1314 u64 offset
, u64 size
),
1316 TP_ARGS(info
, map
, offset
, size
)
1319 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1321 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1323 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1324 u64 offset
, u64 size
),
1326 TP_ARGS(root
, map
, offset
, size
),
1329 ctf_integer(int, num_stripes
, map
->num_stripes
)
1330 ctf_integer(u64
, type
, map
->type
)
1331 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1332 ctf_integer(u64
, offset
, offset
)
1333 ctf_integer(u64
, size
, size
)
1334 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1338 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1340 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1341 u64 offset
, u64 size
),
1343 TP_ARGS(root
, map
, offset
, size
)
1346 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1348 TP_PROTO(const struct btrfs_root
*root
, const struct map_lookup
*map
,
1349 u64 offset
, u64 size
),
1351 TP_ARGS(root
, map
, offset
, size
)
1354 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1356 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__chunk
,
1358 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1359 u64 offset
, u64 size
),
1361 TP_ARGS(root
, map
, offset
, size
),
1364 ctf_integer(int, num_stripes
, map
->num_stripes
)
1365 ctf_integer(u64
, type
, map
->type
)
1366 ctf_integer(int, sub_stripes
, map
->sub_stripes
)
1367 ctf_integer(u64
, offset
, offset
)
1368 ctf_integer(u64
, size
, size
)
1369 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1373 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_alloc
,
1375 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1376 u64 offset
, u64 size
),
1378 TP_ARGS(root
, map
, offset
, size
)
1381 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__chunk
, btrfs_chunk_free
,
1383 TP_PROTO(struct btrfs_root
*root
, struct map_lookup
*map
,
1384 u64 offset
, u64 size
),
1386 TP_ARGS(root
, map
, offset
, size
)
1389 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1391 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1392 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1393 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1395 TP_PROTO(const struct btrfs_root
*root
, const struct extent_buffer
*buf
,
1396 const struct extent_buffer
*cow
),
1398 TP_ARGS(root
, buf
, cow
),
1401 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1402 ctf_integer(u64
, buf_start
, buf
->start
)
1403 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1404 ctf_integer(u64
, cow_start
, cow
->start
)
1405 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1406 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1410 LTTNG_TRACEPOINT_EVENT(btrfs_cow_block
,
1412 TP_PROTO(struct btrfs_root
*root
, struct extent_buffer
*buf
,
1413 struct extent_buffer
*cow
),
1415 TP_ARGS(root
, buf
, cow
),
1418 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1419 ctf_integer(u64
, buf_start
, buf
->start
)
1420 ctf_integer(int, refs
, atomic_read(&buf
->refs
))
1421 ctf_integer(u64
, cow_start
, cow
->start
)
1422 ctf_integer(int, buf_level
, btrfs_header_level(buf
))
1423 ctf_integer(int, cow_level
, btrfs_header_level(cow
))
1428 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1429 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1430 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1432 TP_PROTO(const struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1433 u64 bytes
, int reserve
),
1435 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1438 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1439 ctf_string(type
, type
)
1440 ctf_integer(u64
, val
, val
)
1441 ctf_integer(u64
, bytes
, bytes
)
1442 ctf_integer(int, reserve
, reserve
)
1445 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1446 LTTNG_TRACEPOINT_EVENT(btrfs_space_reservation
,
1448 TP_PROTO(struct btrfs_fs_info
*fs_info
, char *type
, u64 val
,
1449 u64 bytes
, int reserve
),
1451 TP_ARGS(fs_info
, type
, val
, bytes
, reserve
),
1454 ctf_array(u8
, fsid
, fs_info
->fsid
, BTRFS_UUID_SIZE
)
1455 ctf_string(type
, type
)
1456 ctf_integer(u64
, val
, val
)
1457 ctf_integer(u64
, bytes
, bytes
)
1458 ctf_integer(int, reserve
, reserve
)
1463 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1465 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1467 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1469 TP_ARGS(info
, start
, len
),
1472 ctf_integer(u64
, start
, start
)
1473 ctf_integer(u64
, len
, len
)
1477 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1479 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1481 TP_ARGS(info
, start
, len
)
1484 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1486 TP_PROTO(const struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1488 TP_ARGS(info
, start
, len
)
1491 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1493 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1495 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1497 TP_ARGS(info
, start
, len
),
1500 ctf_integer(u64
, start
, start
)
1501 ctf_integer(u64
, len
, len
)
1505 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1507 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1509 TP_ARGS(info
, start
, len
)
1512 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1514 TP_PROTO(struct btrfs_fs_info
*info
, u64 start
, u64 len
),
1516 TP_ARGS(info
, start
, len
)
1519 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1521 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1523 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1525 TP_ARGS(root
, start
, len
),
1528 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1529 ctf_integer(u64
, start
, start
)
1530 ctf_integer(u64
, len
, len
)
1534 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1536 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1538 TP_ARGS(root
, start
, len
)
1541 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1543 TP_PROTO(const struct btrfs_root
*root
, u64 start
, u64 len
),
1545 TP_ARGS(root
, start
, len
)
1548 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1550 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserved_extent
,
1552 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1554 TP_ARGS(root
, start
, len
),
1557 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1558 ctf_integer(u64
, start
, start
)
1559 ctf_integer(u64
, len
, len
)
1563 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_alloc
,
1565 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1567 TP_ARGS(root
, start
, len
)
1570 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserved_extent
, btrfs_reserved_extent_free
,
1572 TP_PROTO(struct btrfs_root
*root
, u64 start
, u64 len
),
1574 TP_ARGS(root
, start
, len
)
1577 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1579 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
1580 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1582 btrfs_find_free_extent
,
1584 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1587 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1590 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1591 ctf_integer(u64
, num_bytes
, num_bytes
)
1592 ctf_integer(u64
, empty_size
, empty_size
)
1593 ctf_integer(u64
, data
, data
)
1597 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1599 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1602 TP_ARGS(block_group
, start
, len
),
1605 ctf_array(u8
, fsid
, block_group
->fs_info
->fsid
, BTRFS_UUID_SIZE
)
1606 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1607 ctf_integer(u64
, flags
, block_group
->flags
)
1608 ctf_integer(u64
, start
, start
)
1609 ctf_integer(u64
, len
, len
)
1613 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1615 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1618 TP_ARGS(block_group
, start
, len
)
1621 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1623 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1626 TP_ARGS(block_group
, start
, len
)
1629 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
1630 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1632 btrfs_find_free_extent
,
1634 TP_PROTO(const struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1637 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1640 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1641 ctf_integer(u64
, num_bytes
, num_bytes
)
1642 ctf_integer(u64
, empty_size
, empty_size
)
1643 ctf_integer(u64
, data
, data
)
1647 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1649 TP_PROTO(const struct btrfs_fs_info
*info
,
1650 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1653 TP_ARGS(info
, block_group
, start
, len
),
1656 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1657 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1658 ctf_integer(u64
, flags
, block_group
->flags
)
1659 ctf_integer(u64
, start
, start
)
1660 ctf_integer(u64
, len
, len
)
1664 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1666 TP_PROTO(const struct btrfs_fs_info
*info
,
1667 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1670 TP_ARGS(info
, block_group
, start
, len
)
1673 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1675 TP_PROTO(const struct btrfs_fs_info
*info
,
1676 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1679 TP_ARGS(info
, block_group
, start
, len
)
1682 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
1684 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1686 btrfs_find_free_extent
,
1688 TP_PROTO(struct btrfs_fs_info
*info
, u64 num_bytes
, u64 empty_size
,
1691 TP_ARGS(info
, num_bytes
, empty_size
, data
),
1694 ctf_array(u8
, fsid
, info
->fsid
, BTRFS_UUID_SIZE
)
1695 ctf_integer(u64
, num_bytes
, num_bytes
)
1696 ctf_integer(u64
, empty_size
, empty_size
)
1697 ctf_integer(u64
, data
, data
)
1701 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1703 TP_PROTO(struct btrfs_fs_info
*info
,
1704 struct btrfs_block_group_cache
*block_group
, u64 start
,
1707 TP_ARGS(info
, block_group
, start
, len
),
1710 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1711 ctf_integer(u64
, flags
, block_group
->flags
)
1712 ctf_integer(u64
, start
, start
)
1713 ctf_integer(u64
, len
, len
)
1717 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1719 TP_PROTO(struct btrfs_fs_info
*info
,
1720 struct btrfs_block_group_cache
*block_group
, u64 start
,
1723 TP_ARGS(info
, block_group
, start
, len
)
1726 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1728 TP_PROTO(struct btrfs_fs_info
*info
,
1729 struct btrfs_block_group_cache
*block_group
, u64 start
,
1732 TP_ARGS(info
, block_group
, start
, len
)
1734 #elif (LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1736 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1738 btrfs_find_free_extent
,
1740 TP_PROTO(const struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1743 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1746 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1747 ctf_integer(u64
, num_bytes
, num_bytes
)
1748 ctf_integer(u64
, empty_size
, empty_size
)
1749 ctf_integer(u64
, data
, data
)
1753 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1755 TP_PROTO(const struct btrfs_root
*root
,
1756 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1759 TP_ARGS(root
, block_group
, start
, len
),
1762 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1763 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1764 ctf_integer(u64
, flags
, block_group
->flags
)
1765 ctf_integer(u64
, start
, start
)
1766 ctf_integer(u64
, len
, len
)
1770 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1772 TP_PROTO(const struct btrfs_root
*root
,
1773 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1776 TP_ARGS(root
, block_group
, start
, len
)
1779 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1781 TP_PROTO(const struct btrfs_root
*root
,
1782 const struct btrfs_block_group_cache
*block_group
, u64 start
,
1785 TP_ARGS(root
, block_group
, start
, len
)
1788 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1790 LTTNG_TRACEPOINT_EVENT_MAP(find_free_extent
,
1792 btrfs_find_free_extent
,
1794 TP_PROTO(struct btrfs_root
*root
, u64 num_bytes
, u64 empty_size
,
1797 TP_ARGS(root
, num_bytes
, empty_size
, data
),
1800 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1801 ctf_integer(u64
, num_bytes
, num_bytes
)
1802 ctf_integer(u64
, empty_size
, empty_size
)
1803 ctf_integer(u64
, data
, data
)
1807 LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__reserve_extent
,
1809 TP_PROTO(struct btrfs_root
*root
,
1810 struct btrfs_block_group_cache
*block_group
, u64 start
,
1813 TP_ARGS(root
, block_group
, start
, len
),
1816 ctf_integer(u64
, root_objectid
, root
->root_key
.objectid
)
1817 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1818 ctf_integer(u64
, flags
, block_group
->flags
)
1819 ctf_integer(u64
, start
, start
)
1820 ctf_integer(u64
, len
, len
)
1824 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent
,
1826 TP_PROTO(struct btrfs_root
*root
,
1827 struct btrfs_block_group_cache
*block_group
, u64 start
,
1830 TP_ARGS(root
, block_group
, start
, len
)
1833 LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__reserve_extent
, btrfs_reserve_extent_cluster
,
1835 TP_PROTO(struct btrfs_root
*root
,
1836 struct btrfs_block_group_cache
*block_group
, u64 start
,
1839 TP_ARGS(root
, block_group
, start
, len
)
1842 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
1844 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1845 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1846 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1848 TP_PROTO(const struct btrfs_block_group_cache
*block_group
, u64 start
,
1849 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1851 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1854 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1855 ctf_integer(u64
, flags
, block_group
->flags
)
1856 ctf_integer(u64
, start
, start
)
1857 ctf_integer(u64
, bytes
, bytes
)
1858 ctf_integer(u64
, empty_size
, empty_size
)
1859 ctf_integer(u64
, min_bytes
, min_bytes
)
1863 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1865 TP_PROTO(const struct btrfs_block_group_cache
*block_group
),
1867 TP_ARGS(block_group
),
1870 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1874 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1876 TP_PROTO(const struct btrfs_block_group_cache
*block_group
,
1877 const struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1879 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1882 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1883 ctf_integer(u64
, flags
, block_group
->flags
)
1884 ctf_integer(u64
, start
, cluster
->window_start
)
1885 ctf_integer(u64
, max_size
, cluster
->max_size
)
1886 ctf_integer(u64
, size
, size
)
1887 ctf_integer(int, bitmap
, bitmap
)
1890 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
1891 LTTNG_TRACEPOINT_EVENT(btrfs_find_cluster
,
1893 TP_PROTO(struct btrfs_block_group_cache
*block_group
, u64 start
,
1894 u64 bytes
, u64 empty_size
, u64 min_bytes
),
1896 TP_ARGS(block_group
, start
, bytes
, empty_size
, min_bytes
),
1899 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1900 ctf_integer(u64
, flags
, block_group
->flags
)
1901 ctf_integer(u64
, start
, start
)
1902 ctf_integer(u64
, bytes
, bytes
)
1903 ctf_integer(u64
, empty_size
, empty_size
)
1904 ctf_integer(u64
, min_bytes
, min_bytes
)
1908 LTTNG_TRACEPOINT_EVENT(btrfs_failed_cluster_setup
,
1910 TP_PROTO(struct btrfs_block_group_cache
*block_group
),
1912 TP_ARGS(block_group
),
1915 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1919 LTTNG_TRACEPOINT_EVENT(btrfs_setup_cluster
,
1921 TP_PROTO(struct btrfs_block_group_cache
*block_group
,
1922 struct btrfs_free_cluster
*cluster
, u64 size
, int bitmap
),
1924 TP_ARGS(block_group
, cluster
, size
, bitmap
),
1927 ctf_integer(u64
, bg_objectid
, block_group
->key
.objectid
)
1928 ctf_integer(u64
, flags
, block_group
->flags
)
1929 ctf_integer(u64
, start
, cluster
->window_start
)
1930 ctf_integer(u64
, max_size
, cluster
->max_size
)
1931 ctf_integer(u64
, size
, size
)
1932 ctf_integer(int, bitmap
, bitmap
)
1937 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) || \
1938 LTTNG_SLE_KERNEL_RANGE(4,4,103,6,0,0, 4,5,0,0,0,0))
1939 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1941 btrfs_alloc_extent_state
,
1943 TP_PROTO(const struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1945 TP_ARGS(state
, mask
, IP
),
1948 ctf_integer_hex(const struct extent_state
*, state
, state
)
1949 ctf_integer(gfp_t
, mask
, mask
)
1950 ctf_integer(unsigned long, ip
, IP
)
1954 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1956 btrfs_free_extent_state
,
1958 TP_PROTO(const struct extent_state
*state
, unsigned long IP
),
1963 ctf_integer_hex(const struct extent_state
*, state
, state
)
1964 ctf_integer(unsigned long, ip
, IP
)
1967 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
1968 LTTNG_TRACEPOINT_EVENT_MAP(alloc_extent_state
,
1970 btrfs_alloc_extent_state
,
1972 TP_PROTO(struct extent_state
*state
, gfp_t mask
, unsigned long IP
),
1974 TP_ARGS(state
, mask
, IP
),
1977 ctf_integer_hex(struct extent_state
*, state
, state
)
1978 ctf_integer(gfp_t
, mask
, mask
)
1979 ctf_integer(unsigned long, ip
, IP
)
1983 LTTNG_TRACEPOINT_EVENT_MAP(free_extent_state
,
1985 btrfs_free_extent_state
,
1987 TP_PROTO(struct extent_state
*state
, unsigned long IP
),
1992 ctf_integer_hex(struct extent_state
*, state
, state
)
1993 ctf_integer(unsigned long, ip
, IP
)
1998 #endif /* LTTNG_TRACE_BTRFS_H */
2000 /* This part must be outside protection */
2001 #include <probes/define_trace.h>