Skip to content

Pool locking

Zdenek Kabelac lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11Introduce laopts structurelib/activate/activate.c lib/activate/activate.h lib/activate/dev_manager.c +1 more+110 -760 replies
2/11Add laoptslib/activate/activate.c lib/activate/activate.h lib/activate/dev_manager.c +8 more+48 -300 replies
3/11Replace ACTIVATElib/mirror/mirrored.c+1 -20 replies
4/11Replace MERGING in activationlib/activate/activate.c lib/activate/dev_manager.c lib/snapshot/snapshot.c+10 -100 replies
5/11FIXMElib/activate/activate.c lib/metadata/mirror.c+4 -10 replies
6/11FIXME - remove test for status flaglib/metadata/mirror.c+1 -20 replies
7/11Remove ACTIVATE_EXCL appearance from the codelib/activate/activate.c lib/format_text/flags.c lib/metadata/metadata-exported.h +1 more+0 -110 replies
8/11Code move vg_mark_partial up in stacklib/format_text/import.c lib/metadata/metadata.c+6 -50 replies
9/11Pool locking codelibdm/libdevmapper.h libdm/mm/pool-debug.c libdm/mm/pool-fast.c +2 more+209 -30 replies
10/11Share VG multiple timeslib/cache/lvmcache.c lib/cache/lvmcache.h lib/metadata/metadata.c +1 more+101 -30 replies
11/11lv_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 00/11] Pool locking

Patchset tries to optimize creation of VG structure from config_tree. When the config_tree is unchange and we know VG structure is not modified we could reuse this structure multiple times.

Patchset currently has few limitation and is not the optimal solution, but it present relatively very small set of changes with good improvements.

Patchset tries to avoid modification of VG structure for read-only operations. And then introducion pool locking - debugging uses mprotect to generate segfault in the moment of memory write access.
Normal code currently uses simple CRC checksum - could be later disabled, once we are sure there could be no write operation.

Few things are left for the future:
vg_mark_partial is in wrong layer currentl.
clvmd would greatly benefit from 'smarter' cache flushing - VG structure could be the reused more extensively.

Patch is splited in way to allow easier review.

Zdenek Kabelac (11):
Introduce laopts structure
Add laopts
Replace ACTIVATE
Replace MERGING in activation
FIXME
FIXME - remove test for status flag
Remove ACTIVATE_EXCL appearance from the code
Code move vg_mark_partial up in stack
Pool locking code
Share VG multiple times
lv_postorder unlock and lock

 lib/activate/activate.c          |  114 ++++++++++++++++++++----------------
 lib/activate/activate.h          |   10 +++-
 lib/activate/dev_manager.c       |  120 +++++++++++++++++++++-----------------
 lib/activate/dev_manager.h       |   10 ++-
 lib/cache/lvmcache.c             |   73 +++++++++++++++++++++++-
 lib/cache/lvmcache.h             |    5 ++
 lib/error/errseg.c               |    1 +
 lib/format_text/flags.c          |    1 -
 lib/format_text/import.c         |    6 ++
 lib/metadata/metadata-exported.h |    1 -
 lib/metadata/metadata.c          |   45 ++++++++++++--
 lib/metadata/metadata.h          |    1 -
 lib/metadata/mirror.c            |    4 +-
 lib/metadata/segtype.h           |   13 +++--
 lib/metadata/vg.h                |    2 +
 lib/mirror/mirrored.c            |   15 +++--
 lib/replicator/replicator.c      |    2 +
 lib/snapshot/snapshot.c          |    5 +-
 lib/striped/striped.c            |    1 +
 lib/unknown/unknown.c            |    1 +
 lib/zero/zero.c                  |    1 +
 libdm/libdevmapper.h             |    7 ++
 libdm/mm/pool-debug.c            |   27 +++++++++
 libdm/mm/pool-fast.c             |   70 +++++++++++++++++++++-
 libdm/mm/pool.c                  |  106 +++++++++++++++++++++++++++++++++-
 make.tmpl.in                     |    2 +
 26 files changed, 503 insertions(+), 140 deletions(-)
Signature · 1 line
1.7.5.2