From: Michael Jeanson Date: Tue, 11 Feb 2020 19:47:23 +0000 (-0500) Subject: fix: btrfs: make btrfs_ordered_extent naming consistent (v5.6) X-Git-Tag: before-upstreaming~42 X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=f7afb954f3908b302f7b3fef1b8195736845c41f fix: btrfs: make btrfs_ordered_extent naming consistent (v5.6) See upstream commit : commit bffe633e00fb6b904817137fc17a44b42efcd985 Author: Omar Sandoval Date: Mon Dec 2 17:34:19 2019 -0800 btrfs: make btrfs_ordered_extent naming consistent with btrfs_file_extent_item ordered->start, ordered->len, and ordered->disk_len correspond to fi->disk_bytenr, fi->num_bytes, and fi->disk_num_bytes, respectively. It's confusing to translate between the two naming schemes. Since a btrfs_ordered_extent is basically a pending btrfs_file_extent_item, let's make the former use the naming from the latter. Note that I didn't touch the names in tracepoints just in case there are scripts depending on the current naming. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/btrfs.h b/instrumentation/events/lttng-module/btrfs.h index b4f2fe70..7b290085 100644 --- a/instrumentation/events/lttng-module/btrfs.h +++ b/instrumentation/events/lttng-module/btrfs.h @@ -346,7 +346,29 @@ LTTNG_TRACEPOINT_EVENT(btrfs_handle_em_exist, ) #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) +LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, + + TP_PROTO(const struct inode *inode, + const struct btrfs_ordered_extent *ordered), + + TP_ARGS(inode, ordered), + + TP_FIELDS( + ctf_integer(ino_t, ino, inode->i_ino) + ctf_integer(u64, file_offset, ordered->file_offset) + ctf_integer(u64, start, ordered->disk_bytenr) + ctf_integer(u64, len, ordered->num_bytes) + ctf_integer(u64, disk_len, ordered->disk_num_bytes) + ctf_integer(u64, bytes_left, ordered->bytes_left) + ctf_integer(unsigned long, flags, ordered->flags) + ctf_integer(int, compress_type, ordered->compress_type) + ctf_integer(int, refs, refcount_read(&ordered->refs)) + ctf_integer(u64, root_objectid, + BTRFS_I(inode)->root->root_key.objectid) + ) +) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__ordered_extent, TP_PROTO(const struct inode *inode,