mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
o I was tearing down device bottom-up instead of top down. Which
is why lvremove of snapshots wasn't working.
This commit is contained in:
parent
9db196e6c5
commit
3a84c18bdd
@ -783,13 +783,21 @@ int _create_rec(struct dev_manager *dm, struct dev_layer *dl)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Layers are removed in a top-down manner.
|
||||
*/
|
||||
int _remove_rec(struct dev_manager *dm, struct dev_layer *dl)
|
||||
{
|
||||
struct list *sh;
|
||||
struct dev_layer *dep;
|
||||
char *name;
|
||||
|
||||
if (dl->info.exists && !_suspend(dl)) {
|
||||
if (dl->info.exists && dl->info.suspended && !_resume(dl)) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!_remove(dl)) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
@ -808,11 +816,6 @@ int _remove_rec(struct dev_manager *dm, struct dev_layer *dl)
|
||||
}
|
||||
}
|
||||
|
||||
if (dl->info.exists && (!_resume(dl) || !_remove(dl))) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user