From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR2Dv-0004qp-4v for qemu-devel@nongnu.org; Thu, 17 Nov 2011 08:41:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RR2Do-0001Kz-Ro for qemu-devel@nongnu.org; Thu, 17 Nov 2011 08:41:51 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:50013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR2Do-0001Kt-Mz for qemu-devel@nongnu.org; Thu, 17 Nov 2011 08:41:44 -0500 Received: by iakk32 with SMTP id k32so2367776iak.4 for ; Thu, 17 Nov 2011 05:41:40 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4EC50F0F.3020400@redhat.com> Date: Thu, 17 Nov 2011 14:41:35 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1321529765-14863-1-git-send-email-cyliu@suse.com> In-Reply-To: <1321529765-14863-1-git-send-email-cyliu@suse.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chunyan Liu Cc: qemu-devel@nongnu.org On 11/17/2011 12:36 PM, Chunyan Liu wrote: > > Adding lock to the nbd device before connecting disk image to that device to > handling race conditions. This removes the possibility for other programs to lock. Have you checked what happens if you use the same device twice and whether you can piggyback on e.g. an EBUSY from the NBD_SET_SOCK ioctl? Paolo