[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] [PATCH 4/4] Abort any partially completed SRBs



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of owen.smith@xxxxxxxxxx
> Sent: 09 April 2018 09:48
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH 4/4] Abort any partially completed SRBs
> 
> From: Owen Smith <owen.smith@xxxxxxxxxx>
> 
> When disabling, a SRB may be comprised of requests that have been
> prepared and completed. Set the SrbStatus as early as possible, so
> that any partially completed SRB is always failed.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xenvbd/ring.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c
> index ef94513..33b346d 100644
> --- a/src/xenvbd/ring.c
> +++ b/src/xenvbd/ring.c
> @@ -1972,13 +1972,13 @@ RingDisable(
>          SrbExt = Request->SrbExt;
>          Srb = SrbExt->Srb;
> 
> +        Srb->SrbStatus = SRB_STATUS_ABORTED;
> +        Srb->ScsiStatus = 0x40; // SCSI_ABORTED
> +
>          RingPutRequest(Ring, Request);
> 
> -        if (InterlockedDecrement(&SrbExt->RequestCount) == 0) {
> -            Srb->SrbStatus = SRB_STATUS_ABORTED;
> -            Srb->ScsiStatus = 0x40; // SCSI_ABORTED
> +        if (InterlockedDecrement(&SrbExt->RequestCount) == 0)
>              AdapterCompleteSrb(Adapter, SrbExt);
> -        }
>      }
>  }
> 
> --
> 2.8.3
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/win-pv-devel
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.