From 197abe83b0ed9fc69686e32e818eb5bc714a8d32 Mon Sep 17 00:00:00 2001 From: Petros Koutoupis Date: Mon, 4 Sep 2017 11:44:35 -0500 Subject: [PATCH] Releasing version 5.1. --- CHANGELOG.md | 6 ++++++ module/Makefile | 2 +- module/dkms.conf | 2 +- module/rapiddisk-cache.c | 28 +++++++++++++++++++++++++-- module/rapiddisk.c | 6 +++++- pkg-mgmt/debian/changelog | 6 ++++++ pkg-mgmt/debian/control | 2 +- pkg-mgmt/debian/postinst | 6 +++--- pkg-mgmt/debian/prerm | 2 +- pkg-mgmt/spec/rapiddisk.spec.opensuse | 6 +++++- pkg-mgmt/spec/rapiddisk.spec.rhel6 | 6 +++++- pkg-mgmt/spec/rapiddisk.spec.rhel7+ | 6 +++++- src/common.h | 2 +- 13 files changed, 66 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81beef1..7052c64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### Release 5.1 ### + +- kernel: added support for 4.13 kernel. +- kernel: added support for 4.12 kernel (thank you Marcel Huber). +- utility: fixed compilation warnings (thank you Marcel Huber). + ### Release 5.0 ### - kernel: Remove kernel mainline specific code (intended for brd replacement). diff --git a/module/Makefile b/module/Makefile index 3e225ef..89bbea1 100644 --- a/module/Makefile +++ b/module/Makefile @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -VERSION = 5.0 +VERSION = 5.1 ifeq ($(KSRC),) KSRC := /lib/modules/$(shell uname -r)/build diff --git a/module/dkms.conf b/module/dkms.conf index b546001..23d8bab 100644 --- a/module/dkms.conf +++ b/module/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="rapiddisk" -PACKAGE_VERSION="5.0" +PACKAGE_VERSION="5.1" BUILT_MODULE_NAME[0]="rapiddisk" BUILT_MODULE_NAME[1]="rapiddisk-cache" DEST_MODULE_LOCATION[0]="/kernel/rapiddisk/" diff --git a/module/rapiddisk-cache.c b/module/rapiddisk-cache.c index d2fe059..d09ade5 100644 --- a/module/rapiddisk-cache.c +++ b/module/rapiddisk-cache.c @@ -57,7 +57,7 @@ } \ } while (0) -#define VERSION_STR "5.0" +#define VERSION_STR "5.1" #define DM_MSG_PREFIX "rapiddisk-cache" #define READCACHE 1 @@ -282,8 +282,12 @@ void rc_io_callback(unsigned long error, void *context) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, error); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + bio->bi_status= error; #else bio->bi_error = error; +#endif bio_io_error(bio); #endif spin_lock_irqsave(&dmc->cache_spin_lock, flags); @@ -569,8 +573,12 @@ static void cache_read_miss(struct cache_context *dmc, spin_unlock_irqrestore(&dmc->cache_spin_lock, flags); #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, -EIO); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + bio->bi_status = -EIO; #else bio->bi_error = -EIO; +#endif bio_io_error(bio); #endif } else { @@ -615,8 +623,12 @@ static void cache_read(struct cache_context *dmc, struct bio *bio) spin_unlock_irqrestore(&dmc->cache_spin_lock, flags); #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, -EIO); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + bio->bi_status = -EIO; #else bio->bi_error = -EIO; +#endif bio_io_error(bio); #endif } else { @@ -765,8 +777,12 @@ static void cache_write(struct cache_context *dmc, struct bio *bio) spin_unlock_irqrestore(&dmc->cache_spin_lock, flags); #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, -EIO); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + bio->bi_status= -EIO; #else bio->bi_error = -EIO; +#endif bio_io_error(bio); #endif return; @@ -857,7 +873,11 @@ static void rc_uncached_io_callback(unsigned long error, void *context) bio_endio(job->bio, error); #else if (error) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + job->bio->bi_status = error; +#else job->bio->bi_error = error; +#endif bio_io_error(job->bio); } else { bio_endio(job->bio); @@ -877,8 +897,12 @@ static void rc_start_uncached_io(struct cache_context *dmc, struct bio *bio) if (unlikely(!job)) { #if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, -EIO); +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + bio->bi_status= -EIO; #else bio->bi_error = -EIO; +#endif bio_io_error(bio); #endif return; @@ -1212,7 +1236,7 @@ cache_status(struct dm_target *ti, status_type_t type, unsigned status_flags, static struct target_type cache_target = { .name = "rapiddisk-cache", - .version = {5, 0, 0}, + .version = {5, 1, 0}, .module = THIS_MODULE, .ctr = cache_ctr, .dtr = cache_dtr, diff --git a/module/rapiddisk.c b/module/rapiddisk.c index d854936..7df6ca5 100644 --- a/module/rapiddisk.c +++ b/module/rapiddisk.c @@ -39,7 +39,7 @@ #include #include -#define VERSION_STR "5.0" +#define VERSION_STR "5.1" #define PREFIX "rapiddisk" #define BYTES_PER_SECTOR 512 #define MAX_RDSKS 128 @@ -579,7 +579,11 @@ rdsk_make_request(struct request_queue *q, struct bio *bio) return; #endif io_error: +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0) + bio->bi_status= err; +#else bio->bi_error = err; +#endif bio_io_error(bio); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) return BLK_QC_T_NONE; diff --git a/pkg-mgmt/debian/changelog b/pkg-mgmt/debian/changelog index e7c5f0a..8e14e0d 100644 --- a/pkg-mgmt/debian/changelog +++ b/pkg-mgmt/debian/changelog @@ -1,3 +1,9 @@ +rapiddisk (5.1-1) released; urgency=medium + +* kernel: added support for 4.13 kernel. +* kernel: added support for 4.12 kernel (thank you Marcel Huber). +* utility: fixed compilation warnings (thank you Marcel Huber). + rapiddisk (5.0-1) released; urgency=medium * kernel: Remove kernel mainline specific code (intended for brd replacement). diff --git a/pkg-mgmt/debian/control b/pkg-mgmt/debian/control index a38c5cf..6f84364 100755 --- a/pkg-mgmt/debian/control +++ b/pkg-mgmt/debian/control @@ -1,5 +1,5 @@ Package: rapiddisk -Version: 5.0-1 +Version: 5.1-1 Section: base Priority: optional Architecture: amd64 diff --git a/pkg-mgmt/debian/postinst b/pkg-mgmt/debian/postinst index e3ae6c3..d18bc96 100755 --- a/pkg-mgmt/debian/postinst +++ b/pkg-mgmt/debian/postinst @@ -16,9 +16,9 @@ fi case "$1" in configure) - dkms add -m rapiddisk -v 5.0 - dkms build -m rapiddisk -v 5.0 - dkms install -m rapiddisk -v 5.0 + dkms add -m rapiddisk -v 5.1 + dkms build -m rapiddisk -v 5.1 + dkms install -m rapiddisk -v 5.1 echo "rapiddisk max_sectors=2048 nr_requests=1024" >> /etc/modules echo "rapiddisk-cache" >> /etc/modules echo "dm_mod" >> /etc/modules diff --git a/pkg-mgmt/debian/prerm b/pkg-mgmt/debian/prerm index 3fd7eb0..15d07e2 100755 --- a/pkg-mgmt/debian/prerm +++ b/pkg-mgmt/debian/prerm @@ -14,7 +14,7 @@ fi case "$1" in remove|upgrade|deconfigure) - dkms remove -m rapiddisk -v 5.0 --all + dkms remove -m rapiddisk -v 5.1 --all ;; failed-upgrade) diff --git a/pkg-mgmt/spec/rapiddisk.spec.opensuse b/pkg-mgmt/spec/rapiddisk.spec.opensuse index b482c16..3c354ae 100644 --- a/pkg-mgmt/spec/rapiddisk.spec.opensuse +++ b/pkg-mgmt/spec/rapiddisk.spec.opensuse @@ -1,6 +1,6 @@ Summary: The RapidDisk software defined advanced RAM drive and storage caching solution. Name: rapiddisk -Version: 5.0 +Version: 5.1 Release: 1 License: General Public License Version 2 Group: Applications/System @@ -81,6 +81,10 @@ rm -rf %{buildroot} %doc %attr(0444,root,root) /usr/share/man/man1/* %changelog +* Mon Sep 4 2017 Petros Koutoupis +- kernel: added support for 4.13 kernel. +- kernel: added support for 4.12 kernel (thank you Marcel Huber). +- utility: fixed compilation warnings (thank you Marcel Huber). * Fri Nov 25 2016 Petros Koutoupis - kernel: Remove kernel mainline specific code (intended for brd replacement). - utility: Add JSON output for RapidDisk configuration (requires libjansson). diff --git a/pkg-mgmt/spec/rapiddisk.spec.rhel6 b/pkg-mgmt/spec/rapiddisk.spec.rhel6 index 0ad2c9e..1c2ec34 100644 --- a/pkg-mgmt/spec/rapiddisk.spec.rhel6 +++ b/pkg-mgmt/spec/rapiddisk.spec.rhel6 @@ -1,6 +1,6 @@ Summary: The RapidDisk software defined advanced RAM drive and storage caching solution. Name: rapiddisk -Version: 5.0 +Version: 5.1 Release: 1 License: General Public License Version 2 Group: Applications/System @@ -81,6 +81,10 @@ rm -rf %{buildroot} %doc %attr(0444,root,root) /usr/share/man/man1/* %changelog +* Mon Sep 4 2017 Petros Koutoupis +- kernel: added support for 4.13 kernel. +- kernel: added support for 4.12 kernel (thank you Marcel Huber). +- utility: fixed compilation warnings (thank you Marcel Huber). * Fri Nov 25 2016 Petros Koutoupis - kernel: Remove kernel mainline specific code (intended for brd replacement). - utility: Add JSON output for RapidDisk configuration (requires libjansson). diff --git a/pkg-mgmt/spec/rapiddisk.spec.rhel7+ b/pkg-mgmt/spec/rapiddisk.spec.rhel7+ index b821765..58f429d 100644 --- a/pkg-mgmt/spec/rapiddisk.spec.rhel7+ +++ b/pkg-mgmt/spec/rapiddisk.spec.rhel7+ @@ -1,6 +1,6 @@ Summary: The RapidDisk software defined advanced RAM drive and storage caching solution. Name: rapiddisk -Version: 5.0 +Version: 5.1 Release: 1 License: General Public License Version 2 Group: Applications/System @@ -81,6 +81,10 @@ rm -rf %{buildroot} %doc %attr(0444,root,root) /usr/share/man/man1/* %changelog +* Mon Sep 4 2017 Petros Koutoupis +- kernel: added support for 4.13 kernel. +- kernel: added support for 4.12 kernel (thank you Marcel Huber). +- utility: fixed compilation warnings (thank you Marcel Huber). * Fri Nov 25 2016 Petros Koutoupis - kernel: Remove kernel mainline specific code (intended for brd replacement). - utility: Add JSON output for RapidDisk configuration (requires libjansson). diff --git a/src/common.h b/src/common.h index 3dcfa16..2e31cce 100644 --- a/src/common.h +++ b/src/common.h @@ -41,7 +41,7 @@ #define UTIL "rapiddisk" #define COPYRIGHT "Copyright 2011-2017 Petros Koutoupis" -#define VERSION_NUM "5.0" +#define VERSION_NUM "5.1" #define SUCCESS 0x0 #define NAMELEN 0x100 #define BYTES_PER_SECTOR 0x200