blob: 84c97d5f90a576ba8d594e43dd3d120945f8c688 [file] [log] [blame]
Andrew Geissler615f2f12022-07-15 14:00:58 -05001From b5d1c38665cd69d7d1c94231fe0609da5c8afbc3 Mon Sep 17 00:00:00 2001
2From: Michael Jeanson <mjeanson@efficios.com>
3Date: Wed, 8 Jun 2022 13:07:59 -0400
4Subject: [PATCH 2/3] fix: fs: Remove flags parameter from aops->write_begin
5 (v5.19)
6
7See upstream commit :
8
9 commit 9d6b0cd7579844761ed68926eb3073bab1dca87b
10 Author: Matthew Wilcox (Oracle) <willy@infradead.org>
11 Date: Tue Feb 22 14:31:43 2022 -0500
12
13 fs: Remove flags parameter from aops->write_begin
14
15 There are no more aop flags left, so remove the parameter.
16
17Upstream-Status: Backport
18
19Change-Id: I82725b93e13d749f52a631b2ac60df81a5e839f8
20Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
21Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
22---
23 include/instrumentation/events/ext4.h | 30 +++++++++++++++++++++++++++
24 1 file changed, 30 insertions(+)
25
26diff --git a/include/instrumentation/events/ext4.h b/include/instrumentation/events/ext4.h
27index 513762c0..222416ec 100644
28--- a/include/instrumentation/events/ext4.h
29+++ b/include/instrumentation/events/ext4.h
30@@ -122,6 +122,35 @@ LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate,
31 )
32 )
33
34+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,19,0))
35+LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin,
36+
37+ TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
38+
39+ TP_ARGS(inode, pos, len),
40+
41+ TP_FIELDS(
42+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
43+ ctf_integer(ino_t, ino, inode->i_ino)
44+ ctf_integer(loff_t, pos, pos)
45+ ctf_integer(unsigned int, len, len)
46+ )
47+)
48+
49+LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_write_begin,
50+
51+ TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
52+
53+ TP_ARGS(inode, pos, len)
54+)
55+
56+LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_da_write_begin,
57+
58+ TP_PROTO(struct inode *inode, loff_t pos, unsigned int len),
59+
60+ TP_ARGS(inode, pos, len)
61+)
62+#else
63 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin,
64
65 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
66@@ -153,6 +182,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_da_write_begin,
67
68 TP_ARGS(inode, pos, len, flags)
69 )
70+#endif
71
72 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_end,
73 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
74--
752.19.1
76