mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
unknown: fix mempool used for name allocation
Use cmd libmem mempool for name allocation, since mem mempool is released after each clvmd command.
This commit is contained in:
parent
b5f8f452ac
commit
47a60369a0
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.107 -
|
Version 2.02.107 -
|
||||||
==================================
|
==================================
|
||||||
|
Use proper libmem mempool for allocation of unknown segment name.
|
||||||
Add --readonly to reporting and display tools for lock-free metadata access.
|
Add --readonly to reporting and display tools for lock-free metadata access.
|
||||||
Add locking_type 5 for dummy locking for tools that do not need any locks.
|
Add locking_type 5 for dummy locking for tools that do not need any locks.
|
||||||
Fix _recover_vg() error path when lock conversion fails.
|
Fix _recover_vg() error path when lock conversion fails.
|
||||||
|
@ -95,7 +95,7 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd, const char *n
|
|||||||
|
|
||||||
segtype->cmd = cmd;
|
segtype->cmd = cmd;
|
||||||
segtype->ops = &_unknown_ops;
|
segtype->ops = &_unknown_ops;
|
||||||
segtype->name = dm_pool_strdup(cmd->mem, name);
|
segtype->name = dm_pool_strdup(cmd->libmem, name);
|
||||||
segtype->private = NULL;
|
segtype->private = NULL;
|
||||||
segtype->flags = SEG_UNKNOWN | SEG_VIRTUAL | SEG_CANNOT_BE_ZEROED;
|
segtype->flags = SEG_UNKNOWN | SEG_VIRTUAL | SEG_CANNOT_BE_ZEROED;
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ vgcfgrestore -f bak0 $vg
|
|||||||
# we have on-disk metadata with unknown segments now
|
# we have on-disk metadata with unknown segments now
|
||||||
not lvchange -aey $vg/$lv1 # check that activation is refused
|
not lvchange -aey $vg/$lv1 # check that activation is refused
|
||||||
|
|
||||||
|
# try once more to catch invalid memory access with valgrind
|
||||||
|
# when clvmd flushes cmd mem pool
|
||||||
|
not lvchange -aey $vg/$lv1 # check that activation is refused
|
||||||
|
|
||||||
vgcfgbackup -f bak1 $vg
|
vgcfgbackup -f bak1 $vg
|
||||||
cat bak1
|
cat bak1
|
||||||
sed -e 's,unstriped,striped,;s,unmirror,mirror,' -i.orig bak1
|
sed -e 's,unstriped,striped,;s,unmirror,mirror,' -i.orig bak1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user