From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpGKE-0005E1-LC for qemu-devel@nongnu.org; Fri, 05 Aug 2011 05:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpGKD-0005dL-FA for qemu-devel@nongnu.org; Fri, 05 Aug 2011 05:04:14 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:36527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpGKD-0005dB-AR for qemu-devel@nongnu.org; Fri, 05 Aug 2011 05:04:13 -0400 Received: by wye20 with SMTP id 20so1780743wye.4 for ; Fri, 05 Aug 2011 02:04:12 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E3BB203.5060703@redhat.com> Date: Fri, 05 Aug 2011 11:04:03 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Safely reopening image files by stashing fds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Supriya Kannery , Anthony Liguori , qemu-devel On 08/05/2011 10:40 AM, Stefan Hajnoczi wrote: > 4. Implement bdrv_reopen() > > First call bdrv_extract_fds() to stash the file descriptors, then close the > block device. Try opening the new image but if that fails, reopen using the > stashed file descriptors. Why not do the latter unconditionally? Paolo