sys: file change notifications

This commit is contained in:
Bill Zissimopoulos
2016-04-01 13:42:46 -07:00
parent aa81e1ffe5
commit 109e483a2f
7 changed files with 58 additions and 8 deletions

View File

@ -406,9 +406,14 @@ NTSTATUS FspFsvolWriteComplete(
/* if we are top-level */
if (0 == FspIrpTopFlags(Irp))
{
UINT64 OriginalFileSize = FileNode->Header.FileSize.QuadPart;
/* update file info */
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.Write.FileInfo);
if (OriginalFileSize != Response->Rsp.Write.FileInfo.FileSize)
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
/* update the current file offset if synchronous I/O (and not paging I/O) */
if (SynchronousIo && !PagingIo)
FileObject->CurrentByteOffset.QuadPart = WriteToEndOfFile ?