mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
sys: hardcode AlwaysUseDoubleBuffering for Reads
This commit is contained in:
parent
6774c34422
commit
4c0386bf8d
@ -1139,12 +1139,10 @@ BOOLEAN FspWriteIrpShouldUseProcessBuffer(PIRP Irp, SIZE_T BufferSize)
|
|||||||
{
|
{
|
||||||
ASSERT(0 != Irp);
|
ASSERT(0 != Irp);
|
||||||
#if DBG
|
#if DBG
|
||||||
return DEBUGTEST(50) ||
|
return DEBUGTEST(50);
|
||||||
#else
|
#else
|
||||||
return FspProcessBufferSizeMax >= BufferSize ||
|
return FspProcessBufferSizeMax >= BufferSize;
|
||||||
#endif
|
#endif
|
||||||
FspFsvolDeviceExtension(IoGetCurrentIrpStackLocation(Irp)->DeviceObject)->
|
|
||||||
VolumeParams.AlwaysUseDoubleBuffering;
|
|
||||||
}
|
}
|
||||||
static inline
|
static inline
|
||||||
BOOLEAN FspQueryDirectoryIrpShouldUseProcessBuffer(PIRP Irp, SIZE_T BufferSize)
|
BOOLEAN FspQueryDirectoryIrpShouldUseProcessBuffer(PIRP Irp, SIZE_T BufferSize)
|
||||||
|
@ -171,6 +171,16 @@ static NTSTATUS FspVolumeCreateNoLock(
|
|||||||
}
|
}
|
||||||
VolumeParams.FileSystemName[sizeof VolumeParams.FileSystemName / sizeof(WCHAR) - 1] = L'\0';
|
VolumeParams.FileSystemName[sizeof VolumeParams.FileSystemName / sizeof(WCHAR) - 1] = L'\0';
|
||||||
|
|
||||||
|
#if !DBG
|
||||||
|
/*
|
||||||
|
* In Release builds we hardcode AlwaysUseDoubleBuffering for Reads as we do not want someone
|
||||||
|
* to use WinFsp to crash Windows.
|
||||||
|
*
|
||||||
|
* See http://www.osronline.com/showthread.cfm?link=282037
|
||||||
|
*/
|
||||||
|
VolumeParams.AlwaysUseDoubleBuffering = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* create volume guid */
|
/* create volume guid */
|
||||||
Result = FspCreateGuid(&Guid);
|
Result = FspCreateGuid(&Guid);
|
||||||
if (!NT_SUCCESS(Result))
|
if (!NT_SUCCESS(Result))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user