mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: fix upgrade regression
Older lvm2 tools where always providing linear mapping for thin pool. Recent lvm2 version however support external usage of thin pool and empty/unused pools are loaded without such external linear mapping. So this patch covers 'upgrade' problem, where older tool has activated thin-pool with 'linear' layer mapping, and newer tools didn't expected such mapping to exist and were not able to deactivate such table. So before checking for new layout in dm-table, check if there is not an old one already there.
This commit is contained in:
parent
a29a3ed3c3
commit
40102ae014
@ -655,8 +655,13 @@ static int _lv_info(struct cmd_context *cmd, const struct logical_volume *lv,
|
||||
}
|
||||
|
||||
/* New thin-pool has no layer, but -tpool suffix needs to be queried */
|
||||
if (!use_layer && lv_is_new_thin_pool(lv))
|
||||
use_layer = 1;
|
||||
if (!use_layer && lv_is_new_thin_pool(lv)) {
|
||||
/* Check if there isn't existing old thin pool mapping in the table */
|
||||
if (!dev_manager_info(cmd->mem, lv, NULL, 0, 0, &dminfo, NULL, NULL))
|
||||
return_0;
|
||||
if (!dminfo.exists)
|
||||
use_layer = 1;
|
||||
}
|
||||
|
||||
if (seg_status)
|
||||
seg_status->seg = seg;
|
||||
|
Loading…
Reference in New Issue
Block a user