See upstream commit :
commit
3b5149ac50970669ee0ddb9629ec77ffd5c0622d
Author: Christoph Hellwig <hch@lst.de>
Date: Mon Nov 22 14:06:21 2021 +0100
block: remove GENHD_FL_SUPPRESS_PARTITION_INFO
This flag is not set directly anywhere and only inherited from
GENHD_FL_HIDDEN. Just check for GENHD_FL_HIDDEN instead.
Link: https://lore.kernel.org/r/20211122130625.1136848-11-hch@lst.de
Change-Id: Ide92bdaaff7d16e96be23aaf00cebeaa601235b7
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
* suppressed
*/
if (get_capacity(disk) == 0 ||
- (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO))
+ (disk->flags & LTTNG_GENHD_FL_HIDDEN))
continue;
ret = lttng_statedump_each_block_device(session, disk);
#include <linux/genhd.h>
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
+#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_HIDDEN
+#else
+#define LTTNG_GENHD_FL_HIDDEN GENHD_FL_SUPPRESS_PARTITION_INFO
+#endif
+
#ifdef CONFIG_KALLSYMS_ALL
#include <linux/kallsyms.h>