X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Finstrumentation%2Fevents%2Fwriteback.h;h=99aafde4b0d5d8c4100a354ed17bd38442da1e50;hb=91bc9003a7446a3ac1145295d6e5697d322c4c6c;hp=f05708a8376c6f949665eae06b19c4087977cf75;hpb=dbabd7296e9bcfb263f96e78c185f1eb7346ee53;p=lttng-modules.git diff --git a/include/instrumentation/events/writeback.h b/include/instrumentation/events/writeback.h index f05708a8..99aafde4 100644 --- a/include/instrumentation/events/writeback.h +++ b/include/instrumentation/events/writeback.h @@ -65,7 +65,17 @@ static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode) #endif -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,9,0)) +/* + * 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_KERNEL_RANGE(4,14,218, 4,15,0) || \ + LTTNG_KERNEL_RANGE(4,19,172, 4,20,0) || \ + LTTNG_KERNEL_RANGE(5,4,94, 5,5,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"}, \