Commit Graph

56 Commits

Author SHA1 Message Date
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
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
0f0ef79b89 Disable standby mode
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-06 13:23:07 +02: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
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
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
Michal Mielewczyk
04c2d97ea2 casadm: set log level when printing cmd's usage
Allow printing command's usage with the same log level as it's context

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-03-02 09:44:48 +01:00
Michal Mielewczyk
08307ce77b casadm: prevent using init and load at once
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-02-22 09:27:45 +01:00
Jan Musial
58b09c11a6 Forbid using load with other options in casadm
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-10 12:06:37 +01:00
Jan Musial
199993d9a4 Fix error logging levels
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-10 12:06:37 +01:00
Robert Baldyga
63bab9584c Redesign failover standby management
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-05 16:17:52 +01:00
Adam Rutkowski
0f6a024025 Make device parameter obligatory in failover activate
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-12-01 00:58:09 +01:00
Krzysztof Majzerowicz-Jaszcz
4768d06b97 Fix for issue #981
Added extra argument checks for --failover-standby switch in casadm.

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2021-11-15 12:32:45 +01:00
Rafal Stefanowski
acec05060d Fix license
Change license to BSD-3-Clause

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-28 12:46:42 +02:00
Adam Rutkowski
90d8584bd7 failover detach
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-10-08 15:20:52 +02:00
Robert Baldyga
f8e39fa104 Introduce activate operation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:59 +02:00
Robert Baldyga
17aa424319 Introduce cache bind operation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:54 +02:00
Robert Baldyga
c968285d9f Remove upgrade-in-flight feature
Due to changes in Linux kernel this feature is not working anymore.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-11 20:33:16 +02:00
Adam Rutkowski
7aa883dbd3 OCF update (removed configurable eviction policy)
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 22:56:51 +02:00
Robert Baldyga
eaebdffa5b
Merge pull request #795 from robertbaldyga/fix-seq-cutoff-thresh-units
casadm: Fix seq cutoff threshold units
2021-04-12 15:06:34 +02:00
Robert Baldyga
61d704fbb9 casadm: Fix seq cutoff threshold units
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-04-12 14:22:58 +02:00
Michal Mielewczyk
4e680bb50a Reorganize remove-inacitve command
Don't remove inactive core if it has dirt cache lines assigned unless `force`
flag is specified.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-12 13:48:28 +02:00
Michal Mielewczyk
66f30dcf12 casadm: use constans for parsing seq cutoff params
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-12 09:12:45 +01:00
Slawomir Jankowski
2514f5fa5b Add "remove inactive" command to casadm
Add `remove_inactive_core` function to casadm's code
to handle `remove inactive` command.
Print messages based on errors returned when command fails.
Add documentation comment to new function.
Add CLI part of introduced command.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:39:07 +01:00
Slawomir Jankowski
2bf6e42dea Print separate messages for different "remove core" return codes
Change extended error message for `KCAS_ERR_REMOVED_DIRTY`.
Print informative messages when `remove core` command fails.
Make separate error messages for detaching.
Update help printouts.
Update documentation comments.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:26:09 +01:00
Robert Baldyga
836726409a casadm: Add promotion count parameter
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-08 07:20:20 +01:00
Adam Rutkowski
4c98949cac Add force option to zero-metadata
Force option is used to enforce metadata erasure despite
dirty data, metadata mistmatch and/or dirty shutdown.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-01-21 15:50:17 -06:00
Robert Baldyga
63eb23ba40
Merge pull request #648 from rafalste/update_copyright
Update copyright statements (2021)
2021-01-21 13:27:51 +01:00
Adam Rutkowski
1fb5fd9662 Verify whether input device path is actually a block device
This applies to add/momove core, start/stop cache, zero superblock
commands.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-01-21 14:03:36 -06:00
Rafal Stefanowski
43f43068ad Update copyright statements (2021)
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:15:38 +01:00
Slawomir Jankowski
0f331cb650 casadm: Add option to print full /dev/by-id link
User can check path in runtime to use the same in config.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-12-22 16:29:06 +01:00
Michal Rakowski
1cd1db2b45 Fully remove format nvme command
Since there is no kernel-kernel api available to communicate
with nvme driver it is more convenient to use some nvme-dedicated
software (e.g. nvme-cli) to manage nvme devices.
It is even not possible to format nvme device with CAS using current
implementation on newest kernels.

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-08-11 06:10:31 -04:00
Slawomir Jankowski
1b7c425fae Disable the possibility to use the 'load'
and 'force' flags at once

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-06-01 13:21:53 +02:00
Slawomir Jankowski
9750883d99 Introduce zero-metadata command
Add 'zero-metadata' option to *casadm*.
Handle new option.
Add struct for new option.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-25 10:54:04 +02:00
Robert Baldyga
1e25420f86
Merge pull request #404 from rafalste/copyright_update
Update copyright statements
2020-05-19 11:25:11 +02:00
Michal Mielewczyk
3b62e40a2e Purge core command
Purge invalidates all cache lines which belongs to given core. It is very
usefull feature for tests.

Calling purge is possbile with casadm `--script` swtich.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-05-12 11:32:01 -04:00
Michal Mielewczyk
d24288a9b1 Purge cache command
Purge invalidates all cache lines. It is very usefull feature for tests.

Calling purge is possbile with casadm `--script` swtich.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-05-12 11:32:01 -04:00
Rafal Stefanowski
44b4020cc1 Update copyright statements
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-05-04 16:47:38 +02:00
Michal Rakowski
31bc2d2787 casadm: fix get/set seq cutoff param
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-22 09:45:50 +01:00
Michal Rakowski
db8ff10cd5 casadm: add err log in case of failed param getting/setting
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-20 07:52:05 +01:00
Michal Mielewczyk
296db39ea0 Adapt to new OCF PP param set/get API.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-10-01 06:54:32 -04:00
Michal Mielewczyk
50efb1e165 Enable setting acp params.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-24 11:41:18 -04:00
Robert Bałdyga
8f45549cc7
Merge pull request #107 from robertbaldyga/cleanup-cas-version
Cleanup cas version
2019-09-19 13:45:17 +02:00
Robert Baldyga
19bc5da2cf Cleanup CAS_VERSION
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-09-19 12:43:34 +02:00
Jan Musial
fd24803b74 Handle promotion policy selection in casadm
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-09-19 08:38:35 +02:00