All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: LVM2 lib/metadata/lv_manip.c lib/metadata/meta ...
Date: Thu, 07 Apr 2011 22:35:52 +0200	[thread overview]
Message-ID: <4D9E2028.4030109@redhat.com> (raw)
In-Reply-To: <7BF6E37A-25E5-4F8A-AC90-461D9AE26EF8@redhat.com>

Dne 7.4.2011 17:20, Jonathan Brassow napsal(a):
> 
> On Apr 7, 2011, at 7:09 AM, Zdenek Kabelac wrote:
> 
>>> +
>>> +	dm_pool_free(lv->vg->cmd->mem, img_name);
>>
>>
>> Aren't you experiencing random crashes with this  dm_pool_free() ?
>> It removes also all objects allocated past this img_name.
>> (Also I think there is already an internal function for building such names)
> 
> No crashes so far... I haven't run into that while running through the test suite or my by-hand tests.  Why would I expect that kind of behavior?

See the comment for dm_pool_free() in libdevmapper.h
As you are allocating LV after img_name - by this pool you are effectively
removing all memory allocated in VG pool after.

> 
> Also, do you know what the name of the internal function would be to replace my 'alloc, fill with template name, create empty lv's, free' sequence?
> 

Ok - it looks like for _mimage_ - there is not yet one - so as there are
already 3 other placed - it might be forth to create one for this purpose.

(Also note - in other case we are already using simplier ,"%s_mimage_%%d",
(see the _split_mirror_images() in mirror.c)

Zdenek



  reply	other threads:[~2011-04-07 20:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 21:32 LVM2 lib/metadata/lv_manip.c lib/metadata/meta jbrassow
2011-04-07 12:09 ` Zdenek Kabelac
2011-04-07 15:20   ` Jonathan Brassow
2011-04-07 20:35     ` Zdenek Kabelac [this message]
2011-04-07 21:36       ` Jonathan Brassow
  -- strict thread matches above, loose matches on Subject: below --
2009-07-26  2:33 wysochanski
2008-08-05 12:05 zkabelac
2008-01-17 13:54 agk
2008-01-17 13:13 agk
2007-12-20 22:37 agk
2007-10-11 19:20 wysochanski
2007-09-24 21:30 wysochanski
2007-08-21 16:40 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=4D9E2028.4030109@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.