public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: mbroz@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/format_text archive.c archiver.c Date: Fri, 10 Apr 2009 10:00:00 -0000 [thread overview] Message-ID: <20090410100038.20359.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mbroz@sourceware.org 2009-04-10 10:00:38 Modified files: lib/format_text: archive.c archiver.c Log message: Properly release VG memory pool in archiver code. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archive.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23 --- LVM2/lib/format_text/archive.c 2008/12/07 04:27:56 1.33 +++ LVM2/lib/format_text/archive.c 2009/04/10 10:00:37 1.34 @@ -326,7 +326,7 @@ log_print("Description:\t%s", desc ? : "<No description>"); log_print("Backup Time:\t%s", ctime(&when)); - dm_pool_free(cmd->mem, vg); + vg_release(vg); tf->fmt->ops->destroy_instance(tf); } --- LVM2/lib/format_text/archiver.c 2009/04/02 21:34:41 1.22 +++ LVM2/lib/format_text/archiver.c 2009/04/10 10:00:37 1.23 @@ -326,6 +326,7 @@ const char *file) { struct volume_group *vg; + int r = 0; /* * Read in the volume group from the text file. @@ -336,10 +337,11 @@ /* * If PV is missing, there is already message from read above */ - if (vg_missing_pv_count(vg)) - return_0; + if (!vg_missing_pv_count(vg)) + r = backup_restore_vg(cmd, vg); - return backup_restore_vg(cmd, vg); + vg_release(vg); + return r; } int backup_restore(struct cmd_context *cmd, const char *vg_name) @@ -414,12 +416,15 @@ (vg->seqno == vg_backup->seqno) && (id_equal(&vg->id, &vg_backup->id))) { log_suppress(old_suppress); + vg_release(vg_backup); return; } log_suppress(old_suppress); - if (vg_backup) + if (vg_backup) { archive(vg_backup); + vg_release(vg_backup); + } archive(vg); backup(vg); }
reply other threads:[~2009-04-10 10:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090410100038.20359.qmail@sourceware.org \ --to=mbroz@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).