mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +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 -
|
||||
==================================
|
||||
Use proper libmem mempool for allocation of unknown segment name.
|
||||
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.
|
||||
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->ops = &_unknown_ops;
|
||||
segtype->name = dm_pool_strdup(cmd->mem, name);
|
||||
segtype->name = dm_pool_strdup(cmd->libmem, name);
|
||||
segtype->private = NULL;
|
||||
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
|
||||
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
|
||||
cat bak1
|
||||
sed -e 's,unstriped,striped,;s,unmirror,mirror,' -i.orig bak1
|
||||
|
Loading…
Reference in New Issue
Block a user