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

Re: [win-pv-devel] [PATCH] Track StartIo and Failed SRB counts



On Wed, 9 Oct 2019 at 13:45, Owen Smith <owen.smith@xxxxxxxxxx> wrote:
>
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul@xxxxxxx>

> ---
>  src/xenvbd/adapter.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
> index 1ae96cf..5e20944 100644
> --- a/src/xenvbd/adapter.c
> +++ b/src/xenvbd/adapter.c
> @@ -93,6 +93,7 @@ struct _XENVBD_ADAPTER {
>      ULONG                       BuildIo;
>      ULONG                       StartIo;
>      ULONG                       Completed;
> +    ULONG                       Failed;
>  };
>
>  static FORCEINLINE PVOID
> @@ -905,10 +906,11 @@ AdapterDebugCallback(
>                   PowerDeviceStateName(Adapter->DevicePower));
>      XENBUS_DEBUG(Printf,
>                   &Adapter->DebugInterface,
> -                 "ADAPTER: Srbs            : %u built, %u started, %u 
> completed\n",
> +                 "ADAPTER: Srbs            : %u built, %u started, %u 
> completed, %u failed\n",
>                   Adapter->BuildIo,
>                   Adapter->StartIo,
> -                 Adapter->Completed);
> +                 Adapter->Completed,
> +                 Adapter->Failed);
>  }
>
>  static NTSTATUS
> @@ -1503,6 +1505,7 @@ AdapterTeardown(
>      Adapter->BuildIo                = 0;
>      Adapter->StartIo                = 0;
>      Adapter->Completed              = 0;
> +    Adapter->Failed                 = 0;
>
>      ASSERT(IsZeroMemory(Adapter, sizeof(XENVBD_ADAPTER)));
>      Trace("<===== (%d)\n", KeGetCurrentIrql());
> @@ -1518,7 +1521,10 @@ AdapterCompleteSrb(
>
>      ASSERT3U(Srb->SrbStatus, !=, SRB_STATUS_PENDING);
>
> -    InterlockedIncrement((PLONG)&Adapter->Completed);
> +    if (Srb->SrbStatus == SRB_STATUS_SUCCESS)
> +        InterlockedIncrement((PLONG)&Adapter->Completed);
> +    else
> +        InterlockedIncrement((PLONG)&Adapter->Failed);
>
>      StorPortNotification(RequestComplete, Adapter, Srb);
>  }
> @@ -1974,6 +1980,7 @@ AdapterHwStartIo(
>      BOOLEAN                 WasQueued = FALSE;
>      PXENVBD_TARGET          Target;
>
> +    InterlockedIncrement((PLONG)&Adapter->StartIo);
>      Target = AdapterGetTarget(Adapter, Srb->TargetId);
>      if (Target == NULL) {
>          Srb->SrbStatus = SRB_STATUS_NO_DEVICE;
> --
> 2.16.2.windows.1
>
>
> _______________________________________________
> 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®.