Skip to content
Permalink
Browse files

Pushing staging branch of version 6.0 (bug fixes, removed zlib and cr…

…yptsetup, updated license).
  • Loading branch information...
pkoutoupis committed May 3, 2019
1 parent 08be5d8 commit f3da7402ae704494257a78f58ad8fc484688590e
@@ -1,3 +1,10 @@
### Release 6.0 ###

- kernel: Fixed module compilation error with modern version of GCC.
- utility: Remove dm-crypt code; Not sure why i had it in the first place. Doesn't really belong. Just use cryptsetup.
- utility: Removed archive/restore code and dependency on zlib. Again, can just use dd and tar. Is anyone even using this?
- misc: Updated licensing and logo location (thanks Boian!).

### Release 5.2 ###

- kernel: added support for 4.17 kernel.
@@ -31,16 +31,3 @@ tools-uninstall:
cd src; make uninstall; \
cd ../conf; make uninstall; \
cd ../doc; make uninstall; cd ..

.PHONY: nocrypt
nocrypt:
cd src; make nocrypt; \
cd ../module; make; \
cd ../test; make; cd ..

.PHONY: nocrypt-install
nocrypt-install:
cd src; make nocrypt-install; \
cd ../module; make install; \
cd ../conf; make install; \
cd ../doc; make install; cd ..
@@ -7,9 +7,8 @@ Building and Installing the rapiddisk kernel modules and utilities

Change into the project's parent directory path.

> To build the rapiddisk management utility, you will need to have the `zlib`,
> `libcryptsetup` and `libjansson` development library files installed on your
> host system.
> To build the rapiddisk management utility, you will need to have the
> `libjansson` development library files installed on your host system.
>
> You are required to having either the full kernel source or the kernel
> headers installed for your current kernel revision.
@@ -83,13 +82,6 @@ Uninstalling:
# make tools-uninstall
```

Build without encryption support
--------------------------------

```console
# make nocrypt
```

Installing modules for DKMS support
-----------------------------------

@@ -125,17 +125,7 @@ do_start()
ocf_log info "Unable to create a RapidDisk volume of $OCF_RESKEY_size MB"
return $OCF_ERR_GENERIC
fi
/sbin/cryptsetup isLuks $OCF_RESKEY_volume
if [ $? -eq 0 ]; then
$RDSK_bin --activate-crypt $OCF_RESKEY_volume
if [ $? -ne 0 ]; then
ocf_log info "Unable to activate encryption on $OCF_RESKEY_volume"
return $OCF_ERR_GENERIC
fi
volume="/dev/mapper/crypt-`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
else
volume="$OCF_RESKEY_volume"
fi
volume="$OCF_RESKEY_volume"
rdsk=`echo $output|sed -e 's/^.*rd/rd/' -e 's/ .*$//'`
$RDSK_bin --cache-map $rdsk $volume $mode

@@ -146,27 +136,17 @@ do_start()
do_stop()
{
verify_all || exit $?
crypt=0

if [ -z "$OCF_RESKEY_mode" ]; then
mode="wt"
else
mode=$OCF_RESKEY_mode
fi

/sbin/cryptsetup isLuks $OCF_RESKEY_volume
if [ $? -eq 0 ]; then
cache="rc-${mode}_rcrypt-`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
crypt=1
else
cache="rc-${mode}_`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
fi
cache="rc-${mode}_`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
output=`$RDSK_bin --short-list|grep "$cache:"`
$RDSK_bin --cache-unmap $cache
$RDSK_bin --detach `echo "$output"|sed -e 's/^rc.*://' -e 's/,.*$//'`
if [ $crypt -eq "1" ]; then
$RDSK_bin --deactivate-crypt /dev/mapper/crypt-`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`
fi

return $OCF_SUCCESS
}
@@ -183,7 +163,7 @@ do_status()
fi

volume=`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`
if [ -e "/dev/mapper/rc-${mode}_$volume" ] || [ -e "/dev/mapper/rc-${mode}_crypt-$volume" ]; then
if [ -e "/dev/mapper/rc-${mode}_$volume" ]; then
return $OCF_SUCCESS
fi
ocf_log debug "RapidDisk resource for $OCF_RESKEY_volume is not running."
@@ -143,18 +143,7 @@ do_start()
clog_service_start $CLOG_FAILED
return $OCF_ERR_GENERIC
fi
/sbin/cryptsetup isLuks $OCF_RESKEY_volume
if [ $? -eq 0 ]; then
$RDSK_bin --activate-crypt $OCF_RESKEY_volume
if [ $? -ne 0 ]; then
ocf_log info "Unable to activate encryption on $OCF_RESKEY_volume"
clog_service_start $CLOG_FAILED
return $OCF_ERR_GENERIC
fi
volume="/dev/mapper/crypt-`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
else
volume="$OCF_RESKEY_volume"
fi
volume="$OCF_RESKEY_volume"
rdsk=`echo $output|sed -e 's/^.*rd/rd/' -e 's/ .*$//'`
$RDSK_bin --cache-map $rdsk $volume $mode

@@ -167,27 +156,17 @@ do_stop()
{
verify_all || exit $?
clog_service_stop $CLOG_INIT
crypt=0

if [ -z "$OCF_RESKEY_mode" ]; then
mode="wt"
else
mode=$OCF_RESKEY_mode
fi

/sbin/cryptsetup isLuks $OCF_RESKEY_volume
if [ $? -eq 0 ]; then
cache="rc-${mode}_crypt-`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
crypt=1
else
cache="rc-${mode}_`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
fi
cache="rc-${mode}_`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`"
output=`$RDSK_bin --short-list|grep "$cache:"`
$RDSK_bin --cache-unmap $cache
$RDSK_bin --detach `echo "$output"|sed -e 's/^rc.*://' -e 's/,.*$//'`
if [ $crypt -eq "1" ]; then
$RDSK_bin --deactivate-crypt /dev/mapper/crypt-`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`
fi

clog_service_stop $CLOG_SUCCEED
return $OCF_SUCCESS
@@ -206,7 +185,7 @@ do_status()
fi

volume=`echo $OCF_RESKEY_volume|rev|cut -d'/' -f1|rev`
if [ -e "/dev/mapper/rc-${mode}_$volume" ] || [ -e "/dev/mapper/rc-${mode}_crypt-$volume" ]; then
if [ -e "/dev/mapper/rc-${mode}_$volume" ]; then
clog_service_status $CLOG_SUCCEED
return 0
fi
@@ -2,7 +2,7 @@
.SH NAME
rapiddisk \- An administration tool to manage the RapidDisk RAM disk devices and RapidDisk-Cache mappings.
.SH SYNOPSIS
rapiddisk [ -h | -v ] function [ parameters: unit | size | src & dest | cache & source | mode ]
rapiddisk [ -h | -v ] function [ parameters: unit | size | cache & source | mode ]
.SH DESCRIPTION
rapiddisk is a RapidDisk module management tool. The tool allows the user to list all attached RapidDisk devices, with the ability to dynamically attach a new RapidDisk block devices and detach existing ones. It also is capable of mapping and unmapping an RapidDisk volumes as a Write-Through or Write Around cache to any block device via the RapidDisk-Cache kernel module.
.SS Options
@@ -35,12 +35,6 @@ Erase all data to a specified RapidDisk device (dangerous).
--resize
Dynamically grow the size of an existing RapidDisk device.
.TP
--archive
Using zlib, archive an RapidDisk device to a data file.
.TP
--restore
Using zlib, restore an RapidDisk device from an archived data file.
.TP
--cache-map
Map an RapidDisk device as a caching node to another block device.
.TP
@@ -49,15 +43,6 @@ Map an RapidDisk device as a caching node to another block device.
.TP
--stat-cache
Obtain RapidDisk-Cache Mappings statistics.
.TP
--enable-crypt
Initialize a storage volume for data encryption. Please store user defined keys in /etc/rapiddisk/key, otherwise it will default to the built-in DES key provided by the utility (only if enabled during compilation).
.TP
--activate-crypt
Activate an encryption volume. Please store user defined keys in /etc/rapiddisk/key, otherwise it will default to the built-in DES key provided by the utility (only if enabled during compilation).
.TP
--deactivate-crypt
Deactivate an encrypted volume (only if enabled during compilation).
.SS Parameters (if applicable)
.TP
[size]
@@ -66,12 +51,6 @@ Specify desired size of attaching RAM disk device in MBytes.
[unit]
Specify unit number of RAM disk device to detach.
.TP
[src]
Source path for archive/restore options.
.TP
[dest]
Destination path for arcive/restore options.
.TP
[cache]
Specify RapidDisk node to use as caching volume.
.TP
@@ -92,10 +71,6 @@ rapiddisk --detach rd2
.TP
rapiddisk --resize rd2 128
.TP
rapiddisk --archive rd0 rd-052911.dat
.TP
rapiddisk --restore rd-052911.dat rd0
.TP
rapiddisk --cache-map rd1 /dev/sdb
.TP
rapiddisk --cache-map rd1 /dev/sdb wt
@@ -105,12 +80,6 @@ rapiddisk --cache-unmap rc_sdb
rapiddisk --stat-cache rc_sdb
.TP
rapiddisk --flush rd2
.TP
rapiddisk --enable-crypt /dev/rd0
.TP
rapiddisk --activate-crypt /dev/rd0
.TP
rapiddisk --deactivate-crypt /dev/mapper/crypt-rd0
.SH EXIT STATUS
rapiddisk returns a zero exit status if no error occurs during operation. A non-zero value is returned on error.
.SH AUTHORS
@@ -1,5 +1,5 @@
PACKAGE_NAME="rapiddisk"
PACKAGE_VERSION="5.2"
PACKAGE_VERSION="6.0"
BUILT_MODULE_NAME[0]="rapiddisk"
BUILT_MODULE_NAME[1]="rapiddisk-cache"
DEST_MODULE_LOCATION[0]="/kernel/rapiddisk/"
@@ -1,5 +1,5 @@
/*******************************************************************************
** Copyright © 2011-2018 Petros Koutoupis
** Copyright © 2011-2019 Petros Koutoupis
** All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
@@ -59,7 +59,7 @@
} \
} while (0)

#define VERSION_STR "5.2"
#define VERSION_STR "6.0"
#define DM_MSG_PREFIX "rapiddisk-cache"

#define READCACHE 1
@@ -1239,7 +1239,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, 2, 0},
.version = {6, 0, 0},
.module = THIS_MODULE,
.ctr = cache_ctr,
.dtr = cache_dtr,
@@ -1281,4 +1281,4 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Petros Koutoupis <petros@petroskoutoupis.com>");
MODULE_DESCRIPTION("RapidDisk-Cache DM target is a write-through caching target with RapidDisk volumes.");
MODULE_VERSION(VERSION_STR);
MODULE_INFO(Copyright, "Copyright 2010 - 2018 Petros Koutoupis");
MODULE_INFO(Copyright, "Copyright 2010 - 2019 Petros Koutoupis");
@@ -1,5 +1,5 @@
/*******************************************************************************
** Copyright © 2011-2018 Petros Koutoupis
** Copyright © 2011-2019 Petros Koutoupis
** All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
@@ -41,7 +41,7 @@
#include <linux/radix-tree.h>
#include <linux/io.h>

#define VERSION_STR "5.2"
#define VERSION_STR "6.0"
#define PREFIX "rapiddisk"
#define BYTES_PER_SECTOR 512
#define MAX_RDSKS 128
@@ -857,4 +857,4 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Petros Koutoupis <petros@petroskoutoupis.com>");
MODULE_DESCRIPTION("RapidDisk is an enhanced RAM disk block device driver.");
MODULE_VERSION(VERSION_STR);
MODULE_INFO(Copyright, "Copyright 2010 - 2018 Petros Koutoupis");
MODULE_INFO(Copyright, "Copyright 2010 - 2019 Petros Koutoupis");
@@ -1,3 +1,10 @@
rapiddisk (6.0-1) released; urgency=medium

* kernel: Fixed module compilation error with modern version of GCC.
* utility: Remove dm-crypt code; Not sure why i had it in the first place. Doesn't really belong. Just use cryptsetup.
* utility: Removed archive/restore code and dependency on zlib. Again, can just use dd and tar. Is anyone even using this?
* misc: Updated licensing and logo location (thanks Boian!).

rapiddisk (5.2-1) released; urgency=medium

* kernel: added support for 4.17 kernel.
@@ -1,9 +1,9 @@
Package: rapiddisk
Version: 5.2-1
Version: 6.0-1
Section: base
Priority: optional
Architecture: amd64
Depends: dkms, gcc, zlib1g, cryptsetup-luks, libjansson4
Depends: dkms, gcc, libjansson4
Maintainer: Petros Koutoupis <petros@petroskoutoupis.com>
Description: RapidDisk
The RapidDisk software defined advanced RAM drive and storage
@@ -16,13 +16,12 @@ fi
case "$1" in

configure)
dkms add -m rapiddisk -v 5.2
dkms build -m rapiddisk -v 5.2
dkms install -m rapiddisk -v 5.2
dkms add -m rapiddisk -v 6.0
dkms build -m rapiddisk -v 6.0
dkms install -m rapiddisk -v 6.0
echo "rapiddisk max_sectors=2048 nr_requests=1024" >> /etc/modules
echo "rapiddisk-cache" >> /etc/modules
echo "dm_mod" >> /etc/modules
echo "dm_crypt" >> /etc/modules
;;

abort-upgrade|abort-remove|abort-deconfigure)
@@ -24,14 +24,12 @@ case "$1" in
rm -f /lib/modules/$(uname -r)/{extra,updates,weak-updates}/{rapiddisk,rapiddisk-cache}.ko
sed -i '/rapiddisk/d' /etc/modules
sed -i '/rapiddisk-cache/d' /etc/modules
sed -i '/dm-crypt/d' /etc/modules
;;

remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
rm -f /lib/modules/$(uname -r)/{extra,updates,weak-updates}/{rapiddisk,rapiddisk-cache}.ko
sed -i '/rapiddisk/d' /etc/modules
sed -i '/rapiddisk-cache/d' /etc/modules
sed -i '/dm-crypt/d' /etc/modules
;;

*)
@@ -1,13 +1,13 @@
Summary: The RapidDisk software defined advanced RAM drive and storage caching solution.
Name: rapiddisk
Version: 5.2
Version: 6.0
Release: 1
License: General Public License Version 2
Group: Applications/System
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: gcc,make,kernel-headers,kernel-devel,dkms,libcryptsetup4,libjansson4
BuildRequires: kernel-headers,kernel-devel,gcc,make,cryptsetup-devel,zlib-devel,libjansson-devel
Requires: gcc,make,kernel-headers,kernel-devel,dkms,libjansson4
BuildRequires: kernel-headers,kernel-devel,gcc,make,libjansson-devel

%description
The RapidDisk software defined advanced RAM drive and storage
@@ -51,9 +51,7 @@ dkms build -m rapiddisk -v %{version}
dkms install -m rapiddisk -v %{version}
echo rapiddisk > /etc/modules-load.d/rapiddisk.conf
echo rapiddisk-cache >> /etc/modules-load.d/rapiddisk.conf
echo dm-crypt >> /etc/modules-load.d/rapiddisk.conf
chmod 755 /etc/modules-load.d/rapiddisk.conf
modprobe dm-crypt
modprobe rapiddisk
modprobe rapiddisk-cache

@@ -81,6 +79,11 @@ rm -rf %{buildroot}
%doc %attr(0444,root,root) /usr/share/man/man1/*

%changelog
* Thu May 2 2019 Petros Koutoupis <petros@petroskoutoupis.com>
- kernel: Fixed module compilation error with modern version of GCC.
- utility: Remove dm-crypt code; Not sure why i had it in the first place. Doesn't really belong. Just use cryptsetup.
- utility: Removed archive/restore code and dependency on zlib. Again, can just use dd and tar. Is anyone even using this?
- misc: Updated licensing and logo location (thanks Boian!).
* Mon May 25 2018 Petros Koutoupis <petros@petroskoutoupis.com>
- kernel: added support for 4.17 kernel.
- build: Cleaned up module clean Makefile.

0 comments on commit f3da740

Please sign in to comment.
You can’t perform that action at this time.