]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Remove bogus ASSERTion
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 6 Aug 2018 09:47:58 +0000 (10:47 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 6 Aug 2018 09:47:58 +0000 (10:47 +0100)
In a checked build the code in BlkifRingSchedule() sometimes hits the
ASSERTion:

ASSERT3U(State->Count, ==, 0);

This check is there because this code was ported across from XENVIF. In
the context of that driver the check is valid because it should never be
possible to post a partial sequence of netif requests (since that would
violate the protocol). However, in the context of XENVBD posting blkif
requests, it is perfectly reasonable for a subset of blkif requests for
a single SRB to be posted, and hence __BlkifRingPostRequests() may exit
before State->Count falls to zero. Thus the ASSERTion is invalid in this
context and needs to be removed.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvbd/ring.c

index 2f5c876885a0be5fa3b00e67f56e9c274af3501c..d59522623c304b60b9082253d6c11fa695abdc23 100644 (file)
@@ -1419,8 +1419,6 @@ BlkifRingSchedule(
             RING_SIZE(&BlkifRing->Front) / 4)
             __BlkifRingPushRequests(BlkifRing);
 
-        ASSERT3U(State->Count, == , 0);
-
         if (IsListEmpty(&BlkifRing->SrbQueue))
             break;