akiradeveloper / dm-writeboost

Log-structured Caching for Linux
GNU General Public License v2.0
120 stars 18 forks source link

fix Linux 5.7 FTBFS #211

Closed onlyjob closed 4 years ago

onlyjob commented 4 years ago

A friendly developer contributed a patch to fix FTBFS with Linux 5.7.

Please review:

From 358e980fc487e6ff551a44dfed481910aee9dd52 Mon Sep 17 00:00:00 2001
From: Paolo Pisati <paolo.pisati@canonical.com>
Date: Wed, 13 May 2020 13:10:03 +0000
Subject: [PATCH] Fix Linux 5.7 build

commit c6a564ffadc9105880329710164ee493f0de103c "block: move the part_stat*
helpers from genhd.h to a new header" moved part_stat* to a new header, fix the
code accordingly

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 src/dm-writeboost-daemon.c | 1 +
 1 file changed, 1 insertion(+)

--- a/src/dm-writeboost-daemon.c
+++ b/src/dm-writeboost-daemon.c
@@ -21,6 +21,9 @@
 #include "dm-writeboost-metadata.h"
 #include "dm-writeboost-daemon.h"

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)
+#include <linux/part_stat.h>
+#endif
 #include <linux/rbtree.h>

 /*----------------------------------------------------------------------------*/
akiradeveloper commented 4 years ago

this is the patch mentioned in this thread: https://lkml.org/lkml/2020/3/25/344

akiradeveloper commented 4 years ago

Thanks for the patch. It is merged now.