Commit Graph

222 Commits

Author SHA1 Message Date
Daniel Madej
d562602556 Add force to gzip commands
Without force make shows errors when .gz
files already exist.

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2025-02-28 12:25:09 +01:00
Robert Baldyga
dd20fcbc8e
Merge pull request #1590 from robertbaldyga/enable-attach-detach
Revert "Disable cache attach and detach"
2025-02-27 15:50:07 +01:00
Daniel Madej
69cdb458d2 Error msg for metadata found during attach
Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2025-02-24 12:00:06 +01:00
Robert Baldyga
c4b862a3e0
Merge pull request #1607 from robertbaldyga/fix-manpage
Fix manpage installation
2025-02-06 11:32:53 +01:00
Robert Baldyga
0f6c122e17 Fix manpage installation
gzip manpage properly and update mandb after its installation.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2025-01-27 22:20:13 +01:00
Robert Baldyga
75038692cd Revert "Disable cache attach and detach"
This reverts commit f34328adf2.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-11-27 13:41:00 +01:00
Daniel Madej
f15d3238ad Informative error for incorrect IO class 0 name
Instead of generic 'Invalid input parameter'

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2024-11-26 15:08:08 +01:00
Daniel Madej
0461de9e24 Fix typos
Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2024-11-26 15:08:07 +01:00
Daniel Madej
545a07098c Fix for mtab changes
Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2024-10-31 11:02:31 +01:00
Daniel Madej
f11f14d31a Refactor mounted device checks
Calling functions now print error messages.
All the mounted devices are printed (not just the first one).

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2024-10-28 16:07:33 +01:00
Daniel Madej
a2f3cc1f4a Mtab check optional
There are situations when /etc/mtab is not present in the
system (e.g. in certain container images). This blocks
stop/remove operations. With making this check optional
the duty of checking mounts falls to kernel.
Test modified to check operations with and without mtab.

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
2024-10-28 16:07:33 +01:00
Michal Mielewczyk
f34328adf2 Disable cache attach and detach
The feature is disable due to a possible data corruption which may occur when
attaching a new caching device. Once the problem is resolved this commit should
be reverted

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-26 17:02:50 +02:00
Michal Mielewczyk
46775aa884 casadm: Exit status 0 for blocked commands
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-26 17:02:44 +02:00
Avi Halaf
1a1d9507af Fix get-param casadm man page
Signed-off-by: Avi Halaf <avi.halaf@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Amir Haroush
b02c02f1bb Makefile: fix dependencies for casadm
Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-10 14:36:43 +02:00
Michal Mielewczyk
16690e1eab Enable cache detach
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Jan Musial <jan.musial@huawei.com>
2024-09-09 16:30:05 +02:00
Michal Mielewczyk
af8c75b20a Enable cache attach
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:29:21 +02:00
Michal Mielewczyk
b480bbaf47 casadm: cache start refactor
Cache start and cache attach will share the same code in casadm; the following
refactor is supposed to facilitate reusing the existing code in next commits

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:27:20 +02:00
Michal Mielewczyk
12e7c8339a casadm: code cleanup and cache_stop() refactor
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:27:08 +02:00
Michal Mielewczyk
9f5a9f0d62 casadm: '-' instead of dev path for detached cache
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
6a1187a8b3 casadm: list cores of detached cache
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
fc35684910 casadm: skip printing strings of len 0
An attempt to print a string of zero length was crashing casadm.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
e0ef8c1b8d New error codes
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
0f0ef79b89 Disable standby mode
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-06 13:23:07 +02:00
Michal Mielewczyk
5ef09fb1a2 casadm: A generic mechanism to disable commands
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-06 12:24:15 +02:00
Michal Mielewczyk
c9644baf42 Rename "initializing" cache state to "detached"
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-08-28 09:50:27 +02:00
Robert Baldyga
d124533596 casadm: Add missing safeclib files
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2023-11-29 14:11:27 +01:00
Damian Raczkowski
68cc4bfe7a Add print error message when invoked --set-param command with --cache-id that does not exists
Signed-off-by: Damian Raczkowski <damian.raczkowski@intel.com>
2022-11-10 11:07:29 +01:00
Robert Baldyga
f0943bc09b
Merge pull request #1377 from kmajzero/5.18_prep
Open CAS Linux kernel 5.18 support
2022-10-25 10:17:01 +02:00
Krzysztof Majzerowicz-Jaszcz
f0af7cb52d Open CAS Linux kernel 5.18 support
This patch introduces the support for 5.18 kernel.

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-10-24 09:53:01 +00:00
Robert Baldyga
97c8df0995
Merge pull request #1373 from DocentSzachista/merge_flush_and_cache
Merge flush and cache commands
2022-10-12 12:38:14 +02:00
Adam Rutkowski
f0a398116c Clarify ALRU wake up time documentation
ALRU does not have a configurable sleep time between active awakenings
of the cleaning thread. Once it starts cleaning, it does not back off
unless staleness time and/or activity threshold constraints force it
to do so. Wake up time parameter only controls sleep time after
an idle wake up.

Updating casadm help and man page accordingly.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2022-09-30 18:18:13 +02:00
Damian Raczkowski
4a933f603b merge flush core and cache commands
Signed-off-by: Damian Raczkowski <damian.raczkowski@intel.com>
2022-09-29 15:54:48 +02:00
Robert Baldyga
13d3decfa9 Consolidate modules
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-16 15:16:28 +02:00
Robert Baldyga
8be913462f
Merge pull request #1208 from rafalste/debug_packages
packaging: Fix debug package build
2022-09-06 11:45:23 +02:00
Krzysztof Majzerowicz-Jaszcz
fbe530fae1 Fix for Coverity CID 356469
Fix for CID 356469 - truncated time_t value.

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-08-31 15:43:39 +02:00
Robert Baldyga
7260d29714 casadm: Fix seq cutoff min threshold calculation
Min seq cutoff threshold value is defined in bytes and if it's lower than
1 KiB, then dividing it by KiB will give 0, which is potentially lower than
the real min value. Use DIV_ROUND_UP() to address this issue.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-08-29 17:41:55 +02:00
Piotr Debski
9273b39d5d Fix error message for cache already in standby detach state
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-08-19 12:36:22 +02:00
Rafal Stefanowski
63f1c162b6 packaging: Fix debug package build
For debug symbols packages to build properly, we need to
instruct the compiler to produce debugging information
during the compilation process by adding a proper flag.
Additionally there is no point to create packages with
debug info in normal build, because it may crash the
package creation process if no debug info is found.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2022-08-16 01:29:22 +02:00
Piotr Debski
dd95c8be4d Add core, try-add script missing core-id parameter fix
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-07-12 11:14:44 +02:00
Michal Mielewczyk
a33896573e Fix standby detach
As the check added in commit a90839f286 tries to open the caching devcie
exclusively, it is impossible to detach cache from a standby instance.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-07-04 10:27:26 +02:00
Michal Mielewczyk
a90839f286 Check for preexisting FS before standby init
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-06-29 12:46:56 +02:00
Jan Musial
a4c82c364f Bump safeclib version
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-06-28 14:37:07 +02:00
Robert Baldyga
1bd1767d1b
Merge pull request #1192 from pdebski21/1180
Standard error message for each disallowed management operation in standby mode
2022-05-10 10:08:59 +02:00
Piotr Debski
01cf67a637 license dates update
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-04-30 22:27:58 +02:00
Piotr Debski
f773d7fff3 standard error message for each disallowed management operation in standby mode
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-04-25 23:47:52 +02:00
Michal Mielewczyk
94f46c1d3c casadm: print error message when activate failed
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-04-21 13:58:33 +02:00
Michal Mielewczyk
4dd6aae999 casadm: refactor printing cache incompleteness msg
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-04-07 14:55:52 +02:00
Michal Mielewczyk
9784abefd7 casadm: remove dead code
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-04-07 09:10:17 +02:00
Piotr Debski
8ec9bd3d93 Warning for standby activate with inactive core
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-03-26 21:52:36 +01:00