mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
cache: Update man page to reflect need for dm-cache 1.3.0
Update the man page so the user knows that dm-cache 1.3.0 module is needed. Also, enforce that in the code and print a warning if the module is not new enough.
This commit is contained in:
parent
a060b3b390
commit
907641cd3d
@ -257,13 +257,28 @@ static int _target_present(struct cmd_context *cmd,
|
||||
const struct lv_segment *seg __attribute__((unused)),
|
||||
unsigned *attributes __attribute__((unused)))
|
||||
{
|
||||
uint32_t maj, min, patchlevel;
|
||||
static int _cache_checked = 0;
|
||||
static int _cache_present = 0;
|
||||
|
||||
if (!_cache_checked)
|
||||
if (!_cache_checked) {
|
||||
_cache_present = target_present(cmd, "cache", 1);
|
||||
|
||||
_cache_checked = 1;
|
||||
if (!target_version("cache", &maj, &min, &patchlevel)) {
|
||||
log_error("Failed to determine version of cache kernel module");
|
||||
return 0;
|
||||
}
|
||||
|
||||
_cache_checked = 1;
|
||||
|
||||
if ((maj < 1) ||
|
||||
((maj == 1) && (min < 3))) {
|
||||
log_error("The cache kernel module is version %u.%u.%u."
|
||||
" Version 1.3.0+ is required.",
|
||||
maj, min, patchlevel);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return _cache_present;
|
||||
}
|
||||
|
@ -398,6 +398,7 @@ commandline switch alias that will enable their use
|
||||
However, this argument must be used when no existing
|
||||
commandline switch alias is available for the desired type,
|
||||
as is the case with
|
||||
.IR cache ,
|
||||
.IR error ,
|
||||
.IR raid1 ,
|
||||
.IR raid4 ,
|
||||
@ -406,6 +407,9 @@ as is the case with
|
||||
.IR raid10
|
||||
or
|
||||
.IR zero .
|
||||
Note that the cache segment type requires a dm-cache kernel module version
|
||||
1.3.0 or greater or a kernel version 3.14 or newer.
|
||||
|
||||
.TP
|
||||
.BR \-V ", " \-\-virtualsize " " \fIVirtualSize [ \fIbBsSkKmMgGtTpPeE ]
|
||||
Creates a sparse device of the given size (in MiB by default) using a snapshot
|
||||
|
Loading…
x
Reference in New Issue
Block a user