From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3859 invoked by alias); 29 Jun 2010 13:29:54 -0000 Received: (qmail 3841 invoked by uid 9657); 29 Jun 2010 13:29:54 -0000 Date: Tue, 29 Jun 2010 13:29:00 -0000 Message-ID: <20100629132954.3839.qmail@sourceware.org> From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/format_text format-text.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00100.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@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 */