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>
If an underflowed float number was casted to an int explicitly, it's value was
rounded to a lower value.
Using `round()` function ensures that the number will be always rounded to a
nearest integer.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
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>
Kernel adapter now returns is_cache_device=1 and newly added
metadata_compatible=0 in case of metadata detected with
differing version (instead of is_cache_device = 0).
This allows zero-superblock command to recognize old
cache instance and clear it.
casadm --script --check-cache-device still returns 'Is cache'='no'
in this case, as this layer only cares about metadata in current
version to be able to detect dirty datas tatus.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This check covers the previous case (cache started) as well as
other potential incorrect usages of the command. Also now
the check is made exactly at the moment of opening the
device to write to.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
to `print_slow_atomic_cache_start_info` after removing check from lower
function `_check_cache_device`.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Not every usage of `set_device_path()` needs to print message.
Sometimes it's internal operation and can contain misleading info.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Check if path passed to core adding or cache starting is by-id link
otherwise do not allow to use it except it is exported object's path.
Do not resolve device's by-id path during core addition or cache starting.
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This fixes startup bug when core was added to core pool by md-name*
symlink, but cache metadata contained md-uuid* path, which led to
incomplete configuration
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
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>
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>
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>
The functionality of displaying flush progress in caches list
was removed. Updating casadm user message to reflect this.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
Write-only (WO) cache mode is similar to Write-back (WB), however
read operations do not promote data to cache. Reads are mostly
serviced by the core device, only dirty sectors are fetched from
the cache.
Write-only cache mode is behaving similarly to Write-back with
respect to flushing dirty data. For example it is required to
explicitly enable/disable flushing when changing cache mode
from WO to something other than WB.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>