Skip to content

VG share v2

Zdenek Kabelac lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Pool locking codelibdm/libdevmapper.h libdm/mm/pool-debug.c libdm/mm/pool-fast.c +1 more+337 -31 reply
1/6Pool locking code+0 -01 reply
1/6Pool locking code+0 -01 reply
1/6Pool locking code+0 -01 reply
1/6Pool locking code+0 -00 replies
1/6Pool locking code+0 -00 replies
1/6Pool locking code+0 -01 reply
1/6Pool locking code+0 -00 replies
1/6Pool locking code+0 -00 replies
2/6Code move vg_mark_partial up in stacklib/cache/lvmcache.c lib/metadata/metadata.c+7 -50 replies
3/6Share VG multiple timeslib/cache/lvmcache.c lib/cache/lvmcache.h lib/metadata/metadata.c +1 more+124 -50 replies
4/6Use dm_pool_set_uint64lib/activate/activate.c lib/metadata/lv.h lib/metadata/snapshot_manip.c+20 -50 replies
5/6lv_postorder using dm_pool_set_uint64lib/metadata/metadata.c+13 -40 replies
6/6lv_postorder unlock and locklib/metadata/metadata.c+16 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] VG share v2

Second version of VG sharing patch.
Still rather in 'proposal' form as some part of code are not fully finished (pool-debug code is missing, usage of posix_memalign). If someone notices some weak points - let me know.

Patchset add support for locking and unlocking memory pool. Such pool has volatile memory area attached.
VG sharing is made in way the only 1 user could work with such VG. It may optionaly modify few small parts (only uin64_t is supported) which are reverted before next reuse.

2 methods to catch writes are implemented -
mprotect - memory consuming, and creates immediate segfault when
expected change of pool content happens. But it's fast and give exact location of such writer.

pool_crc - simple hash crc checksum - gives notice that after multiple
uses is not in its original state - doesn't segfault, but it's hard to detect such writer. And checksumming consumes some CPU.

Pool volatile area uses very simle 'exception pair values' - if there would be a lot of them - more efficent code would be needed. Also support for storing more differnet types would add some complexity. Both these extension do not seem to be needed with current code.

Patch set - as is - passes valgrind tests.

Zdenek Kabelac (6):
Pool locking code
Code move vg_mark_partial up in stack
Share VG multiple times
Use dm_pool_set_uint64
lv_postorder using dm_pool_set_uint64
lv_postorder unlock and lock

 lib/activate/activate.c       |    5 +-
 lib/cache/lvmcache.c          |  111 ++++++++++++++++++-
 lib/cache/lvmcache.h          |    3 +
 lib/metadata/lv.h             |    5 +-
 lib/metadata/metadata.c       |   58 ++++++++--
 lib/metadata/snapshot_manip.c |   15 ++-
 lib/metadata/vg.h             |    2 +
 libdm/libdevmapper.h          |   11 ++
 libdm/mm/pool-debug.c         |    9 ++
 libdm/mm/pool-fast.c          |   74 ++++++++++++-
 libdm/mm/pool.c               |  246 ++++++++++++++++++++++++++++++++++++++++-
 11 files changed, 517 insertions(+), 22 deletions(-)
Signature · 1 line
1.7.4.1