mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 17:03:12 -05:00
sys: maintain FO_FILE_MODIFIED bit
This commit is contained in:
parent
9bcd8dcb8e
commit
e0f163e9ba
@ -896,6 +896,9 @@ static NTSTATUS FspFsvolSetAllocationInformation(PFILE_OBJECT FileObject,
|
|||||||
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.SetInformation.FileInfo);
|
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.SetInformation.FileInfo);
|
||||||
FileNode->TruncateOnClose = TRUE;
|
FileNode->TruncateOnClose = TRUE;
|
||||||
|
|
||||||
|
/* mark the file object as modified */
|
||||||
|
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||||
|
|
||||||
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
|
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -996,6 +999,9 @@ static NTSTATUS FspFsvolSetEndOfFileInformation(PFILE_OBJECT FileObject,
|
|||||||
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.SetInformation.FileInfo);
|
FspFileNodeSetFileInfo(FileNode, FileObject, &Response->Rsp.SetInformation.FileInfo);
|
||||||
FileNode->TruncateOnClose = TRUE;
|
FileNode->TruncateOnClose = TRUE;
|
||||||
|
|
||||||
|
/* mark the file object as modified -- FastFat does this only for Allocation though! */
|
||||||
|
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||||
|
|
||||||
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
|
FspFileNodeNotifyChange(FileNode, FILE_NOTIFY_CHANGE_SIZE, FILE_ACTION_MODIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +229,9 @@ static NTSTATUS FspFsvolWriteCached(
|
|||||||
if (SynchronousIo)
|
if (SynchronousIo)
|
||||||
FileObject->CurrentByteOffset.QuadPart = WriteEndOffset;
|
FileObject->CurrentByteOffset.QuadPart = WriteEndOffset;
|
||||||
|
|
||||||
|
/* mark the file object as modified (if not paging I/O) */
|
||||||
|
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||||
|
|
||||||
FspFileNodeRelease(FileNode, Main);
|
FspFileNodeRelease(FileNode, Main);
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
@ -432,6 +435,10 @@ NTSTATUS FspFsvolWriteComplete(
|
|||||||
Response->Rsp.Write.FileInfo.FileSize :
|
Response->Rsp.Write.FileInfo.FileSize :
|
||||||
WriteOffset.QuadPart + Response->IoStatus.Information;
|
WriteOffset.QuadPart + Response->IoStatus.Information;
|
||||||
|
|
||||||
|
/* mark the file object as modified (if not paging I/O) */
|
||||||
|
if (!PagingIo)
|
||||||
|
SetFlag(FileObject->Flags, FO_FILE_MODIFIED);
|
||||||
|
|
||||||
FspIopResetRequest(Request, 0);
|
FspIopResetRequest(Request, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -634,7 +634,8 @@ static NTSTATUS Open(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
* To properly implement this we should maintain some state of whether
|
* To properly implement this we should maintain some state of whether
|
||||||
* we modified the file or not. Alternatively we could have the driver
|
* we modified the file or not. Alternatively we could have the driver
|
||||||
* report to us at Cleanup time whether the file was modified. [The
|
* report to us at Cleanup time whether the file was modified. [The
|
||||||
* driver does not currently maintain the FO_FILE_MODIFIED bit however.]
|
* FSD does maintain the FO_FILE_MODIFIED bit, but does not send it
|
||||||
|
* to us.]
|
||||||
*
|
*
|
||||||
* TBD.
|
* TBD.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user