Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: dm-writeboost

dm-writeboost (2.2.9-1ubuntu1) disco; urgency=low * Merge from Debian unstable. Remaining changes: - Adding DEP8 functional test case * Fix building for linux 4.19 (LP: #1801975) * Fix calling dm_kcopyd_zero on linux 4.19 (LP: #1801975) -- Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Wed, 07 Nov 2018 20:41:49 -0200

Modifications :
  1. Download patch debian/tests/control

    --- 2.2.9-1/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ 2.2.9-1ubuntu1/debian/tests/control 2017-11-15 09:43:14.000000000 +0000 @@ -0,0 +1,3 @@ +Tests: test_dm-writeboost.sh +Restrictions: needs-root, isolation-machine +Depends: dm-writeboost-dkms, stress-ng, dkms, dmsetup
  2. Download patch debian/control

    --- 2.2.9-1/debian/control 2018-06-11 04:55:40.000000000 +0000 +++ 2.2.9-1ubuntu1/debian/control 2018-06-11 10:16:35.000000000 +0000 @@ -1,7 +1,8 @@ Source: dm-writeboost Section: kernel Priority: optional -Maintainer: Dmitry Smirnov <onlyjob@debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Dmitry Smirnov <onlyjob@debian.org> Build-Depends: debhelper (>= 10), dkms Standards-Version: 4.1.4 Homepage: https://github.com/akiradeveloper/dm-writeboost
  3. Download patch debian/patches/0001-Fix-building-for-linux-4.19

    --- 2.2.9-1/debian/patches/0001-Fix-building-for-linux-4.19 1970-01-01 00:00:00.000000000 +0000 +++ 2.2.9-1ubuntu1/debian/patches/0001-Fix-building-for-linux-4.19 2018-11-07 22:41:49.000000000 +0000 @@ -0,0 +1,54 @@ +From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> +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 <cascardo@canonical.com> + +Origin: upstream, commit:af218c398d1f18877a3c54a2c255d8fb5b867df0 +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) +
  4. Download patch debian/tests/test_dm-writeboost.sh

    --- 2.2.9-1/debian/tests/test_dm-writeboost.sh 1970-01-01 00:00:00.000000000 +0000 +++ 2.2.9-1ubuntu1/debian/tests/test_dm-writeboost.sh 2017-11-15 09:43:14.000000000 +0000 @@ -0,0 +1,122 @@ +#!/bin/sh +# Requires: dm-writeboost-dkms stress-ng +# If not started as root, should allow sudo without password + +# Size of test volumes in GB +B_SIZE=10 +C_SIZE=4 + +# Names for loop files and mount point +B_NAME="backing-$$.img" +C_NAME="cache-$$.img" +M_NAME="wbmnt-$$" + +DoCleanup() { + if [ "$(mount|grep $M_NAME)" != "" ]; then + echo "II: Unmounting $M_NAME..." + sudo umount $M_NAME + fi + if [ -d $M_NAME ]; then + echo "II: Removing mount directory..." + rmdir $M_NAME + fi + if [ "$(sudo dmsetup ls|grep ^wbtgt)" != "" ]; then + echo "II: Deleting dm-writeboost target..." + sudo dmsetup remove wbtgt + fi + DEVNAME=$(losetup -j $C_NAME | cut -d: -f1) + if [ "$DEVNAME" != "" ]; then + echo "II: Detaching $DEVNAME..." + sudo losetup -d $DEVNAME + fi + DEVNAME=$(losetup -j $B_NAME | cut -d: -f1) + if [ "$DEVNAME" != "" ]; then + echo "II: Detaching $DEVNAME..." + sudo losetup -d $DEVNAME + fi + echo "II: Deleting file images..." + rm -f $B_NAME $C_NAME +} + +FailAbort() { + echo "FAILED!" + DoCleanup + echo "EE: FAIL" + exit 1 +} + + +# Want to fit both image files (+1G safety margin) into current path +AVAIL=$(df -BG --output=avail .|tail -1|tr -d ' G') + +echo -n "II: Checking for $(($B_SIZE + $C_SIZE))G available disk space..." +if [ $AVAIL -lt $(($B_SIZE + $C_SIZE + 1)) ]; then + echo "FAIL!" + exit 1 +fi +echo "OK" + +echo "II: Creating loop files:" +echo -n "II: - $B_NAME..." +fallocate -l ${B_SIZE}G ${B_NAME} || FailAbort +echo "OK" +echo -n "II: - $C_NAME..." +fallocate -l ${C_SIZE}G ${C_NAME} || FailAbort +echo "OK" + +echo "II: Connecting to loop devices:" +B_DEV=$(losetup -f) +echo -n "II: - $B_NAME -> $B_DEV..." +sudo losetup $B_DEV $B_NAME || FailAbort +echo "OK" +C_DEV=$(losetup -f) +echo -n "II: - $C_NAME -> $C_DEV..." +sudo losetup $C_DEV $C_NAME || FailAbort +echo "OK" + +echo -n "II: Initialize cache..." +sudo dd if=/dev/zero of=$C_DEV oflag=direct bs=1M count=1 status=none || \ + FailAbort +echo "OK" + +if ! lsmod | grep -q dm.writeboost; then + echo -n "II: Loading dm-writeboost module..." + sudo modprobe dm-writeboost || FailAbort + echo "OK" +fi + +SIZE=$(sudo blockdev --getsize $B_DEV) +echo -n "II: Creating dm-writeboost logical device..." +sudo dmsetup create wbtgt \ + --table "0 $SIZE writeboost $B_DEV $C_DEV" || FailAbort +echo "OK" + +echo -n "II: Creating mount-point..." +mkdir $M_NAME || FailAbort +echo "OK" + +echo -n "II: Create filesystem on dm-writeboost target..." +sudo mkfs.ext4 /dev/mapper/wbtgt >/dev/null 2>&1 || FailAbort +echo "OK" + +echo -n "II: Mounting dm-writeboost target to $M_NAME..." +sudo mount /dev/mapper/wbtgt $M_NAME || FailAbort +echo "OK" + +echo "II: Testing..." +HDD_NUM=$(getconf _NPROCESSORS_ONLN) +if [ $HDD_NUM -gt 8 ]; then + HDD_NUM=8 +fi +HDD_SIZE=$((8 / $HDD_NUM)) +( + cd $M_NAME + sudo stress-ng --timeout=5m --hdd=$HDD_NUM --verify --hdd-opts=wr-rnd \ + --hdd-bytes=${HDD_SIZE}g +) 2>&1 || FailAbort + +DoCleanup +echo "PASS" + +exit 0 +
  5. Download patch debian/patches/series

    --- 2.2.9-1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ 2.2.9-1ubuntu1/debian/patches/series 2018-11-06 17:20:28.000000000 +0000 @@ -0,0 +1,2 @@ +0001-Fix-building-for-linux-4.19 +0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19
  6. Download patch debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19

    --- 2.2.9-1/debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19 1970-01-01 00:00:00.000000000 +0000 +++ 2.2.9-1ubuntu1/debian/patches/0001-Fix-calling-dm_kcopyd_zero-on-linux-4.19 2018-11-07 22:41:49.000000000 +0000 @@ -0,0 +1,32 @@ +From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> +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 <cascardo@canonical.com> + +Origin: upstream, commit:f81f0f9df7629099fda7adbfaaa991b3aa71af1a +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; + }
  1. dm-writeboost