Skip to content

Add interface to support adding and removing metadata areas on demand

Peter Rajnoha 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/11Add mda_slots field for PV info in the cache.lib/cache/lvmcache.c lib/cache/lvmcache.h+3 -01 reply
1/11Add mda_slots field for PV info in the cache.+0 -00 replies
1/11Add mda_slots field for PV info in the cache.+0 -00 replies
2/11Add pe_start_locked flag in struct physical_volume to retain pe_start.lib/format_text/format-text.c lib/metadata/pv.h+5 -20 replies
3/11Add pv_add_metadata_area to format_handler interface.lib/format_text/format-text.c lib/format_text/format-text.h lib/metadata/metadata.h+266 -00 replies
4/11Add pv_remove_metadata_area to format_handler interface.lib/format_text/format-text.c lib/format_text/format-text.h lib/metadata/metadata.h+60 -01 reply
5/11Add pv_initialise to format_handler interface.lib/format1/disk-rep.c lib/format1/disk-rep.h lib/format1/format1.c +11 more+209 -261 reply
6/11Refactor pv_setup to not include the initialisation only code.lib/format1/format1.c lib/format_pool/format_pool.c lib/format_text/archiver.c +5 more+127 -1910 replies
7/11Remove unused _mda_setup.lib/format_text/format-text.c+0 -1530 replies
8/11Cleanup pv_write to use recent changes in metadata handling interface.lib/format1/format1.c lib/format_text/format-text.c lib/metadata/metadata-exported.h +6 more+17 -1400 replies
9/11Remove useless mdas parameter in code creating new PVs.lib/metadata/metadata.c tools/vgconvert.c+0 -40 replies
10/11Make existing lvmcache_update_pvid public.lib/cache/lvmcache.c lib/cache/lvmcache.h tools/pvchange.c+18 -60 replies
11/11Use new metadata interface to provide better support for PV resize.lib/format_text/format-text.c lib/metadata/metadata-exported.h lib/metadata/metadata.h +2 more+118 -690 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] Add interface to support adding and removing metadata areas on demand

This patchset provides a possibility to add new metadata areas on demand as well as removing them. Now, we can add a new metadata area independently of the PV initialisation so if there's a place we can even add metadata area additionally. The same applies for metadata removal functionality. This is only internal interface for now, but we should be able to provide external hooks in lvm2 commands if desired.

The patchset also tries to cleanup existing pv_setup/pv_write code. It also uses the new interface to allow resizing a PV with more copies of metadata areas on disk which was not allowed before because of missing metadata handling part in the interface.

(This patchset should be applicable to 4f2136c6545532afe149657f923fb982d2660415. There's still one thing that is failing which I need to inspect - it's lvm1 format handling and failing t-pv-create-usage.sh: "PV segment pe_count mismatch: 33 != 32". But anyway, here it is... I'll provide an update if I find anything.)

Peter Rajnoha (11):
Add mda_slots field for PV info in the cache.
Add pe_start_locked flag in struct physical_volume to retain
pe_start.
Add pv_add_metadata_area to format_handler interface. Add pv_remove_metadata_area to format_handler interface. Add pv_initialise to format_handler interface.
Refactor pv_setup to not include the initialisation only code. Remove unused _mda_setup.
Cleanup pv_write to use recent changes in metadata handling
interface.
Remove useless mdas parameter in code creating new PVs. Make existing lvmcache_update_pvid public.
Use new metadata interface to provide better support for PV resize.

 lib/cache/lvmcache.c             |   18 +-
 lib/cache/lvmcache.h             |    3 +
 lib/format1/disk-rep.c           |    7 +
 lib/format1/disk-rep.h           |    1 +
 lib/format1/format1.c            |   64 ++-
 lib/format1/format1.h            |    1 +
 lib/format1/lvm1-label.c         |    5 +
 lib/format_pool/disk_rep.c       |    4 +
 lib/format_pool/disk_rep.h       |    1 +
 lib/format_pool/format_pool.c    |   22 +-
 lib/format_pool/format_pool.h    |    1 +
 lib/format_text/archiver.c       |    5 +-
 lib/format_text/format-text.c    |  912 ++++++++++++++++++++++----------------
 lib/format_text/format-text.h    |   11 +-
 lib/format_text/text_label.c     |   26 +-
 lib/metadata/metadata-exported.h |   12 +-
 lib/metadata/metadata.c          |   80 ++--
 lib/metadata/metadata.h          |   49 ++-
 lib/metadata/pv.h                |    1 +
 lib/metadata/pv_manip.c          |   70 +++-
 tools/pvchange.c                 |   10 +-
 tools/pvresize.c                 |   57 +---
 tools/vgconvert.c                |   12 +-
 tools/vgreduce.c                 |    2 +-
 24 files changed, 803 insertions(+), 571 deletions(-)
Signature · 1 line
1.7.3.2