From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 3/4] Use allog_vg for _free_vg in _pvsegs_sub_single
Date: Wed, 09 Mar 2011 09:51:47 +0100 [thread overview]
Message-ID: <4D773FA3.3060200@redhat.com> (raw)
In-Reply-To: <20110309030150.GQ10767@agk-dp.fab.redhat.com>
Dne 9.3.2011 04:01, Alasdair G Kergon napsal(a):
> On Tue, Mar 08, 2011 at 11:30:16PM +0100, Zdenek Kabelac wrote:
>> The major purpose if the patch is to keep also reference count setting in one
>> place (needed in my vg sharing patch) - also whenever someone adds any new
>> member to VG structure - only one place needs to be updated for proper
>> initialization. So I'd still prefer to have this code running through
>> standard allocation procedure.
>
> But the new function is not (yet?) initialising the whole structure.
Idea here was - to keep all dm_list initialization in one place - so whenever
some new list or some similar structure which required to have some non-null
value to be usable - it will be set in one place - so one doesn't need to
track all such places in the code and add dm_list_init in more then one place.
(object encapsulation).
>
> The 'reporter' use is only as a read-only dummy structure to allow us
> to share some code paths. It should not need a vgmem (or reference
> counting), I'd have thought.
I've been not checking all related code paths which may be executed from this
place - so it's been rather pure code refactoring.
It seems like the code below now should actually never allocate anything from
this pool (seem like after my recent fix for allocation from vg mem and using
reporter's mempool possibly fixed it?) and if it does some allocation
somewhere it's bug which should crash the appliction, but currently IMHO there
was no such restriction put or documented in the code.
Zdenek
next prev parent reply other threads:[~2011-03-09 8:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-02 18:20 [PATCH 0/4] Alloc VG Zdenek Kabelac
2011-03-02 18:20 ` [PATCH 1/4] Refactor vg allocation code Zdenek Kabelac
2011-03-02 18:20 ` [PATCH 2/4] Use alloc_vg for _pool_vg_read Zdenek Kabelac
2011-03-02 18:20 ` [PATCH 3/4] Use allog_vg for _free_vg in _pvsegs_sub_single Zdenek Kabelac
2011-03-08 17:09 ` Alasdair G Kergon
2011-03-08 22:30 ` Zdenek Kabelac
2011-03-09 3:01 ` Alasdair G Kergon
2011-03-09 8:51 ` Zdenek Kabelac [this message]
2011-03-02 18:20 ` [PATCH 4/4] Use alloc_vg for forma1_vg_read Zdenek Kabelac
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=4D773FA3.3060200@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.