From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRQj-0005y7-W3 for qemu-devel@nongnu.org; Mon, 16 Feb 2015 14:34:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNRQg-0004zY-4g for qemu-devel@nongnu.org; Mon, 16 Feb 2015 14:34:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRQf-0004yU-T9 for qemu-devel@nongnu.org; Mon, 16 Feb 2015 14:34:02 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1GJY0Ca003012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 16 Feb 2015 14:34:00 -0500 Message-ID: <54E24627.3090104@redhat.com> Date: Mon, 16 Feb 2015 14:33:59 -0500 From: Max Reitz MIME-Version: 1.0 References: <1423257977-25630-1-git-send-email-jsnow@redhat.com> In-Reply-To: <1423257977-25630-1-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3] blkdebug: fix "once" rule List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com On 2015-02-06 at 16:26, John Snow wrote: > Background: > The blkdebug scripts are currently engineered so that when a debug > event occurs, a prefilter browses a master list of parsed rules for a > certain event and adds them to an "active list" of rules to be used for > the forthcoming action, provided the events and state numbers match. > > Then, once the request is received, the last active rule is used to > inject an error if certain parameters match. > > This active list is cleared every time the prefilter injects a new > rule for the first time during a debug event. > > The "once" rule currently causes the error injection, if it is > triggered, to only clear the active list. This is insufficient for > preventing future injections of the same rule. > > Remedy: > This patch /deletes/ the rule from the list that the prefilter > browses, so it is gone for good. In V2, we remove only the rule of > interest from the active list instead of allowing the "once" rule to > clear the entire list of active rules. > > Impact: > This affects iotests 026. Several ENOSPC tests that used "once" can > be seen to have output that shows multiple failure messages. After > this patch, the error messages tend to be smaller and less severe, but > the injection can still be seen to be working. I have patched the > expected output to expect the smaller error messages. > > Signed-off-by: John Snow > --- > > V3: > - Fix interaction of "immediately" and "once" rule > - Remembered that my patch sending script does not work well with > single patches and moved the version history below the commit bump > > V2: > - Remove only the offending "once" rule from the active list instead > of clearing the entire active list. > > block/blkdebug.c | 6 ++++-- > tests/qemu-iotests/026.out | 24 ++++-------------------- > 2 files changed, 8 insertions(+), 22 deletions(-) Thanks, applied to my block tree: https://github.com/XanClic/qemu/commits/block