mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Lookup snapshot usage percent of origin when a snapshot is merging.
This commit is contained in:
parent
079473f10a
commit
e756b80f56
@ -1,5 +1,6 @@
|
||||
Version 2.02.89 -
|
||||
==================================
|
||||
Lookup snapshot usage percent of origin when a snapshot is merging.
|
||||
Update lvdisplay with backward compat. config opt. lvm1_compatible_display.
|
||||
Do not report linear segtype for non-striped targets.
|
||||
Keep info about creation host and time for each logical volume.
|
||||
|
@ -742,6 +742,7 @@ int dev_manager_snapshot_percent(struct dev_manager *dm,
|
||||
const struct logical_volume *lv,
|
||||
percent_t *percent)
|
||||
{
|
||||
const struct logical_volume *snap_lv;
|
||||
char *name;
|
||||
const char *dlid;
|
||||
int fail_if_percent_unsupported = 0;
|
||||
@ -761,13 +762,19 @@ int dev_manager_snapshot_percent(struct dev_manager *dm,
|
||||
fail_if_percent_unsupported = 1;
|
||||
}
|
||||
|
||||
if (lv_is_merging_cow(lv)) {
|
||||
/* must check percent of origin for a merging snapshot */
|
||||
snap_lv = origin_from_cow(lv);
|
||||
} else
|
||||
snap_lv = lv;
|
||||
|
||||
/*
|
||||
* Build a name for the top layer.
|
||||
*/
|
||||
if (!(name = dm_build_dm_name(dm->mem, lv->vg->name, lv->name, NULL)))
|
||||
if (!(name = dm_build_dm_name(dm->mem, snap_lv->vg->name, snap_lv->name, NULL)))
|
||||
return_0;
|
||||
|
||||
if (!(dlid = build_dm_uuid(dm->mem, lv->lvid.s, NULL)))
|
||||
if (!(dlid = build_dm_uuid(dm->mem, snap_lv->lvid.s, NULL)))
|
||||
return_0;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user