From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNnEt-0004rM-RH for qemu-devel@nongnu.org; Tue, 08 Nov 2011 10:05:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNnEk-000502-Gj for qemu-devel@nongnu.org; Tue, 08 Nov 2011 10:05:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNnEk-0004zv-7s for qemu-devel@nongnu.org; Tue, 08 Nov 2011 10:05:18 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA8F5GqD025299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Nov 2011 10:05:16 -0500 Message-ID: <4EB945E9.6050502@redhat.com> Date: Tue, 08 Nov 2011 16:08:25 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1320418284-11081-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1320418284-11081-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/7] reorganize operation of "qemu-nbd -c" and fix it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 04.11.2011 15:51, schrieb Paolo Bonzini: > This is another approach to fixing the breakage of "qemu-nbd -c" due > to mixing fork with threads. It switches operation of qemu-nbd to > threads completely, with the exception of daemonization which is moved > as early as possible to avoid conflicts with threads. > > Patches 1 and 2 are bugfixes to qemu-nbd, the first more or less > unrelated, the second required by the rest of the patch. > > Patches 3 and 4 change "qemu-nbd -c" to operate within a single process. > They are enough to fix the current breakage of "qemu-nbd -c -v", but not > enough for "qemu-nbd -c". For that you need patch 5 too, which moves > the daemonization to before the block layer is initialized. > > Patches 6 and 7 remove more warts that are now easily fixed. > > The patches are large, but unfortunately so is the breakage. > > Paolo Bonzini (7): > nbd: treat EPIPE from NBD_DO_IT as success > qemu-nbd: trap SIGTERM > qemu-nbd: rename socket variable > qemu-nbd: move client to a thread > qemu-nbd: print error messages from the daemon through a pipe > qemu-nbd: fix socket creation race condition > qemu-nbd: open the block device after starting the client thread > > nbd.c | 7 ++ > qemu-nbd.c | 289 +++++++++++++++++++++++++++++++++++++++-------------------- > 2 files changed, 194 insertions(+), 102 deletions(-) Thanks, applied all to the block-stable branch (for 1.0) Kevin