From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfvlk-0007iF-KD for qemu-devel@nongnu.org; Wed, 08 Apr 2015 15:36:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfvlf-0006Zr-Ek for qemu-devel@nongnu.org; Wed, 08 Apr 2015 15:36:12 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:34007 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfvlf-0006Z5-5F for qemu-devel@nongnu.org; Wed, 08 Apr 2015 15:36:07 -0400 Message-ID: <55258321.3090706@kamp.de> Date: Wed, 08 Apr 2015 21:36:01 +0200 From: Peter Lieven MIME-Version: 1.0 References: <1428437295-29577-1-git-send-email-pl@kamp.de> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block/iscsi: handle zero events from iscsi_which_events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , ronnie sahlberg Cc: Paolo Bonzini , qemu-devel , qemu-block@nongnu.org Am 08.04.2015 um 21:22 schrieb Stefan Hajnoczi: > On Wed, Apr 8, 2015 at 6:08 PM, ronnie sahlberg > wrote: >> The nice part with the current patch of Peter is that qemu and >> libiscsi can be upgraded/downgraded independently. > That's fine for avoiding hassles for existing apps, like QEMU, and I'm > happy to merge the patch. > > For the library's API design it would be return the timeout so that > new applications can avoid polling, but that's just a suggestion. You are right. Paolo also brought up this idea, but as Ronnie said the idea was not to bump the API version. The whole async reconnect stuff works without a change in the client. But polling every 250ms is magnitutes better than having a hung Qemu :-) If you feel 250ms is too often we could also go to 1000ms. The timeout we are talking about is in the order of 1-30 seconds. It only happens when a reconnect is initiated either bei Qemu (due to NOP timeout) or libiscsi (protocol, socket error etc.) and the first reconnect try is not successful. Another idea I had was to encode the timeout in the return value of iscsi_which_events. This would work with all Qemu versions, but I do not know how poll reacts if it gets unknown events passed. So all users other than Qemu that pass the result of iscsi_which_events directly to poll would need to mask the result. Thats not a problem for the tools provided with libiscsi, but I do not know how much other real users except Qemu are out there? Peter