public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW lib/metadata/metadata-exporte ... Date: Fri, 21 May 2010 12:55:00 -0000 [thread overview] Message-ID: <20100521125532.22463.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2010-05-21 12:55:25 Modified files: . : WHATS_NEW lib/metadata : metadata-exported.h replicator_manip.c Log message: Replicator: add find_replicator_vgs Adding find_replicator_vgs() function to find all needed VGs for replicator-dev LV. This function is later called before taking lock_vol(). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1583&r2=1.1584 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.149&r2=1.150 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/replicator_manip.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4 --- LVM2/WHATS_NEW 2010/05/21 12:52:01 1.1583 +++ LVM2/WHATS_NEW 2010/05/21 12:55:25 1.1584 @@ -1,5 +1,6 @@ Version 2.02.67 - =============================== + Add find_replicator_vgs() to discover all needed VGs for replicator-dev LV. Add functions for handling cmd_vg structure. Extend _lv_each_dependency() with Replicator dependencies. Add check_replicator_segment() for catching internal Replicator errors. --- LVM2/lib/metadata/metadata-exported.h 2010/05/21 12:52:01 1.149 +++ LVM2/lib/metadata/metadata-exported.h 2010/05/21 12:55:25 1.150 @@ -815,6 +815,8 @@ int cmd_vg_read(struct cmd_context *cmd, struct dm_list *cmd_vgs); void cmd_vg_release(struct dm_list *cmd_vgs); +int find_replicator_vgs(struct logical_volume *lv); + struct logical_volume *find_pvmove_lv(struct volume_group *vg, struct device *dev, uint32_t lv_type); struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd, --- LVM2/lib/metadata/replicator_manip.c 2010/05/21 12:52:01 1.3 +++ LVM2/lib/metadata/replicator_manip.c 2010/05/21 12:55:25 1.4 @@ -602,3 +602,35 @@ cvl->vg = NULL; } } + +/** + * Find all needed remote VGs for processing given LV. + * Missing VGs are added to VG's cmd_vg list and flag cmd_missing_vgs is set. + */ +int find_replicator_vgs(struct logical_volume *lv) +{ + struct replicator_site *rsite; + int ret = 1; + + if (!lv_is_replicator_dev(lv)) + return 1; + + dm_list_iterate_items(rsite, &first_seg(lv)->replicator->rsites) { + if (!rsite->vg_name || !lv->vg->cmd_vgs || + cmd_vg_lookup(lv->vg->cmd_vgs, rsite->vg_name, NULL)) + continue; + ret = 0; + /* Using cmd memory pool for cmd_vg list allocation */ + if (!cmd_vg_add(lv->vg->cmd->mem, lv->vg->cmd_vgs, + rsite->vg_name, NULL, 0)) { + lv->vg->cmd_missing_vgs = 0; /* do not retry */ + stack; + break; + } + + log_debug("VG: %s added as missing.", rsite->vg_name); + lv->vg->cmd_missing_vgs++; + } + + return ret; +}
next reply other threads:[~2010-05-21 12:55 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-21 12:55 zkabelac [this message] -- strict thread matches above, loose matches on Subject: below -- 2011-12-01 0:09 jbrassow 2011-10-28 20:12 zkabelac 2011-10-07 14:56 jbrassow 2011-09-14 9:57 zkabelac 2011-09-07 8:34 zkabelac 2011-08-18 19:43 jbrassow 2011-08-18 19:34 jbrassow 2011-03-11 14:56 prajnoha 2011-03-02 20:00 mbroz 2011-02-25 14:02 prajnoha 2010-05-21 14:07 zkabelac 2010-05-21 12:52 zkabelac 2010-05-14 15:19 jbrassow 2010-03-16 15:30 agk 2010-03-16 14:37 agk 2009-07-14 2:19 wysochanski 2009-06-05 20:00 mbroz 2009-06-01 14:43 mbroz 2009-02-03 16:19 wysochanski 2008-04-23 14:33 wysochanski 2008-02-13 20:01 meyering 2008-01-18 22:02 agk 2008-01-16 18:15 agk 2008-01-07 20:42 mbroz 2007-11-15 2:20 agk 2007-10-12 14:08 wysochanski 2007-09-20 21:39 wysochanski 2007-08-30 20:30 wysochanski 2007-08-21 17:38 wysochanski 2007-07-23 17:27 wysochanski
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=20100521125532.22463.qmail@sourceware.org \ --to=zkabelac@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).