diff -Nru dm-writeboost-2.2.8/debian/changelog dm-writeboost-2.2.8/debian/changelog --- dm-writeboost-2.2.8/debian/changelog 2018-11-19 16:45:31.000000000 +0000 +++ dm-writeboost-2.2.8/debian/changelog 2019-04-17 02:06:11.000000000 +0000 @@ -1,3 +1,9 @@ +dm-writeboost (2.2.8-1ubuntu3~18.04.2) bionic; urgency=medium + + * Fix building for linux 4.19 (LP: #1801975) + + -- Thadeu Lima de Souza Cascardo Tue, 16 Apr 2019 23:06:11 -0300 + dm-writeboost (2.2.8-1ubuntu3~18.04.1) bionic; urgency=medium * debian/patches/buildfix-4.17.patch diff -Nru dm-writeboost-2.2.8/debian/patches/0001-Fix-building-for-linux-4.19 dm-writeboost-2.2.8/debian/patches/0001-Fix-building-for-linux-4.19 --- dm-writeboost-2.2.8/debian/patches/0001-Fix-building-for-linux-4.19 1970-01-01 00:00:00.000000000 +0000 +++ dm-writeboost-2.2.8/debian/patches/0001-Fix-building-for-linux-4.19 2019-04-17 02:04:50.000000000 +0000 @@ -0,0 +1,54 @@ +From: Thadeu Lima de Souza Cascardo +Description: Fix building for linux 4.19. + +linux 4.19 has introduced STAT_WRITE and STAT_READ for partition stat +entries. This conflicts with dm-writeboost own STAT_WRITE, which was +renamed as WB_STAT_WRITE. The same pattern renaming was applied to other +values. + +Signed-off-by: Thadeu Lima de Souza Cascardo + +Origin: upstream, commit:4de4b080241b0e63eb3b53b86db5b5befe04fdf4 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1801975 + +diff --git a/src/dm-writeboost-target.c b/src/dm-writeboost-target.c +index a0b104789d42..9846bf650adb 100644 +--- a/src/dm-writeboost-target.c ++++ b/src/dm-writeboost-target.c +@@ -424,13 +424,13 @@ static void inc_stat(struct wb_device *wb, + + int i = 0; + if (rw) +- i |= (1 << STAT_WRITE); ++ i |= (1 << WB_STAT_WRITE); + if (found) +- i |= (1 << STAT_HIT); ++ i |= (1 << WB_STAT_HIT); + if (on_buffer) +- i |= (1 << STAT_ON_BUFFER); ++ i |= (1 << WB_STAT_ON_BUFFER); + if (fullsize) +- i |= (1 << STAT_FULLSIZE); ++ i |= (1 << WB_STAT_FULLSIZE); + + v = &wb->stat[i]; + atomic64_inc(v); +diff --git a/src/dm-writeboost.h b/src/dm-writeboost.h +index f771dde34e3e..da6dd1b6d97f 100644 +--- a/src/dm-writeboost.h ++++ b/src/dm-writeboost.h +@@ -232,10 +232,10 @@ struct read_cache_cells { + /*----------------------------------------------------------------------------*/ + + enum STATFLAG { +- STAT_WRITE = 3, /* Write or read */ +- STAT_HIT = 2, /* Hit or miss */ +- STAT_ON_BUFFER = 1, /* Found on buffer or on the cache device */ +- STAT_FULLSIZE = 0, /* Bio is fullsize or partial */ ++ WB_STAT_WRITE = 3, /* Write or read */ ++ WB_STAT_HIT = 2, /* Hit or miss */ ++ WB_STAT_ON_BUFFER = 1, /* Found on buffer or on the cache device */ ++ WB_STAT_FULLSIZE = 0, /* Bio is fullsize or partial */ + }; + #define STATLEN (1 << 4) + diff -Nru dm-writeboost-2.2.8/debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19 dm-writeboost-2.2.8/debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19 --- dm-writeboost-2.2.8/debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19 1970-01-01 00:00:00.000000000 +0000 +++ dm-writeboost-2.2.8/debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19 2019-04-17 02:04:50.000000000 +0000 @@ -0,0 +1,32 @@ +From: Thadeu Lima de Souza Cascardo +Description: Fix calling dm_kcopyd_zero on linux 4.19. + +On linux 4.19, dm_kcopyd_zero was changed to return void instead of int, +because dm_kcopyd_copy always returned 0. As that has been since the +introduction of kcopyd, there should be no problem ignoring its return +value even on versions where it would still return an int. + +Signed-off-by: Thadeu Lima de Souza Cascardo + +Origin: upstream, commit:e28fae7961107d8a4169fde86ca324068f8fa358 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1801975 + +diff --git a/src/dm-writeboost-metadata.c b/src/dm-writeboost-metadata.c +index ea9227161374..456ab7eeaffa 100644 +--- a/src/dm-writeboost-metadata.c ++++ b/src/dm-writeboost-metadata.c +@@ -438,13 +438,10 @@ static void zeroing_complete(int read_err, unsigned long write_err, void *contex + */ + static int do_zeroing_region(struct wb_device *wb, struct dm_io_region *region) + { +- int err; + struct zeroing_context zc; + zc.error = 0; + init_completion(&zc.complete); +- err = dm_kcopyd_zero(wb->copier, 1, region, 0, zeroing_complete, &zc); +- if (err) +- return err; ++ dm_kcopyd_zero(wb->copier, 1, region, 0, zeroing_complete, &zc); + wait_for_completion(&zc.complete); + return zc.error; + } diff -Nru dm-writeboost-2.2.8/debian/patches/series dm-writeboost-2.2.8/debian/patches/series --- dm-writeboost-2.2.8/debian/patches/series 2018-05-25 14:27:59.000000000 +0000 +++ dm-writeboost-2.2.8/debian/patches/series 2019-04-17 02:05:24.000000000 +0000 @@ -1,2 +1,4 @@ 0001-use-read_once.patch buildfix-4.17.patch +0001-Fix-building-for-linux-4.19 +0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19