Commit Graph

896 Commits

Author SHA1 Message Date
c7b3312cf6 sys: disable FSP_FILE_NODE_NO_PGIO 2022-05-17 23:44:16 +01:00
c0fa5696d7 sys: FspVolumeFastTransact 2022-05-17 17:25:18 +01:00
43af829d46 sys,dll,inc: FSP_IOCTL_TRANSACT 2022-05-16 21:40:01 +01:00
df4c19c113 sys: FSP_FILE_NODE_NO_PGIO 2022-04-19 15:21:54 +01:00
deaf475861 sys: FSP_ENTER_FIO: handle bogus fast I/O to fsctl device 2022-04-19 14:29:29 +01:00
1a879e3302 inc, src: PostDispositionWhenNecessaryOnly
- Rename PostDispositionForDirOnly to PostDispositionWhenNecessaryOnly

- Implement PostDispositionWhenNecessaryOnly across the board
2022-04-02 12:48:35 +01:00
98421fe11b inc,sys,tst: fsctl: PostDispositionForDirOnly 2022-04-01 20:54:54 +01:00
d816d607f4 sys: FspFsvolDeviceDirInfoCacheItemSizeMax: increase to 64K 2022-03-24 18:10:04 +00:00
20680fa5b5 sys: FastIo: read/write implementation 2022-03-20 20:31:54 +00:00
29251dc2be sys, dll: convert memory barriers to interlocked operations 2022-01-19 10:55:46 +00:00
04c2f0120c sys: remove wait group (Wgroup) functionality 2022-01-17 14:30:06 +00:00
228f1d658d sys: FspVolumeNotify: allow multiple outstanding calls to FspFileSystemNotifyBegin 2022-01-15 15:46:56 +00:00
57fce78ff3 sys: FspVolumeNotifyWork: always acquire the rename lock shared 2022-01-12 15:43:05 +00:00
751eaa69df update source copyright to 2022 2022-01-07 17:30:49 +00:00
41cc70e573 ARM64: initial port 2021-12-07 14:40:28 +00:00
c208e0ecbd sys: cache FileDesc->DispositionStatus
DeleteFileW and RemoveDirectoryW in recent versions of Windows 10 have
been changed to perform a FileDispositionInformationEx with POSIX
semantics and if that fails to retry with FileDispositionInformation.
Unfortunately this is done even for legitimate error codes such as
STATUS_DIRECTORY_NOT_EMPTY.

This means that user mode file systems have to do unnecessary CanDelete
checks even when they support FileDispositionInformationEx. The extra
check incurs extra context switches, and in some cases it may also be
costly to compute (e.g. FUSE).

We optimize this away by storing the status of the last CanDelete check
in the FileDesc and then continue returning the same status code for
all checks for the same FileDesc.
2021-12-04 12:36:12 +00:00
c32b1c19c2 sys: FspFsvolQueryDirectoryRetry: early exit when pattern not wild 2021-12-03 17:20:50 +00:00
00219f29cf sys: POSIX rename improvements 2021-11-25 10:35:22 +00:00
c4f994f8f6 sys: FspFsvolSetDispositionInformation
return STATUS_FILE_DELETED if file is already deleted
2021-11-24 18:31:48 +00:00
91211f6ccb sys: reimplement POSIX unlink 2021-11-24 16:03:31 +00:00
d72fe2ee33 sys: FspFsvolSetDispositionInformation: ignore FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK flag 2021-11-19 17:16:36 +00:00
9eaaefd154 sys,dll: debug support for DispositionEx, RenameEx 2021-10-21 15:54:38 +01:00
bb3e92df6c sys, dll: implement POSIX semantics for Rename 2021-10-21 15:39:25 +01:00
19823d84de sys,dll,inc: implement new Delete design and POSIX semantics 2021-10-19 15:23:15 +01:00
3e66082f11 sys: FspFsvolQueryDirectoryCopy: fix issue #380 2021-10-13 16:35:02 +01:00
6e3a8f70b2 update source copyright to 2021 2021-05-21 15:57:05 -07:00
ca832988ed dll,sys: fix issue #369
The original WinFsp protocol for shutting down a file system was to issue
an FSP_FSCTL_STOP control code to the fsctl device. This would set the IOQ
to the "stopped" state and would also cancel all active IRP's. Cancelation
of IRP's would sometimes free buffers that may have still been in use by
the user mode file system threads; hence access violation.

To fix this problem a new control code FSP_FSCTL_STOP0 is introduced. The
new file system shutdown protocol is backwards compatible with the original
one and works as follows:

- First the file system process issues an FSP_FSCTL_STOP0 control code which
sets the IOQ to the "stopped" state but does NOT cancel IRP's.

- Then the file system process waits for its dispatcher threads to complete
(see FspFileSystemStopDispatcher).

- Finally the file system process issues an FSP_FSCTL_STOP control code
which stops the (already stopped) IOQ and cancels all IRP's.
2021-05-18 12:30:17 -07:00
33c6e7ee61 sys: fix issue #364 2021-04-16 16:43:34 -07:00
023c925fb6 WinFsp rebranding support 2021-04-12 17:47:34 -07:00
b2e677a3d3 sys: FspFsvolSetBasicInformation: issue #362
According to the FILE_BASIC_INFORMATION doc a file system should not update a file timestamp when it receives a value of -1 in the corresponding time field.

This commit converts a -1 timestamp to a 0 timestamp; this directs a WinFsp file system not to update the corresponding file timestamp.

This commit fixes issue #362
2021-04-06 13:41:35 -07:00
c5b850be35 sys: improve trace functionality 2021-01-25 13:11:10 -08:00
0af0bfbe7c sys: FspFsvolClose: convert CLOSE requests to synchronous when above the IOQ watermark 2021-01-25 12:45:33 -08:00
1dbcae3985 sys: FspTraceNtStatus: fix spelling mistake 2021-01-25 12:44:59 -08:00
a5726c820b sys: add trace functionality 2021-01-13 16:15:06 -08:00
912703cd77 sys: FspBufferUserBuffer: special case Irp->UserBuffer kernel address 2020-10-30 15:39:56 -07:00
e59a49992a sys: FspFileNodeInvalidateCachesAndNotifyChangeByName: flush and purge only 2020-10-17 22:06:49 -07:00
6b4b1dff6c sys: notify implementation 2020-10-09 15:19:51 -07:00
92b7989999 tst: winfsp-tests: notify testing 2020-10-09 15:05:31 -07:00
3687df53c6 sys: wait groups and notify implementation 2020-10-09 12:40:49 -07:00
a004e4be10 sys: notify implementation 2020-10-08 20:49:24 -07:00
7f360827f6 sys: notify implementation 2020-10-08 15:31:41 -07:00
01f91c771d sys: notify implementation 2020-10-07 17:07:35 -07:00
844fb7171e inc,dll,sys: notify implementation skeleton 2020-10-06 16:37:33 -07:00
32a5b2bc64 tst: winfsp-tests: rename_backslash_test 2020-10-01 11:46:55 -07:00
5045403d85 sys: FspFsvolSetRenameInformation: tolerate trailing backslash on target name 2020-09-28 16:01:38 -07:00
84e0744c28 sys: FspVolumeTransact: FSP_FSCTL_TRANSACT_INTERNAL
Zero out OutputBuffer on error to avoid confusion for fsext providers.
2020-07-29 22:51:17 -07:00
0296502f24 sys: FspFsvolReadNonCached: acquire FileNode shared
See GitHub issue #291 for discussion
2020-07-22 15:42:06 -07:00
aa3beba928 sys: silo support 2020-06-05 15:47:19 -07:00
899cd5595d sys: FspIsNtDdiVersionAvailable 2020-06-01 23:11:33 -07:00
2ffb8a1c97 sys: FSP_FSCTL_QUERY_WINFSP
The FSP_FSCTL_QUERY_WINFSP code provides a simple method to determine if
the file system backing a file is a WinFsp file system. To use issue a

    DeviceIoControl(Handle, FSP_FSCTL_QUERY_WINFSP, 0, 0, 0, 0, &Bytes, 0)

If the return value is TRUE this is a WinFsp file system.
2020-05-24 21:04:28 -07:00