From: wysochanski@sourceware.org <wysochanski@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/lib/format_text format-text.c
Date: 29 Jun 2010 13:29:54 -0000 [thread overview]
Message-ID: <20100629132954.3839.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2010-06-29 13:29:53
Modified files:
lib/format_text: format-text.c
Log message:
Attempt to fix intermittent failure with non-debug configured vgcfgbackup.
There's an intermittent failure with vgcfgbackup that seems to have been
introduced with the metadataignore / vgmetadatacopies patchset.
Intermittent failures are often the result of uninitialized data,
so this patch calls zalloc in a few places it might matter.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.133&r2=1.134
--- LVM2/lib/format_text/format-text.c 2010/06/28 20:35:17 1.133
+++ LVM2/lib/format_text/format-text.c 2010/06/29 13:29:53 1.134
@@ -1919,7 +1919,7 @@
dm_list_init(&fid->metadata_areas_ignored);
if (!vgname) {
- if (!(mda = dm_pool_alloc(fmt->cmd->mem, sizeof(*mda))))
+ if (!(mda = dm_pool_zalloc(fmt->cmd->mem, sizeof(*mda))))
return_NULL;
mda->ops = &_metadata_text_file_backup_ops;
mda->metadata_locn = context;
@@ -1936,7 +1936,7 @@
}
context = create_text_context(fmt->cmd, path, NULL);
- if (!(mda = dm_pool_alloc(fmt->cmd->mem, sizeof(*mda))))
+ if (!(mda = dm_pool_zalloc(fmt->cmd->mem, sizeof(*mda))))
return_NULL;
mda->ops = &_metadata_text_file_ops;
mda->metadata_locn = context;
@@ -1950,10 +1950,10 @@
if (!_raw_holds_vgname(fid, &rl->dev_area, vgname))
continue;
- if (!(mda = dm_pool_alloc(fmt->cmd->mem, sizeof(*mda))))
+ if (!(mda = dm_pool_zalloc(fmt->cmd->mem, sizeof(*mda))))
return_NULL;
- if (!(mdac = dm_pool_alloc(fmt->cmd->mem, sizeof(*mdac))))
+ if (!(mdac = dm_pool_zalloc(fmt->cmd->mem, sizeof(*mdac))))
return_NULL;
mda->metadata_locn = mdac;
/* FIXME Allow multiple dev_areas inside area */
next reply other threads:[~2010-06-29 13:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 13:29 wysochanski [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-27 9:54 LVM2/lib/format_text format-text.c zkabelac
2011-03-02 10:23 prajnoha
2011-02-28 17:05 prajnoha
2011-02-25 13:50 prajnoha
2011-02-21 12:25 prajnoha
2010-11-29 11:16 zkabelac
2010-08-26 12:22 mbroz
2010-06-28 20:30 wysochanski
2009-07-31 14:23 snitzer
2009-07-30 17:41 snitzer
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=20100629132954.3839.qmail@sourceware.org \
--to=wysochanski@sourceware.org \
--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.