[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/2] Call BlkifRing(Acquire/Release)Lock before/after BlkifRingPoll
Releasing the blkif ring lock drains the atomic SRB list into the queue. When attempting to move things along, this also includes the atomic SRB list. Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- src/xenvbd/ring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c index 66e8cdd..1ea1250 100644 --- a/src/xenvbd/ring.c +++ b/src/xenvbd/ring.c @@ -2158,7 +2158,6 @@ BlkifRingDisable( Trace("====> %u\n", BlkifRing->Index); - __BlkifRingAcquireLock(BlkifRing); ASSERT(BlkifRing->Enabled); status = XENBUS_STORE(Read, @@ -2188,8 +2187,10 @@ BlkifRingDisable( break; // Try to move things along + __BlkifRingAcquireLock(BlkifRing); __BlkifRingSend(BlkifRing); (VOID) BlkifRingPoll(BlkifRing); + __BlkifRingReleaseLock(BlkifRing); // We are waiting for a watch event at DISPATCH_LEVEL so // it is our responsibility to poll the store ring. @@ -2200,6 +2201,7 @@ BlkifRingDisable( } } + __BlkifRingAcquireLock(BlkifRing); BlkifRing->Enabled = FALSE; while (!IsListEmpty(&BlkifRing->SubmittedList)) { -- 2.31.1.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |