VirtualBox

Changeset 107969 in vbox for trunk


Ignore:
Timestamp:
Jan 28, 2025 3:37:55 PM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167221
Message:

DevVirtioSCSI: comment and indentation fixing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp

    r107851 r107969  
    16451645        if (!pThisCC->fQuiescing)
    16461646        {
    1647              /* Process any reqs that were suspended saved to the redo queue in save exec. */
    1648              for (int i = 0; i < pWorkerR3->cRedoDescs; i++)
    1649              {
     1647            /* Process any reqs that were suspended saved to the redo queue in save exec. */
     1648            for (int i = 0; i < pWorkerR3->cRedoDescs; i++)
     1649            {
    16501650                PVIRTQBUF pVirtqBuf = virtioCoreR3VirtqBufAlloc();
    16511651                if (!pVirtqBuf)
     
    16551655                }
    16561656                int rc = virtioCoreR3VirtqAvailBufGet(pDevIns, &pThis->Virtio, uVirtqNbr,
    1657                                                     pWorkerR3->auRedoDescs[i], pVirtqBuf);
     1657                                                      pWorkerR3->auRedoDescs[i], pVirtqBuf);
    16581658                if (RT_FAILURE(rc))
    16591659                    LogRel(("Error fetching desc chain to redo, %Rrc", rc));
     
    16631663                    LogRel(("Error submitting req packet, resetting %Rrc", rc));
    16641664
    1665                   virtioCoreR3VirtqBufRelease(&pThis->Virtio, pVirtqBuf);
    1666              }
    1667              pWorkerR3->cRedoDescs = 0;
    1668 
    1669              Log6Func(("fetching next descriptor chain from %s\n", VIRTQNAME(uVirtqNbr)));
     1665                virtioCoreR3VirtqBufRelease(&pThis->Virtio, pVirtqBuf);
     1666            }
     1667            pWorkerR3->cRedoDescs = 0;
     1668
     1669            Log6Func(("fetching next descriptor chain from %s\n", VIRTQNAME(uVirtqNbr)));
    16701670            PVIRTQBUF pVirtqBuf = virtioCoreR3VirtqBufAlloc();
    16711671            if (!pVirtqBuf)
     
    17001700
    17011701/*********************************************************************************************************************************
    1702 *   Sending evnets
     1702*   Sending events
    17031703*********************************************************************************************************************************/
    17041704
     
    21462146    AssertMsg(!pThis->cActiveReqs, ("There are still outstanding requests on this device\n"));
    21472147
    2148      pHlp->pfnSSMPutU32(pSSM, pThis->cTargets);
    2149 
    2150      for (uint16_t uTarget = 0; uTarget < pThis->cTargets; uTarget++)
    2151      {
     2148    pHlp->pfnSSMPutU32(pSSM, pThis->cTargets);
     2149
     2150    for (uint16_t uTarget = 0; uTarget < pThis->cTargets; uTarget++)
     2151    {
    21522152        PVIRTIOSCSITARGET pTarget = &pThisCC->paTargetInstances[uTarget];
    21532153
    2154          /* Query all suspended requests and store them in the request queue. */
    2155          if (pTarget->pDrvMediaEx)
    2156          {
    2157              uint32_t cReqsRedo = pTarget->pDrvMediaEx->pfnIoReqGetSuspendedCount(pTarget->pDrvMediaEx);
    2158 
    2159              pHlp->pfnSSMPutU16(pSSM, cReqsRedo);
    2160 
    2161              if (cReqsRedo)
    2162              {
    2163                  PDMMEDIAEXIOREQ hIoReq;
    2164                  PVIRTIOSCSIREQ pReq;
    2165 
    2166                  int rc = pTarget->pDrvMediaEx->pfnIoReqQuerySuspendedStart(pTarget->pDrvMediaEx, &hIoReq,
    2167                                                                             (void **)&pReq);
    2168                  AssertRCBreak(rc);
    2169 
    2170                  while(--cReqsRedo)
    2171                  {
     2154        /* Query all suspended requests and store them in the request queue. */
     2155        if (pTarget->pDrvMediaEx)
     2156        {
     2157            uint32_t cReqsRedo = pTarget->pDrvMediaEx->pfnIoReqGetSuspendedCount(pTarget->pDrvMediaEx);
     2158
     2159            pHlp->pfnSSMPutU16(pSSM, cReqsRedo);
     2160
     2161            if (cReqsRedo)
     2162            {
     2163                PDMMEDIAEXIOREQ hIoReq;
     2164                PVIRTIOSCSIREQ pReq;
     2165
     2166                int rc = pTarget->pDrvMediaEx->pfnIoReqQuerySuspendedStart(pTarget->pDrvMediaEx, &hIoReq,
     2167                                                                           (void **)&pReq);
     2168                AssertRCBreak(rc);
     2169
     2170                while(--cReqsRedo)
     2171                {
    21722172                    pHlp->pfnSSMPutU16(pSSM, pReq->uVirtqNbr);
    21732173                    pHlp->pfnSSMPutU16(pSSM, pReq->pVirtqBuf->uHeadIdx);
     
    21762176                                                                          &hIoReq, (void **)&pReq);
    21772177                    AssertRCBreak(rc);
    2178                  }
    2179              }
    2180          }
    2181      }
     2178                }
     2179            }
     2180        }
     2181    }
    21822182
    21832183    /*
     
    24842484                AssertMsgFailed(("%s Failed to destroythread rc=%Rrc rcThread=%Rrc\n",
    24852485                                 __FUNCTION__, rc, rcThread));
    2486            pThisCC->aWorkers[uVirtqNbr].pThread = NULL;
     2486            pThisCC->aWorkers[uVirtqNbr].pThread = NULL;
    24872487        }
    24882488
     
    25342534    rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "Bootable", &pThis->fBootable, true);
    25352535    if (RT_FAILURE(rc))
    2536          return PDMDEV_SET_ERROR(pDevIns, rc, N_("virtio-scsi configuration error: failed to read Bootable as boolean"));
     2536        return PDMDEV_SET_ERROR(pDevIns, rc, N_("virtio-scsi configuration error: failed to read Bootable as boolean"));
    25372537
    25382538    LogRel(("%s: Targets=%u Bootable=%RTbool (unimplemented) R0Enabled=%RTbool RCEnabled=%RTbool\n",
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette