Sync `show_inode_state()` macro with Ubuntu 4.15 kernel
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 10 May 2021 17:41:48 +0000 (13:41 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 May 2021 13:51:57 +0000 (09:51 -0400)
The following commit changed the `show_inode_state()` macro which
triggered a warning on our CI build:
  commit 63388062bea96e5cd8b8d7abf7b7142f8666ca1f
  Author: Jan Kara <jack@suse.cz>
  Date:   Mon Jan 25 12:37:43 2021 -0800

      writeback: Drop I_DIRTY_TIME_EXPIRE

Also, this commit adds a comment to clarify why we keep these
`#if/#elif` even though we don't use it the macro.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I2dd53a1a286ab8a431977bda6cde01f700f0c7d9

instrumentation/events/lttng-module/writeback.h

index 8c0ea8c6332ff59433196ea3af3a53d6fb26b7ba..9d21a136963752a19237b0e78b4fcec7e7f8035c 100644 (file)
@@ -65,8 +65,15 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode)
 
 #endif
 
+/*
+ * Keep this macro around to track changes in the valid values for `state`.
+ * Eventually, we will have a enum to describe that field. If the macro is
+ * changed by an upstream kernel, the fact that we have a redefinition here
+ * will generate a compiler warning.
+ */
 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0) || \
-       LTTNG_UBUNTU_KERNEL_RANGE(5,4,94,67, 5,5,0,0))
+       LTTNG_UBUNTU_KERNEL_RANGE(5,4,94,67, 5,5,0,0) ||        \
+       LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,141, 4,16,0,0))
 #define show_inode_state(state)                                        \
        __print_flags(state, "|",                               \
                {I_DIRTY_SYNC,          "I_DIRTY_SYNC"},        \
This page took 0.026918 seconds and 4 git commands to generate.