From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 4/7] Introduce vg_add_lc and vg_remove_lv functions.
Date: Tue, 12 May 2009 15:37:23 +0200 [thread overview]
Message-ID: <4A097B93.10809@redhat.com> (raw)
In-Reply-To: <87eiuwu69u.fsf@eriador.mornfall.net>
Petr Rockai wrote:
> Btw., would vg_link_lv and vg_unlink_lv describe better what these two
> functions do? It seems a little easy to confuse _add_lv and vg_add_lv, while
> the two do quite a different thing.
yes, renamed
>> @@ -331,7 +330,7 @@ int import_lv(struct dm_pool *mem, struct logical_volume *lv, struct lv_disk *lv
>> lv->alloc = ALLOC_NORMAL;
>>
>> if (!lvd->lv_read_ahead)
>> - lv->read_ahead = lv->vg->cmd->default_settings.read_ahead;
>> + lv->read_ahead = cmd->default_settings.read_ahead;
>> else
>> lv->read_ahead = lvd->lv_read_ahead;
>>
> I'm not sure why is this change needed? (Adding cmd_context parameter to
> import_lv.)
just code shuffle, because lv->vg is initialized later in vg_add_lv and we
need cmd for default settings.
(probably explains some code shuffle later too)
> Does not change what the code does, just shuffles the lines somewhat. It does
> change semantics of import_lv, but that function is never used outside _add_lv
> anyway (would it make sense to make it static _import_lv, in a separate
> patch?).
ok, I'll move it to separate patch
>> + //FIXME: cow still in VG, fix count, remove this later
>> + if (lv->status & SNAPSHOT)
>> + lv->vg->lv_count++;
> ^^ This is indeed ugly (see also my previous mail: it might be worth getting
> rid of lv_count altogether) ... although this patch is a definite improvement,
> it is still suboptimal in this respect.
later patch removes that, I keep it here just that every separate patch can pass
full testing.
Milan
next prev parent reply other threads:[~2009-05-12 13:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 14:42 [PATCH 0/7] Fix lv_count & max_lv problems in lvm2 Milan Broz
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 [this message]
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=4A097B93.10809@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.