From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 25/35] Make vg->mda_copies persistent in on disk vg metadata.
Date: Tue, 22 Jun 2010 10:18:56 +0200 [thread overview]
Message-ID: <4C2071F0.1030204@redhat.com> (raw)
In-Reply-To: <1277175968-9661-26-git-send-email-dwysocha@redhat.com>
Dne 22.6.2010 05:05, Dave Wysochanski napsal(a):
> This patch adds the ability to read/write the vg->mda_copies values
> from/to the vg metadata.
>
> If we read the VG metadata and this field does not exist, we set
> mda_copies to the default value of 0. Later in the code, we use
> this special '0' value to indicate a disable of metadata balancing.
> This should preserve existing LVM behavior and ensure metadata balancing
> can be turned off should the need arise.
>
> Signed-off-by: Dave Wysochanski<dwysocha@redhat.com>
> ---
> lib/format_text/export.c | 1 +
> lib/format_text/import_vsn1.c | 5 +++++
> 2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/lib/format_text/export.c b/lib/format_text/export.c
> index 5f02b5d..52ae11c 100644
> --- a/lib/format_text/export.c
> +++ b/lib/format_text/export.c
> @@ -397,6 +397,7 @@ static int _print_vg(struct formatter *f, struct volume_group *vg)
> outf(f, "allocation_policy = \"%s\"",
> get_alloc_string(vg->alloc));
> }
> + outf(f, "metadata_copies = %u", vg->mda_copies);
>
> return 1;
Hmm - so we add a new element to the metadata format with the same version
number? If the user will update metadata with older tools which do not know
about this parameter - will he get at least a warning that he will miss some
information ?
Zdenek
next prev parent reply other threads:[~2010-06-22 8:18 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 3:05 [PATCH 00/35] Add full metadata balancing support, v5 Dave Wysochanski
2010-06-22 3:05 ` [PATCH 01/35] Change 'filler' to 'flags' in on-disk 'raw_locn' structure Dave Wysochanski
2010-06-22 3:05 ` [PATCH 02/35] Add text format specific 'rlocn' ignore flag and access functions Dave Wysochanski
2010-06-22 3:05 ` [PATCH 03/35] Add location independent flag and functions to ignore mdas Dave Wysochanski
2010-06-22 3:05 ` [PATCH 04/35] Move dev_open / dev_close outside _vg_read_raw_area() Dave Wysochanski
2010-06-22 3:05 ` [PATCH 05/35] Move dev_open/dev_close outside vgname_from_mda() Dave Wysochanski
2010-06-22 3:05 ` [PATCH 06/35] Allow raw_read_mda_header to be called from text_label.c Dave Wysochanski
2010-06-22 3:05 ` [PATCH 07/35] Ensure in-memory state matches on-disk state of mda ignore bit Dave Wysochanski
2010-06-22 3:05 ` [PATCH 08/35] Add mda_locn_match() internal library function for mapping pv/device to VG mda Dave Wysochanski
2010-06-22 3:05 ` [PATCH 09/35] Add mda location specific mda_copy constructor Dave Wysochanski
2010-06-22 3:05 ` [PATCH 10/35] Use vg_mda_count() in vgdisplay Dave Wysochanski
2010-06-22 3:05 ` [PATCH 11/35] Add metadata_areas_ignored list and functions to manage ignored mdas Dave Wysochanski
2010-06-22 3:05 ` [PATCH 12/35] Define new functions and vgs/pvs fields related to mda ignore Dave Wysochanski
2010-06-22 3:05 ` [PATCH 13/35] Add --metadataignore to pvchange, allowing for ignoring of metadata areas Dave Wysochanski
2010-06-22 3:05 ` [PATCH 14/35] Update pvchange, pvs and vgs man pages for metadata ignore Dave Wysochanski
2010-06-22 3:05 ` [PATCH 15/35] Implement ignore of mda if bit set by skipping r/w of metadata Dave Wysochanski
2010-06-22 3:05 ` [PATCH 16/35] Add mdas_empty_or_ignored() helper function Dave Wysochanski
2010-06-22 3:05 ` [PATCH 17/35] Use mdas_empty_or_ignored() in place of checks for empty mda list Dave Wysochanski
2010-06-22 3:05 ` [PATCH 18/35] Update _vg_read and _text_create_text_instance to use fid_add_mda[s] Dave Wysochanski
2010-06-22 3:05 ` [PATCH 19/35] Refactor vg_commit() to add _vg_commit_mdas() Dave Wysochanski
2010-06-22 3:05 ` [PATCH 20/35] Before committing each mda, arrange mdas so ignored mdas get committed first Dave Wysochanski
2010-06-22 3:05 ` [PATCH 21/35] Add tests for phase 1 of metadata balance - manage per-PV ignore bit Dave Wysochanski
2010-06-22 3:05 ` [PATCH 22/35] Define vgmetadatacopies in vgchange man page Dave Wysochanski
2010-06-22 3:05 ` [PATCH 23/35] Add mda_copies to VG structures and initialization Dave Wysochanski
2010-06-22 3:05 ` [PATCH 24/35] Add vg get/set methods for VG metadata copies Dave Wysochanski
2010-06-22 3:05 ` [PATCH 25/35] Make vg->mda_copies persistent in on disk vg metadata Dave Wysochanski
2010-06-22 3:05 ` [PATCH 26/35] Add vg_mda_copies display field to 'vgs' command Dave Wysochanski
2010-06-22 3:06 ` [PATCH 27/35] Update vgchange tool to accept --vgmetadatacopies Dave Wysochanski
2010-06-22 3:06 ` [PATCH 28/35] Implement _vg_metadata_balance and call from vg_write() path Dave Wysochanski
2010-06-22 3:06 ` [PATCH 29/35] Set vg_mda_copies when pvchange --metadataignore is given Dave Wysochanski
2010-06-22 3:06 ` [PATCH 30/35] Add --vgmetadatacopies to vgcreate man page, command, and lvm.conf Dave Wysochanski
2010-06-22 3:06 ` [PATCH 31/35] Ensure fid mda lists are populated correctly during vgextend Dave Wysochanski
2010-06-22 3:06 ` [PATCH 32/35] Update check in vg_split_mdas to account for ignored mdas list Dave Wysochanski
2010-06-22 3:06 ` [PATCH 33/35] Update _vgmerge_single() to move fid->metadata_areas_ignored Dave Wysochanski
2010-06-22 3:06 ` [PATCH 34/35] Add --vgmetadatacopies to vgsplit man page and command Dave Wysochanski
2010-06-22 3:06 ` [PATCH 35/35] Update tests to handle phase 2 (vg based) metadata balance Dave Wysochanski
2010-06-22 8:18 ` Zdenek Kabelac [this message]
2010-06-22 10:36 ` [PATCH 25/35] Make vg->mda_copies persistent in on disk vg metadata Dave Wysochanski
2010-06-22 14:04 ` Alasdair G Kergon
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=4C2071F0.1030204@redhat.com \
--to=zkabelac@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.