All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 09/22] Replicator: add sorted vgs_list
Date: Mon, 26 Apr 2010 16:56:02 +0200	[thread overview]
Message-ID: <4BD5A982.80602@redhat.com> (raw)
In-Reply-To: <20100426143404.GR23791@agk-dp.fab.redhat.com>

Dne 26.4.2010 16:34, Alasdair G Kergon napsal(a):
> On Mon, Apr 12, 2010 at 05:21:37PM +0200, Zdenek Kabelac wrote:
>> Introduce struct vgs_list to store information about needed
>> volume group name, vgid, flags and the pointer to opened VG.
>  
> Why does this need a new structure?

We don't have any similar one - I would be aware of.

Using new structure here seems to simplify modification of routines to be able
to process some loops multiple times  - i.e. code changes are minimal to
extend it for work with remote VGs.


> How does this interact with internal caches?

There is no interaction  - VGs are opened in alphabetical order via standard
lvm mechanism - there are no peeks into internal caches.

Technically we could find names in caches - but we should also keep locks for
all VGs during activation so noone changes them.

> How does this interact with 'struct volume_group' itself?  (The fields are
> already part of it so why is a new struct needed?)

We keep list of needed VGs outside in command - once we open 'master' VG -
list is moved (spliced) to internal VG list - then it's filled with
potentially missing 'other VGs' - later - if there was found problem in
processing caused by missing VG - list is taken out of VG - and in
alphabetical order opened again. And this loop iterates until either all
missing VGs are satisfied or some VG couldn't be opened -> failing resource.
This is a bit tricky - but we do not need to put things to global structure
like cmd_context in this case.

Zdenek



  reply	other threads:[~2010-04-26 14:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12 15:21 [PATCH 00/22] Replicator 100412 Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 01/22] Add dm_list_splice() for list join Zdenek Kabelac
2010-04-14 11:38   ` Petr Rockai
2010-04-26 13:15   ` Alasdair G Kergon
2010-04-26 13:23     ` Alasdair G Kergon
2010-04-12 15:21 ` [PATCH 02/22] API change for args of process_each_lv_in_vg() Zdenek Kabelac
2010-04-26 13:34   ` Alasdair G Kergon
2010-04-26 13:46   ` Mike Snitzer
2010-04-12 15:21 ` [PATCH 03/22] Replicator: add libdm support Zdenek Kabelac
2010-04-26 13:46   ` Alasdair G Kergon
2010-04-26 14:12     ` Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 04/22] Replicator: suspend/deactivate replicator Zdenek Kabelac
2010-04-26 13:50   ` Alasdair G Kergon
2010-04-12 15:21 ` [PATCH 05/22] Replicator: add lvm support Zdenek Kabelac
2010-04-26 14:10   ` Alasdair G Kergon
2010-04-12 15:21 ` [PATCH 06/22] Replicator: check replicator segment Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 07/22] Replicator: extend _lv_each_dependency() rep. deps Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 08/22] Replicator: extend volume_group with list of VGs Zdenek Kabelac
2010-04-26 14:26   ` Alasdair G Kergon
2010-04-26 14:39     ` Zdenek Kabelac
2010-04-26 14:27   ` Alasdair G Kergon
2010-04-26 14:35     ` Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 09/22] Replicator: add sorted vgs_list Zdenek Kabelac
2010-04-26 14:34   ` Alasdair G Kergon
2010-04-26 14:56     ` Zdenek Kabelac [this message]
2010-04-26 18:01       ` Dave Wysochanski
2010-04-12 15:21 ` [PATCH 10/22] Replicator: add find_replicator_vgs Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 11/22] Replicator: add read and release VGs for rsites Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 12/22] Replicator: use vgs_list for _process_one_vg() Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 13/22] Replicator: use vgs_list for process_each_lv_in_vg() Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 14/22] Replicator: lock_vol() finds missing VGs Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 15/22] Replicator: activate checks for missing vgs Zdenek Kabelac
2010-04-26 14:39   ` Alasdair G Kergon
2010-04-12 15:21 ` [PATCH 16/22] Replicator: update _create_partial_dtree() Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 17/22] Replicator: vg with missing_vgs does not print Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 18/22] Replicator: add replicator to dtree Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 19/22] Replicator: do not remove of replicators' LVs Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 20/22] Replicator: activate change for vgchange Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 21/22] Replicator: add new options for replicator Zdenek Kabelac
2010-04-12 15:21 ` [PATCH 22/22] Replicator: man pages for lvcreate, lvchange Zdenek Kabelac
2010-04-26 14:49   ` 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=4BD5A982.80602@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.