From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDytU-0006mj-Hz for qemu-devel@nongnu.org; Tue, 09 Jun 2009 06:49:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDytP-0006jC-J4 for qemu-devel@nongnu.org; Tue, 09 Jun 2009 06:49:27 -0400 Received: from [199.232.76.173] (port=42024 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDytP-0006j2-EK for qemu-devel@nongnu.org; Tue, 09 Jun 2009 06:49:23 -0400 Received: from mx2.redhat.com ([66.187.237.31]:46438) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDytO-0000dr-SI for qemu-devel@nongnu.org; Tue, 09 Jun 2009 06:49:23 -0400 Message-ID: <4A2E3E2D.1030401@redhat.com> Date: Tue, 09 Jun 2009 13:49:17 +0300 From: Uri Lublin MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] exec-migration: handle EINTR in popen_get_buffer() References: <1244478441-26288-1-git-send-email-uril@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On 06/08/2009 07:55 PM, Blue Swirl wrote: > On 6/8/09, Uri Lublin wrote: >> Sometimes, upon interrupt, fread returns with no data, and >> the (incoming exec) migration fails. >> >> Fix by retrying on such a case. > > Maybe a better solution would be to introduce qemu_{f,}{read,write}, > which handle EINTR and partial reads/writes. > > The migration code does not care about partial reads/writes (at this level). Data is read /written to/from a buffer. When needed/available we retry. I can introduce qemu_{f,}{read,write} which only takes care of EINTR (by retrying) but the caller would have to handle partial reads/writes (and EAGAIN). Would that be helpful ? Thanks, Uri.