LVM2/lib/format_text format-text.c
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.
lib/format_text/format-text.c +4 -4
@@ -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 */