From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v1 1/3] kvm tools: Close the disk images after the guest shuts down Date: Wed, 18 May 2011 13:15:31 +0200 Message-ID: <20110518111531.GF16556@elte.hu> References: <1305713837-18889-1-git-send-email-prasadjoshi124@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, penberg@kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, levinsasha928@gmail.com, chaitanyakulkarni15@gmail.com, ashwini.kulkarni@gmail.com To: Prasad Joshi Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:43461 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932168Ab1ERLPg (ORCPT ); Wed, 18 May 2011 07:15:36 -0400 Content-Disposition: inline In-Reply-To: <1305713837-18889-1-git-send-email-prasadjoshi124@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: * Prasad Joshi wrote: > @@ -583,6 +585,11 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix) > exit_code = 1; > } > > + for (i = 0; i < MAX_DISK_IMAGES; i++) { > + if (image_disks[i]) > + disk_image__close(image_disks[i]); > + } Isnt this a method that the disk/image subsystem wants to provide? Or at least it should move into an inline - kvm_cmd_run() is *way* too big already at 200 lines and these patches are how it grows! it should split into several helpers, setting up various aspects of the context, then one separate helper doing the vcpu startup and waiting. Thanks, Ingo