mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
Thin handle empty thin volume case
Report both values as 0 in case the volume is unused.
This commit is contained in:
parent
5fd459f0ab
commit
9568f1b5c3
@ -3143,7 +3143,10 @@ int dm_get_status_thin(struct dm_pool *mem, const char *params,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sscanf(params, "%" PRIu64 " %" PRIu64,
|
if (strchr(params, '-')) {
|
||||||
|
s->mapped_sectors = 0;
|
||||||
|
s->highest_mapped_sector = 0;
|
||||||
|
} else if (sscanf(params, "%" PRIu64 " %" PRIu64,
|
||||||
&s->mapped_sectors,
|
&s->mapped_sectors,
|
||||||
&s->highest_mapped_sector) != 2) {
|
&s->highest_mapped_sector) != 2) {
|
||||||
log_error("Failed to parse thin params: %s.", params);
|
log_error("Failed to parse thin params: %s.", params);
|
||||||
|
Loading…
Reference in New Issue
Block a user