Received: from eggs.gnu.org ([140.186.70.92]:44099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmGjX-0000VJ-Sg for qemu-devel@nongnu.org; Wed, 27 Jul 2011 22:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmGjW-00072Q-PN for qemu-devel@nongnu.org; Wed, 27 Jul 2011 22:53:59 -0400 Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:53604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmGjW-000711-EZ for qemu-devel@nongnu.org; Wed, 27 Jul 2011 22:53:58 -0400 From: Fernando Luis =?ISO-8859-1?Q?V=E1zquez?= Cao In-Reply-To: <20110727152457.GK18528@redhat.com> References: <20110727152457.GK18528@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 28 Jul 2011 11:53:50 +0900 Message-ID: <1311821631.9256.11.camel@nexus.oss.ntt.co.jp> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC: moving fsfreeze support from the userland guest agent to the guest kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: Jes Sorensen , Luiz Capitulino , qemu-devel@nongnu.org, Michael Roth On Wed, 2011-07-27 at 17:24 +0200, Andrea Arcangeli wrote: > making > sure no lib is calling any I/O function to be able to defreeze the > filesystems later, making sure the oom killer or a wrong kill -9 > $RANDOM isn't killing the agent by mistake while the I/O is blocked > and the copy is going. Yes with the current API if the agent is killed while the filesystems are frozen we are screwed. I have just submitted patches that implement a new API that should make the virtualization use case more reliable. Basically, I am adding a new ioctl, FIGETFREEZEFD, which freezes the indicated filesystem and returns a file descriptor; as long as that file descriptor is held open, the filesystem remains open. If the freeze file descriptor is closed (be it through a explicit call to close(2) or as part of process exit housekeeping) the associated filesystem is automatically thawed. - fsfreeze: add ioctl to create a fd for freeze control http://marc.info/?l=linux-fsdevel&m=131175212512290&w=2 - fsfreeze: add freeze fd ioctls http://marc.info/?l=linux-fsdevel&m=131175220612341&w=2