From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 0/7] Fix lv_count & max_lv problems in lvm2
Date: Wed, 6 May 2009 16:42:57 +0200 [thread overview]
Message-ID: <cover.1241620083.git.mbroz@redhat.com> (raw)
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 tries to consistenly use visible LV count and fixes
all code paths which are temporarily violating the restrictions.
See also bug https://bugzilla.redhat.com/show_bug.cgi?id=490298
(with reproducer)
Milan Broz (7):
Fix snapshot segment import to not use duplicate segments & replace.
Never set mirror log and images directly visible in metadata.
Remove snapshot_count from VG and use function instead.
Introduce vg_add_lc and vg_remove_lv functions.
Introduce lv_set_visible & lv_set_hidden and use lv_is_visible
always.
Merge lv_is_displayable and lv_is_visible.
Remove import paramater from lv_create_empty.
lib/activate/activate.c | 6 +-
lib/display/display.c | 4 +-
lib/format1/disk-rep.h | 3 +-
lib/format1/import-export.c | 28 ++++-----
lib/format_pool/format_pool.c | 1 -
lib/format_pool/import_export.c | 15 +----
lib/format_text/export.c | 4 +-
lib/format_text/import_vsn1.c | 22 +------
lib/metadata/lv_manip.c | 127 +++++++++++++++++++++++--------------
lib/metadata/metadata-exported.h | 20 +++---
lib/metadata/metadata.c | 35 +++++------
lib/metadata/metadata.h | 4 +-
lib/metadata/mirror.c | 20 +++----
lib/metadata/snapshot_manip.c | 44 ++++++-------
lib/report/columns.h | 4 +-
lib/report/report.c | 22 +++---
lib/snapshot/snapshot.c | 19 +++++-
test/t-lvcreate-usage.sh | 22 ++++++-
test/test-utils.sh | 1 +
tools/lvchange.c | 2 +-
tools/lvconvert.c | 3 +-
tools/lvcreate.c | 6 +-
tools/lvdisplay.c | 2 +-
tools/lvscan.c | 2 +-
tools/pvmove.c | 2 +-
tools/reporter.c | 4 +-
tools/vgmerge.c | 2 -
tools/vgsplit.c | 5 +-
28 files changed, 221 insertions(+), 208 deletions(-)
next reply other threads:[~2009-05-06 14:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 14:42 Milan Broz [this message]
2009-05-06 14:42 ` [PATCH 1/7] Fix snapshot segment import to not use duplicate segments & replace Milan Broz
2009-05-11 6:27 ` Petr Rockai
2009-05-11 11:29 ` Alasdair G Kergon
2009-05-06 14:42 ` [PATCH 2/7] Never set mirror log and images directly visible in metadata Milan Broz
2009-05-10 18:33 ` Petr Rockai
2009-05-10 18:42 ` Milan Broz
2009-05-10 19:24 ` Petr Rockai
2009-05-11 1:30 ` Alasdair G Kergon
2009-05-11 1:39 ` Alasdair G Kergon
2009-05-11 1:54 ` Alasdair G Kergon
2009-05-12 12:34 ` Milan Broz
2009-05-06 14:43 ` [PATCH 3/7] Remove snapshot_count from VG and use function instead Milan Broz
2009-05-10 18:41 ` Petr Rockai
2009-05-11 11:48 ` Alasdair G Kergon
2009-05-11 11:42 ` Alasdair G Kergon
2009-05-06 14:43 ` [PATCH 4/7] Introduce vg_add_lc and vg_remove_lv functions Milan Broz
2009-05-10 19:06 ` Petr Rockai
2009-05-12 13:37 ` Milan Broz
2009-05-06 14:43 ` [PATCH 5/7] Introduce lv_set_visible & lv_set_hidden and use lv_is_visible always Milan Broz
2009-05-10 19:23 ` Petr Rockai
2009-05-12 15:12 ` Milan Broz
2009-05-06 14:43 ` [PATCH 6/7] Merge lv_is_displayable and lv_is_visible Milan Broz
2009-05-11 6:09 ` Petr Rockai
2009-05-06 14:43 ` [PATCH 7/7] Remove import paramater from lv_create_empty Milan Broz
2009-05-11 6:15 ` Petr Rockai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1241620083.git.mbroz@redhat.com \
--to=mbroz@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.