1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Fix dev_manager_transient to access -real device not snapshot-origin. (brassow)

Another reminder why cloning functions impedes maintenance.
This commit is contained in:
Alasdair Kergon 2010-08-17 01:51:12 +00:00
parent f92b4f9482
commit 85ed403002
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.73 -
================================
Fix dev_manager_transient to access -real device not snapshot-origin.
Monitor origin -real device below snapshot instead of overlay device.
Don't really change monitoring status when in test mode.
Fix some exit statuses when starting/stopping monitoring fails.

View File

@ -548,6 +548,7 @@ static int _percent(struct dev_manager *dm, const char *name, const char *dlid,
return 0;
}
/* FIXME Merge with the percent function */
int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv)
{
int r = 0;
@ -558,10 +559,11 @@ int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv)
char *type = NULL;
char *params = NULL;
char *dlid = NULL;
char *suffix = lv_is_origin(lv) ? "real" : NULL;
const struct dm_list *segh = &lv->segments;
struct lv_segment *seg = NULL;
if (!(dlid = build_dm_uuid(dm->mem, lv->lvid.s, NULL)))
if (!(dlid = build_dm_uuid(dm->mem, lv->lvid.s, suffix)))
return_0;
if (!(dmt = _setup_task(0, dlid, NULL, DM_DEVICE_STATUS, 0, 0)))