mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: parse Overflow string from snapshot status
This is likely to be a new 'info' provided by kernel snapshot target. For now just parse this string.
This commit is contained in:
parent
90ad817a43
commit
e0d915a873
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.109 -
|
Version 1.02.109 -
|
||||||
======================================
|
======================================
|
||||||
|
Parse new Overflow status string for snapshot target.
|
||||||
Check dir path components are valid if using dm_create_dir, error out if not.
|
Check dir path components are valid if using dm_create_dir, error out if not.
|
||||||
Fix /dev/mapper handling to remove dangling entries if symlinks are found.
|
Fix /dev/mapper handling to remove dangling entries if symlinks are found.
|
||||||
Make it possible to use blank value as selection for string list report field.
|
Make it possible to use blank value as selection for string list report field.
|
||||||
|
@ -352,6 +352,7 @@ struct dm_status_snapshot {
|
|||||||
unsigned has_metadata_sectors : 1; /* set when metadata_sectors is present */
|
unsigned has_metadata_sectors : 1; /* set when metadata_sectors is present */
|
||||||
unsigned invalid : 1; /* set when snapshot is invalidated */
|
unsigned invalid : 1; /* set when snapshot is invalidated */
|
||||||
unsigned merge_failed : 1; /* set when snapshot merge failed */
|
unsigned merge_failed : 1; /* set when snapshot merge failed */
|
||||||
|
unsigned overflow : 1; /* set when snapshot overflows */
|
||||||
};
|
};
|
||||||
|
|
||||||
int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
|
int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
|
||||||
|
@ -3126,6 +3126,8 @@ int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
|
|||||||
s->invalid = 1;
|
s->invalid = 1;
|
||||||
else if (!strcmp(params, "Merge failed"))
|
else if (!strcmp(params, "Merge failed"))
|
||||||
s->merge_failed = 1;
|
s->merge_failed = 1;
|
||||||
|
else if (!strcmp(params, "Overflow"))
|
||||||
|
s->overflow = 1;
|
||||||
else {
|
else {
|
||||||
dm_pool_free(mem, s);
|
dm_pool_free(mem, s);
|
||||||
log_error("Failed to parse snapshot params: %s.", params);
|
log_error("Failed to parse snapshot params: %s.", params);
|
||||||
|
Loading…
Reference in New Issue
Block a user