From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm5Zi-0001F2-JM for qemu-devel@nongnu.org; Tue, 03 Jul 2012 12:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm5ZZ-0002BJ-S2 for qemu-devel@nongnu.org; Tue, 03 Jul 2012 12:03:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm5ZZ-0002B3-Jl for qemu-devel@nongnu.org; Tue, 03 Jul 2012 12:03:29 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q63G3SV3002263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 3 Jul 2012 12:03:29 -0400 Message-ID: <4FF317C7.7060109@redhat.com> Date: Tue, 03 Jul 2012 18:03:19 +0200 From: Paolo Bonzini 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> In-Reply-To: <4FF31286.50000@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: Kevin Wolf Cc: qemu-devel@nongnu.org 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. Paolo