diff options
| author | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
|---|---|---|
| committer | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
| commit | 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch) | |
| tree | ad5f3ede5cbcd6b598677ce41bcf8318471bdd92 /storage/msdsm/src | |
| parent | 687b274aa38fd05c8c26e3068932121876d7f745 (diff) | |
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'storage/msdsm/src')
| -rw-r--r-- | storage/msdsm/src/SampleDSM.vcxproj | 4 | ||||
| -rw-r--r-- | storage/msdsm/src/SampleDSM.vcxproj.Filters | 8 | ||||
| -rw-r--r-- | storage/msdsm/src/dsmmain.c | 2 | ||||
| -rw-r--r-- | storage/msdsm/src/intrface.c | 24 | ||||
| -rw-r--r-- | storage/msdsm/src/precomp.h | 2 | ||||
| -rw-r--r-- | storage/msdsm/src/utils.c | 38 | ||||
| -rw-r--r-- | storage/msdsm/src/wmi.c | 3 |
7 files changed, 57 insertions, 24 deletions
diff --git a/storage/msdsm/src/SampleDSM.vcxproj b/storage/msdsm/src/SampleDSM.vcxproj index c4870a68..9b5563f5 100644 --- a/storage/msdsm/src/SampleDSM.vcxproj +++ b/storage/msdsm/src/SampleDSM.vcxproj @@ -19,12 +19,12 @@ </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> - <ProjectGuid>{D093D3C3-53D2-4E2A-A634-CFBE482CC29D}</ProjectGuid> + <ProjectGuid>{65A3C0DB-248E-4365-83D2-E4DE6E764C6C}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <SupportsPackaging>false</SupportsPackaging> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{0B2AAAFE-CC5D-4581-92BE-2CFF7879B4E8}</SampleGuid> + <SampleGuid>{C7903CA3-734F-46C5-AECC-1824E8E189EE}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> diff --git a/storage/msdsm/src/SampleDSM.vcxproj.Filters b/storage/msdsm/src/SampleDSM.vcxproj.Filters index ab3c118a..5d097976 100644 --- a/storage/msdsm/src/SampleDSM.vcxproj.Filters +++ b/storage/msdsm/src/SampleDSM.vcxproj.Filters @@ -3,19 +3,19 @@ <ItemGroup> <Filter Include="Source Files"> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> - <UniqueIdentifier>{5467502E-BE53-48E3-9B4D-2727B895913F}</UniqueIdentifier> + <UniqueIdentifier>{DF2838D8-1C88-49F8-9A61-165CDBE203E4}</UniqueIdentifier> </Filter> <Filter Include="Header Files"> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{E67880DC-0E2B-4629-9BC4-6DE655C52134}</UniqueIdentifier> + <UniqueIdentifier>{53AF5736-142C-496F-93D0-CA43CC76BF9C}</UniqueIdentifier> </Filter> <Filter Include="Resource Files"> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions> - <UniqueIdentifier>{77134D09-E871-4C7B-8EBB-BC35E319ABF8}</UniqueIdentifier> + <UniqueIdentifier>{DDA0526B-40A0-4BB7-AAAC-EF10718F6C00}</UniqueIdentifier> </Filter> <Filter Include="Driver Files"> <Extensions>inf;inv;inx;mof;mc;</Extensions> - <UniqueIdentifier>{029DDD29-646E-4A6D-AF49-A8F30315A59D}</UniqueIdentifier> + <UniqueIdentifier>{35E21F2D-00EC-4D8E-A5FC-B6B1E43B41E7}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> diff --git a/storage/msdsm/src/dsmmain.c b/storage/msdsm/src/dsmmain.c index 1b414081..bad147d7 100644 --- a/storage/msdsm/src/dsmmain.c +++ b/storage/msdsm/src/dsmmain.c @@ -2409,7 +2409,7 @@ Return Value: // Create a new entry if the group does not exist in the zombie group list. // if (groupInZombieList == FALSE) { - newZombieGroup = (PDSM_ZOMBIEGROUP_ENTRY)DsmpAllocatePool(NonPagedPool, + newZombieGroup = (PDSM_ZOMBIEGROUP_ENTRY)DsmpAllocatePool(NonPagedPoolNx, sizeof(DSM_ZOMBIEGROUP_ENTRY), DSM_TAG_ZOMBIEGROUP_ENTRY); if (newZombieGroup != NULL) { diff --git a/storage/msdsm/src/intrface.c b/storage/msdsm/src/intrface.c index ab05199a..e7c1eb29 100644 --- a/storage/msdsm/src/intrface.c +++ b/storage/msdsm/src/intrface.c @@ -24,8 +24,6 @@ Environment: --*/ -#define DEBUG_MAIN_SOURCE 1 - #include "precomp.h" #ifdef DEBUG_USE_WPP @@ -36,7 +34,7 @@ Environment: // -// Flag to indicate whether to NT_ASSERT or ignore a paritcular condition. +// Flag to indicate whether to NT_ASSERT or ignore a particular condition. // BOOLEAN DoAssert = TRUE; @@ -452,6 +450,8 @@ Return Value: NT_ASSERT(NT_SUCCESS(ioStatus.Status)); + + return; } @@ -2722,6 +2722,22 @@ Return Value: if (DsmpIsDeviceInitialized(deviceInfo)) { + if (deviceInfo->Unresponsive) { + // + // Since the device is marked unresponsive, there + // is no point in sending RTPG or TUR down + // as that will fail by port driver. + // but that doesn't necessarily mean that the path doesn't exist. + // Return SUCCESS here so that MPIO doesn't remove + // disk in case of failover etc. + // If really this path is gone, this should get deleted + // as part of pnp removal and then if no other paths are left + // disk will be removed + // + status = STATUS_SUCCESS; + return status; + } + irql = ExAcquireSpinLockExclusive(&(dsmCtxt->DsmContextLock)); // @@ -3844,7 +3860,7 @@ Return Value: DsmIds)); // - // Determine whether this is a special-case request - PR or QOS. + // Determine whether this is a special-case request. // if (DsmpReservationCommand(Irp, Srb)) { diff --git a/storage/msdsm/src/precomp.h b/storage/msdsm/src/precomp.h index de4f4e1f..c199724e 100644 --- a/storage/msdsm/src/precomp.h +++ b/storage/msdsm/src/precomp.h @@ -17,6 +17,8 @@ Revision History: #pragma once +#define DEBUG_MAIN_SOURCE 1 + #include <stdio.h> #include <stdarg.h> diff --git a/storage/msdsm/src/utils.c b/storage/msdsm/src/utils.c index 529e7536..2f1bcbe1 100644 --- a/storage/msdsm/src/utils.c +++ b/storage/msdsm/src/utils.c @@ -307,9 +307,10 @@ Return Value: // The query table has two entries. One for the supporteddeviceList and // the second which is the 'NULL' terminator. // - queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_DISABLE_STATISTICS; queryTable[0].EntryContext = StatsGatherChoice; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_SERVICES, registryKeyName, @@ -437,7 +438,7 @@ Return Value: // Indicate that there is NO call-back routine, and to give back the MULTI_SZ as // one blob, as opposed to individual unicode strings. // - queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND; + queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND | RTL_QUERY_REGISTRY_TYPECHECK; // // The value to query. @@ -451,7 +452,7 @@ Return Value: // is why we can't use Context->SupportedDevices directly in the call. // queryTable[0].EntryContext = &inquiryStrings; - queryTable[0].DefaultType = REG_MULTI_SZ; + queryTable[0].DefaultType = (REG_MULTI_SZ << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_MULTI_SZ; queryTable[0].DefaultData = defaultIDs; queryTable[0].DefaultLength = sizeof(defaultIDs); @@ -2921,9 +2922,11 @@ Return Value : RtlZeroMemory(queryTable, sizeof(queryTable)); queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | - RTL_QUERY_REGISTRY_REQUIRED; + RTL_QUERY_REGISTRY_REQUIRED | + RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_LOAD_BALANCE_POLICY; queryTable[0].EntryContext = LoadBalanceType; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, deviceKey, @@ -3191,9 +3194,11 @@ Return Value : RtlZeroMemory(queryTable, sizeof(queryTable)); queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | - RTL_QUERY_REGISTRY_REQUIRED; + RTL_QUERY_REGISTRY_REQUIRED | + RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_LOAD_BALANCE_POLICY; queryTable[0].EntryContext = LoadBalanceType; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, targetKey, @@ -3346,9 +3351,11 @@ Return Value : RtlZeroMemory(queryTable, sizeof(queryTable)); queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | - RTL_QUERY_REGISTRY_REQUIRED; + RTL_QUERY_REGISTRY_REQUIRED | + RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_LOAD_BALANCE_POLICY; queryTable[0].EntryContext = LoadBalanceType; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, parametersKey, @@ -4835,9 +4842,11 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable)); queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | - RTL_QUERY_REGISTRY_REQUIRED; + RTL_QUERY_REGISTRY_REQUIRED | + RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_PATH_WEIGHT; queryTable[0].EntryContext = PathWeight; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; pathWeightQueryStatus = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, dsmPathKey, @@ -4860,9 +4869,11 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable)); queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | - RTL_QUERY_REGISTRY_REQUIRED; + RTL_QUERY_REGISTRY_REQUIRED | + RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_PRIMARY_PATH; queryTable[0].EntryContext = PrimaryPath; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, dsmPathKey, @@ -4878,9 +4889,11 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable)); queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | - RTL_QUERY_REGISTRY_REQUIRED; + RTL_QUERY_REGISTRY_REQUIRED | + RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_OPTIMIZED_PATH; queryTable[0].EntryContext = OptimizedPath; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, dsmPathKey, @@ -7746,9 +7759,10 @@ Return Value: // The query table has two entries. One for the state transition time and // the second which is the 'NULL' terminator. // - queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_MAX_STATE_TRANSITION_TIME_VALUE_NAME; queryTable[0].EntryContext = RetryTime; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_SERVICES, registryKeyName, @@ -7833,10 +7847,10 @@ Return Value: // The query table has two entries. One for whether to use cache, and // and the second which is the 'NULL' terminator. // - queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_USE_CACHE_FOR_LEAST_BLOCKS; queryTable[0].EntryContext = UseCacheForLeastBlocks; - queryTable[0].DefaultType = REG_BINARY; + queryTable[0].DefaultType = (REG_BINARY << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_BINARY; queryTable[0].DefaultLength = sizeof(BOOLEAN); queryTable[0].DefaultData = &useCacheForLeastBlocksDefault; diff --git a/storage/msdsm/src/wmi.c b/storage/msdsm/src/wmi.c index 8dcf309a..090ce8b8 100644 --- a/storage/msdsm/src/wmi.c +++ b/storage/msdsm/src/wmi.c @@ -3603,9 +3603,10 @@ Return Value: RtlZeroMemory(queryTable, sizeof(queryTable)); - queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + queryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_TYPECHECK; queryTable[0].Name = DSM_LOAD_BALANCE_POLICY; queryTable[0].EntryContext = &loadBalanceType; + queryTable[0].DefaultType = (REG_DWORD << RTL_QUERY_REGISTRY_TYPECHECK_SHIFT) | REG_NONE; status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, targetKey, |
