diff -Nru dm-writeboost-2.2.6/debian/changelog dm-writeboost-2.2.6/debian/changelog --- dm-writeboost-2.2.6/debian/changelog 2017-10-27 15:16:55.000000000 -0200 +++ dm-writeboost-2.2.6/debian/changelog 2018-06-19 09:03:22.000000000 -0300 @@ -1,3 +1,10 @@ +dm-writeboost (2.2.6-1~16.04.3) xenial; urgency=medium + + * Backport to xenial to support 4.11 and 4.15 kernels. (LP: #1777636) + - 0002-ubuntu-compat-4.15.patch + + -- Marcelo Henrique Cerri Tue, 19 Jun 2018 09:03:22 -0300 + dm-writeboost (2.2.6-1~16.04.2) xenial; urgency=medium * Backport to xenial to support 4.11 and 4.13 kernels. (LP: #1727334) diff -Nru dm-writeboost-2.2.6/debian/patches/0002-ubuntu-compat-4.15.patch dm-writeboost-2.2.6/debian/patches/0002-ubuntu-compat-4.15.patch --- dm-writeboost-2.2.6/debian/patches/0002-ubuntu-compat-4.15.patch 1969-12-31 21:00:00.000000000 -0300 +++ dm-writeboost-2.2.6/debian/patches/0002-ubuntu-compat-4.15.patch 2018-06-18 15:16:25.000000000 -0300 @@ -0,0 +1,83 @@ +--- a/src/dm-writeboost-daemon.c ++++ b/src/dm-writeboost-daemon.c +@@ -385,7 +385,7 @@ + atomic64_read(&wb->last_flushed_segment_id) + - atomic64_read(&wb->last_writeback_segment_id); + +- u32 nr_max_batch = ACCESS_ONCE(wb->nr_max_batched_writeback); ++ u32 nr_max_batch = READ_ONCE(wb->nr_max_batched_writeback); + if (wb->nr_writeback_segs != nr_max_batch) + try_alloc_writeback_ios(wb, nr_max_batch, GFP_NOIO | __GFP_NOWARN); + +@@ -394,9 +394,9 @@ + + static bool should_writeback(struct wb_device *wb) + { +- return ACCESS_ONCE(wb->allow_writeback) || +- ACCESS_ONCE(wb->urge_writeback) || +- ACCESS_ONCE(wb->force_drop); ++ return READ_ONCE(wb->allow_writeback) || ++ READ_ONCE(wb->urge_writeback) || ++ READ_ONCE(wb->force_drop); + } + + static void do_writeback_proc(struct wb_device *wb) +@@ -475,7 +475,7 @@ + + util = div_u64(100 * (new - old), 1000); + +- if (util < ACCESS_ONCE(wb->writeback_threshold)) ++ if (util < READ_ONCE(wb->writeback_threshold)) + wb->allow_writeback = true; + else + wb->allow_writeback = false; +@@ -530,7 +530,7 @@ + + while (!kthread_should_stop()) { + /* sec -> ms */ +- intvl = ACCESS_ONCE(wb->update_sb_record_interval) * 1000; ++ intvl = READ_ONCE(wb->update_sb_record_interval) * 1000; + + if (!intvl) { + schedule_timeout_interruptible(msecs_to_jiffies(1000)); +@@ -552,7 +552,7 @@ + + while (!kthread_should_stop()) { + /* sec -> ms */ +- intvl = ACCESS_ONCE(wb->sync_data_interval) * 1000; ++ intvl = READ_ONCE(wb->sync_data_interval) * 1000; + + if (!intvl) { + schedule_timeout_interruptible(msecs_to_jiffies(1000)); +--- a/src/dm-writeboost-target.c ++++ b/src/dm-writeboost-target.c +@@ -132,7 +132,11 @@ + + static void bio_remap(struct bio *bio, struct dm_dev *dev, sector_t sector) + { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) ++ bio_set_dev(bio, dev->bdev); ++#else + bio->bi_bdev = dev->bdev; ++#endif + bi_sector(bio) = sector; + } + +@@ -779,7 +783,7 @@ + + ASSERT(cells->threshold > 0); + +- if (!ACCESS_ONCE(wb->read_cache_threshold)) ++ if (!READ_ONCE(wb->read_cache_threshold)) + return false; + + if (!cells->cursor) +@@ -970,7 +974,7 @@ + struct read_cache_cell *cell = cells->array + i; + cell->cancelled = false; + } +- cur_threshold = ACCESS_ONCE(wb->read_cache_threshold); ++ cur_threshold = READ_ONCE(wb->read_cache_threshold); + if (cur_threshold && (cur_threshold != cells->threshold)) { + cells->threshold = cur_threshold; + cells->over_threshold = false; diff -Nru dm-writeboost-2.2.6/debian/patches/series dm-writeboost-2.2.6/debian/patches/series --- dm-writeboost-2.2.6/debian/patches/series 2017-10-27 15:15:14.000000000 -0200 +++ dm-writeboost-2.2.6/debian/patches/series 2018-06-18 15:16:45.000000000 -0300 @@ -1 +1,2 @@ 0001-ubuntu-compat-4.13.patch +0002-ubuntu-compat-4.15.patch