Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian....@packages.debian.org
Usertags: pu

[ Reason ]
A change from Linux v6.9-rc1 got backported to v6.1.83 and breaks
building the dm-writeboost module (dm_io() got an extra parameter).

I'd like to update dm-writeboost to a new upstream release, the only
functional change is that fix (patch by me), everything else is
documentation and metadata updates.
On the Debian side there are some autopkgtest and metadata
improvements.
I'd prefer getting the full package from sid instead of just
cherry-picking the fix.

[ Impact ]
The module cannot be built for the kernel in bookworm-security (or any
future kernels in bookworm).

[ Tests ]
pkg-autopkgtest-dkms takes care of that ;-)

[ Risks ]
Low.

[ Checklist ]
  [*] *all* changes are documented in the d/changelog
  [*] I reviewed all changes and I approve them
  [*] attach debdiff against the package in (old)stable
  [*] the issue is verified as fixed in unstable

[ Changes ]
dm-writeboost (2.2.17-0.2~deb12u1) bookworm; urgency=medium

  * Non-maintainer upload.
  * Rebuild for bookworm.

 -- Andreas Beckmann <a...@debian.org>  Sun, 05 May 2024 20:42:46 +0200

dm-writeboost (2.2.17-0.2) unstable; urgency=medium

  * Non-maintainer upload.
  * Fix misspelled autopkgtest dependency.

 -- Andreas Beckmann <a...@debian.org>  Sun, 05 May 2024 04:21:59 +0200

dm-writeboost (2.2.17-0.1) unstable; urgency=medium

  [ Andreas Beckmann ]
  * Non-maintainer upload.
  * New upstream release [May 2024]. (Closes: #1069878)
  * Update upstream metadata.
  * dkms.conf: Set BUILD_EXCLUSIVE_KERNEL_MIN="3.9".
  * Fix autopkgtest dependencies. (Closes: #1069600)

  [ Andrea Righi ]
  * Skip I/O-intensive autopkgtest on small systems (LP: #2012947)

 -- Andreas Beckmann <a...@debian.org>  Sat, 04 May 2024 09:21:27 +0200

[ Other info ]
This is a rebuild of the package from sid with no further changes.

Andreas
diff --git a/ChangeLog b/ChangeLog
index e6f0c3c..53bcd7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-01  Akira Hayakawa  <ruby.w...@gmail.com>
+
+       * v2.2.17
+       * Fix build error with 6.9 kernel and backports
+       * Improve dkms.conf
+
 2023-02-11  Akira Hayakawa  <ruby.w...@gmail.com>
 
        * v2.2.16
diff --git a/Makefile b/Makefile
index 581d373..aa6b6ea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-MODULE_VERSION ?= 2.2.15
+MODULE_VERSION ?= 2.2.17
 DKMS_DIR := /usr/src/dm-writeboost-$(MODULE_VERSION)
 DKMS_KEY := -m dm-writeboost -v $(MODULE_VERSION)
 
diff --git a/README.md b/README.md
index f5d280d..ddd1f88 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,5 @@
 # dm-writeboost 
 
-[![Tokei](https://tokei.rs/b1/github/akiradeveloper/dm-writeboost)](https://github.com/akiradeveloper/dm-writeboost)
-[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/akiradeveloper)
-
 Log-structured Caching for Linux
 
 ## Overview
@@ -42,15 +39,11 @@ As a further extension, dm-writeboost supports read-caching 
which also writes da
 ## Distribution Packages
 - [Debian](https://packages.debian.org/search?keywords=dm-writeboost-dkms)  
 - [Ubuntu](https://packages.ubuntu.com/search?keywords=dm-writeboost-dkms)  
-- [CentOS/Fedora](https://copr.fedorainfracloud.org/coprs/khara/dm-writeboost/)
-- [Arch](https://aur.archlinux.org/packages/dm-writeboost/)  
-- Momonga
 
 ## Related Projects
 * https://github.com/akiradeveloper/dm-writeboost-tools: Tools to help users 
analyze the state of the cache device  
 * https://gitlab.com/onlyjob/writeboost: A management tool including init 
script  
 * https://github.com/akiradeveloper/device-mapper-tests: Testing framework 
written in Rust
-* https://github.com/kazuhisya/dm-writeboost-rpm: Providing RPM packages
 
 ## Related works
 * Y. Hu and Q. Yang -- DCD Disk Caching Disk: A New Approach for Boosting I/O 
Performance (1995)
@@ -65,7 +58,7 @@ Awarded by Japanese OSS Encouragement Award. Thanks!
 
 ## License
 ```
-Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/debian/changelog b/debian/changelog
index b27c491..5fa74b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,31 @@
+dm-writeboost (2.2.17-0.2~deb12u1) bookworm; urgency=medium
+
+  * Non-maintainer upload.
+  * Rebuild for bookworm.
+
+ -- Andreas Beckmann <a...@debian.org>  Sun, 05 May 2024 20:42:46 +0200
+
+dm-writeboost (2.2.17-0.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix misspelled autopkgtest dependency.
+
+ -- Andreas Beckmann <a...@debian.org>  Sun, 05 May 2024 04:21:59 +0200
+
+dm-writeboost (2.2.17-0.1) unstable; urgency=medium
+
+  [ Andreas Beckmann ]
+  * Non-maintainer upload.
+  * New upstream release [May 2024]. (Closes: #1069878)
+  * Update upstream metadata.
+  * dkms.conf: Set BUILD_EXCLUSIVE_KERNEL_MIN="3.9".
+  * Fix autopkgtest dependencies. (Closes: #1069600)
+
+  [ Andrea Righi ]
+  * Skip I/O-intensive autopkgtest on small systems (LP: #2012947)
+
+ -- Andreas Beckmann <a...@debian.org>  Sat, 04 May 2024 09:21:27 +0200
+
 dm-writeboost (2.2.16-0.1) unstable; urgency=medium
 
   [ Andreas Beckmann ]
diff --git a/debian/copyright b/debian/copyright
index 0a50f56..bcba446 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,7 +4,7 @@ Upstream-Contact: Akira Hayakawa <ruby.w...@gmail.com>
 Source: https://github.com/akiradeveloper/dm-writeboost
 
 Files: *
-Copyright: 2012-2021 Akira Hayakawa <ruby.w...@gmail.com>
+Copyright: 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
 License: GPL-2+
 
 Files: debian/*
diff --git a/debian/dm-writeboost-dkms.dkms b/debian/dm-writeboost-dkms.dkms
index 2ab969b..fc08201 100644
--- a/debian/dm-writeboost-dkms.dkms
+++ b/debian/dm-writeboost-dkms.dkms
@@ -1,6 +1,9 @@
 PACKAGE_NAME="dm-writeboost"
 PACKAGE_VERSION="#MODULE_VERSION#"
 
+# dm-writeboost builds on top of dm features introduced in Linux 3.9
+BUILD_EXCLUSIVE_KERNEL_MIN="3.9"
+
 MAKE="make all KERNEL_TREE=$kernel_source_dir V=1"
 CLEAN="make clean"
 
diff --git a/debian/tests/control b/debian/tests/control
index 8a1f38c..c39ea0b 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,9 @@
 Tests: test-dm-writeboost.sh
-Restrictions: needs-root, isolation-machine
-Depends: dm-writeboost-dkms, stress-ng, dkms, dmsetup
+Restrictions: needs-root, isolation-machine, skippable
+Depends:
+ dm-writeboost-dkms,
+ dmsetup,
+ linux-image-generic,
+ linux-headers-generic,
+ stress-ng,
+ sudo,
diff --git a/debian/tests/test-dm-writeboost.sh 
b/debian/tests/test-dm-writeboost.sh
index c660db6..5ead3a2 100755
--- a/debian/tests/test-dm-writeboost.sh
+++ b/debian/tests/test-dm-writeboost.sh
@@ -45,14 +45,18 @@ FailAbort() {
        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
+       echo "SKIP"
+       exit 77
+fi
+CPU_NUM=$(getconf _NPROCESSORS_ONLN)
+if [ $CPU_NUM -lt 8 ]; then
+       echo "SKIP"
+       exit 77
 fi
 echo "OK"
 
@@ -104,14 +108,13 @@ 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
+if [ $CPU_NUM -gt 8 ]; then
+       CPU_NUM=8
 fi
-HDD_SIZE=$((8 / $HDD_NUM))
+HDD_SIZE=$((8 / $CPU_NUM))
 (
        cd $M_NAME
-       sudo stress-ng --timeout=5m --hdd=$HDD_NUM --verify --hdd-opts=wr-rnd \
+       sudo stress-ng --timeout=5m --hdd=$CPU_NUM --verify --hdd-opts=wr-rnd \
                --hdd-bytes=${HDD_SIZE}g
 ) 2>&1 || FailAbort
 
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
index db9c1ca..1efbf7a 100644
--- a/debian/upstream/metadata
+++ b/debian/upstream/metadata
@@ -1,2 +1,4 @@
----
+Bug-Database: https://github.com/akiradeveloper/dm-writeboost/issues
+Bug-Submit: https://github.com/akiradeveloper/dm-writeboost/issues/new
+Repository: https://github.com/akiradeveloper/dm-writeboost.git
 Repository-Browse: https://github.com/akiradeveloper/dm-writeboost
diff --git a/debian/watch b/debian/watch
index 7c46492..79d7a97 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,5 +1,4 @@
-# uscan(1) configuration file.
-version=3
+version=4
 
 opts=\
 dversionmangle=s/\+git(\d+)/$1/,\
diff --git a/src/dkms.conf b/src/dkms.conf
index 21c260b..4f7949a 100644
--- a/src/dkms.conf
+++ b/src/dkms.conf
@@ -1,8 +1,11 @@
 PACKAGE_NAME="dm-writeboost"
-PACKAGE_VERSION="2.2.15"
+PACKAGE_VERSION="2.2.17"
+
+# dm-writeboost builds on top of dm features introduced in Linux 3.9
+BUILD_EXCLUSIVE_KERNEL_MIN="3.9"
+
 BUILT_MODULE_NAME="dm-writeboost"
 DEST_MODULE_LOCATION="/kernel/drivers/md"
 MAKE="make all KERNEL_TREE=$kernel_source_dir"
 CLEAN="make clean"
 AUTOINSTALL="yes"
-REMAKE_INITRD="yes"
diff --git a/src/dm-writeboost-daemon.c b/src/dm-writeboost-daemon.c
index 59d85f7..fe7d8c5 100644
--- a/src/dm-writeboost-daemon.c
+++ b/src/dm-writeboost-daemon.c
@@ -1,6 +1,6 @@
 /*
  * This file is part of dm-writeboost
- * Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+ * Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/dm-writeboost-daemon.h b/src/dm-writeboost-daemon.h
index 8fc4beb..4f3d6ae 100644
--- a/src/dm-writeboost-daemon.h
+++ b/src/dm-writeboost-daemon.h
@@ -1,6 +1,6 @@
 /*
  * This file is part of dm-writeboost
- * Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+ * Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/dm-writeboost-metadata.c b/src/dm-writeboost-metadata.c
index f725d59..ee0f076 100644
--- a/src/dm-writeboost-metadata.c
+++ b/src/dm-writeboost-metadata.c
@@ -1,6 +1,6 @@
 /*
  * This file is part of dm-writeboost
- * Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+ * Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/dm-writeboost-metadata.h b/src/dm-writeboost-metadata.h
index d06b6da..8377e4d 100644
--- a/src/dm-writeboost-metadata.h
+++ b/src/dm-writeboost-metadata.h
@@ -1,6 +1,6 @@
 /*
  * This file is part of dm-writeboost
- * Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+ * Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/dm-writeboost-target.c b/src/dm-writeboost-target.c
index 38f4995..91dea67 100644
--- a/src/dm-writeboost-target.c
+++ b/src/dm-writeboost-target.c
@@ -3,7 +3,7 @@
  * Log-structured Caching for Linux
  *
  * This file is part of dm-writeboost
- * Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+ * Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,6 +26,17 @@
 
 #include "linux/sort.h"
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,2)) || \
+       ((LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,11)) && (LINUX_VERSION_CODE 
< KERNEL_VERSION(6,8,0))) || \
+       ((LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,23)) && (LINUX_VERSION_CODE 
< KERNEL_VERSION(6,7,0))) || \
+       ((LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,83)) && (LINUX_VERSION_CODE 
< KERNEL_VERSION(6,2,0)))
+// Linux commit 6e5f0f6383b4896c7e9b943d84b136149d0f45e9 "dm io: Support IO 
priority"
+// added the IO priority parameter in v6.9-rc1.
+#define DM_IO(arg1, arg2, arg3, arg4) dm_io(arg1, arg2, arg3, arg4, 
IOPRIO_DEFAULT)
+#else
+#define DM_IO(arg1, arg2, arg3, arg4) dm_io(arg1, arg2, arg3, arg4)
+#endif
+
 
/*----------------------------------------------------------------------------*/
 
 void do_check_buffer_alignment(void *buf, const char *name, const char *caller)
@@ -53,7 +64,7 @@ static void wb_io_fn(struct work_struct *work)
 {
        struct wb_io *io = container_of(work, struct wb_io, work);
        io->err_bits = 0;
-       io->err = dm_io(io->io_req, io->num_regions, io->regions, 
&io->err_bits);
+       io->err = DM_IO(io->io_req, io->num_regions, io->regions, 
&io->err_bits);
 }
 
 int wb_io_internal(struct wb_device *wb, struct dm_io_request *io_req,
@@ -79,7 +90,7 @@ int wb_io_internal(struct wb_device *wb, struct dm_io_request 
*io_req,
                if (err_bits)
                        *err_bits = io.err_bits;
        } else {
-               err = dm_io(io_req, num_regions, regions, err_bits);
+               err = DM_IO(io_req, num_regions, regions, err_bits);
        }
 
        /* err_bits can be NULL. */
@@ -1953,7 +1964,7 @@ static void writeboost_status(struct dm_target *ti, 
status_type_t type,
 
 static struct target_type writeboost_target = {
        .name = "writeboost",
-       .version = {2, 2, 15},
+       .version = {2, 2, 17},
        .module = THIS_MODULE,
        .map = writeboost_map,
        .end_io = writeboost_end_io,
diff --git a/src/dm-writeboost.h b/src/dm-writeboost.h
index b692386..37a3a42 100644
--- a/src/dm-writeboost.h
+++ b/src/dm-writeboost.h
@@ -1,6 +1,6 @@
 /*
  * This file is part of dm-writeboost
- * Copyright (C) 2012-2023 Akira Hayakawa <ruby.w...@gmail.com>
+ * Copyright (C) 2012-2024 Akira Hayakawa <ruby.w...@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by

Reply via email to