Skip to content

: Change semantics of lvm_vg_remove and rename vg_remove fns

Dave Wysochanski lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Split vg_remove_single into 2 functions - the second part commits to disk.lib/metadata/metadata-exported.h lib/metadata/metadata.c liblvm/lvm_vg.c +1 more+20 -70 replies
2/4Update vg_remove_single_* functions to use the removed_pvs list.lib/metadata/metadata.c+6 -10 replies
3/4Update lvm_vg_write() to handle the deferred commit of lvm_vg_write().liblvm/lvm2app.h liblvm/lvm_vg.c+5 -70 replies
4/4Rename internal library function vg_remove to vg_remove_mdas.lib/metadata/metadata-exported.h lib/metadata/metadata.c tools/vgconvert.c+7 -70 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/4]: Change semantics of lvm_vg_remove and rename vg_remove fns

This patchset changes the semantics of lvm_vg_remove to be more consistent with lvm_vg_create, and renames some of the internal lvm library vg_remove functions.

For liblvm, we would like a consistent API that allows modification of LVM objects in memory before committing to disk. The commit to disk is normally done in a single call, lvm_vg_write(). Currently, not all liblvm functions behave this way, and lvm_vg_remove is one of them, as it commits to disk after completion and does not require lvm_vg_write. This is inconsistent with lvm_vg_create, which requires lvm_vg_write to commit to disk. This patchset changes the semantic of lvm_vg_remove to require lvm_vg_write to commit to disk and make it consistent with lvm_vg_create and other functions. Along the way, there are a few renames and minor refactorings to the internal vg_remove functions.

Further cleanup should probably consolidate the various areas where devices are removed from VGs as there is currently a bit of duplicated code. I've avoided such changes in this patchset though to keep it as simple and low risk.

Testsuite ok and applies cleanly on:
commit 597986b711175bd90d234e0a6ac001f165aa1274

Author: Dave Wysochanski <[email protected]>
Date:   Mon Aug 10 17:23:04 2009 +0000

Update man pages to clarify usage of PE ranges.