mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
lvconvert: disable reshaping of open RAID LV
Disable until we have a proper fix for reshape space allocation, switching it to begin/end of rimages and activation. Related: rhbz1447812
This commit is contained in:
parent
e1a1c20e95
commit
9e9163618a
@ -6267,6 +6267,8 @@ int lv_raid_convert(struct logical_volume *lv,
|
||||
uint32_t region_size;
|
||||
uint32_t data_copies = seg->data_copies;
|
||||
uint32_t available_slvs, removed_slvs;
|
||||
char *dev_path;
|
||||
size_t sz;
|
||||
takeover_fn_t takeover_fn;
|
||||
|
||||
/* FIXME If not active, prompt and activate */
|
||||
@ -6331,6 +6333,17 @@ int lv_raid_convert(struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* BZ1447812 */
|
||||
sz = strlen(lv->vg->cmd->dev_dir) + strlen(lv->vg->name) + strlen(lv->name) + 2;
|
||||
if (!(dev_path = dm_pool_alloc(lv->vg->cmd->mem, sz)))
|
||||
return_0;
|
||||
if (dm_snprintf(dev_path, sz, "%s%s/%s", lv->vg->cmd->dev_dir, lv->vg->name, lv->name) < 0)
|
||||
return_0;
|
||||
if (open(dev_path, O_RDONLY|O_EXCL) && errno) {
|
||||
log_error("Reshape of open %s not supported.", display_lvname(lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!_raid_reshape(lv, new_segtype, yes, force,
|
||||
data_copies, region_size,
|
||||
stripes, stripe_size, allocate_pvs)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user