mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
pools: no checking for lv/vgremove deactivation
Thin-pool and cache-pool targets got already quite stable so let's try to remove checking of pools when using lvremove or vgremove commands. This skips checking pools when they are going to be removed, but it also when removing thin volume that was the only user of a thin-pool. In this case thin-pool will be still there and could be activated again with another thin volume and thin_check will be executed in this moment. In this case it can delay discovery of metadata damage.
This commit is contained in:
parent
2fdf3b137a
commit
d6df31fba1
@ -2649,6 +2649,14 @@ static int _pool_register_callback(struct dev_manager *dm,
|
||||
pool_has_message(first_seg(lv), NULL, 0))))
|
||||
return 1;
|
||||
#endif
|
||||
/* Skip validation of metadata for lvremove and vgremove */
|
||||
if (!dm->activation &&
|
||||
(!strcmp(dm->cmd->name, "lvremove") ||
|
||||
!strcmp(dm->cmd->name, "vgremove"))) {
|
||||
log_debug("Skipping %s callback registration for command %s.",
|
||||
display_lvname(lv), dm->cmd->name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!(data = dm_pool_zalloc(dm->mem, sizeof(*data)))) {
|
||||
log_error("Failed to allocated path for callback.");
|
||||
|
Loading…
Reference in New Issue
Block a user