win-pvdrivers

changeset 874:f5a973a8a10b

Handle shadow entries in dump mode that were created in normal mode when crashing
author James Harper <james.harper@bendigoit.com.au>
date Fri Mar 11 12:38:07 2011 +1100 (2011-03-11)
parents 4722ecc909c3
children 8d7560d67376
files xenvbd/xenvbd_scsiport.c
line diff
     1.1 --- a/xenvbd/xenvbd_scsiport.c	Thu Mar 03 23:21:10 2011 +1100
     1.2 +++ b/xenvbd/xenvbd_scsiport.c	Fri Mar 11 12:38:07 2011 +1100
     1.3 @@ -278,6 +278,12 @@ XenVbd_InitFromConfig(PXENVBD_DEVICE_DAT
     1.4      {
     1.5        xvdd->shadows[i].req.id = i;
     1.6        put_shadow_on_freelist(xvdd, &xvdd->shadows[i]);
     1.7 +      if (dump_mode)
     1.8 +      {
     1.9 +        /* set reset = TRUE to pick up in-flight requests when dump mode kicked in */
    1.10 +        /* do it after put_shadow_on_freelist because that resets the reset flag */
    1.11 +        xvdd->shadows[i].reset = TRUE;
    1.12 +      }
    1.13      }
    1.14    }
    1.15    
    1.16 @@ -439,6 +445,7 @@ XenVbd_PutQueuedSrbsOnRing(PXENVBD_DEVIC
    1.17      ASSERT(shadow);
    1.18      ASSERT(!shadow->aligned_buffer_in_use);
    1.19      ASSERT(!shadow->srb);
    1.20 +    shadow->reset = FALSE;
    1.21      shadow->req.sector_number = sector_number;
    1.22      shadow->req.handle = 0;
    1.23      shadow->req.operation = decode_cdb_is_read(srb)?BLKIF_OP_READ:BLKIF_OP_WRITE;
    1.24 @@ -1575,7 +1582,6 @@ XenVbd_HwScsiResetBus(PVOID DeviceExtens
    1.25  
    1.26    FUNCTION_EXIT();
    1.27  
    1.28 -
    1.29    return TRUE;
    1.30  }
    1.31