From: prajnoha@sourceware.org <prajnoha@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/format_text/format-text.c ...
Date: 25 Feb 2011 14:08:58 -0000 [thread overview]
Message-ID: <20110225140858.644.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2011-02-25 14:08:55
Modified files:
. : WHATS_NEW
lib/format_text: format-text.c
lib/metadata : metadata.c
Log message:
Allow only orphan PVs to be resized even with two metadata areas.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1925&r2=1.1926
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.168&r2=1.169
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.435&r2=1.436
--- LVM2/WHATS_NEW 2011/02/25 14:02:53 1.1925
+++ LVM2/WHATS_NEW 2011/02/25 14:08:54 1.1926
@@ -2,7 +2,7 @@
===================================
Fix metadata balance code to work with recent changes in metadata handling.
Add old_uuid field to physical_volume and fix pvchange -u for recent changes.
- Allow pvresize on a PV with two metadata areas.
+ Allow pvresize on a PV with two metadata areas (for PVs not in a VG).
Change pvcreate to use new metadata handling interface.
Restructure existing pv_setup and pv_write fn, add pv_initialise fn.
Add internal interface to support adding and removing metadata areas.
--- LVM2/lib/format_text/format-text.c 2011/02/25 13:59:47 1.168
+++ LVM2/lib/format_text/format-text.c 2011/02/25 14:08:55 1.169
@@ -2161,6 +2161,17 @@
/* If there's an mda at the end, move it to a new position. */
if ((mda = fid_get_mda_indexed(fid, pvid, ID_LEN, 1)) &&
(mdac = mda->metadata_locn)) {
+ /*
+ * FIXME: Remove this restriction - we need to
+ * allow writing PV labels on non-orphan VGs
+ * for this to work correctly.
+ */
+ if (vg) {
+ log_error("Resizing a PV with two metadata areas "
+ "that is part of a VG is not supported.");
+ return 0;
+ }
+
/* FIXME: Maybe MDA0 size would be better? */
mda_size = mdac->area.size >> SECTOR_SHIFT;
mda_ignored = mda_is_ignored(mda);
--- LVM2/lib/metadata/metadata.c 2011/02/25 14:02:54 1.435
+++ LVM2/lib/metadata/metadata.c 2011/02/25 14:08:55 1.436
@@ -3543,6 +3543,12 @@
return 0;
}
+ /*
+ * FIXME: Try to remove this restriction. This requires checking
+ * that the PV and the VG are in a consistent state. We need
+ * to provide some revert mechanism since PV label together
+ * with VG metadata write is not atomic.
+ */
if (!is_orphan_vg(pv->vg_name) || pv->pe_alloc_count) {
log_error("Assertion failed: can't _pv_write non-orphan PV "
"(in VG %s)", pv->vg_name);
next reply other threads:[~2011-02-25 14:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 14:08 prajnoha [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-09 12:31 LVM2 ./WHATS_NEW lib/format_text/format-text.c prajnoha
2011-04-21 13:13 zkabelac
2011-02-28 13:19 prajnoha
2009-05-07 12:11 mbroz
2007-11-05 17:17 agk
2007-04-25 21:10 wysochanski
2007-03-23 12:43 mbroz
2007-01-09 21:12 agk
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=20110225140858.644.qmail@sourceware.org \
--to=prajnoha@sourceware.org \
--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.