From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmJF9-0005T1-0K for qemu-devel@nongnu.org; Wed, 04 Jul 2012 02:39:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmJF7-0004Vo-Cg for qemu-devel@nongnu.org; Wed, 04 Jul 2012 02:39:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmJF7-0004Vg-4k for qemu-devel@nongnu.org; Wed, 04 Jul 2012 02:39:17 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q646dFCh006531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 4 Jul 2012 02:39:15 -0400 Message-ID: <4FF3E510.8020008@redhat.com> Date: Wed, 04 Jul 2012 08:39:12 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1338963044-21445-1-git-send-email-pbonzini@redhat.com> <1338963044-21445-5-git-send-email-pbonzini@redhat.com> <4FF31286.50000@redhat.com> <4FF317C7.7060109@redhat.com> In-Reply-To: <4FF317C7.7060109@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/6] blkdebug: store list of active rules List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 03.07.2012 18:03, schrieb Paolo Bonzini: > Il 03/07/2012 17:40, Kevin Wolf ha scritto: >>>> case ACTION_INJECT_ERROR: >>>> - vars->inject_errno = rule->options.inject.error; >>>> - vars->inject_once = rule->options.inject.once; >>>> - vars->inject_immediately = rule->options.inject.immediately; >>>> + if (!injected) { >>>> + QSIMPLEQ_INIT(&s->active_rules); >>>> + injected = true; >>>> + } >> Does this mean that the next event will invalidate the active rules? >> Currently it only does so if a rule for the new event exists. > > No, the point of having the injected bool is exactly to keep the > currently active rules unless a rule exists for the new event. We > cannot just do the QSIMPLEQ_INIT in blkdebug_debug_event, that would be > the behavior you describe. Ah, yes. Maybe I should learn reading sometime. Kevin