mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-08 04:52:10 -05:00
tst: memfs: fix pending Write
This commit is contained in:
parent
68122b5c68
commit
5a44e5c04a
@ -736,8 +736,7 @@ void SlowioWriteThread(
|
|||||||
PVOID Buffer,
|
PVOID Buffer,
|
||||||
UINT64 Offset,
|
UINT64 Offset,
|
||||||
UINT64 EndOffset,
|
UINT64 EndOffset,
|
||||||
UINT64 RequestHint,
|
UINT64 RequestHint)
|
||||||
FSP_FSCTL_FILE_INFO *FileInfo)
|
|
||||||
{
|
{
|
||||||
SlowioSnooze(FileSystem);
|
SlowioSnooze(FileSystem);
|
||||||
|
|
||||||
@ -751,7 +750,7 @@ void SlowioWriteThread(
|
|||||||
ResponseBuf.Hint = RequestHint; // IRP that is being completed
|
ResponseBuf.Hint = RequestHint; // IRP that is being completed
|
||||||
ResponseBuf.IoStatus.Status = STATUS_SUCCESS;
|
ResponseBuf.IoStatus.Status = STATUS_SUCCESS;
|
||||||
ResponseBuf.IoStatus.Information = BytesTransferred; // bytes written
|
ResponseBuf.IoStatus.Information = BytesTransferred; // bytes written
|
||||||
ResponseBuf.Rsp.Write.FileInfo = *FileInfo; // FileInfo of file after Write
|
MemfsFileNodeGetFileInfo(FileNode, &ResponseBuf.Rsp.Write.FileInfo);
|
||||||
FspFileSystemSendResponse(FileSystem, &ResponseBuf);
|
FspFileSystemSendResponse(FileSystem, &ResponseBuf);
|
||||||
|
|
||||||
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
||||||
@ -1247,7 +1246,7 @@ static NTSTATUS Write(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
InterlockedIncrement(&Memfs->SlowioThreadsRunning);
|
InterlockedIncrement(&Memfs->SlowioThreadsRunning);
|
||||||
try {
|
try {
|
||||||
auto Thread = std::thread(SlowioWriteThread,
|
auto Thread = std::thread(SlowioWriteThread,
|
||||||
FileSystem, FileNode, Buffer, Offset, EndOffset, RequestHint, FileInfo);
|
FileSystem, FileNode, Buffer, Offset, EndOffset, RequestHint);
|
||||||
Thread.detach();
|
Thread.detach();
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user