All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9 v2] Fix lv_count & max_lv problems in lvm2
@ 2009-05-13 15:23 Milan Broz
  2009-05-13 15:23 ` [PATCH 1/9] Fix snapshot segment import to not use duplicate segments & replace Milan Broz
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Milan Broz @ 2009-05-13 15:23 UTC (permalink / raw)
  To: lvm-devel

(reposted with some fixed thisng after review)

LVM2 allows setting of maximal logical count in metadata.

Logically, the maximal count of LVs should be count of user-visible LVs.

Curently there are several problems:
 - we have several variables and code paths counts visible/diplayable LVs
   not consistently

 - some code paths violates these restrictions

 - there are situations when code allows creating new LV, but then
   during metadata loading the VG is not read (because of violating limits)

   Only possible fix if this happen is to restore metadata from backup
   an manualy edit max_lv (or remove some volume).
   (vgchange -l doesn't work too here)

This patchset
 - rearanges code to be cleaner
 - removes lv_count counter and use function to do that (simplify code)
 - forces max_lv count only for new volume creation
 (per previous discussion we allow temporarily violate max_lv count)

Milan Broz (9):
  Fix snapshot segment import to not use duplicate segments & replace.
  Remove vg->lv_count and use counter function.
  Tidy format1 import LV function.
  Introduce vg_link_lv and vg_unlink_lv functions.
  Fix lv_is_visible to handle virtual origin.
  Introduce lv_set_visible & lv_set_hidden and use lv_is_visible
    always.
  Merge lv_is_displayable and lv_is_visible.
  Remove unneeded import parameter from lv_create_empty.
  Check max_lv on only place and force the check only for new volume.

 lib/activate/activate.c          |    6 +-
 lib/display/display.c            |    4 +-
 lib/format1/disk-rep.h           |    3 +-
 lib/format1/import-export.c      |   30 +++++-----
 lib/format_pool/format_pool.c    |    1 -
 lib/format_pool/import_export.c  |   16 +----
 lib/format_text/export.c         |    4 +-
 lib/format_text/import_vsn1.c    |   22 +------
 lib/metadata/lv_manip.c          |  130 ++++++++++++++++++++++++--------------
 lib/metadata/metadata-exported.h |   23 ++++---
 lib/metadata/metadata.c          |   76 ++++++++++++++--------
 lib/metadata/metadata.h          |    5 --
 lib/metadata/mirror.c            |   16 +++---
 lib/metadata/snapshot_manip.c    |   73 ++++++++++-----------
 lib/report/report.c              |    4 +-
 lib/snapshot/snapshot.c          |    6 +--
 test/t-lvcreate-usage.sh         |   23 +++++++-
 test/test-utils.sh               |    1 +
 tools/lvchange.c                 |    2 +-
 tools/lvconvert.c                |    3 +-
 tools/lvcreate.c                 |   12 +++-
 tools/lvdisplay.c                |    2 +-
 tools/lvscan.c                   |    2 +-
 tools/pvmove.c                   |    2 +-
 tools/reporter.c                 |    4 +-
 tools/vgchange.c                 |    4 +-
 tools/vgmerge.c                  |    1 -
 tools/vgsplit.c                  |    6 +--
 28 files changed, 262 insertions(+), 219 deletions(-)



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-05-13 15:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-13 15:23 [PATCH 0/9 v2] Fix lv_count & max_lv problems in lvm2 Milan Broz
2009-05-13 15:23 ` [PATCH 1/9] Fix snapshot segment import to not use duplicate segments & replace Milan Broz
2009-05-13 15:23 ` [PATCH 2/9] Remove vg->lv_count and use counter function Milan Broz
2009-05-13 15:23 ` [PATCH 3/9] Tidy format1 import LV function Milan Broz
2009-05-13 15:24 ` [PATCH 4/9] Introduce vg_link_lv and vg_unlink_lv functions Milan Broz
2009-05-13 15:24 ` [PATCH 5/9] Fix lv_is_visible to handle virtual origin Milan Broz
2009-05-13 15:24 ` [PATCH 6/9] Introduce lv_set_visible & lv_set_hidden and use lv_is_visible always Milan Broz
2009-05-13 15:24 ` [PATCH 7/9] Merge lv_is_displayable and lv_is_visible Milan Broz
2009-05-13 15:24 ` [PATCH 8/9] Remove unneeded import parameter from lv_create_empty Milan Broz
2009-05-13 15:25 ` [PATCH 9/9] Check max_lv on only place and force the check only for new volume Milan Broz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.