Compare commits

..

96 Commits

Author SHA1 Message Date
c61679a35d tools: build.bat: make cab file from unsigned drivers 2022-12-05 13:06:18 +00:00
619e41a18e changelog: update for v1.12.22335 2022-12-01 11:09:58 +00:00
80fa156e7b tools: build.bat: remove SHA1 signatures 2022-12-01 10:59:48 +00:00
e1b2e77df0 build: version: 2022.2 2022-10-18 12:19:36 +01:00
4783902d1d tools: make-release.ps1 2022-10-12 16:57:43 +01:00
4cd2b8c612 tools: make-release.ps1 2022-10-12 16:35:40 +01:00
dacaff41e4 changelog: update for v1.12B2 2022-10-12 15:33:18 +01:00
be27a82879 dll: FspCreateDirectoryFileW
On Windows/ARM64 CreateFileW is no longer able to create directories
using the flags FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_POSIX_SEMANTICS.
The new FspCreateDirectoryFileW implements the same semantics and replaces
the previous CreateFileW call.
2022-10-07 11:47:25 +01:00
b9ca46694e sys: FspFileNodeRenameCheck: fix handle oplock break 2022-10-04 15:44:27 +01:00
e50d7adc50 tools: run-tests: retire some tests
Retire some tests that are no longer useful.
This should shorten CI time considerably.
2022-10-04 13:44:31 +01:00
7f73192f8d sys: FspVolumeCreate
If we have an fsvrt device, mount it via opening the volume.
This ensures that the fsvrt is mounted by the correct fsvol
device early on and remedies a rare case where NTFS crashes
the system when it attempts to mount our fsvrt.
2022-10-02 20:10:32 +01:00
d71049225e sys: FSP_DEVICE_EXTENSION: remove unused SiloContainerId 2022-10-02 17:35:07 +01:00
c15006cce8 appveyor: silo testing 2022-09-28 19:06:16 +01:00
53b44dcb5c tst: winfsp-tests: silo testing 2022-09-28 18:46:17 +01:00
a3765d6360 sys: silo: FspSiloPostInitialize 2022-09-27 19:55:08 +01:00
6c6dd8abcc tools: run-tests: disable exec tests for mountmgr 2022-09-26 17:51:05 +01:00
16dd729fc7 tools: run-tests: disable exec tests for mountmgr 2022-09-26 17:50:19 +01:00
a2d49a1ded build: version: 2022.2 Beta2 2022-09-26 17:35:57 +01:00
9ede097e73 changelog: update for v1.12B2 2022-09-26 17:34:36 +01:00
2c3800077f tst: passthrough: GetFileInfoInternal: fix IndexNumber 2022-09-26 17:26:25 +01:00
84b3f98d38 Merge branch 'pvt-fuse-mountmgr' 2022-09-26 17:01:35 +01:00
16734bf37a Merge pull request #450 from chyyran/patch-doc-add-winfsp-rs
doc: Add winfsp-rs to file system libraries
2022-09-26 15:31:26 +01:00
ea189c5b68 dll: fuse: fix mountmgr directory mount points under Cygwin 2022-09-26 15:26:34 +01:00
7735506cc7 legal: add Ronny Chan to contributors 2022-09-25 22:14:11 -04:00
ca3170c293 doc: Add winfsp-rs to file system libraries 2022-09-25 22:09:40 -04:00
ba13995d10 update changelog 2022-09-14 12:26:40 +01:00
deee7edded build: version: v1.12B1 (2022.2 Beta1) 2022-08-30 13:21:31 +01:00
f41f410546 changelog: update for v1.12B1 2022-08-30 13:19:05 +01:00
a2dc40fe3a build: version: v1.12B1 (2022.2 Beta1) 2022-08-30 13:15:57 +01:00
637e8bb8c2 build.version.props: MyFsctlRegisterPath, MyNpRegisterPath, MyEventLogRegisterPath 2022-08-19 17:43:55 +01:00
ec832b45ff changelog: update for v1.12 2022-07-28 17:16:48 +01:00
fc03b485f3 doc: MountUseMountmgrFromFSD 2022-07-28 17:12:26 +01:00
651e45c3ba tools: update DigiCert cross cert 2022-07-01 14:06:26 +01:00
95c2fadce0 build: version: v1.12 (2023) 2022-07-01 00:00:01 +01:00
b4453c89cc tst: winfsp-tests: RejectIrpPriorToTransact0 test fixes 2022-06-30 13:32:31 +01:00
5483dcbd73 dll: FspMountSet_MountmgrDirectory: bug fix 2022-06-29 15:30:36 +01:00
f1cfe758ec sys: RejectIrpPriorToTransact0 is always 1 2022-06-29 15:08:34 +01:00
e9143a73a6 tools: run-tests: mount manager testing 2022-06-28 15:16:13 +01:00
264450f627 tst: winfsp-tests: test mount manager directory support 2022-06-28 14:32:27 +01:00
a731f0e5d8 sys,dll: MountUseMountmgrFromFSD 2022-06-27 17:28:24 +01:00
d7450d740e dll: Mount Manager directory support 2022-06-27 17:27:45 +01:00
5251dcbce9 Merge pull request #431 from xiaogaozi/doc-add-juicefs
doc: add JuiceFS to known file systems
2022-06-22 09:06:13 +01:00
dd3adf34ef Sign contributor agreement 2022-06-22 13:24:51 +08:00
b8a6a8efed Reorder 2022-06-20 13:48:26 +08:00
d67acf3b3a doc: add JuiceFS to known file systems 2022-06-20 13:47:17 +08:00
3b104723af changelog: update for v1.11 2022-06-15 16:45:37 +01:00
699278a7ed appveyor: disable special pool 2022-06-15 10:58:47 +01:00
e070cdd6be build: bump to 2022+ARM64 2022-06-14 23:09:23 +01:00
fbbca110fb README: minor improvements 2022-06-14 23:06:03 +01:00
0083a45e31 doc: registry settings document 2022-06-13 17:52:33 +01:00
faaac2da3c doc: building document 2022-06-13 14:19:59 +01:00
e44cba033f update README 2022-06-12 17:39:23 +01:00
91400babe0 update README 2022-06-11 15:42:03 +01:00
e1ac7b60f7 update README 2022-06-11 15:38:43 +01:00
573897b06e appveyor: skip_commits 2022-06-11 15:25:58 +01:00
b77b0a51f4 appveyor: enable special pool 2022-06-10 17:43:06 +01:00
26af6c9363 sys: convert suitable ERESOURCE to FAST_MUTEX 2022-06-10 16:20:24 +01:00
2e441534a3 sys: FspFsvolDeviceLockVolumeNotify 2022-06-10 16:20:19 +01:00
66f3620808 sys: FSP_FSVOL_DEVICE_EXTENSION::VolumeDeleteResource 2022-06-10 16:20:13 +01:00
805742f306 sys: FSP_FSVOL_DEVICE_EXTENSION::VolumeDeleteResource 2022-06-10 16:20:08 +01:00
18842682c8 sys: inline FspFsvolDeviceFileRename* and FspFsvolDeviceLockContextTable 2022-06-10 16:19:57 +01:00
a7a526351f sys: keep extra fsvol device reference
Reference an fsvol device at CREATE time and dereference at CLOSE time,
to ensure that fsvol remains around for DeviceIoControl operations done
after CLEANUP.
2022-06-09 14:28:31 +01:00
22bf0b09ef dll: FspMountBroadcastDriveChange
Broadcast WM_DEVICECHANGE asynchronously.
2022-06-07 14:06:13 +01:00
0a919d317a dll: FspMountBroadcastDriveChange
Broadcast WM_DEVICECHANGE asynchronously.
2022-06-07 13:11:23 +01:00
8e45f7d795 doc: WinFsp Performance Testing
Update with new tests and analysis for 2022.
2022-06-06 15:58:19 +01:00
646818a65c doc: WinFsp Performance Testing
Update with new tests and analysis for 2022.
2022-06-06 15:44:45 +01:00
6023efa7e6 doc: WinFsp Performance Testing
Update with new tests and analysis for 2022.
2022-06-06 00:32:15 +01:00
2dcb21edf2 tools: perf testing 2022-06-03 22:45:38 +01:00
edc56df2b2 tools: perf testing 2022-06-03 17:54:35 +01:00
64b57476dc changelog: update for v1.11RC1 2022-06-03 12:28:01 +01:00
acfa0ad880 build: version: bump to 2022+ARM64 RC1 2022-06-03 12:26:42 +01:00
d63cbd4146 changelog: update for v1.11B3 2022-06-03 12:25:16 +01:00
a90f19dbe3 dll: FspMountBroadcastDriveChange: fix drive change unitmask 2022-06-03 12:10:54 +01:00
b0cfdc0396 tst: fsbench: OptEmptyCacheDrive, OptOpenCount 2022-06-02 13:10:31 +01:00
69257949ac sys: FspCompareUnicodeString 2022-06-02 13:09:40 +01:00
09ab9de32c tst: memfs: MemfsUpperChar
Bit-twiddling upper case char
2022-05-30 17:08:36 +01:00
75620332c7 tst: memfs: MemfsFileNameCompare
Use fast loop for ASCII and fall back to
CompareStringW for general case.
2022-05-30 14:13:53 +01:00
47aa53c70a dll: FspFsctlServiceVersion
During file system volume creation FspFsctlCreateVolume calls FspFsctlServiceVersion
which examines the version of the driver in use and initializes the variables
FspFsctlTransactCode and FspFsctlTransactBatchCode with either the new
FSP_IOCTL_TRANSACT* codes or the old FSP_FSCTL_TRANSACT* codes.
2022-05-27 18:31:36 +01:00
c343253718 inc: fuse: FSP_FUSE_HAS_GETPATH 2022-05-25 21:11:28 +01:00
6764269a49 dll: MountBroadcastDriveChange registry setting: BSF_POSTMESSAGE 2022-05-25 20:52:54 +01:00
41d69d7186 dll: MountBroadcastDriveChange registry setting 2022-05-25 16:55:54 +01:00
f6e6660362 dll: fuse: gracefully handle ENOSYS from xattr calls 2022-05-23 22:07:37 +01:00
61027daf6e update changelog 2022-05-23 21:38:53 +01:00
9ae9b8ff2c dll: fuse: uidmap option and AzureAD support 2022-05-23 17:53:39 +01:00
74bb51ae07 shared: posix: FspPosixSetUidMap 2022-05-19 00:50:38 +01:00
332ba48203 changelog: update for 2022+ARM64 Beta3 2022-05-18 14:01:43 +01:00
0d7f13abeb changelog: update for 2022+ARM64 Beta3 2022-05-18 13:59:16 +01:00
e88a7742df build: version: bump to 2022+ARM64 Beta3 2022-05-18 13:56:00 +01:00
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
9c1a7fb40b build: sign all artifacts destined for installation 2022-05-16 12:24:25 +01:00
dd907a44ad dll: fuse: ensure MaxComponentLength is initialized 2022-04-25 17:41:42 +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
bda0477a79 tst: fsbench: --empty-cache option 2022-04-19 10:21:31 +01:00
141 changed files with 6189 additions and 1865 deletions

View File

@ -1,6 +1,194 @@
# Changelog # Changelog
## v1.12.22339 (2022.2 Update1)
*Note: This release (`v1.12.22339`) is the same as the previous release (`v1.12`) except that: (1) the kernel-mode drivers are now digitally signed only with the Microsoft Attestation signature, and that: (2) no release assets are digitally signed with SHA-1. (This change was necessary to fix a problem in older versions of Windows such as Windows 7.)*
- [NEW] WinFsp now supports mounting as directory using the Mount Manager. Use the syntax `\\.\C:\Path\To\Mount\Directory`.
- [NEW] A new registry setting `MountUseMountmgrFromFSD` has been added. See [WinFsp Registry Settings](https://github.com/winfsp/winfsp/wiki/WinFsp-Registry-Settings) for details.
- [FIX] A problem with Windows containers has been fixed. (GitHub issue #438.)
- [FIX] File systems can now be mounted as directories on ARM64. (GitHub issue #448.)
- [FIX] The passthrough file system now reports correct `IndexNumber`. (GitHub issue #325.)
- [BUILD] Product configuration for the relative paths to the File System Driver, Network Provider and EventLog is now possible via the file `build.version.props` located in `build\VStudio`.
## v1.12 (2022.2)
- [NEW] WinFsp now supports mounting as directory using the Mount Manager. Use the syntax `\\.\C:\Path\To\Mount\Directory`.
- [NEW] A new registry setting `MountUseMountmgrFromFSD` has been added. See [WinFsp Registry Settings](https://github.com/winfsp/winfsp/wiki/WinFsp-Registry-Settings) for details.
- [FIX] A problem with Windows containers has been fixed. (GitHub issue #438.)
- [FIX] File systems can now be mounted as directories on ARM64. (GitHub issue #448.)
- [FIX] The passthrough file system now reports correct `IndexNumber`. (GitHub issue #325.)
- [BUILD] Product configuration for the relative paths to the File System Driver, Network Provider and EventLog is now possible via the file `build.version.props` located in `build\VStudio`.
## v1.12B2 (2022.2 Beta2)
- [NEW] WinFsp now supports mounting as directory using the Mount Manager. Use the syntax `\\.\C:\Path\To\Mount\Directory`.
- [NEW] A new registry setting `MountUseMountmgrFromFSD` has been added. See [WinFsp Registry Settings](https://github.com/winfsp/winfsp/wiki/WinFsp-Registry-Settings) for details.
- [FIX] A problem with Windows containers has been fixed. (GitHub issue #438.)
- [FIX] File systems can now be mounted as directories on ARM64. (GitHub issue #448.)
- [FIX] The passthrough file system now reports correct `IndexNumber`. (GitHub issue #325.)
- [BUILD] Product configuration for the relative paths to the File System Driver, Network Provider and EventLog is now possible via the file `build.version.props` located in `build\VStudio`.
## v1.12B1 (2022.2 Beta1)
- [NEW] WinFsp now supports mounting as directory using the Mount Manager. Use the syntax `\\.\C:\Path\To\Mount\Directory`.
- [NEW] A new registry setting `MountUseMountmgrFromFSD` has been added. See [WinFsp Registry Settings](https://github.com/winfsp/winfsp/wiki/WinFsp-Registry-Settings) for details.
- [BUILD] Product configuration for the relative paths to the File System Driver, Network Provider and EventLog is now possible via the file `build.version.props` located in `build\VStudio`.
## v1.11 (2022+ARM64)
- [NEW] ARM64 support! For details see [WinFsp on ARM64](https://github.com/winfsp/winfsp/wiki/WinFsp-on-ARM64).
- [NEW] A new file system operation has been added to the FUSE API:
```C
int (*getpath)(const char *path, char *buf, size_t size,
struct fuse_file_info *fi);
```
The `getpath` operation allows a case-insensitive file system to report the correct case of a file path. For example, `getpath` can be used to report that the actual path of a file opened as `/PATH/TO/FILE` is really `/Path/To/File`. This capability is important for some Windows file system scenarios and can sometimes result in a performance improvement.
- [NEW] New `ntptfs` sample file system. This is a production quality pass through file system and should be used instead of the original `passthrough` file system that was developed for education purposes only.
- [NEW] Many performance improvements:
- A new `PostDispositionForDirOnly` setting has been added to `FSP_FSCTL_VOLUME_PARAMS`. This allows a file system to declare that it does not want to see `SetInformation/Disposition` requests for files (such requests will still be sent for directories, because a file system is supposed to check if a directory is empty before deletion). This makes file (not directory) deletion faster. This optimization should be safe to enable for most file systems. FUSE file systems get this optimization for free.
- The FSD now implements "fast I/O" reads and writes. Fast I/O is a technique for doing I/O without using IRP's (I/O Request Packets) and can only work for file systems using the cache manager (`FileInfoTimeout==-1`). This results in significant improvement in read/write scenarios.
- The FSD now implements "fast I/O" for "transact" messages. Transact messages are used in the communication protocol between the kernel-mode FSD and the user-mode file system. Fast I/O speeds this communication protocol by as much as 10% in some scenarios. (Fast I/O for transact messages is enabled only when using the new `FSP_IOCTL_TRANSACT` control code, but does not require any other special configuration to be enabled.)
- The FSD per directory cache limit has been increased from 16K to 64K. This should allow for more directory data to be maintained in kernel and reduce round-trips to the user mode file system.
- The user mode directory buffering mechanism (`FspFileSystemAcquireDirectoryBuffer`) has been improved. The mechanism uses the quick-sort algorithm internally which can exhibit bad performance when sorting already sorted data. The quick-sort algorithm has been improved with the use use of median of three partitioning, which alleviates this problem.
- [NEW] A new registry setting under `HKLM\SOFTWARE\WinFsp` (or `HKLM\SOFTWARE\WOW6432Node\WinFsp` on a 64-bit system) called `MountBroadcastDriveChange` has been introduced, which if set to 1 will broadcast an additional "drive change" message to all top-level windows (including Explorer) during mounting and unmounting.
- Normally the Windows infrastructure broadcasts a `WM_DEVICECHANGE` message whenever a drive gets added/removed. In some rare systems it is possible for this message to get lost or stalled. The workaround for these rare systems is to enable this registry setting, in which case WinFsp will broadcast the `WM_DEVICECHANGE` using a slightly different but more reliable method than the one Windows uses.
- For more details see source code comments at [`FspMountBroadcastDriveChange`](https://github.com/winfsp/winfsp/blob/v1.11B3/src/dll/mount.c#L390-L406).
- [FIX] The WinFsp Network Provider now implements `NPGetUniversalName`. This fixes problems with some apps (e.g. Photos app).
- [FIX] WinFsp-FUSE now supports Azure AD accounts when specifying the `-o uid=-1` option. In addition a new option `-o uidmap=UID:SID` allows the specification of arbitrary UID<->SID or UID<->UserName mappings.
- [FIX] All executables (`*.exe,*.dll,*.sys`) in the WinFsp installation `bin` folder are now signed.
- [FIX] The default value for the registry setting `DistinctPermsForSameOwnerGroup` has been changed from 0 to 1.
- [BUILD] Product configuration (`MyProductName`, etc.) is done by the file `build.version.props` located in `build\VStudio`. This file was previously named `version.properties`.
## v1.11RC1 (2022+ARM64 RC1)
- [NEW] ARM64 support! For details see [WinFsp on ARM64](https://github.com/winfsp/winfsp/wiki/WinFsp-on-ARM64).
- [NEW] A new file system operation has been added to the FUSE API:
```C
int (*getpath)(const char *path, char *buf, size_t size,
struct fuse_file_info *fi);
```
The `getpath` operation allows a case-insensitive file system to report the correct case of a file path. For example, `getpath` can be used to report that the actual path of a file opened as `/PATH/TO/FILE` is really `/Path/To/File`. This capability is important for some Windows file system scenarios and can sometimes result in a performance improvement.
- [NEW] New `ntptfs` sample file system. This is a production quality pass through file system and should be used instead of the original `passthrough` file system that was developed for education purposes only.
- [NEW] Many performance improvements:
- A new `PostDispositionForDirOnly` setting has been added to `FSP_FSCTL_VOLUME_PARAMS`. This allows a file system to declare that it does not want to see `SetInformation/Disposition` requests for files (such requests will still be sent for directories, because a file system is supposed to check if a directory is empty before deletion). This makes file (not directory) deletion faster. This optimization should be safe to enable for most file systems. FUSE file systems get this optimization for free.
- The FSD now implements "fast I/O" reads and writes. Fast I/O is a technique for doing I/O without using IRP's (I/O Request Packets) and can only work for file systems using the cache manager (`FileInfoTimeout==-1`). This results in significant improvement in read/write scenarios.
- The FSD now implements "fast I/O" for "transact" messages. Transact messages are used in the communication protocol between the kernel-mode FSD and the user-mode file system. Fast I/O speeds this communication protocol by as much as 10% in some scenarios. (Fast I/O for transact messages is enabled only when using the new `FSP_IOCTL_TRANSACT` control code, but does not require any other special configuration to be enabled.)
- The FSD per directory cache limit has been increased from 16K to 64K. This should allow for more directory data to be maintained in kernel and reduce round-trips to the user mode file system.
- The user mode directory buffering mechanism (`FspFileSystemAcquireDirectoryBuffer`) has been improved. The mechanism uses the quick-sort algorithm internally which can exhibit bad performance when sorting already sorted data. The quick-sort algorithm has been improved with the use use of median of three partitioning, which alleviates this problem.
- [NEW] A new registry setting under `HKLM\SOFTWARE\WinFsp` (or `HKLM\SOFTWARE\WOW6432Node\WinFsp` on a 64-bit system) called `MountBroadcastDriveChange` has been introduced, which if set to 1 will broadcast an additional "drive change" message to all top-level windows (including Explorer) during mounting and unmounting.
- Normally the Windows infrastructure broadcasts a `WM_DEVICECHANGE` message whenever a drive gets added/removed. In some rare systems it is possible for this message to get lost or stalled. The workaround for these rare systems is to enable this registry setting, in which case WinFsp will broadcast the `WM_DEVICECHANGE` using a slightly different but more reliable method than the one Windows uses.
- For more details see source code comments at [`FspMountBroadcastDriveChange`](https://github.com/winfsp/winfsp/blob/v1.11B3/src/dll/mount.c#L390-L406).
- [FIX] The WinFsp Network Provider now implements `NPGetUniversalName`. This fixes problems with some apps (e.g. Photos app).
- [FIX] WinFsp-FUSE now supports Azure AD accounts when specifying the `-o uid=-1` option. In addition a new option `-o uidmap=UID:SID` allows the specification of arbitrary UID<->SID or UID<->UserName mappings.
- [FIX] All executables (`*.exe,*.dll,*.sys`) in the WinFsp installation `bin` folder are now signed.
- [FIX] The default value for the registry setting `DistinctPermsForSameOwnerGroup` has been changed from 0 to 1.
- [BUILD] Product configuration (`MyProductName`, etc.) is done by the file `build.version.props` located in `build\VStudio`. This file was previously named `version.properties`.
## v1.11B3 (2022+ARM64 Beta3)
- [NEW] ARM64 support! For details see [WinFsp on ARM64](https://github.com/winfsp/winfsp/wiki/WinFsp-on-ARM64).
- [NEW] A new file system operation has been added to the FUSE API:
```C
int (*getpath)(const char *path, char *buf, size_t size,
struct fuse_file_info *fi);
```
The `getpath` operation allows a case-insensitive file system to report the correct case of a file path. For example, `getpath` can be used to report that the actual path of a file opened as `/PATH/TO/FILE` is really `/Path/To/File`. This capability is important for some Windows file system scenarios and can sometimes result in a performance improvement.
- [NEW] New `ntptfs` sample file system. This is a production quality pass through file system and should be used instead of the original `passthrough` file system that was developed for education purposes only.
- [NEW] Many performance improvements:
- A new `PostDispositionForDirOnly` setting has been added to `FSP_FSCTL_VOLUME_PARAMS`. This allows a file system to declare that it does not want to see `SetInformation/Disposition` requests for files (such requests will still be sent for directories, because a file system is supposed to check if a directory is empty before deletion). This makes file (not directory) deletion faster. This optimization should be safe to enable for most file systems. FUSE file systems get this optimization for free.
- The FSD now implements "fast I/O" reads and writes. Fast I/O is a technique for doing I/O without using IRP's (I/O Request Packets) and can only work for file systems using the cache manager (`FileInfoTimeout==-1`). This results in significant improvement in read/write scenarios.
- The FSD now implements "fast I/O" for "transact" messages. Transact messages are used in the communication protocol between the kernel-mode FSD and the user-mode file system. Fast I/O speeds this communication protocol by as much as 10% in some scenarios. (Fast I/O for transact messages is enabled only when using the new `FSP_IOCTL_TRANSACT` control code, but does not require any other special configuration to be enabled.)
- The FSD per directory cache limit has been increased from 16K to 64K. This should allow for more directory data to be maintained in kernel and reduce round-trips to the user mode file system.
- The user mode directory buffering mechanism (`FspFileSystemAcquireDirectoryBuffer`) has been improved. The mechanism uses the quick-sort algorithm internally which can exhibit bad performance when sorting already sorted data. The quick-sort algorithm has been improved with the use use of median of three partitioning, which alleviates this problem.
- [NEW] A new registry setting under `HKLM\SOFTWARE\WinFsp` (or `HKLM\SOFTWARE\WOW6432Node\WinFsp` on a 64-bit system) called `MountBroadcastDriveChange` has been introduced, which if set to 1 will broadcast an additional "drive change" message to all top-level windows (including Explorer) during mounting and unmounting.
- Normally the Windows infrastructure broadcasts a `WM_DEVICECHANGE` message whenever a drive gets added/removed. In some rare systems it is possible for this message to get lost or stalled. The workaround for these rare systems is to enable this registry setting, in which case WinFsp will broadcast the `WM_DEVICECHANGE` using a slightly different but more reliable method than the one Windows uses.
- For more details see source code comments at [`FspMountBroadcastDriveChange`](https://github.com/winfsp/winfsp/blob/v1.11B3/src/dll/mount.c#L390-L406).
- [FIX] The WinFsp Network Provider now implements `NPGetUniversalName`. This fixes problems with some apps (e.g. Photos app).
- [FIX] WinFsp-FUSE now supports Azure AD accounts when specifying the `-o uid=-1` option. In addition a new option `-o uidmap=UID:SID` allows the specification of arbitrary UID<->SID or UID<->UserName mappings.
- [FIX] All executables (`*.exe,*.dll,*.sys`) in the WinFsp installation `bin` folder are now signed.
- [FIX] The default value for the registry setting `DistinctPermsForSameOwnerGroup` has been changed from 0 to 1.
- [BUILD] Product configuration (`MyProductName`, etc.) is done by the file `build.version.props` located in `build\VStudio`. This file was previously named `version.properties`.
## v1.11B2 (2022+ARM64 Beta2) ## v1.11B2 (2022+ARM64 Beta2)
- [NEW] ARM64 support! For details see [WinFsp on ARM64](https://github.com/winfsp/winfsp/wiki/WinFsp-on-ARM64). - [NEW] ARM64 support! For details see [WinFsp on ARM64](https://github.com/winfsp/winfsp/wiki/WinFsp-on-ARM64).

View File

@ -58,6 +58,7 @@ CONTRIBUTOR LIST
|Ben Rubson |ben.rubson at gmail.com |Ben Rubson |ben.rubson at gmail.com
|Bill Zissimopoulos |billziss at navimatics.com |Bill Zissimopoulos |billziss at navimatics.com
|Brett Dutro |brett.dutro at gmail.com |Brett Dutro |brett.dutro at gmail.com
|Changjian Gao (Juicedata, https://juicefs.com) |gcj at juicedata.io
|Colin Atkinson (Atakama, https://atakama.com) |colin at atakama.com |Colin Atkinson (Atakama, https://atakama.com) |colin at atakama.com
|Felix Croes |felix at dworkin.nl |Felix Croes |felix at dworkin.nl
|Francois Karam (KS2, http://www.ks2.fr) |francois.karam at ks2.fr |Francois Karam (KS2, http://www.ks2.fr) |francois.karam at ks2.fr
@ -67,6 +68,7 @@ CONTRIBUTOR LIST
|John Tyner |jtyner at gmail.com |John Tyner |jtyner at gmail.com
|Paweł Wegner (Google LLC, https://google.com) |lemourin at google.com |Paweł Wegner (Google LLC, https://google.com) |lemourin at google.com
|Pedro Frejo (Arpa System, https://arpasystem.com) |pedro.frejo at arpasystem.com |Pedro Frejo (Arpa System, https://arpasystem.com) |pedro.frejo at arpasystem.com
|Ronny Chan |ronny at ronnychan.ca
|Sam Kelly (DuroSoft Technologies LLC, https://durosoft.com) |sam at durosoft.com |Sam Kelly (DuroSoft Technologies LLC, https://durosoft.com) |sam at durosoft.com
|Santiago Ganis |sganis at gmail.com |Santiago Ganis |sganis at gmail.com
|Tobias Urlaub |saibotu at outlook.de |Tobias Urlaub |saibotu at outlook.de

157
README.md
View File

@ -1,141 +1,110 @@
<h1 align="center"> <h1 align="center">WinFsp &middot; Windows File System Proxy</h1>
<img src="art/winfsp-glow.png" width="256"/>
<br/>
<br/>
WinFsp &middot; Windows File System Proxy
</h1>
<p align="center"> <p align="center">
<b>Download</b><br> <img src="art/winfsp-glow.png" width="128"/>
<a href="https://github.com/winfsp/winfsp/releases/latest">
<img src="https://img.shields.io/github/release/winfsp/winfsp.svg?label=stable&style=for-the-badge"/>
</a>
<a href="https://github.com/winfsp/winfsp/releases">
<img src="https://img.shields.io/github/release/winfsp/winfsp/all.svg?label=latest&colorB=e52e4b&style=for-the-badge"/>
</a>
<a href="https://chocolatey.org/packages/winfsp">
<img src="https://img.shields.io/badge/choco-install%20winfsp-black.svg?style=for-the-badge"/>
</a>
<br/> <br/>
<br/> <br/>
<a href="https://ci.appveyor.com/project/billziss-gh/winfsp"> <i>WinFsp enables developers to write their own file systems (i.e. "Windows drives") as user mode programs and without any knowledge of Windows kernel programming. It is similar to FUSE (Filesystem in Userspace) for Linux and other UNIX-like computers.</i>
<img src="https://img.shields.io/appveyor/ci/billziss-gh/winfsp.svg"/>
</a>
<br/> <br/>
<br/> <br/>
WinFsp is a set of software components for Windows computers that allows the creation of user mode file systems. In this sense it is similar to FUSE (Filesystem in Userspace), which provides the same functionality on UNIX-like computers. <a href="https://winfsp.dev"><b>winfsp.dev</b></a>
<br/>
<br/>
<a href="https://github.com/winfsp/winfsp/releases/latest"><img src="https://img.shields.io/github/release/winfsp/winfsp.svg?label=stable&style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0ODAgNDgwIj48cGF0aCBkPSJNMzg3LjAwMiAyMDEuMDAxQzM3Mi45OTggMTMyLjAwMiAzMTIuOTk4IDgwIDI0MCA4MGMtNTcuOTk4IDAtMTA3Ljk5OCAzMi45OTgtMTMyLjk5OCA4MS4wMDFDNDcuMDAyIDE2Ny4wMDIgMCAyMTcuOTk4IDAgMjgwYzAgNjUuOTk2IDUzLjk5OSAxMjAgMTIwIDEyMGgyNjBjNTUgMCAxMDAtNDUgMTAwLTEwMCAwLTUyLjk5OC00MC45OTYtOTYuMDAxLTkyLjk5OC05OC45OTl6TTIwOCAyNTJ2LTc2aDY0djc2aDY4TDI0MCAzNTIgMTQwIDI1Mmg2OHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4="/></a>
<a href="https://github.com/winfsp/winfsp/releases"><img src="https://img.shields.io/github/release/winfsp/winfsp/all.svg?label=latest&colorB=e52e4b&style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0ODAgNDgwIj48cGF0aCBkPSJNMzg3LjAwMiAyMDEuMDAxQzM3Mi45OTggMTMyLjAwMiAzMTIuOTk4IDgwIDI0MCA4MGMtNTcuOTk4IDAtMTA3Ljk5OCAzMi45OTgtMTMyLjk5OCA4MS4wMDFDNDcuMDAyIDE2Ny4wMDIgMCAyMTcuOTk4IDAgMjgwYzAgNjUuOTk2IDUzLjk5OSAxMjAgMTIwIDEyMGgyNjBjNTUgMCAxMDAtNDUgMTAwLTEwMCAwLTUyLjk5OC00MC45OTYtOTYuMDAxLTkyLjk5OC05OC45OTl6TTIwOCAyNTJ2LTc2aDY0djc2aDY4TDI0MCAzNTIgMTQwIDI1Mmg2OHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4="/></a>
<a href="https://chocolatey.org/packages/winfsp"><img src="https://img.shields.io/badge/choco-install%20winfsp-black.svg?style=for-the-badge"/></a>
<br/>
<br/>
<img src="doc/cap.gif" width="75%" height="75%"/>
<br/> <br/>
<br/> <br/>
<img src="doc/cap.gif" height="450"/>
</p> </p>
## Benefits <hr/>
### Stability ## Overview
WinFsp is very stable. There are no known kernel mode crashes and it does not suffer from resource leaks or similar problems. WinFsp owes this stability to its [Design](doc/WinFsp-Design.asciidoc) and its rigorous [Testing Regime](doc/WinFsp-Testing.asciidoc). WinFsp is a platform that provides development and runtime support for custom file systems on Windows computers. Typically any information or storage may be organized and presented as a file system via WinFsp, with the benefit being that the information can be accessed via the standand Windows file APIs by any Windows application.
### Performance The core WinFsp consists of a kernel mode file system driver (FSD) and a user mode DLL. The FSD interfaces with the Windows kernel and handles all interactions necessary to present itself as a file system driver. The DLL interfaces with the FSD and presents an API that can be used to handle file system functions. For example, when an application attempts to open a file, the file system receives an `Open` call with the necessary information.
WinFsp outperforms its competition and in many scenarios performs as well as NTFS. Read more about its [Performance](doc/WinFsp-Performance-Testing.asciidoc). Using WinFsp to build a file system has many benefits:
**Easy development**: Developing kernel mode file systems for Windows is a notoriously difficult task. WinFsp makes file system development relatively painless. This [Tutorial](doc/WinFsp-Tutorial.asciidoc) explains how to build a file system.
**Stability**: Stable software without any known kernel mode crashes, resource leaks or similar problems. WinFsp owes this stability to its [Design](doc/WinFsp-Design.asciidoc) and its rigorous [Testing Regime](doc/WinFsp-Testing.asciidoc).
**Correctness**: Strives for file system correctness and compatibility with NTFS. For details see the [Compatibility](doc/NTFS-Compatibility.asciidoc) document.
**Performance**: Has excellent performance that rivals or exceeds that of NTFS in many file system scenarios. Read more about its [Performance](doc/WinFsp-Performance-Testing.asciidoc).
<p align="center"> <p align="center">
<img src="doc/WinFsp-Performance-Testing/file_tests.png" height="300"/> <img src="doc/WinFsp-Performance-Testing/file_tests.png" height="300"/>
<img src="doc/WinFsp-Performance-Testing/rdwr_tests.png" height="300"/> <img src="doc/WinFsp-Performance-Testing/rdwr_tests.png" height="300"/>
</p> </p>
### Compatibility **Wide support**: Supports Windows 7 to Windows 11 and the x86, x64 and ARM64 architectures.
WinFsp strives for compatibility with NTFS and file system correctness. For the full details see the [Compatibility](doc/NTFS-Compatibility.asciidoc) document. **Flexible API**: Includes Native, FUSE2, FUSE3 and .NET API's.
### Easy to Use **Shell integration**: Provides facilities to integrate user mode file systems with the Windows shell. See the [Service Architecture](doc/WinFsp-Service-Architecture.asciidoc) document.
WinFsp has an easy to use but comprehensive API. **Self-contained**: Self-contained software without external dependencies.
* This simple [Tutorial](doc/WinFsp-Tutorial.asciidoc) explains how to build a file system. **Widely used**: Used in many open-source and commercial applications with millions of installations (estimated: the WinFsp project does not track its users).
* Consult the [API Reference](https://winfsp.dev/apiref) for native development.
* Includes .NET layer for managed development. See [src/dotnet](src/dotnet).
* Includes FUSE 2.8 compatibility layer: [fuse/fuse.h](inc/fuse/fuse.h)
* Includes FUSE 3.2 compatibility layer: [fuse3/fuse.h](inc/fuse3/fuse.h)
### Other Benefits **Flexible licensing**: Available under the [GPLv3](License.txt) license with a special exception for Free/Libre and Open Source Software. A commercial license is also available. Please contact Bill Zissimopoulos \<billziss at navimatics.com> for more details.
* Signed drivers provided on every release. ## Installation
* Available under the [GPLv3](License.txt) license with a special exception for Free/Libre and Open Source Software.
To learn more about WinFsp, please visit its website: https://winfsp.dev Download and run the [WinFsp installer](https://github.com/winfsp/winfsp/releases/latest). In the installer select the option to install the "Developer" files. These include the MEMFS sample file system, but also header and library files that let you develop your own user-mode file system.
## Project Organization <img src="doc/WinFsp-Tutorial/Installer.png" height="290"/>
The project source code is organized as follows: ### Launch a file system for testing
* :file_folder: [build/VStudio](build/VStudio): WinFsp solution and project files. You can test WinFsp by launching MEMFS from the command line:
* :file_folder: [doc](doc): The WinFsp design documents and additional documentation can be found here.
* :file_folder: [ext](ext): External dependencies.
* :file_folder: [ext/tlib](ext/tlib): A small test library originally from the secfs (Secure Cloud File System) project.
* :file_folder: ext/test: Submodule pointing to the secfs.test project, which contains a number of tools for testing Windows and POSIX file systems.
* :file_folder: [inc](inc): Public headers.
* :file_folder: [inc/fuse](inc/fuse): Public headers for the FUSE compatibility layer.
* :file_folder: [inc/fuse3](inc/fuse3): Public headers for the FUSE3 compatibility layer.
* :file_folder: [inc/winfsp](inc/winfsp): Public headers for the WinFsp API.
* :file_folder: [src](src): WinFsp source code.
* :file_folder: [src/dll](src/dll): Source code to the WinFsp DLL.
* :file_folder: [src/dll/fuse](src/dll/fuse): Source code to the FUSE compatibility layer.
* :file_folder: [src/dll/fuse3](src/dll/fuse3): Source code to the FUSE3 compatibility layer.
* :file_folder: [src/dotnet](src/dotnet): Source code to the .NET layer.
* :file_folder: [src/fsptool](src/fsptool): Source code to fsptool command line utility.
* :file_folder: [src/ku](src/ku): Source code that can be used from kernel or user mode.
* :file_folder: [src/launcher](src/launcher): Source code to the launcher service and the launchctl utility.
* :file_folder: [src/sys](src/sys): Source code to the WinFsp FSD.
* :file_folder: [opt/cygfuse](opt/cygfuse): Source code to the FUSE for Cygwin package.
* :file_folder: [tst](tst): Source code to example file systems and test suites.
* :file_folder: [tst/winfsp-tests](tst/winfsp-tests): WinFsp test suite.
* :file_folder: [tools](tools): Various tools for building and testing WinFsp.
## Building and Running ```
billziss@xps ⟩ ~ ⟩ net use X: \\memfs64\test
The command completed successfully.
In order to build WinFsp you will need the following: billziss@xps ⟩ ~ ⟩ X:
billziss@xps ⟩ X:\ ⟩ echo "hello world" > hello.txt
billziss@xps ⟩ X:\ ⟩ dir
* Visual Studio 2015 - 2019
* Windows Driver Kit (WDK) 10
- **NOTE**: When using the latest WDK (Windows 10.0.18362.1) with Visual Studio 2015 you may get an error about a missing task `ValidateNTTargetVersion`. The fix is to edit the file `\Program Files (x86)\Windows Kits\10\build\WindowsDriver.Common.targets` and modify the `UsingTask` line for `ValidateNTTargetVersion` as follows:
```
<UsingTask TaskName="ValidateNTTargetVersion" AssemblyFile="$(WDKContentRoot)build\bin\Microsoft.DriverKit.Build.Tasks.16.0.dll"/>
```
* [Wix toolset](http://wixtoolset.org)
To fully build WinFsp (including the installer) you must use `tools\build.bat`. By default it builds a Release build, but you can choose either the Debug or Release configuration by using the syntax: Directory: X:\
tools\build.bat CONFIGURATION
If you build the driver yourself it will not be signed and Windows will refuse to load it unless you enable "testsigning". You can enable "testsigning" using the command `bcdedit.exe -set testsigning on`. For more information see this [document](doc/WinFsp-Debugging-Setup.asciidoc). Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 6/12/2022 5:15 PM 28 hello.txt
WinFsp is designed to run on Windows 7 and above. It has been tested on the following platforms:
* Windows 7 Enterprise billziss@xps ⟩ X:\ ⟩ type hello.txt
* Windows 8 Pro hello world
* Windows Server 2012 billziss@xps ⟩ X:\ ⟩ cd ~
* Windows 10 Pro billziss@xps ⟩ ~ ⟩ net use X: /delete
* Windows Server 2016 X: was deleted successfully.
* Windows 11 Pro ```
## How to Help MEMFS (and all file systems that use the WinFsp Launcher as documented in the [Service Architecture](doc/WinFsp-Service-Architecture.asciidoc) document) can also be launched from Explorer using the "Map Network Drive" functionality.
I am looking for help in the following areas: ## Resources
* If you have a file system that runs on FUSE please consider porting it to WinFsp. WinFsp has a native API, but it also has a FUSE (high-level) API. **Documentation**:
* If you are working with a language other than C/C++ (e.g. Delphi, Java, etc.) and you are interested in porting/wrapping WinFsp I would love to hear from you.
* There are a number of outstanding issues listed in the [GitHub repository](https://github.com/winfsp/winfsp/issues). Many of these require knowledge of Windows kernel-mode and an understanding of the internals of WinFsp so they are not for the faint of heart.
In all cases I can provide ideas and/or support. - [Tutorial](doc/WinFsp-Tutorial.asciidoc)
## Where to Discuss - [API Reference](doc/WinFsp-API-winfsp.h.md)
If you wish to discuss WinFsp there are now two options: - [Building](doc/WinFsp-Building.asciidoc)
- [Project wiki](https://github.com/winfsp/winfsp/wiki)
**Discussion**:
- [WinFsp Google Group](https://groups.google.com/forum/#!forum/winfsp) - [WinFsp Google Group](https://groups.google.com/forum/#!forum/winfsp)
- [Author's Twitter](https://twitter.com/BZissimopoulos) - [Author's Twitter](https://twitter.com/BZissimopoulos)
## License
WinFsp is available under the [GPLv3](License.txt) license with a special exception for Free/Libre and Open Source Software. A commercial license is also available. Please contact Bill Zissimopoulos \<billziss at navimatics.com> for more details.

View File

@ -1,6 +1,13 @@
version: '{build}' version: '{build}'
skip_tags: true skip_tags: true
skip_commits:
files:
- README.md
- Changelog.md
- Contributors.asciidoc
- art/**
- doc/**
environment: environment:
# Disable the winfsp-tests built-in exception filter to allow WER to collect dumps. # Disable the winfsp-tests built-in exception filter to allow WER to collect dumps.
@ -10,19 +17,25 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CONFIGURATION: Debug CONFIGURATION: Debug
TESTING: Func TESTING: Func
DOCKER_TESTING: None
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CONFIGURATION: Release CONFIGURATION: Release
TESTING: Func TESTING: Func
DOCKER_TESTING: None
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CONFIGURATION: Release CONFIGURATION: Release
TESTING: Func TESTING: Func
DOCKER_TESTING: None
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CONFIGURATION: Release CONFIGURATION: Release
TESTING: Func TESTING: Func
DOCKER_TESTING: Func
#- CONFIGURATION: Release #- CONFIGURATION: Release
# TESTING: Avast # TESTING: Avast
# DOCKER_TESTING: None
#- CONFIGURATION: Release #- CONFIGURATION: Release
# TESTING: Perf # TESTING: Perf
# DOCKER_TESTING: None
init: init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
@ -73,6 +86,8 @@ test_script:
- if %TESTING%==Func 7z x Test.Filter.Driver.zip.001 - if %TESTING%==Func 7z x Test.Filter.Driver.zip.001
- if %TESTING%==Func start /wait msiexec /i "Test.Filter.Driver\HCK Filter.Driver Content-x86_en-us.msi" /qn - if %TESTING%==Func start /wait msiexec /i "Test.Filter.Driver\HCK Filter.Driver Content-x86_en-us.msi" /qn
- if %TESTING%==Func tools\nmake-ext-test.bat %CONFIGURATION% - if %TESTING%==Func tools\nmake-ext-test.bat %CONFIGURATION%
#- ps: . "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\gflags.exe" /k +spp *
- if %DOCKER_TESTING%==Func docker run -d --name=Container0 --isolation=process "-vC:\Program Files (x86)\WinFsp:C:\Program Files (x86)\WinFsp:RO" "-vC:\projects:C:\projects:RO" mcr.microsoft.com/windows/servercore:ltsc2019 cmd.exe /c waitfor 7BF47D72F6664550B03248ECFE77C7DD
- if %TESTING%==Func tools\run-tests.bat %CONFIGURATION% - if %TESTING%==Func tools\run-tests.bat %CONFIGURATION%
- if %TESTING%==Func tools\run-tests.bat %CONFIGURATION% ifstest - if %TESTING%==Func tools\run-tests.bat %CONFIGURATION% ifstest
- if %TESTING%==Func tools\run-tests.bat %CONFIGURATION% sample - if %TESTING%==Func tools\run-tests.bat %CONFIGURATION% sample
@ -80,6 +95,9 @@ test_script:
- if %TESTING%==Avast choco install avastfreeantivirus && fltmc instances -v "C:" - if %TESTING%==Avast choco install avastfreeantivirus && fltmc instances -v "C:"
- if %TESTING%==Avast tools\run-tests.bat %CONFIGURATION% avast-tests - if %TESTING%==Avast tools\run-tests.bat %CONFIGURATION% avast-tests
- if %TESTING%==Perf tools\run-perf-tests.bat %CONFIGURATION% baseline > perf-tests.csv && type perf-tests.csv & appveyor PushArtifact perf-tests.csv - if %TESTING%==Perf tools\run-perf-tests.bat %CONFIGURATION% baseline > perf-tests.csv && type perf-tests.csv & appveyor PushArtifact perf-tests.csv
- if %DOCKER_TESTING%==Func docker exec Container0 cmd.exe /c C:\projects\winfsp\build\VStudio\build\%CONFIGURATION%\winfsp-tests-x64.exe +*
#- if %DOCKER_TESTING%==Func docker run -d --name=Container1 --isolation=process "-vC:\Program Files (x86)\WinFsp:C:\Program Files (x86)\WinFsp:RO" "-vC:\projects:C:\projects:RO" mcr.microsoft.com/windows/servercore:ltsc2019 cmd.exe /c waitfor 7BF47D72F6664550B03248ECFE77C7DD
#- if %DOCKER_TESTING%==Func docker exec Container1 cmd.exe /c C:\projects\winfsp\build\VStudio\build\%CONFIGURATION%\winfsp-tests-x64.exe +*
- choco uninstall winfsp -y - choco uninstall winfsp -y
on_finish: on_finish:

View File

@ -3,10 +3,10 @@
<Import Project="$(MsbuildThisFileDirectory)\build.version.props" /> <Import Project="$(MsbuildThisFileDirectory)\build.version.props" />
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<PreprocessorDefinitions>NTDDI_VERSION=0x06010000;_WIN32_WINNT=0x0601;MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid)</PreprocessorDefinitions> <PreprocessorDefinitions>NTDDI_VERSION=0x06010000;_WIN32_WINNT=0x0601;MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid);MyFsctlRegisterPath=$(MyFsctlRegisterPath);MyNpRegisterPath=$(MyNpRegisterPath);MyEventLogRegisterPath=$(MyEventLogRegisterPath)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid)</PreprocessorDefinitions> <PreprocessorDefinitions>MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid);MyFsctlRegisterPath=$(MyFsctlRegisterPath);MyNpRegisterPath=$(MyNpRegisterPath);MyEventLogRegisterPath=$(MyEventLogRegisterPath)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(IsKernelModeToolset)'=='true'"> <ItemDefinitionGroup Condition="'$(IsKernelModeToolset)'=='true'">

View File

@ -18,12 +18,12 @@
<MyCompanyName>Navimatics LLC</MyCompanyName> <MyCompanyName>Navimatics LLC</MyCompanyName>
<MyCopyright>2015-$([System.DateTime]::Now.ToString(`yyyy`)) Bill Zissimopoulos</MyCopyright> <MyCopyright>2015-$([System.DateTime]::Now.ToString(`yyyy`)) Bill Zissimopoulos</MyCopyright>
<MyCanonicalVersion>1.11</MyCanonicalVersion> <MyCanonicalVersion>1.12</MyCanonicalVersion>
<MyProductVersion>2022+ARM64 Beta2</MyProductVersion> <MyProductVersion>2022.2</MyProductVersion>
<MyProductStage>Beta</MyProductStage> <MyProductStage>Gold</MyProductStage>
<MyCrossCert>DigiCert High Assurance EV Root CA.crt</MyCrossCert> <MyCrossCert>DigiCertGlobalG3CodeSigningECCSHA3842021CA1.cer</MyCrossCert>
<MyCertIssuer>DigiCert</MyCertIssuer> <MyCertIssuer>DigiCert</MyCertIssuer>
<MyVersion>$(MyCanonicalVersion).$(MyBuildNumber)</MyVersion> <MyVersion>$(MyCanonicalVersion).$(MyBuildNumber)</MyVersion>
@ -40,5 +40,37 @@
<!-- When rebranding WinFsp you MUST change the following GUIDs - use VS "Create GUID" tool --> <!-- When rebranding WinFsp you MUST change the following GUIDs - use VS "Create GUID" tool -->
<MyFspFsctlDeviceClassGuid>{ 0x6f9d25fa, 0x6dee, 0x4a9d, { 0x80, 0xf5, 0xe9, 0x8e, 0x14, 0xf3, 0x5e, 0x54 } }</MyFspFsctlDeviceClassGuid> <MyFspFsctlDeviceClassGuid>{ 0x6f9d25fa, 0x6dee, 0x4a9d, { 0x80, 0xf5, 0xe9, 0x8e, 0x14, 0xf3, 0x5e, 0x54 } }</MyFspFsctlDeviceClassGuid>
<MyFspFsvrtDeviceClassGuid>{ 0xb48171c3, 0xdd50, 0x4852, { 0x83, 0xa3, 0x34, 0x4c, 0x50, 0xd9, 0x3b, 0x17 } }</MyFspFsvrtDeviceClassGuid> <MyFspFsvrtDeviceClassGuid>{ 0xb48171c3, 0xdd50, 0x4852, { 0x83, 0xa3, 0x34, 0x4c, 0x50, 0xd9, 0x3b, 0x17 } }</MyFspFsvrtDeviceClassGuid>
<!--
Configure paths used for registration via DllRegisterServer:
- MyFsctlRegisterPath: File System Driver registration path
- MyNpRegisterPath: Network Provider registration path
- MyEventLogRegisterPath: Event Log registration path
These paths are assumed to be relative to the location of the WinFsp DLL during
registration: during DLLRegisterServer the DLL uses PathCombineW to combine its own
location with these paths to produce the final locations to be used for registration.
For example, if the DLL location is `C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll`:
- Combining with the path "." will produce the original DLL location:
`C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll`
- Combining with the path "..\\NetworkProvider.dll" will produce:
`C:\Program Files (x86)\WinFsp\bin\NetworkProvider.dll`
- For Network Provider registrations only it is allowed to use environment variables
in the path. For example combining the above DLL location with the path
"..\\NetworkProvider-\x25PROCESSOR_ARCHITECTURE\x25.dll" will produce:
`C:\Program Files (x86)\WinFsp\bin\NetworkProvider-%PROCESSOR_ARCHITECTURE%.dll`
(Note that the \x25 escape sequence must be used otherwise the VS build system will
try to interpret the string %PROCESSOR_ARCHITECTURE% as an environment variable during
the build.)
-->
<MyFsctlRegisterPath>"."</MyFsctlRegisterPath>
<MyNpRegisterPath>"."</MyNpRegisterPath>
<MyEventLogRegisterPath>"."</MyEventLogRegisterPath>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -48,6 +48,7 @@
<ClInclude Include="..\..\src\shared\um\minimal.h" /> <ClInclude Include="..\..\src\shared\um\minimal.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\src\dll\debug.c" />
<ClCompile Include="..\..\src\dll\dirbuf.c" /> <ClCompile Include="..\..\src\dll\dirbuf.c" />
<ClCompile Include="..\..\src\dll\eventlog.c" /> <ClCompile Include="..\..\src\dll\eventlog.c" />
<ClCompile Include="..\..\src\dll\fuse3\fuse2to3.c" /> <ClCompile Include="..\..\src\dll\fuse3\fuse2to3.c" />
@ -64,7 +65,7 @@
<ClCompile Include="..\..\src\dll\mount.c" /> <ClCompile Include="..\..\src\dll\mount.c" />
<ClCompile Include="..\..\src\dll\np.c" /> <ClCompile Include="..\..\src\dll\np.c" />
<ClCompile Include="..\..\src\dll\security.c" /> <ClCompile Include="..\..\src\dll\security.c" />
<ClCompile Include="..\..\src\dll\debug.c" /> <ClCompile Include="..\..\src\dll\debuglog.c" />
<ClCompile Include="..\..\src\dll\fsctl.c" /> <ClCompile Include="..\..\src\dll\fsctl.c" />
<ClCompile Include="..\..\src\dll\fsop.c" /> <ClCompile Include="..\..\src\dll\fsop.c" />
<ClCompile Include="..\..\src\dll\library.c" /> <ClCompile Include="..\..\src\dll\library.c" />
@ -74,6 +75,7 @@
<ClCompile Include="..\..\src\dll\service.c" /> <ClCompile Include="..\..\src\dll\service.c" />
<ClCompile Include="..\..\src\dll\util.c" /> <ClCompile Include="..\..\src\dll\util.c" />
<ClCompile Include="..\..\src\dll\wksid.c" /> <ClCompile Include="..\..\src\dll\wksid.c" />
<ClCompile Include="..\..\src\shared\ku\mountmgr.c" />
<ClCompile Include="..\..\src\shared\ku\posix.c" /> <ClCompile Include="..\..\src\shared\ku\posix.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -286,7 +288,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My
<MapFileName>$(OutDir)$(TargetFileName).map</MapFileName> <MapFileName>$(OutDir)$(TargetFileName).map</MapFileName>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies);rpcrt4.lib;credui.lib;secur32.lib;version.lib;netapi32.lib;wldap32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);credui.lib;netapi32.lib;rpcrt4.lib;secur32.lib;shlwapi.lib;version.lib;wldap32.lib</AdditionalDependencies>
<StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols> <StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@ -313,7 +315,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My
<MapFileName>$(OutDir)$(TargetFileName).map</MapFileName> <MapFileName>$(OutDir)$(TargetFileName).map</MapFileName>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies);rpcrt4.lib;credui.lib;secur32.lib;version.lib;netapi32.lib;wldap32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);credui.lib;netapi32.lib;rpcrt4.lib;secur32.lib;shlwapi.lib;version.lib;wldap32.lib</AdditionalDependencies>
<StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols> <StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@ -340,7 +342,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My
<MapFileName>$(OutDir)$(TargetFileName).map</MapFileName> <MapFileName>$(OutDir)$(TargetFileName).map</MapFileName>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies);rpcrt4.lib;credui.lib;secur32.lib;version.lib;netapi32.lib;wldap32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);credui.lib;netapi32.lib;rpcrt4.lib;secur32.lib;shlwapi.lib;version.lib;wldap32.lib</AdditionalDependencies>
<StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols> <StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@ -370,7 +372,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My
<MapFileName>$(OutDir)$(TargetFileName).map</MapFileName> <MapFileName>$(OutDir)$(TargetFileName).map</MapFileName>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies);rpcrt4.lib;credui.lib;secur32.lib;version.lib;netapi32.lib;wldap32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);credui.lib;netapi32.lib;rpcrt4.lib;secur32.lib;shlwapi.lib;version.lib;wldap32.lib</AdditionalDependencies>
<StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols> <StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols>
<AdditionalOptions>/PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
@ -401,7 +403,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My
<MapFileName>$(OutDir)$(TargetFileName).map</MapFileName> <MapFileName>$(OutDir)$(TargetFileName).map</MapFileName>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies);rpcrt4.lib;credui.lib;secur32.lib;version.lib;netapi32.lib;wldap32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);credui.lib;netapi32.lib;rpcrt4.lib;secur32.lib;shlwapi.lib;version.lib;wldap32.lib</AdditionalDependencies>
<StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols> <StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols>
<AdditionalOptions>/PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>
@ -432,7 +434,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My
<MapFileName>$(OutDir)$(TargetFileName).map</MapFileName> <MapFileName>$(OutDir)$(TargetFileName).map</MapFileName>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile> <ModuleDefinitionFile>..\..\src\dll\library.def</ModuleDefinitionFile>
<AdditionalDependencies>%(AdditionalDependencies);rpcrt4.lib;credui.lib;secur32.lib;version.lib;netapi32.lib;wldap32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);credui.lib;netapi32.lib;rpcrt4.lib;secur32.lib;shlwapi.lib;version.lib;wldap32.lib</AdditionalDependencies>
<StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols> <StripPrivateSymbols>$(OutDir)$(TargetFileName).public.pdb</StripPrivateSymbols>
<AdditionalOptions>/PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions)</AdditionalOptions>
</Link> </Link>

View File

@ -94,7 +94,7 @@
<ClCompile Include="..\..\src\dll\library.c"> <ClCompile Include="..\..\src\dll\library.c">
<Filter>Source</Filter> <Filter>Source</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\dll\debug.c"> <ClCompile Include="..\..\src\dll\debuglog.c">
<Filter>Source</Filter> <Filter>Source</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\dll\ntstatus.c"> <ClCompile Include="..\..\src\dll\ntstatus.c">
@ -172,6 +172,12 @@
<ClCompile Include="..\..\src\dll\ldap.c"> <ClCompile Include="..\..\src\dll\ldap.c">
<Filter>Source</Filter> <Filter>Source</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\dll\debug.c">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="..\..\src\shared\ku\mountmgr.c">
<Filter>Source\shared\ku</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\..\src\dll\library.def"> <None Include="..\..\src\dll\library.def">

View File

@ -228,6 +228,7 @@
<FilesToPackage Include="$(TargetPath)" /> <FilesToPackage Include="$(TargetPath)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\src\shared\ku\mountmgr.c" />
<ClCompile Include="..\..\src\shared\ku\posix.c" /> <ClCompile Include="..\..\src\shared\ku\posix.c" />
<ClCompile Include="..\..\src\shared\ku\uuid5.c" /> <ClCompile Include="..\..\src\shared\ku\uuid5.c" />
<ClCompile Include="..\..\src\sys\cleanup.c" /> <ClCompile Include="..\..\src\sys\cleanup.c" />

View File

@ -131,6 +131,9 @@
<ClCompile Include="..\..\src\sys\devtimer.c"> <ClCompile Include="..\..\src\sys\devtimer.c">
<Filter>Source</Filter> <Filter>Source</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\shared\ku\mountmgr.c">
<Filter>Source\shared\ku</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\src\sys\driver.h"> <ClInclude Include="..\..\src\sys\driver.h">

View File

@ -11,6 +11,7 @@ This document contains a list of known open-source file systems and file system
- https://github.com/ihaveamac/fuse-3ds[fuse-3ds] - FUSE Filesystem Python scripts for Nintendo 3DS files - https://github.com/ihaveamac/fuse-3ds[fuse-3ds] - FUSE Filesystem Python scripts for Nintendo 3DS files
- https://github.com/sganis/golddrive[golddrive] - Windows ssh network drive - https://github.com/sganis/golddrive[golddrive] - Windows ssh network drive
- https://github.com/winfsp/hubfs[hubfs] - File system for GitHub - https://github.com/winfsp/hubfs[hubfs] - File system for GitHub
- https://github.com/juicedata/juicefs[JuiceFS] - a distributed POSIX file system built on top of Redis and S3
- https://github.com/FrKaram/KS2.Drive[KS2.Drive] - Mount a webDAV/AOS server as a local drive - https://github.com/FrKaram/KS2.Drive[KS2.Drive] - Mount a webDAV/AOS server as a local drive
- https://github.com/winfsp/nfs-win[nfs-win] - NFS for Windows - https://github.com/winfsp/nfs-win[nfs-win] - NFS for Windows
- https://github.com/winfsp/objfs[objfs] - Object Storage File System - https://github.com/winfsp/objfs[objfs] - Object Storage File System
@ -33,3 +34,4 @@ This document contains a list of known open-source file systems and file system
- https://github.com/billziss-gh/fusepy[Python: fusepy] - Simple ctypes bindings for FUSE - https://github.com/billziss-gh/fusepy[Python: fusepy] - Simple ctypes bindings for FUSE
- https://github.com/pleiszenburg/refuse[Python: refuse] - Simple cross-plattform ctypes bindings for libfuse / FUSE for macOS / WinFsp - https://github.com/pleiszenburg/refuse[Python: refuse] - Simple cross-plattform ctypes bindings for libfuse / FUSE for macOS / WinFsp
- https://github.com/Scille/winfspy[Python: winfspy] - WinFSP binding for Python - https://github.com/Scille/winfspy[Python: winfspy] - WinFSP binding for Python
- https://github.com/SnowflakePowered/winfsp-rs[Rust: winfsp-rs] - WinFSP binding for Rust

View File

@ -0,0 +1,59 @@
= WinFsp Building
This document provides instructions on building WinFsp and describes the WinFsp project structure.
== Building
In order to build WinFsp you will need the following:
* Visual Studio 2019
* Windows Driver Kit (WDK)
* https://wixtoolset.org[Wix toolset]
Use the command `tools\build.bat Release` to produce a full build (including the installer). However the resulting product will not be properly signed and Windows will refuse to load the WinFsp driver, unless you enable testsigning with `bcdedit -set testsigning on`.
Producing a fully functional build requires an EV certificate and a Partner Center for Windows Hardware account. Assuming you have those, the steps to produce a full build are as follows:
* Produce a build signed with your EV certificate using `tools\build.bat Release`.
* Upload the signed `driver.cab` file to Microsoft for "attestation signing".
* Download the now Microsoft-signed `driver.cab` file and extract it into a folder (e.g. `signed-drivers`).
* Re-run the build using `tools\build.bat Release PATH\TO\signed-drivers`
== Versioning
WinFsp versioning (and branding) is controlled by the file `build\VStudio\build.version.props`. See the link:WinFsp-Rebranding.asciidoc[WinFsp Rebranding] document for details.
== Project Structure
The WinFsp project is structured as follows:
* 📁 https://github.com/winfsp/winfsp/tree/master/art[art]: Project logo and other art.
* 📁 https://github.com/winfsp/winfsp/tree/master/build[build]: Project build files.
** 📁 https://github.com/winfsp/winfsp/tree/master/build/choco[choco]: Chocolatey package files.
** 📁 https://github.com/winfsp/winfsp/tree/master/build/VStudio[VStudio]: Visual Studio solution and project files.
* 📁 https://github.com/winfsp/winfsp/tree/master/doc[doc]: Project documentation.
* 📁 https://github.com/winfsp/winfsp/tree/master/ext[ext]: External dependencies.
** 📁 https://github.com/winfsp/winfsp/tree/master/ext/tlib[tlib]: Test library for C originally from the secfs project.
** 📁 https://github.com/winfsp/winfsp/tree/master/ext/test[test]: Submodule containing additional file system testing tools.
* 📁 https://github.com/winfsp/winfsp/tree/master/inc[inc]: Public headers.
** 📁 https://github.com/winfsp/winfsp/tree/master/inc/fuse[fuse]: Public headers for the FUSE compatibility layer.
** 📁 https://github.com/winfsp/winfsp/tree/master/inc/fuse3[fuse3]: Public headers for the FUSE3 compatibility layer.
** 📁 https://github.com/winfsp/winfsp/tree/master/inc/winfsp[winfsp]: Public headers for the WinFsp API.
* 📁 https://github.com/winfsp/winfsp/tree/master/opt[opt]: Additional source code and files.
** 📁 https://github.com/winfsp/winfsp/tree/master/opt/cygfuse[cygfuse]: Source code for the FUSE for Cygwin package.
** 📁 https://github.com/winfsp/winfsp/tree/master/opt/fsext[fsext]: Source code for the fsext package.
* 📁 https://github.com/winfsp/winfsp/tree/master/src[src]: Project source code.
** 📁 https://github.com/winfsp/winfsp/tree/master/src/dll[dll]: Source code for the WinFsp DLL.
*** 📁 https://github.com/winfsp/winfsp/tree/master/src/dll/fuse[fuse]: Source code for the FUSE compatibility layer.
*** 📁 https://github.com/winfsp/winfsp/tree/master/src/dll/fuse3[fuse3]: Source code for the FUSE3 compatibility layer.
** 📁 https://github.com/winfsp/winfsp/tree/master/src/dotnet[dotnet]: Source code for the .NET layer.
** 📁 https://github.com/winfsp/winfsp/tree/master/src/fsptool[fsptool]: Source code for the fsptool command line utility.
** 📁 https://github.com/winfsp/winfsp/tree/master/src/launcher[launcher]: Source code for the launcher and the launchctl utility.
** 📁 https://github.com/winfsp/winfsp/tree/master/src/shared[shared]: Shared source code.
*** 📁 https://github.com/winfsp/winfsp/tree/master/src/shared/ku[ku]: Shared source code for kernel and user mode.
*** 📁 https://github.com/winfsp/winfsp/tree/master/src/shared/um[um]: Shared source code for user mode only.
** 📁 https://github.com/winfsp/winfsp/tree/master/src/sys[sys]: Source code for the WinFsp FSD.
* 📁 https://github.com/winfsp/winfsp/tree/master/tools[tools]: Tools for building and testing WinFsp.
* 📁 https://github.com/winfsp/winfsp/tree/master/tst[tst]: Source code for example file systems and test suites.
** 📁 https://github.com/winfsp/winfsp/tree/master/tst/memfs[memfs]: The MEMFS reference file system.
** 📁 https://github.com/winfsp/winfsp/tree/master/tst/winfsp-tests[winfsp-tests]: The primary WinFsp test suite.

View File

@ -1,192 +1,163 @@
= Performance Testing = Performance Testing
:caption:
This document discusses performance testing for WinFsp. The goal of this performance testing is to discover optimization opportunities for WinFsp and compare its performance to that of NTFS and Dokany. This document presents results from performance testing of WinFsp. These results show that WinFsp has excellent performance that rivals or exceeds that of NTFS in many file system scenarios. Some further optimization opportunities are also identified.
== Executive Summary == Summary
This performance testing shows that WinFsp has excellent performance in all tested scenarios. It outperforms NTFS in most scenarios (an unfair comparison as NTFS is a disk file system and WinFsp is tested with an in-memory file system). It also outperforms Dokany in all scenarios, often by an order of magnitude. Two reference WinFsp file systems, MEMFS and NTPTFS, are compared against NTFS in multiple file system scenarios. MEMFS is an in-memory file system, whereas NTPTFS (NT passthrough file system) is a file system that passes all file system requests onto an underlying NTFS file system.
ifdef::env-browser[chart::bar[data-uri="WinFsp-Performance-Testing/file_tests.csv",file="WinFsp-Performance-Testing/file_tests.png",opt="y-label=time"]] The test results are summarized in the charts below. The "File Tests" chart summarizes performance of file path namespace manipulations (e.g. creating/deleting files, opening files, listing files, etc.). The "Read/Write Tests" chart summarizes performance of file I/O (e.g. cached read/write, memory mapped I/O, etc.)
ifndef::env-browser[image::WinFsp-Performance-Testing/file_tests.png[]]
ifdef::env-browser[chart::bar[data-uri="WinFsp-Performance-Testing/rdwr_tests.csv",file="WinFsp-Performance-Testing/rdwr_tests.png",opt="y-label=time"]] The important takeaways are:
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_tests.png[]]
== Fsbench - MEMFS is faster than NTFS is most scenarios. This is a somewhat expected result because MEMFS is an in-memory file system, whereas NTFS is a disk file system. However it shows that WinFsp does not add significant overhead and user mode file systems can be fast.
All testing was performed using a new performance test suite developed as part of WinFsp, called https://github.com/winfsp/winfsp/blob/master/tst/fsbench/fsbench.c[fsbench]. Fsbench was developed because it allows the creation of tests that are important to file system developers; for example, it can answer questions of the type: "how long does it take to delete 1000 files" or "how long does it take to list a directory with 10000 files in it". - MEMFS and NTPTFS both outperform NTFS when doing cached file I/O! This is a significant result because doing file I/O is the primary purpose of a file system. It is also an unexpected result at least in the case of NTPTFS, since NTPTFS runs on top of NTFS.
Fsbench is based on the https://github.com/winfsp/winfsp/tree/master/ext/tlib[tlib] library, originally from the *secfs* project. Tlib is usually used to develop regression test suites in C/C++, but can be also used to create performance tests. The following sections present the testing methodology used, provide instructions for independent verification, describe the individual tests in detail and provide an explanation for the observed results.
Fsbench currently includes the following tests: [cols="a,a", frame=none, grid=none]
[width="100%",cols="20%,60%,20%",options="header"]
|=== |===
|Test |Measures performance of |Parameters |image::WinFsp-Performance-Testing/file_tests.png[]
|file_create_test |CreateFileW(CREATE_NEW) / CloseHandle |file count |image::WinFsp-Performance-Testing/rdwr_tests.png[]
|file_open_test |CreateFileW(OPEN_EXISTING) / CloseHandle |file count
|file_overwrite_test|CreateFileW(CREATE_ALWAYS) / CloseHandle with existing files|file count
|file_list_test |FindFirstFileW / FindNextFile / FindClose |iterations
|file_delete_test |DeleteFileW |file count
|file_mkdir_test |CreateDirectoryW |file count
|file_rmdir_test |RemoveDirectoryW |file count
|rdwr_cc_write_page_test |WriteFile (1 page; cached) |iterations
|rdwr_cc_read_page_test |ReadFile (1 page; cached) |iterations
|rdwr_nc_write_page_test |WriteFile (1 page; non-cached) |iterations
|rdwr_nc_read_page_test |ReadFile (1 page; non-cached) |iterations
|rdwr_cc_write_large_test |WriteFile (16 pages; cached) |iterations
|rdwr_cc_read_large_test |ReadFile (16 pages; cached) |iterations
|rdwr_nc_write_large_test |WriteFile (16 pages; non-cached) |iterations
|rdwr_nc_read_large_test |ReadFile (16 pages; non-cached) |iterations
|mmap_write_test |Memory mapped write test |iterations
|mmap_write_test |Memory mapped read test |iterations
|=== |===
== Tested File Systems == Methodology
=== NTFS A test run consists of performance tests run one after the other (in sequence). The test driver is careful to clear system caches before each test to minimize timing interference between the tests (because we would not want operations performed in test A to affect measurements of test B). Tests are run on an idle computer to minimize interference from third party components.
The comparison to NTFS is very important to establish a baseline. It is also very misleading because NTFS is a disk file system and MEMFS (either the WinFsp or Dokany variants) is an in memory file system. The tests will show that MEMFS is faster than NTFS. This should not be taken to mean that we are trying to make the (obvious) claim that an in memory file system is faster than a disk file system, but to show that the approach of writing a file system in user mode is a valid proposition and can be efficient. Each test run is run a number of times (default: 3) against each file system and the smallest time value for the particular test and file system is chosen. The assumption is that even in a seemingly idle system there is some activity that affects the results; the smallest value is the preferred one to use because it reflects the time when there is less or no other system activity.
=== WinFsp/MEMFS For the NTFS file system we use the default configuration as it ships with Windows (e.g. 8.3 names are enabled). For the NTPTFS file system we disable anti-virus checks on the lower file system, because it makes no sense for NTPTFS to pay for virus checking twice. (Consider an NTPTFS file system that exposes a lower NTFS directory `C:\t` as an upper drive `X:`. Such a file system would have virus checking applied on file accesses to `X:`, but also to its own accesses to `C:\t`. This is unnecessary and counter-productive.)
MEMFS is the file system used to test WinFsp and shipped as a sample bundled with the WinFsp installer. MEMFS is a simple in memory file system and as such is very fast under most conditions. This is desirable because our goal with this performance testing is to measure the speed of the WinFsp system components rather the performance of a complex user mode file system. MEMFS has minimal overhead and is ideal for this purpose. Note that the sequential nature of the tests represents a worst case scenario for WinFsp. The reason is that a single file system operation may require a roundtrip to the user mode file system and such a roundtrip requires two process context switches (i.e. address space and thread switches): one context switch to carry the file system request to the user mode file system and one context switch to carry the response back to the originating process. WinFsp performs better when multiple processes issue file system operations concurrently, because multiple requests are queued in its internal queues and multiple requests can be handled in a single context switch.
WinFsp/MEMFS can be run in different configurations, which enable or disable WinFsp caching features. The tested configurations were: For more information refer to the link:WinFsp-Performance-Testing/WinFsp-Performance-Testing-Analysis.ipynb[Performance Testing Analysis] notebook. This notebook together with the `run-all-perf-tests.bat` script can be used for replication and independent verification of the results presented in this document.
- An infinite FileInfoTimeout, which enables caching of metadata and data. The test environment for the results presented in this document is as follows:
- A FileInfoTimeout of 1s (second), which enables caching of metadata but disables caching of data.
- A FileInfoTimeout of 0, which completely disables caching.
The WinFsp git commit at the time of testing was d804f5674d76f11ea86d14f4bcb1157e6e40e719.
=== Dokany/MEMFS
To achieve fairness when comparing Dokany to WinFsp the MEMFS file system has been ported to Dokany. Substantial care was taken to ensure that WinFsp/MEMFS and Dokany/MEMFS perform equally well, so that the performance of the Dokany FSD and user-mode components can be measured and compared accurately.
The Dokany/MEMFS project has its own https://github.com/billziss-gh/memfs-dokany[repository]. The project comes without a license, which means that it may not be used for any purpose other than as a reference.
The Dokany version used for testing was 1.0.1. The Dokany/MEMFS git commit was 27a678d7c0d5ee2fb3fb2ecc8e38210857ae941c.
== Test Environment
Tests were performed on an idle computer/VM. There was a reboot of both the computer and VM before each file system was tested. Each test was run twice and the smaller time value chosen. The assumption is that even in a seemingly idle desktop system there is some activity which will affect the results; the smaller value is the preferred one to use because it reflects the time when there is less or no other activity.
The test environment was as follows:
---- ----
MacBook Pro (Retina, 13-inch, Early 2015) Dell XPS 13 9300
3.1 GHz Intel Core i7 Intel Core i7-1065G7 CPU
16 GB 1867 MHz DDR3 32GB 3733MHz LPDDR4x RAM
500 GB SSD 2TB M.2 PCIe NVMe SSD
VirtualBox Version 5.0.20 r106931 Windows 11 (64-bit) Version 21H2 (OS Build 22000.258)
1 CPU WinFsp 2022+ARM64 Beta3 (v1.11B3)
4 GB RAM
80 GB Dynamically allocated differencing storage
Windows 10 (64-bit) Version 1511 (OS Build 10586.420)
---- ----
== Test Results == Results
In the graphs below we use consistent coloring to quickly identify a file system. Red is used for NTFS, yellow for WinFsp/MEMFS with a FileInfoTimeout of 0, green for WinFsp/MEMFS with a FileInfoTimeout of 1, light blue for WinFsp/MEMFS with an infinite FileInfoTimeout and deep blue for Dokany/MEMFS. In the charts below we use consistent coloring and markers to quickly identify a file system. Blue and the letter 'N' is used for NTFS, orange and the letter 'M' is used for MEMFS, green and the letter 'P' is used for NTPTFS.
In bar charts shorter bars are better. In plot charts lower times are better. (Better means that the file system is faster).
In all tests lower times are better (the file system is faster).
=== File Tests === File Tests
These tests measure the performance of creating, opening, overwriting and listing files and directories. File tests are tests that are performed against the hierarchical path namespace of a file system. These tests measure the performance of creating, opening, overwriting, listing and deleting files.
Measured times for these tests are normalized against the NTFS time (so that the NTFS value is always 1). This allows for easy comparison between file systems across all file tests.
MEMFS has the best performance in most of these tests. NTFS performs better in some tests; these are discussed further below. NTPTFS is last as it has the overhead of both NTFS and WinFsp.
image::WinFsp-Performance-Testing/file_tests.png[]
==== file_create_test ==== file_create_test
This test measures the performance of CreateFileW(CREATE_NEW) / CloseHandle. WinFsp has the best performance here. Dokany follows and NTFS is last as it has to actually update its data structures on disk. This test measures the performance of creating new files using `CreateFileW(CREATE_NEW)` / `CloseHandle`. MEMFS has the best performance here, while NTFS has worse performance as it has to update its data structures on disk.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_create_test.csv",file="WinFsp-Performance-Testing/file_create_test.png",opt="x-label=file count,y-label=time"]] image::WinFsp-Performance-Testing/file_create_test.png[]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_create_test.png[]]
==== file_open_test ==== file_open_test
This test measures the performance of CreateFileW(OPEN_EXISTING) / CloseHandle. WinFsp again has the best (although uneven) performance, followed by NTFS and then Dokany. This test measures the performance of opening different files using `CreateFileW(OPEN_EXISTING)` / `CloseHandle`. MEMFS again has the best performance, followed by NTFS and then NTPTFS.
WinFsp appears to have very uneven performance here. In particular notice that opening 1000 files is slower than opening 2000 files, which makes no sense! I suspect that the test observes an initial acquisition of resouces when the test first starts, which is not necessary when the test runs for 2000 files at a later time. This uneven performance should probably be investigated in the future. image::WinFsp-Performance-Testing/file_open_test.png[]
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_open_test.csv",file="WinFsp-Performance-Testing/file_open_test.png",opt="x-label=file count,y-label=time"]] ==== iter.file_open_test
ifndef::env-browser[image::WinFsp-Performance-Testing/file_open_test.png[]]
This test measures the performance of opening the same files repeatedly using `CreateFileW(OPEN_EXISTING)` / `CloseHandle`. NTFS has the best performance, with MEMFS following and NTPTFS a distant third.
This test shows that NTFS does a better job than WinFsp when re-opening a file. The problem is that in most cases the WinFsp API design requires a round-trip to the user mode file system when opening a file. Improving WinFsp performance here would likely require substantial changes to the WinFsp API.
image::WinFsp-Performance-Testing/iter.file_open_test.png[]
==== file_overwrite_test ==== file_overwrite_test
This test measures the performance of CreateFileW(CREATE_ALWAYS) / CloseHandle. WinFsp is fastest, followed by NTFS and then Dokany. This test measures the performance of overwriting files using `CreateFileW(CREATE_ALWAYS)` / `CloseHandle`. MEMFS is fastest, followed by NTFS and then NTPTFS.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_overwrite_test.csv",file="WinFsp-Performance-Testing/file_overwrite_test.png",opt="x-label=file count,y-label=time"]] image::WinFsp-Performance-Testing/file_overwrite_test.png[]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_overwrite_test.png[]]
==== file_list_test ==== file_list_test
This test measures the performance of FindFirstFileW / FindNextFile / FindClose. NTFS wins this scenario, likely because it can satisfy the list operation from cache. WinFsp has overall good performance. Dokany appears to show slightly quadratic performance in this scenario. This test measures the performance of listing files using `FindFirstFileW` / `FindNextFile` / `FindClose`. MEMFS is again fastest with NTFS and NTPTFS following.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_list_test.csv",file="WinFsp-Performance-Testing/file_list_test.png",opt="x-label=file count,y-label=time"]] It should be noted that NTFS can perform better in this test, if 8.3 (i.e. short) names are disabled (see `fsutil 8dot3name`). However Microsoft ships NTFS with 8.3 names enabled by default and these tests are performed against the default configuration of NTFS.
ifndef::env-browser[image::WinFsp-Performance-Testing/file_list_test.png[]]
image::WinFsp-Performance-Testing/file_list_test.png[]
==== file_list_single_test
This test measures the performance of listing a single file using `FindFirstFileW` / `FindNextFile` / `FindClose`. NTFS has again best performance, with MEMFS following and NTPTFS a distant third.
This test shows that NTFS does a better job than WinFsp at caching directory data. Improving WinFsp performance here would likely require a more aggressive and/or intelligent directory caching scheme than the one used now.
image::WinFsp-Performance-Testing/file_list_single_test.png[]
==== file_delete_test ==== file_delete_test
This test measures the performance of DeleteFileW. WinFsp has the best performance, followed by Dokany and NTFS with very similar performance. This test measures the performance of deleting files using `DeleteFileW`. MEMFS has the best performance, followed by NTFS and NTPTFS.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_delete_test.csv",file="WinFsp-Performance-Testing/file_delete_test.png",opt="x-label=file count,y-label=time"]] image::WinFsp-Performance-Testing/file_delete_test.png[]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_delete_test.png[]]
=== Read/Write Tests === Read/Write Tests
These tests measure the performance of cached, non-cached and memory-mapped I/O. Read/write tests are tests that measure the performance of cached, non-cached and memory-mapped I/O.
==== rdwr_cc_write_page_test Measured times for these tests are normalized against the NTFS time (so that the NTFS value is always 1). This allows for easy comparison between file systems across all read/write tests.
This test measures the performance of cached WriteFile with 1 page writes. NTFS and WinFsp with an infinite FileInfoTimeout have the best performance, with a clear edge to NTFS (likely because of its use of FastIO, which WinFsp does not currently support). WinFsp with a FileInfoTimeout of 0 or 1 performance is next, because WinFsp does not use the NTOS Cache Manager in this scenario. Dokany performance is last. MEMFS and NTPTFS outperform NTFS in cached and non-cached I/O tests and have equal performance to NTFS in memory mapped I/O tests. This result may be somewhat counter-intuitive (especially for NTPTFS), but the reasons are explained below.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_cc_write_page_test.csv",file="WinFsp-Performance-Testing/rdwr_cc_write_page_test.png",opt="x-label=iterations,y-label=time"]] image::WinFsp-Performance-Testing/rdwr_tests.png[]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_cc_write_page_test.png[]]
==== rdwr_cc_read_page_test ==== rdwr_cc_read_page_test
This test measures the performance of cached ReadFile with 1 page reads. The results here are very similar to the rdwr_cc_write_page_test case and similar comments apply. This test measures the performance of cached `ReadFile` with 1 page reads. MEMFS and NTPTFS outperform NTFS by a considerable margin.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_cc_read_page_test.csv",file="WinFsp-Performance-Testing/rdwr_cc_read_page_test.png",opt="x-label=iterations,y-label=time"]] Cached reads are satisfied from cache and they can effectively be a "memory copy" from the operating system's buffers into the `ReadFile` buffer. Both WinFsp and NTFS implement NT "fast I/O" and one explanation for the test's result is that the WinFsp "fast I/O" implementation is more performant than the NTFS one.
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_cc_read_page_test.png[]]
==== rdwr_nc_write_page_test An alternative explanation is that MEMFS and NTPTFS are simply faster in filling the file system cache when a cache miss occurs. While this may be true for MEMFS (because it maintains file data in user mode memory), it cannot be true for NTPTFS. Recall that the test driver clears system caches prior to running every test, which means that when NTPTFS tries to fill its file system cache for the upper file system, it has to access lower file system data from disk (the same as NTFS).
This test measures the performance of non-cached WriteFile with 1 page writes. WinFsp has the best performance, followed by Dokany. NTFS shows bad performance, which of course make sense as we are asking it to write all data to the disk. image::WinFsp-Performance-Testing/rdwr_cc_read_page_test.png[]
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_nc_write_page_test.csv",file="WinFsp-Performance-Testing/rdwr_nc_write_page_test.png",opt="x-label=iterations,y-label=time"]] ==== rdwr_cc_write_page_test
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_nc_write_page_test.png[]]
This test measures the performance of cached `WriteFile` with 1 page writes. As in the read case, MEMFS and NTPTFS outperform NTFS albeit with a smaller margin.
Similar comments as for `rdwr_cc_read_page_test` apply.
image::WinFsp-Performance-Testing/rdwr_cc_write_page_test.png[]
==== rdwr_nc_read_page_test ==== rdwr_nc_read_page_test
This test measures the performance of non-cached ReadFile with 1 page reads. The results here are very similar to the rdwr_nc_write_page_test case and similar comments apply. This test measures the performance of non-cached `ReadFile` with 1 page reads. Although MEMFS and NTPTFS have better performance than NTFS, this result is not as interesting, because MEMFS is an in-memory file system and NTPTFS currently implements only cached I/O (this may change in the future). However we include this test for completeness.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_nc_read_page_test.csv",file="WinFsp-Performance-Testing/rdwr_nc_read_page_test.png",opt="x-label=iterations,y-label=time"]] image::WinFsp-Performance-Testing/rdwr_nc_read_page_test.png[]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_nc_read_page_test.png[]]
==== mmap_write_test ==== rdwr_nc_write_page_test
This test measures the performance of memory mapped writes. NTFS and WinFsp seem to have identical performance here, which actually makes sense because memory mapped I/O is effectively always cached and most of the actual I/O is done asynchronously by the system. This test measures the performance of non-cached `WriteFile` with 1 page writes. Again MEMFS and NTPTFS have better performance than NTFS, but similar comments as for `rdwr_nc_read_page_test` apply.
There are no results for Dokany as it seems to (still) not support memory mapped files: image::WinFsp-Performance-Testing/rdwr_nc_write_page_test.png[]
----
Y:\>c:\Users\billziss\Projects\winfsp\build\VStudio\build\Release\fsbench-x64.exe --mmap=100 mmap*
mmap_write_test........................ KO
ASSERT(0 != Mapping) failed at fsbench.c:226:mmap_dotest
----
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/mmap_write_test.csv",file="WinFsp-Performance-Testing/mmap_write_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/mmap_write_test.png[]]
==== mmap_read_test ==== mmap_read_test
This test measures the performance of memory mapped reads. Again NTFS and WinFsp seem to have identical performance here. This test measures the performance of memory mapped reads. NTFS and WinFsp have identical performance here, which actually makes sense because memory mapped I/O is effectively cached by buffers that are mapped into the address space of the process doing the I/O.
There are no results for Dokany as it faces the same issue as with mmap_write_test. image::WinFsp-Performance-Testing/mmap_read_test.png[]
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/mmap_read_test.csv",file="WinFsp-Performance-Testing/mmap_read_test.png",opt="x-label=iterations,y-label=time"]] ==== mmap_write_test
ifndef::env-browser[image::WinFsp-Performance-Testing/mmap_read_test.png[]]
This test measures the performance of memory mapped writes. NTFS and WinFsp have again identical performance here. Similar comments as for `mmap_read_test` apply.
image::WinFsp-Performance-Testing/mmap_write_test.png[]

View File

@ -0,0 +1,238 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Performance Testing Analysis\n",
"\n",
"This notebook describes the methodology for analyzing WinFsp performance."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Collection\n",
"\n",
"Performance data is collected by running the script `run-all-perf-tests.bat`. This script runs a variety of performance tests against the NTFS, MEMFS and NTPTFS file systems. The tests are run a number of times (default: 3) and the results are saved in CSV files with names `ntfs-N.csv`, `memfs-N.csv` and `ntptfs-N.csv` (where `N` represents the results of test run `N`)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Loading\n",
"\n",
"Data is loaded from all CSV files into a single pandas `DataFrame`. The resulting `DataFrame` has columns `test`, `iter`, `ntfs`, `memfs`, `ntptfs`. With multiple test runs there will be multiple time values for a `test`, `iter`, file system triple; in this case the smallest time value is entered into the `DataFrame`. The assumption is that even in a seemingly idle system there is some activity that affects the results; the smallest value is the preferred one to use because it reflects the time when there is less or no other system activity.\n",
"\n",
"The resulting `DataFrame` will contain data similar to the following:\n",
"\n",
"| test | iter | ntfs | memfs | ntptfs |\n",
"|:------------------|------:|-------:|-------:|-------:|\n",
"| file_create_test | 1000 | 0.20 | 0.06 | 0.28 |\n",
"| file_open_test | 1000 | 0.09 | 0.05 | 0.22 |\n",
"| ... | ... | ... | ... | ... |"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import glob, os\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"nameord = [\"ntfs\", \"memfs\", \"ntptfs\"]\n",
"\n",
"datamap = {}\n",
"for f in sorted(glob.iglob(\"*.csv\")):\n",
" datamap.setdefault(f.rsplit(\"-\", maxsplit=1)[0], []).append(f)\n",
"\n",
"df = None\n",
"for n in nameord:\n",
" ndf = None\n",
" for f in datamap[n]:\n",
" df0 = pd.read_csv(f, header=None, names=[\"test\", \"iter\", n])\n",
" if ndf is None:\n",
" ndf = df0\n",
" else:\n",
" ndf = ndf.combine(df0, np.minimum)\n",
" if df is None:\n",
" df = ndf\n",
" else:\n",
" df = df.merge(ndf, how=\"left\")\n",
"#df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Analysis\n",
"\n",
"For each test a plot is drawn that shows how each file system performs in the particular test. This allows for easy comparisons between file systems for a particular test."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"markermap = { \"ntfs\": \"$\\mathtt{N}$\", \"memfs\": \"$\\mathtt{M}$\", \"ntptfs\": \"$\\mathtt{P}$\"}\n",
"for t, tdf in df.groupby(\"test\", sort=False):\n",
" plt.figure(figsize=(10,8), dpi=100, facecolor=\"white\")\n",
" plt.title(t)\n",
" xlabel = \"iter\"\n",
" if t.startswith(\"file_\"):\n",
" xlabel = \"files\"\n",
" for n in nameord:\n",
" tdf.plot(ax=plt.gca(), x=\"iter\", xlabel=xlabel, y=n, ylabel=\"time\", marker=markermap[n], ms=8)\n",
" plt.legend(nameord)\n",
" plt.savefig(t + \".png\")\n",
" #plt.show()\n",
" plt.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](file_create_test.png)\n",
"![](file_open_test.png)\n",
"![](file_overwrite_test.png)\n",
"![](file_attr_test.png)\n",
"![](file_list_test.png)\n",
"![](file_list_single_test.png)\n",
"![](file_list_none_test.png)\n",
"![](file_delete_test.png)\n",
"![](file_mkdir_test.png)\n",
"![](file_rmdir_test.png)\n",
"\n",
"![](iter.file_open_test.png)\n",
"![](iter.file_attr_test.png)\n",
"![](iter.file_list_single_test.png)\n",
"![](iter.file_list_none_test.png)\n",
"\n",
"![](rdwr_cc_read_large_test.png)\n",
"![](rdwr_cc_read_page_test.png)\n",
"![](rdwr_cc_write_large_test.png)\n",
"![](rdwr_cc_write_page_test.png)\n",
"![](rdwr_nc_read_large_test.png)\n",
"![](rdwr_nc_read_page_test.png)\n",
"![](rdwr_nc_write_large_test.png)\n",
"![](rdwr_nc_write_page_test.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### File tests\n",
"\n",
"File tests are tests that are performed against the hierarchical path namespace of a file system. Such tests include `file_create_test`, `file_open_test`, etc. Measured times for these tests are normalized against the `ntfs` time (so that the `ntfs` time value becomes 1) and a single aggregate plot is produced.\n",
"\n",
"This allows for easy comparison between file systems across all file tests."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fileord = [\"create\", \"open\", \"iter.open\", \"overwrite\", \"list\", \"list_single\", \"delete\"]\n",
"fdf = pd.concat([df[df.iter == 5000], df[df.iter == 50]])\n",
"fdf.test = fdf.test.map(lambda x: x.replace(\"file_\", \"\").replace(\"_test\", \"\"))\n",
"fdf = fdf.set_index(\"test\").loc[fileord]\n",
"fdf.memfs /= fdf.ntfs; fdf.ntptfs /= fdf.ntfs; fdf.ntfs = 1\n",
"plt.figure(figsize=(10,8), dpi=100, facecolor=\"white\")\n",
"plt.suptitle(\"File Tests\", fontweight=\"light\", fontsize=20, y=0.95)\n",
"plt.title(\"(Shorter bars are better)\")\n",
"fdf.plot.barh(ax=plt.gca(), y=nameord).invert_yaxis()\n",
"plt.gca().set(ylabel=None)\n",
"for container in plt.gca().containers:\n",
" plt.gca().bar_label(container, fmt=\"%0.2f\", padding=4.0, fontsize=\"xx-small\")\n",
"plt.savefig(\"file_tests.png\")\n",
"#plt.show()\n",
"plt.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](file_tests.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Read/write tests\n",
"\n",
"Read/write tests are file I/O tests. Such tests include `rdwr_cc_write_page_test`, `rdwr_cc_read_page_test`, etc. As before measured times for these tests are normalized against the `ntfs` time (so that the `ntfs` time value becomes 1) and a single aggregate plot is produced.\n",
"\n",
"This allows for easy comparison between file systems across all read/write tests."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"rdwrord = [\"cc_read_page\", \"cc_write_page\", \"nc_read_page\", \"nc_write_page\", \"mmap_read\", \"mmap_write\"]\n",
"sdf = df[df.iter == 500].copy()\n",
"sdf.test = sdf.test.map(lambda x: x.replace(\"rdwr_\", \"\").replace(\"_test\", \"\"))\n",
"sdf = sdf.set_index(\"test\").loc[rdwrord]\n",
"sdf.memfs /= sdf.ntfs; sdf.ntptfs /= sdf.ntfs; sdf.ntfs = 1\n",
"plt.figure(figsize=(10,8), dpi=100, facecolor=\"white\")\n",
"plt.suptitle(\"Read/Write Tests\", fontweight=\"light\", fontsize=20, y=0.95)\n",
"plt.title(\"(Shorter bars are better)\")\n",
"sdf.plot.barh(ax=plt.gca(), y=nameord).invert_yaxis()\n",
"plt.gca().set(ylabel=None)\n",
"for container in plt.gca().containers:\n",
" plt.gca().bar_label(container, fmt=\"%0.2f\", padding=4.0, fontsize=\"xx-small\")\n",
"plt.savefig(\"rdwr_tests.png\")\n",
"#plt.show()\n",
"plt.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](rdwr_tests.png)"
]
}
],
"metadata": {
"interpreter": {
"hash": "78f203ba605732dcd419e55e4a2fc56c1449fc8b262db510a48272adb5557637"
},
"kernelspec": {
"display_name": "Python 3.9.7 64-bit ('base': conda)",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.06
file_open_test,1000,0.06
file_overwrite_test,1000,0.06
file_attr_test,1000,0.03
file_list_test,1000,0.06
file_list_single_test,1000,0.12
file_list_none_test,1000,0.12
file_delete_test,1000,0.09
file_mkdir_test,1000,0.06
file_rmdir_test,1000,0.08
file_create_test,2000,0.14
file_open_test,2000,0.11
file_overwrite_test,2000,0.14
file_attr_test,2000,0.08
file_list_test,2000,0.16
file_list_single_test,2000,0.30
file_list_none_test,2000,0.25
file_delete_test,2000,0.17
file_mkdir_test,2000,0.14
file_rmdir_test,2000,0.17
file_create_test,3000,0.20
file_open_test,3000,0.16
file_overwrite_test,3000,0.20
file_attr_test,3000,0.12
file_list_test,3000,0.23
file_list_single_test,3000,0.44
file_list_none_test,3000,0.36
file_delete_test,3000,0.25
file_mkdir_test,3000,0.19
file_rmdir_test,3000,0.27
file_create_test,4000,0.28
file_open_test,4000,0.22
file_overwrite_test,4000,0.27
file_attr_test,4000,0.16
file_list_test,4000,0.31
file_list_single_test,4000,0.61
file_list_none_test,4000,0.52
file_delete_test,4000,0.34
file_mkdir_test,4000,0.25
file_rmdir_test,4000,0.36
file_create_test,5000,0.34
file_open_test,5000,0.27
file_overwrite_test,5000,0.33
file_attr_test,5000,0.22
file_list_test,5000,0.42
file_list_single_test,5000,0.80
file_list_none_test,5000,0.66
file_delete_test,5000,0.42
file_mkdir_test,5000,0.31
file_rmdir_test,5000,0.44
iter.file_open_test,10,0.55
iter.file_attr_test,10,0.41
iter.file_list_single_test,10,0.61
iter.file_list_none_test,10,0.61
iter.file_open_test,20,1.08
iter.file_attr_test,20,0.84
iter.file_list_single_test,20,1.25
iter.file_list_none_test,20,1.20
iter.file_open_test,30,1.62
iter.file_attr_test,30,1.30
iter.file_list_single_test,30,1.92
iter.file_list_none_test,30,1.83
iter.file_open_test,40,2.17
iter.file_attr_test,40,1.72
iter.file_list_single_test,40,2.52
iter.file_list_none_test,40,2.42
iter.file_open_test,50,2.77
iter.file_attr_test,50,2.14
iter.file_list_single_test,50,3.12
iter.file_list_none_test,50,2.98
rdwr_cc_write_page_test,100,0.23
rdwr_cc_read_page_test,100,0.23
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.06
rdwr_cc_write_page_test,200,0.45
rdwr_cc_read_page_test,200,0.45
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.11
rdwr_cc_write_page_test,300,0.66
rdwr_cc_read_page_test,300,0.59
rdwr_cc_write_large_test,300,0.19
rdwr_cc_read_large_test,300,0.19
rdwr_cc_write_page_test,400,0.89
rdwr_cc_read_page_test,400,0.86
rdwr_cc_write_large_test,400,0.25
rdwr_cc_read_large_test,400,0.25
rdwr_cc_write_page_test,500,1.11
rdwr_cc_read_page_test,500,0.91
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.25
rdwr_nc_write_page_test,100,1.81
rdwr_nc_read_page_test,100,1.88
rdwr_nc_write_large_test,100,0.14
rdwr_nc_read_large_test,100,0.16
rdwr_nc_write_page_test,200,3.66
rdwr_nc_read_page_test,200,3.77
rdwr_nc_write_large_test,200,0.30
rdwr_nc_read_large_test,200,0.30
rdwr_nc_write_page_test,300,5.42
rdwr_nc_read_page_test,300,5.66
rdwr_nc_write_large_test,300,0.44
rdwr_nc_read_large_test,300,0.47
rdwr_nc_write_page_test,400,7.28
rdwr_nc_read_page_test,400,7.58
rdwr_nc_write_large_test,400,0.58
rdwr_nc_read_large_test,400,0.61
rdwr_nc_write_page_test,500,9.08
rdwr_nc_read_page_test,500,9.56
rdwr_nc_write_large_test,500,0.81
rdwr_nc_read_large_test,500,0.78
mmap_write_test,100,0.01
mmap_read_test,100,0.06
mmap_write_test,200,0.03
mmap_read_test,200,0.11
mmap_write_test,300,0.05
mmap_read_test,300,0.17
mmap_write_test,400,0.05
mmap_read_test,400,0.22
mmap_write_test,500,0.06
mmap_read_test,500,0.27
1 file_create_test 1000 0.06
2 file_open_test 1000 0.06
3 file_overwrite_test 1000 0.06
4 file_attr_test 1000 0.03
5 file_list_test 1000 0.06
6 file_list_single_test 1000 0.12
7 file_list_none_test 1000 0.12
8 file_delete_test 1000 0.09
9 file_mkdir_test 1000 0.06
10 file_rmdir_test 1000 0.08
11 file_create_test 2000 0.14
12 file_open_test 2000 0.11
13 file_overwrite_test 2000 0.14
14 file_attr_test 2000 0.08
15 file_list_test 2000 0.16
16 file_list_single_test 2000 0.30
17 file_list_none_test 2000 0.25
18 file_delete_test 2000 0.17
19 file_mkdir_test 2000 0.14
20 file_rmdir_test 2000 0.17
21 file_create_test 3000 0.20
22 file_open_test 3000 0.16
23 file_overwrite_test 3000 0.20
24 file_attr_test 3000 0.12
25 file_list_test 3000 0.23
26 file_list_single_test 3000 0.44
27 file_list_none_test 3000 0.36
28 file_delete_test 3000 0.25
29 file_mkdir_test 3000 0.19
30 file_rmdir_test 3000 0.27
31 file_create_test 4000 0.28
32 file_open_test 4000 0.22
33 file_overwrite_test 4000 0.27
34 file_attr_test 4000 0.16
35 file_list_test 4000 0.31
36 file_list_single_test 4000 0.61
37 file_list_none_test 4000 0.52
38 file_delete_test 4000 0.34
39 file_mkdir_test 4000 0.25
40 file_rmdir_test 4000 0.36
41 file_create_test 5000 0.34
42 file_open_test 5000 0.27
43 file_overwrite_test 5000 0.33
44 file_attr_test 5000 0.22
45 file_list_test 5000 0.42
46 file_list_single_test 5000 0.80
47 file_list_none_test 5000 0.66
48 file_delete_test 5000 0.42
49 file_mkdir_test 5000 0.31
50 file_rmdir_test 5000 0.44
51 iter.file_open_test 10 0.55
52 iter.file_attr_test 10 0.41
53 iter.file_list_single_test 10 0.61
54 iter.file_list_none_test 10 0.61
55 iter.file_open_test 20 1.08
56 iter.file_attr_test 20 0.84
57 iter.file_list_single_test 20 1.25
58 iter.file_list_none_test 20 1.20
59 iter.file_open_test 30 1.62
60 iter.file_attr_test 30 1.30
61 iter.file_list_single_test 30 1.92
62 iter.file_list_none_test 30 1.83
63 iter.file_open_test 40 2.17
64 iter.file_attr_test 40 1.72
65 iter.file_list_single_test 40 2.52
66 iter.file_list_none_test 40 2.42
67 iter.file_open_test 50 2.77
68 iter.file_attr_test 50 2.14
69 iter.file_list_single_test 50 3.12
70 iter.file_list_none_test 50 2.98
71 rdwr_cc_write_page_test 100 0.23
72 rdwr_cc_read_page_test 100 0.23
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.06
75 rdwr_cc_write_page_test 200 0.45
76 rdwr_cc_read_page_test 200 0.45
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.11
79 rdwr_cc_write_page_test 300 0.66
80 rdwr_cc_read_page_test 300 0.59
81 rdwr_cc_write_large_test 300 0.19
82 rdwr_cc_read_large_test 300 0.19
83 rdwr_cc_write_page_test 400 0.89
84 rdwr_cc_read_page_test 400 0.86
85 rdwr_cc_write_large_test 400 0.25
86 rdwr_cc_read_large_test 400 0.25
87 rdwr_cc_write_page_test 500 1.11
88 rdwr_cc_read_page_test 500 0.91
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.25
91 rdwr_nc_write_page_test 100 1.81
92 rdwr_nc_read_page_test 100 1.88
93 rdwr_nc_write_large_test 100 0.14
94 rdwr_nc_read_large_test 100 0.16
95 rdwr_nc_write_page_test 200 3.66
96 rdwr_nc_read_page_test 200 3.77
97 rdwr_nc_write_large_test 200 0.30
98 rdwr_nc_read_large_test 200 0.30
99 rdwr_nc_write_page_test 300 5.42
100 rdwr_nc_read_page_test 300 5.66
101 rdwr_nc_write_large_test 300 0.44
102 rdwr_nc_read_large_test 300 0.47
103 rdwr_nc_write_page_test 400 7.28
104 rdwr_nc_read_page_test 400 7.58
105 rdwr_nc_write_large_test 400 0.58
106 rdwr_nc_read_large_test 400 0.61
107 rdwr_nc_write_page_test 500 9.08
108 rdwr_nc_read_page_test 500 9.56
109 rdwr_nc_write_large_test 500 0.81
110 rdwr_nc_read_large_test 500 0.78
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.06
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.11
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.17
117 mmap_write_test 400 0.05
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.27

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.06
file_open_test,1000,0.05
file_overwrite_test,1000,0.06
file_attr_test,1000,0.03
file_list_test,1000,0.06
file_list_single_test,1000,0.12
file_list_none_test,1000,0.12
file_delete_test,1000,0.08
file_mkdir_test,1000,0.06
file_rmdir_test,1000,0.08
file_create_test,2000,0.14
file_open_test,2000,0.11
file_overwrite_test,2000,0.14
file_attr_test,2000,0.08
file_list_test,2000,0.14
file_list_single_test,2000,0.30
file_list_none_test,2000,0.27
file_delete_test,2000,0.17
file_mkdir_test,2000,0.14
file_rmdir_test,2000,0.17
file_create_test,3000,0.22
file_open_test,3000,0.16
file_overwrite_test,3000,0.20
file_attr_test,3000,0.12
file_list_test,3000,0.23
file_list_single_test,3000,0.47
file_list_none_test,3000,0.38
file_delete_test,3000,0.27
file_mkdir_test,3000,0.20
file_rmdir_test,3000,0.28
file_create_test,4000,0.42
file_open_test,4000,0.25
file_overwrite_test,4000,0.27
file_attr_test,4000,0.17
file_list_test,4000,0.34
file_list_single_test,4000,0.61
file_list_none_test,4000,0.52
file_delete_test,4000,0.34
file_mkdir_test,4000,0.25
file_rmdir_test,4000,0.36
file_create_test,5000,0.36
file_open_test,5000,0.28
file_overwrite_test,5000,0.34
file_attr_test,5000,0.22
file_list_test,5000,0.44
file_list_single_test,5000,0.78
file_list_none_test,5000,0.64
file_delete_test,5000,0.44
file_mkdir_test,5000,0.31
file_rmdir_test,5000,0.45
iter.file_open_test,10,0.55
iter.file_attr_test,10,0.42
iter.file_list_single_test,10,0.66
iter.file_list_none_test,10,0.61
iter.file_open_test,20,1.08
iter.file_attr_test,20,0.86
iter.file_list_single_test,20,1.26
iter.file_list_none_test,20,1.17
iter.file_open_test,30,1.61
iter.file_attr_test,30,1.28
iter.file_list_single_test,30,1.91
iter.file_list_none_test,30,1.81
iter.file_open_test,40,2.17
iter.file_attr_test,40,1.70
iter.file_list_single_test,40,2.61
iter.file_list_none_test,40,2.41
iter.file_open_test,50,2.70
iter.file_attr_test,50,2.09
iter.file_list_single_test,50,3.17
iter.file_list_none_test,50,2.94
rdwr_cc_write_page_test,100,0.23
rdwr_cc_read_page_test,100,0.22
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.06
rdwr_cc_write_page_test,200,0.44
rdwr_cc_read_page_test,200,0.45
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.12
rdwr_cc_write_page_test,300,0.66
rdwr_cc_read_page_test,300,0.64
rdwr_cc_write_large_test,300,0.19
rdwr_cc_read_large_test,300,0.17
rdwr_cc_write_page_test,400,0.87
rdwr_cc_read_page_test,400,0.73
rdwr_cc_write_large_test,400,0.25
rdwr_cc_read_large_test,400,0.31
rdwr_cc_write_page_test,500,1.09
rdwr_cc_read_page_test,500,1.02
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.39
rdwr_nc_write_page_test,100,1.83
rdwr_nc_read_page_test,100,1.86
rdwr_nc_write_large_test,100,0.16
rdwr_nc_read_large_test,100,0.16
rdwr_nc_write_page_test,200,3.61
rdwr_nc_read_page_test,200,3.81
rdwr_nc_write_large_test,200,0.30
rdwr_nc_read_large_test,200,0.31
rdwr_nc_write_page_test,300,5.50
rdwr_nc_read_page_test,300,5.72
rdwr_nc_write_large_test,300,0.44
rdwr_nc_read_large_test,300,0.47
rdwr_nc_write_page_test,400,7.31
rdwr_nc_read_page_test,400,7.45
rdwr_nc_write_large_test,400,0.59
rdwr_nc_read_large_test,400,0.61
rdwr_nc_write_page_test,500,9.00
rdwr_nc_read_page_test,500,9.42
rdwr_nc_write_large_test,500,0.73
rdwr_nc_read_large_test,500,0.77
mmap_write_test,100,0.01
mmap_read_test,100,0.06
mmap_write_test,200,0.03
mmap_read_test,200,0.11
mmap_write_test,300,0.03
mmap_read_test,300,0.16
mmap_write_test,400,0.05
mmap_read_test,400,0.22
mmap_write_test,500,0.06
mmap_read_test,500,0.27
1 file_create_test 1000 0.06
2 file_open_test 1000 0.05
3 file_overwrite_test 1000 0.06
4 file_attr_test 1000 0.03
5 file_list_test 1000 0.06
6 file_list_single_test 1000 0.12
7 file_list_none_test 1000 0.12
8 file_delete_test 1000 0.08
9 file_mkdir_test 1000 0.06
10 file_rmdir_test 1000 0.08
11 file_create_test 2000 0.14
12 file_open_test 2000 0.11
13 file_overwrite_test 2000 0.14
14 file_attr_test 2000 0.08
15 file_list_test 2000 0.14
16 file_list_single_test 2000 0.30
17 file_list_none_test 2000 0.27
18 file_delete_test 2000 0.17
19 file_mkdir_test 2000 0.14
20 file_rmdir_test 2000 0.17
21 file_create_test 3000 0.22
22 file_open_test 3000 0.16
23 file_overwrite_test 3000 0.20
24 file_attr_test 3000 0.12
25 file_list_test 3000 0.23
26 file_list_single_test 3000 0.47
27 file_list_none_test 3000 0.38
28 file_delete_test 3000 0.27
29 file_mkdir_test 3000 0.20
30 file_rmdir_test 3000 0.28
31 file_create_test 4000 0.42
32 file_open_test 4000 0.25
33 file_overwrite_test 4000 0.27
34 file_attr_test 4000 0.17
35 file_list_test 4000 0.34
36 file_list_single_test 4000 0.61
37 file_list_none_test 4000 0.52
38 file_delete_test 4000 0.34
39 file_mkdir_test 4000 0.25
40 file_rmdir_test 4000 0.36
41 file_create_test 5000 0.36
42 file_open_test 5000 0.28
43 file_overwrite_test 5000 0.34
44 file_attr_test 5000 0.22
45 file_list_test 5000 0.44
46 file_list_single_test 5000 0.78
47 file_list_none_test 5000 0.64
48 file_delete_test 5000 0.44
49 file_mkdir_test 5000 0.31
50 file_rmdir_test 5000 0.45
51 iter.file_open_test 10 0.55
52 iter.file_attr_test 10 0.42
53 iter.file_list_single_test 10 0.66
54 iter.file_list_none_test 10 0.61
55 iter.file_open_test 20 1.08
56 iter.file_attr_test 20 0.86
57 iter.file_list_single_test 20 1.26
58 iter.file_list_none_test 20 1.17
59 iter.file_open_test 30 1.61
60 iter.file_attr_test 30 1.28
61 iter.file_list_single_test 30 1.91
62 iter.file_list_none_test 30 1.81
63 iter.file_open_test 40 2.17
64 iter.file_attr_test 40 1.70
65 iter.file_list_single_test 40 2.61
66 iter.file_list_none_test 40 2.41
67 iter.file_open_test 50 2.70
68 iter.file_attr_test 50 2.09
69 iter.file_list_single_test 50 3.17
70 iter.file_list_none_test 50 2.94
71 rdwr_cc_write_page_test 100 0.23
72 rdwr_cc_read_page_test 100 0.22
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.06
75 rdwr_cc_write_page_test 200 0.44
76 rdwr_cc_read_page_test 200 0.45
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.12
79 rdwr_cc_write_page_test 300 0.66
80 rdwr_cc_read_page_test 300 0.64
81 rdwr_cc_write_large_test 300 0.19
82 rdwr_cc_read_large_test 300 0.17
83 rdwr_cc_write_page_test 400 0.87
84 rdwr_cc_read_page_test 400 0.73
85 rdwr_cc_write_large_test 400 0.25
86 rdwr_cc_read_large_test 400 0.31
87 rdwr_cc_write_page_test 500 1.09
88 rdwr_cc_read_page_test 500 1.02
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.39
91 rdwr_nc_write_page_test 100 1.83
92 rdwr_nc_read_page_test 100 1.86
93 rdwr_nc_write_large_test 100 0.16
94 rdwr_nc_read_large_test 100 0.16
95 rdwr_nc_write_page_test 200 3.61
96 rdwr_nc_read_page_test 200 3.81
97 rdwr_nc_write_large_test 200 0.30
98 rdwr_nc_read_large_test 200 0.31
99 rdwr_nc_write_page_test 300 5.50
100 rdwr_nc_read_page_test 300 5.72
101 rdwr_nc_write_large_test 300 0.44
102 rdwr_nc_read_large_test 300 0.47
103 rdwr_nc_write_page_test 400 7.31
104 rdwr_nc_read_page_test 400 7.45
105 rdwr_nc_write_large_test 400 0.59
106 rdwr_nc_read_large_test 400 0.61
107 rdwr_nc_write_page_test 500 9.00
108 rdwr_nc_read_page_test 500 9.42
109 rdwr_nc_write_large_test 500 0.73
110 rdwr_nc_read_large_test 500 0.77
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.06
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.11
115 mmap_write_test 300 0.03
116 mmap_read_test 300 0.16
117 mmap_write_test 400 0.05
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.27

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.06
file_open_test,1000,0.05
file_overwrite_test,1000,0.06
file_attr_test,1000,0.03
file_list_test,1000,0.05
file_list_single_test,1000,0.14
file_list_none_test,1000,0.12
file_delete_test,1000,0.08
file_mkdir_test,1000,0.06
file_rmdir_test,1000,0.08
file_create_test,2000,0.14
file_open_test,2000,0.11
file_overwrite_test,2000,0.14
file_attr_test,2000,0.09
file_list_test,2000,0.14
file_list_single_test,2000,0.28
file_list_none_test,2000,0.25
file_delete_test,2000,0.17
file_mkdir_test,2000,0.12
file_rmdir_test,2000,0.17
file_create_test,3000,0.20
file_open_test,3000,0.17
file_overwrite_test,3000,0.20
file_attr_test,3000,0.14
file_list_test,3000,0.25
file_list_single_test,3000,0.44
file_list_none_test,3000,0.36
file_delete_test,3000,0.27
file_mkdir_test,3000,0.19
file_rmdir_test,3000,0.27
file_create_test,4000,0.28
file_open_test,4000,0.22
file_overwrite_test,4000,0.28
file_attr_test,4000,0.17
file_list_test,4000,0.33
file_list_single_test,4000,0.59
file_list_none_test,4000,0.50
file_delete_test,4000,0.34
file_mkdir_test,4000,0.27
file_rmdir_test,4000,0.36
file_create_test,5000,0.37
file_open_test,5000,0.27
file_overwrite_test,5000,0.36
file_attr_test,5000,0.22
file_list_test,5000,0.42
file_list_single_test,5000,0.75
file_list_none_test,5000,0.62
file_delete_test,5000,0.48
file_mkdir_test,5000,0.34
file_rmdir_test,5000,0.45
iter.file_open_test,10,0.53
iter.file_attr_test,10,0.42
iter.file_list_single_test,10,0.61
iter.file_list_none_test,10,0.61
iter.file_open_test,20,1.08
iter.file_attr_test,20,0.81
iter.file_list_single_test,20,1.20
iter.file_list_none_test,20,1.16
iter.file_open_test,30,1.61
iter.file_attr_test,30,1.25
iter.file_list_single_test,30,1.88
iter.file_list_none_test,30,1.81
iter.file_open_test,40,2.14
iter.file_attr_test,40,1.91
iter.file_list_single_test,40,2.66
iter.file_list_none_test,40,2.48
iter.file_open_test,50,2.73
iter.file_attr_test,50,2.14
iter.file_list_single_test,50,3.16
iter.file_list_none_test,50,3.08
rdwr_cc_write_page_test,100,0.23
rdwr_cc_read_page_test,100,0.22
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.06
rdwr_cc_write_page_test,200,0.45
rdwr_cc_read_page_test,200,0.41
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.11
rdwr_cc_write_page_test,300,0.67
rdwr_cc_read_page_test,300,0.62
rdwr_cc_write_large_test,300,0.19
rdwr_cc_read_large_test,300,0.23
rdwr_cc_write_page_test,400,0.87
rdwr_cc_read_page_test,400,0.94
rdwr_cc_write_large_test,400,0.25
rdwr_cc_read_large_test,400,0.33
rdwr_cc_write_page_test,500,1.09
rdwr_cc_read_page_test,500,1.12
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.44
rdwr_nc_write_page_test,100,1.86
rdwr_nc_read_page_test,100,1.94
rdwr_nc_write_large_test,100,0.16
rdwr_nc_read_large_test,100,0.16
rdwr_nc_write_page_test,200,3.66
rdwr_nc_read_page_test,200,3.83
rdwr_nc_write_large_test,200,0.28
rdwr_nc_read_large_test,200,0.30
rdwr_nc_write_page_test,300,5.42
rdwr_nc_read_page_test,300,5.86
rdwr_nc_write_large_test,300,0.45
rdwr_nc_read_large_test,300,0.45
rdwr_nc_write_page_test,400,7.36
rdwr_nc_read_page_test,400,7.56
rdwr_nc_write_large_test,400,0.58
rdwr_nc_read_large_test,400,0.61
rdwr_nc_write_page_test,500,9.09
rdwr_nc_read_page_test,500,9.45
rdwr_nc_write_large_test,500,0.73
rdwr_nc_read_large_test,500,0.75
mmap_write_test,100,0.01
mmap_read_test,100,0.06
mmap_write_test,200,0.03
mmap_read_test,200,0.11
mmap_write_test,300,0.05
mmap_read_test,300,0.16
mmap_write_test,400,0.05
mmap_read_test,400,0.22
mmap_write_test,500,0.06
mmap_read_test,500,0.27
1 file_create_test 1000 0.06
2 file_open_test 1000 0.05
3 file_overwrite_test 1000 0.06
4 file_attr_test 1000 0.03
5 file_list_test 1000 0.05
6 file_list_single_test 1000 0.14
7 file_list_none_test 1000 0.12
8 file_delete_test 1000 0.08
9 file_mkdir_test 1000 0.06
10 file_rmdir_test 1000 0.08
11 file_create_test 2000 0.14
12 file_open_test 2000 0.11
13 file_overwrite_test 2000 0.14
14 file_attr_test 2000 0.09
15 file_list_test 2000 0.14
16 file_list_single_test 2000 0.28
17 file_list_none_test 2000 0.25
18 file_delete_test 2000 0.17
19 file_mkdir_test 2000 0.12
20 file_rmdir_test 2000 0.17
21 file_create_test 3000 0.20
22 file_open_test 3000 0.17
23 file_overwrite_test 3000 0.20
24 file_attr_test 3000 0.14
25 file_list_test 3000 0.25
26 file_list_single_test 3000 0.44
27 file_list_none_test 3000 0.36
28 file_delete_test 3000 0.27
29 file_mkdir_test 3000 0.19
30 file_rmdir_test 3000 0.27
31 file_create_test 4000 0.28
32 file_open_test 4000 0.22
33 file_overwrite_test 4000 0.28
34 file_attr_test 4000 0.17
35 file_list_test 4000 0.33
36 file_list_single_test 4000 0.59
37 file_list_none_test 4000 0.50
38 file_delete_test 4000 0.34
39 file_mkdir_test 4000 0.27
40 file_rmdir_test 4000 0.36
41 file_create_test 5000 0.37
42 file_open_test 5000 0.27
43 file_overwrite_test 5000 0.36
44 file_attr_test 5000 0.22
45 file_list_test 5000 0.42
46 file_list_single_test 5000 0.75
47 file_list_none_test 5000 0.62
48 file_delete_test 5000 0.48
49 file_mkdir_test 5000 0.34
50 file_rmdir_test 5000 0.45
51 iter.file_open_test 10 0.53
52 iter.file_attr_test 10 0.42
53 iter.file_list_single_test 10 0.61
54 iter.file_list_none_test 10 0.61
55 iter.file_open_test 20 1.08
56 iter.file_attr_test 20 0.81
57 iter.file_list_single_test 20 1.20
58 iter.file_list_none_test 20 1.16
59 iter.file_open_test 30 1.61
60 iter.file_attr_test 30 1.25
61 iter.file_list_single_test 30 1.88
62 iter.file_list_none_test 30 1.81
63 iter.file_open_test 40 2.14
64 iter.file_attr_test 40 1.91
65 iter.file_list_single_test 40 2.66
66 iter.file_list_none_test 40 2.48
67 iter.file_open_test 50 2.73
68 iter.file_attr_test 50 2.14
69 iter.file_list_single_test 50 3.16
70 iter.file_list_none_test 50 3.08
71 rdwr_cc_write_page_test 100 0.23
72 rdwr_cc_read_page_test 100 0.22
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.06
75 rdwr_cc_write_page_test 200 0.45
76 rdwr_cc_read_page_test 200 0.41
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.11
79 rdwr_cc_write_page_test 300 0.67
80 rdwr_cc_read_page_test 300 0.62
81 rdwr_cc_write_large_test 300 0.19
82 rdwr_cc_read_large_test 300 0.23
83 rdwr_cc_write_page_test 400 0.87
84 rdwr_cc_read_page_test 400 0.94
85 rdwr_cc_write_large_test 400 0.25
86 rdwr_cc_read_large_test 400 0.33
87 rdwr_cc_write_page_test 500 1.09
88 rdwr_cc_read_page_test 500 1.12
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.44
91 rdwr_nc_write_page_test 100 1.86
92 rdwr_nc_read_page_test 100 1.94
93 rdwr_nc_write_large_test 100 0.16
94 rdwr_nc_read_large_test 100 0.16
95 rdwr_nc_write_page_test 200 3.66
96 rdwr_nc_read_page_test 200 3.83
97 rdwr_nc_write_large_test 200 0.28
98 rdwr_nc_read_large_test 200 0.30
99 rdwr_nc_write_page_test 300 5.42
100 rdwr_nc_read_page_test 300 5.86
101 rdwr_nc_write_large_test 300 0.45
102 rdwr_nc_read_large_test 300 0.45
103 rdwr_nc_write_page_test 400 7.36
104 rdwr_nc_read_page_test 400 7.56
105 rdwr_nc_write_large_test 400 0.58
106 rdwr_nc_read_large_test 400 0.61
107 rdwr_nc_write_page_test 500 9.09
108 rdwr_nc_read_page_test 500 9.45
109 rdwr_nc_write_large_test 500 0.73
110 rdwr_nc_read_large_test 500 0.75
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.06
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.11
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.16
117 mmap_write_test 400 0.05
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.27

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.20
file_open_test,1000,0.09
file_overwrite_test,1000,0.16
file_attr_test,1000,0.08
file_list_test,1000,0.11
file_list_single_test,1000,0.08
file_list_none_test,1000,0.03
file_delete_test,1000,0.14
file_mkdir_test,1000,0.14
file_rmdir_test,1000,0.12
file_create_test,2000,0.45
file_open_test,2000,0.19
file_overwrite_test,2000,0.38
file_attr_test,2000,0.17
file_list_test,2000,0.22
file_list_single_test,2000,0.16
file_list_none_test,2000,0.06
file_delete_test,2000,0.31
file_mkdir_test,2000,0.30
file_rmdir_test,2000,0.28
file_create_test,3000,0.64
file_open_test,3000,0.28
file_overwrite_test,3000,0.55
file_attr_test,3000,0.25
file_list_test,3000,0.36
file_list_single_test,3000,0.25
file_list_none_test,3000,0.08
file_delete_test,3000,0.50
file_mkdir_test,3000,0.47
file_rmdir_test,3000,0.42
file_create_test,4000,0.83
file_open_test,4000,0.36
file_overwrite_test,4000,0.73
file_attr_test,4000,0.33
file_list_test,4000,0.45
file_list_single_test,4000,0.33
file_list_none_test,4000,0.11
file_delete_test,4000,0.64
file_mkdir_test,4000,0.64
file_rmdir_test,4000,0.53
file_create_test,5000,1.03
file_open_test,5000,0.44
file_overwrite_test,5000,0.92
file_attr_test,5000,0.38
file_list_test,5000,0.56
file_list_single_test,5000,0.39
file_list_none_test,5000,0.14
file_delete_test,5000,0.80
file_mkdir_test,5000,0.73
file_rmdir_test,5000,0.64
iter.file_open_test,10,0.25
iter.file_attr_test,10,0.19
iter.file_list_single_test,10,0.34
iter.file_list_none_test,10,0.27
iter.file_open_test,20,0.42
iter.file_attr_test,20,0.33
iter.file_list_single_test,20,0.59
iter.file_list_none_test,20,0.53
iter.file_open_test,30,0.64
iter.file_attr_test,30,0.50
iter.file_list_single_test,30,0.95
iter.file_list_none_test,30,0.77
iter.file_open_test,40,0.78
iter.file_attr_test,40,0.61
iter.file_list_single_test,40,1.19
iter.file_list_none_test,40,1.03
iter.file_open_test,50,0.98
iter.file_attr_test,50,0.73
iter.file_list_single_test,50,1.47
iter.file_list_none_test,50,1.27
rdwr_cc_write_page_test,100,0.28
rdwr_cc_read_page_test,100,0.27
rdwr_cc_write_large_test,100,0.08
rdwr_cc_read_large_test,100,0.09
rdwr_cc_write_page_test,200,0.56
rdwr_cc_read_page_test,200,0.47
rdwr_cc_write_large_test,200,0.16
rdwr_cc_read_large_test,200,0.20
rdwr_cc_write_page_test,300,0.86
rdwr_cc_read_page_test,300,0.73
rdwr_cc_write_large_test,300,0.23
rdwr_cc_read_large_test,300,0.25
rdwr_cc_write_page_test,400,1.11
rdwr_cc_read_page_test,400,0.95
rdwr_cc_write_large_test,400,0.30
rdwr_cc_read_large_test,400,0.30
rdwr_cc_write_page_test,500,1.39
rdwr_cc_read_page_test,500,1.16
rdwr_cc_write_large_test,500,0.39
rdwr_cc_read_large_test,500,0.33
rdwr_nc_write_page_test,100,4.94
rdwr_nc_read_page_test,100,4.55
rdwr_nc_write_large_test,100,0.48
rdwr_nc_read_large_test,100,0.58
rdwr_nc_write_page_test,200,9.84
rdwr_nc_read_page_test,200,9.17
rdwr_nc_write_large_test,200,0.98
rdwr_nc_read_large_test,200,1.14
rdwr_nc_write_page_test,300,14.62
rdwr_nc_read_page_test,300,13.78
rdwr_nc_write_large_test,300,1.42
rdwr_nc_read_large_test,300,1.74
rdwr_nc_write_page_test,400,19.27
rdwr_nc_read_page_test,400,17.14
rdwr_nc_write_large_test,400,1.89
rdwr_nc_read_large_test,400,2.78
rdwr_nc_write_page_test,500,23.80
rdwr_nc_read_page_test,500,21.61
rdwr_nc_write_large_test,500,2.28
rdwr_nc_read_large_test,500,3.98
mmap_write_test,100,0.01
mmap_read_test,100,0.08
mmap_write_test,200,0.03
mmap_read_test,200,0.12
mmap_write_test,300,0.05
mmap_read_test,300,0.17
mmap_write_test,400,0.05
mmap_read_test,400,0.22
mmap_write_test,500,0.06
mmap_read_test,500,0.27
1 file_create_test 1000 0.20
2 file_open_test 1000 0.09
3 file_overwrite_test 1000 0.16
4 file_attr_test 1000 0.08
5 file_list_test 1000 0.11
6 file_list_single_test 1000 0.08
7 file_list_none_test 1000 0.03
8 file_delete_test 1000 0.14
9 file_mkdir_test 1000 0.14
10 file_rmdir_test 1000 0.12
11 file_create_test 2000 0.45
12 file_open_test 2000 0.19
13 file_overwrite_test 2000 0.38
14 file_attr_test 2000 0.17
15 file_list_test 2000 0.22
16 file_list_single_test 2000 0.16
17 file_list_none_test 2000 0.06
18 file_delete_test 2000 0.31
19 file_mkdir_test 2000 0.30
20 file_rmdir_test 2000 0.28
21 file_create_test 3000 0.64
22 file_open_test 3000 0.28
23 file_overwrite_test 3000 0.55
24 file_attr_test 3000 0.25
25 file_list_test 3000 0.36
26 file_list_single_test 3000 0.25
27 file_list_none_test 3000 0.08
28 file_delete_test 3000 0.50
29 file_mkdir_test 3000 0.47
30 file_rmdir_test 3000 0.42
31 file_create_test 4000 0.83
32 file_open_test 4000 0.36
33 file_overwrite_test 4000 0.73
34 file_attr_test 4000 0.33
35 file_list_test 4000 0.45
36 file_list_single_test 4000 0.33
37 file_list_none_test 4000 0.11
38 file_delete_test 4000 0.64
39 file_mkdir_test 4000 0.64
40 file_rmdir_test 4000 0.53
41 file_create_test 5000 1.03
42 file_open_test 5000 0.44
43 file_overwrite_test 5000 0.92
44 file_attr_test 5000 0.38
45 file_list_test 5000 0.56
46 file_list_single_test 5000 0.39
47 file_list_none_test 5000 0.14
48 file_delete_test 5000 0.80
49 file_mkdir_test 5000 0.73
50 file_rmdir_test 5000 0.64
51 iter.file_open_test 10 0.25
52 iter.file_attr_test 10 0.19
53 iter.file_list_single_test 10 0.34
54 iter.file_list_none_test 10 0.27
55 iter.file_open_test 20 0.42
56 iter.file_attr_test 20 0.33
57 iter.file_list_single_test 20 0.59
58 iter.file_list_none_test 20 0.53
59 iter.file_open_test 30 0.64
60 iter.file_attr_test 30 0.50
61 iter.file_list_single_test 30 0.95
62 iter.file_list_none_test 30 0.77
63 iter.file_open_test 40 0.78
64 iter.file_attr_test 40 0.61
65 iter.file_list_single_test 40 1.19
66 iter.file_list_none_test 40 1.03
67 iter.file_open_test 50 0.98
68 iter.file_attr_test 50 0.73
69 iter.file_list_single_test 50 1.47
70 iter.file_list_none_test 50 1.27
71 rdwr_cc_write_page_test 100 0.28
72 rdwr_cc_read_page_test 100 0.27
73 rdwr_cc_write_large_test 100 0.08
74 rdwr_cc_read_large_test 100 0.09
75 rdwr_cc_write_page_test 200 0.56
76 rdwr_cc_read_page_test 200 0.47
77 rdwr_cc_write_large_test 200 0.16
78 rdwr_cc_read_large_test 200 0.20
79 rdwr_cc_write_page_test 300 0.86
80 rdwr_cc_read_page_test 300 0.73
81 rdwr_cc_write_large_test 300 0.23
82 rdwr_cc_read_large_test 300 0.25
83 rdwr_cc_write_page_test 400 1.11
84 rdwr_cc_read_page_test 400 0.95
85 rdwr_cc_write_large_test 400 0.30
86 rdwr_cc_read_large_test 400 0.30
87 rdwr_cc_write_page_test 500 1.39
88 rdwr_cc_read_page_test 500 1.16
89 rdwr_cc_write_large_test 500 0.39
90 rdwr_cc_read_large_test 500 0.33
91 rdwr_nc_write_page_test 100 4.94
92 rdwr_nc_read_page_test 100 4.55
93 rdwr_nc_write_large_test 100 0.48
94 rdwr_nc_read_large_test 100 0.58
95 rdwr_nc_write_page_test 200 9.84
96 rdwr_nc_read_page_test 200 9.17
97 rdwr_nc_write_large_test 200 0.98
98 rdwr_nc_read_large_test 200 1.14
99 rdwr_nc_write_page_test 300 14.62
100 rdwr_nc_read_page_test 300 13.78
101 rdwr_nc_write_large_test 300 1.42
102 rdwr_nc_read_large_test 300 1.74
103 rdwr_nc_write_page_test 400 19.27
104 rdwr_nc_read_page_test 400 17.14
105 rdwr_nc_write_large_test 400 1.89
106 rdwr_nc_read_large_test 400 2.78
107 rdwr_nc_write_page_test 500 23.80
108 rdwr_nc_read_page_test 500 21.61
109 rdwr_nc_write_large_test 500 2.28
110 rdwr_nc_read_large_test 500 3.98
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.08
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.12
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.17
117 mmap_write_test 400 0.05
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.27

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.20
file_open_test,1000,0.09
file_overwrite_test,1000,0.17
file_attr_test,1000,0.08
file_list_test,1000,0.11
file_list_single_test,1000,0.08
file_list_none_test,1000,0.03
file_delete_test,1000,0.16
file_mkdir_test,1000,0.14
file_rmdir_test,1000,0.12
file_create_test,2000,0.42
file_open_test,2000,0.19
file_overwrite_test,2000,0.41
file_attr_test,2000,0.17
file_list_test,2000,0.22
file_list_single_test,2000,0.17
file_list_none_test,2000,0.06
file_delete_test,2000,0.34
file_mkdir_test,2000,0.33
file_rmdir_test,2000,0.28
file_create_test,3000,0.66
file_open_test,3000,0.30
file_overwrite_test,3000,0.59
file_attr_test,3000,0.27
file_list_test,3000,0.36
file_list_single_test,3000,0.28
file_list_none_test,3000,0.09
file_delete_test,3000,0.52
file_mkdir_test,3000,0.48
file_rmdir_test,3000,0.41
file_create_test,4000,0.89
file_open_test,4000,0.36
file_overwrite_test,4000,0.72
file_attr_test,4000,0.34
file_list_test,4000,0.47
file_list_single_test,4000,0.33
file_list_none_test,4000,0.11
file_delete_test,4000,0.66
file_mkdir_test,4000,0.61
file_rmdir_test,4000,0.56
file_create_test,5000,1.01
file_open_test,5000,0.44
file_overwrite_test,5000,0.89
file_attr_test,5000,0.39
file_list_test,5000,0.56
file_list_single_test,5000,0.39
file_list_none_test,5000,0.14
file_delete_test,5000,0.78
file_mkdir_test,5000,0.73
file_rmdir_test,5000,0.64
iter.file_open_test,10,0.25
iter.file_attr_test,10,0.19
iter.file_list_single_test,10,0.33
iter.file_list_none_test,10,0.25
iter.file_open_test,20,0.44
iter.file_attr_test,20,0.33
iter.file_list_single_test,20,0.61
iter.file_list_none_test,20,0.52
iter.file_open_test,30,0.59
iter.file_attr_test,30,0.47
iter.file_list_single_test,30,0.89
iter.file_list_none_test,30,0.81
iter.file_open_test,40,0.84
iter.file_attr_test,40,0.67
iter.file_list_single_test,40,1.17
iter.file_list_none_test,40,1.00
iter.file_open_test,50,0.97
iter.file_attr_test,50,0.73
iter.file_list_single_test,50,1.45
iter.file_list_none_test,50,1.28
rdwr_cc_write_page_test,100,0.25
rdwr_cc_read_page_test,100,0.23
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.08
rdwr_cc_write_page_test,200,0.50
rdwr_cc_read_page_test,200,0.45
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.14
rdwr_cc_write_page_test,300,0.73
rdwr_cc_read_page_test,300,0.70
rdwr_cc_write_large_test,300,0.19
rdwr_cc_read_large_test,300,0.25
rdwr_cc_write_page_test,400,0.98
rdwr_cc_read_page_test,400,0.91
rdwr_cc_write_large_test,400,0.27
rdwr_cc_read_large_test,400,0.34
rdwr_cc_write_page_test,500,1.22
rdwr_cc_read_page_test,500,1.14
rdwr_cc_write_large_test,500,0.33
rdwr_cc_read_large_test,500,0.30
rdwr_nc_write_page_test,100,4.78
rdwr_nc_read_page_test,100,4.28
rdwr_nc_write_large_test,100,0.48
rdwr_nc_read_large_test,100,0.59
rdwr_nc_write_page_test,200,9.44
rdwr_nc_read_page_test,200,8.78
rdwr_nc_write_large_test,200,0.94
rdwr_nc_read_large_test,200,1.16
rdwr_nc_write_page_test,300,14.53
rdwr_nc_read_page_test,300,13.44
rdwr_nc_write_large_test,300,1.50
rdwr_nc_read_large_test,300,1.73
rdwr_nc_write_page_test,400,19.16
rdwr_nc_read_page_test,400,17.14
rdwr_nc_write_large_test,400,1.86
rdwr_nc_read_large_test,400,2.66
rdwr_nc_write_page_test,500,23.55
rdwr_nc_read_page_test,500,21.91
rdwr_nc_write_large_test,500,2.39
rdwr_nc_read_large_test,500,3.36
mmap_write_test,100,0.01
mmap_read_test,100,0.06
mmap_write_test,200,0.03
mmap_read_test,200,0.12
mmap_write_test,300,0.05
mmap_read_test,300,0.19
mmap_write_test,400,0.05
mmap_read_test,400,0.23
mmap_write_test,500,0.08
mmap_read_test,500,0.28
1 file_create_test 1000 0.20
2 file_open_test 1000 0.09
3 file_overwrite_test 1000 0.17
4 file_attr_test 1000 0.08
5 file_list_test 1000 0.11
6 file_list_single_test 1000 0.08
7 file_list_none_test 1000 0.03
8 file_delete_test 1000 0.16
9 file_mkdir_test 1000 0.14
10 file_rmdir_test 1000 0.12
11 file_create_test 2000 0.42
12 file_open_test 2000 0.19
13 file_overwrite_test 2000 0.41
14 file_attr_test 2000 0.17
15 file_list_test 2000 0.22
16 file_list_single_test 2000 0.17
17 file_list_none_test 2000 0.06
18 file_delete_test 2000 0.34
19 file_mkdir_test 2000 0.33
20 file_rmdir_test 2000 0.28
21 file_create_test 3000 0.66
22 file_open_test 3000 0.30
23 file_overwrite_test 3000 0.59
24 file_attr_test 3000 0.27
25 file_list_test 3000 0.36
26 file_list_single_test 3000 0.28
27 file_list_none_test 3000 0.09
28 file_delete_test 3000 0.52
29 file_mkdir_test 3000 0.48
30 file_rmdir_test 3000 0.41
31 file_create_test 4000 0.89
32 file_open_test 4000 0.36
33 file_overwrite_test 4000 0.72
34 file_attr_test 4000 0.34
35 file_list_test 4000 0.47
36 file_list_single_test 4000 0.33
37 file_list_none_test 4000 0.11
38 file_delete_test 4000 0.66
39 file_mkdir_test 4000 0.61
40 file_rmdir_test 4000 0.56
41 file_create_test 5000 1.01
42 file_open_test 5000 0.44
43 file_overwrite_test 5000 0.89
44 file_attr_test 5000 0.39
45 file_list_test 5000 0.56
46 file_list_single_test 5000 0.39
47 file_list_none_test 5000 0.14
48 file_delete_test 5000 0.78
49 file_mkdir_test 5000 0.73
50 file_rmdir_test 5000 0.64
51 iter.file_open_test 10 0.25
52 iter.file_attr_test 10 0.19
53 iter.file_list_single_test 10 0.33
54 iter.file_list_none_test 10 0.25
55 iter.file_open_test 20 0.44
56 iter.file_attr_test 20 0.33
57 iter.file_list_single_test 20 0.61
58 iter.file_list_none_test 20 0.52
59 iter.file_open_test 30 0.59
60 iter.file_attr_test 30 0.47
61 iter.file_list_single_test 30 0.89
62 iter.file_list_none_test 30 0.81
63 iter.file_open_test 40 0.84
64 iter.file_attr_test 40 0.67
65 iter.file_list_single_test 40 1.17
66 iter.file_list_none_test 40 1.00
67 iter.file_open_test 50 0.97
68 iter.file_attr_test 50 0.73
69 iter.file_list_single_test 50 1.45
70 iter.file_list_none_test 50 1.28
71 rdwr_cc_write_page_test 100 0.25
72 rdwr_cc_read_page_test 100 0.23
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.08
75 rdwr_cc_write_page_test 200 0.50
76 rdwr_cc_read_page_test 200 0.45
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.14
79 rdwr_cc_write_page_test 300 0.73
80 rdwr_cc_read_page_test 300 0.70
81 rdwr_cc_write_large_test 300 0.19
82 rdwr_cc_read_large_test 300 0.25
83 rdwr_cc_write_page_test 400 0.98
84 rdwr_cc_read_page_test 400 0.91
85 rdwr_cc_write_large_test 400 0.27
86 rdwr_cc_read_large_test 400 0.34
87 rdwr_cc_write_page_test 500 1.22
88 rdwr_cc_read_page_test 500 1.14
89 rdwr_cc_write_large_test 500 0.33
90 rdwr_cc_read_large_test 500 0.30
91 rdwr_nc_write_page_test 100 4.78
92 rdwr_nc_read_page_test 100 4.28
93 rdwr_nc_write_large_test 100 0.48
94 rdwr_nc_read_large_test 100 0.59
95 rdwr_nc_write_page_test 200 9.44
96 rdwr_nc_read_page_test 200 8.78
97 rdwr_nc_write_large_test 200 0.94
98 rdwr_nc_read_large_test 200 1.16
99 rdwr_nc_write_page_test 300 14.53
100 rdwr_nc_read_page_test 300 13.44
101 rdwr_nc_write_large_test 300 1.50
102 rdwr_nc_read_large_test 300 1.73
103 rdwr_nc_write_page_test 400 19.16
104 rdwr_nc_read_page_test 400 17.14
105 rdwr_nc_write_large_test 400 1.86
106 rdwr_nc_read_large_test 400 2.66
107 rdwr_nc_write_page_test 500 23.55
108 rdwr_nc_read_page_test 500 21.91
109 rdwr_nc_write_large_test 500 2.39
110 rdwr_nc_read_large_test 500 3.36
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.06
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.12
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.19
117 mmap_write_test 400 0.05
118 mmap_read_test 400 0.23
119 mmap_write_test 500 0.08
120 mmap_read_test 500 0.28

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.20
file_open_test,1000,0.09
file_overwrite_test,1000,0.17
file_attr_test,1000,0.08
file_list_test,1000,0.11
file_list_single_test,1000,0.08
file_list_none_test,1000,0.03
file_delete_test,1000,0.14
file_mkdir_test,1000,0.14
file_rmdir_test,1000,0.14
file_create_test,2000,0.42
file_open_test,2000,0.19
file_overwrite_test,2000,0.38
file_attr_test,2000,0.19
file_list_test,2000,0.23
file_list_single_test,2000,0.17
file_list_none_test,2000,0.06
file_delete_test,2000,0.33
file_mkdir_test,2000,0.30
file_rmdir_test,2000,0.27
file_create_test,3000,0.64
file_open_test,3000,0.30
file_overwrite_test,3000,0.59
file_attr_test,3000,0.25
file_list_test,3000,0.36
file_list_single_test,3000,0.27
file_list_none_test,3000,0.08
file_delete_test,3000,0.48
file_mkdir_test,3000,0.47
file_rmdir_test,3000,0.42
file_create_test,4000,0.86
file_open_test,4000,0.38
file_overwrite_test,4000,0.73
file_attr_test,4000,0.33
file_list_test,4000,0.48
file_list_single_test,4000,0.33
file_list_none_test,4000,0.11
file_delete_test,4000,0.64
file_mkdir_test,4000,0.62
file_rmdir_test,4000,0.52
file_create_test,5000,1.03
file_open_test,5000,0.44
file_overwrite_test,5000,0.92
file_attr_test,5000,0.38
file_list_test,5000,0.58
file_list_single_test,5000,0.38
file_list_none_test,5000,0.14
file_delete_test,5000,0.80
file_mkdir_test,5000,0.73
file_rmdir_test,5000,0.69
iter.file_open_test,10,0.25
iter.file_attr_test,10,0.19
iter.file_list_single_test,10,0.33
iter.file_list_none_test,10,0.26
iter.file_open_test,20,0.44
iter.file_attr_test,20,0.34
iter.file_list_single_test,20,0.61
iter.file_list_none_test,20,0.52
iter.file_open_test,30,0.61
iter.file_attr_test,30,0.48
iter.file_list_single_test,30,0.88
iter.file_list_none_test,30,0.78
iter.file_open_test,40,0.77
iter.file_attr_test,40,0.61
iter.file_list_single_test,40,1.19
iter.file_list_none_test,40,1.03
iter.file_open_test,50,0.95
iter.file_attr_test,50,0.73
iter.file_list_single_test,50,1.42
iter.file_list_none_test,50,1.28
rdwr_cc_write_page_test,100,0.25
rdwr_cc_read_page_test,100,0.23
rdwr_cc_write_large_test,100,0.08
rdwr_cc_read_large_test,100,0.08
rdwr_cc_write_page_test,200,0.48
rdwr_cc_read_page_test,200,0.45
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.17
rdwr_cc_write_page_test,300,0.73
rdwr_cc_read_page_test,300,0.61
rdwr_cc_write_large_test,300,0.19
rdwr_cc_read_large_test,300,0.23
rdwr_cc_write_page_test,400,0.97
rdwr_cc_read_page_test,400,0.88
rdwr_cc_write_large_test,400,0.27
rdwr_cc_read_large_test,400,0.33
rdwr_cc_write_page_test,500,1.20
rdwr_cc_read_page_test,500,1.14
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.39
rdwr_nc_write_page_test,100,4.76
rdwr_nc_read_page_test,100,4.24
rdwr_nc_write_large_test,100,0.47
rdwr_nc_read_large_test,100,0.56
rdwr_nc_write_page_test,200,9.44
rdwr_nc_read_page_test,200,8.44
rdwr_nc_write_large_test,200,0.94
rdwr_nc_read_large_test,200,1.14
rdwr_nc_write_page_test,300,14.19
rdwr_nc_read_page_test,300,12.70
rdwr_nc_write_large_test,300,1.39
rdwr_nc_read_large_test,300,1.74
rdwr_nc_write_page_test,400,19.20
rdwr_nc_read_page_test,400,17.41
rdwr_nc_write_large_test,400,1.95
rdwr_nc_read_large_test,400,2.53
rdwr_nc_write_page_test,500,24.02
rdwr_nc_read_page_test,500,22.16
rdwr_nc_write_large_test,500,2.42
rdwr_nc_read_large_test,500,3.14
mmap_write_test,100,0.01
mmap_read_test,100,0.08
mmap_write_test,200,0.03
mmap_read_test,200,0.14
mmap_write_test,300,0.05
mmap_read_test,300,0.17
mmap_write_test,400,0.05
mmap_read_test,400,0.22
mmap_write_test,500,0.06
mmap_read_test,500,0.28
1 file_create_test 1000 0.20
2 file_open_test 1000 0.09
3 file_overwrite_test 1000 0.17
4 file_attr_test 1000 0.08
5 file_list_test 1000 0.11
6 file_list_single_test 1000 0.08
7 file_list_none_test 1000 0.03
8 file_delete_test 1000 0.14
9 file_mkdir_test 1000 0.14
10 file_rmdir_test 1000 0.14
11 file_create_test 2000 0.42
12 file_open_test 2000 0.19
13 file_overwrite_test 2000 0.38
14 file_attr_test 2000 0.19
15 file_list_test 2000 0.23
16 file_list_single_test 2000 0.17
17 file_list_none_test 2000 0.06
18 file_delete_test 2000 0.33
19 file_mkdir_test 2000 0.30
20 file_rmdir_test 2000 0.27
21 file_create_test 3000 0.64
22 file_open_test 3000 0.30
23 file_overwrite_test 3000 0.59
24 file_attr_test 3000 0.25
25 file_list_test 3000 0.36
26 file_list_single_test 3000 0.27
27 file_list_none_test 3000 0.08
28 file_delete_test 3000 0.48
29 file_mkdir_test 3000 0.47
30 file_rmdir_test 3000 0.42
31 file_create_test 4000 0.86
32 file_open_test 4000 0.38
33 file_overwrite_test 4000 0.73
34 file_attr_test 4000 0.33
35 file_list_test 4000 0.48
36 file_list_single_test 4000 0.33
37 file_list_none_test 4000 0.11
38 file_delete_test 4000 0.64
39 file_mkdir_test 4000 0.62
40 file_rmdir_test 4000 0.52
41 file_create_test 5000 1.03
42 file_open_test 5000 0.44
43 file_overwrite_test 5000 0.92
44 file_attr_test 5000 0.38
45 file_list_test 5000 0.58
46 file_list_single_test 5000 0.38
47 file_list_none_test 5000 0.14
48 file_delete_test 5000 0.80
49 file_mkdir_test 5000 0.73
50 file_rmdir_test 5000 0.69
51 iter.file_open_test 10 0.25
52 iter.file_attr_test 10 0.19
53 iter.file_list_single_test 10 0.33
54 iter.file_list_none_test 10 0.26
55 iter.file_open_test 20 0.44
56 iter.file_attr_test 20 0.34
57 iter.file_list_single_test 20 0.61
58 iter.file_list_none_test 20 0.52
59 iter.file_open_test 30 0.61
60 iter.file_attr_test 30 0.48
61 iter.file_list_single_test 30 0.88
62 iter.file_list_none_test 30 0.78
63 iter.file_open_test 40 0.77
64 iter.file_attr_test 40 0.61
65 iter.file_list_single_test 40 1.19
66 iter.file_list_none_test 40 1.03
67 iter.file_open_test 50 0.95
68 iter.file_attr_test 50 0.73
69 iter.file_list_single_test 50 1.42
70 iter.file_list_none_test 50 1.28
71 rdwr_cc_write_page_test 100 0.25
72 rdwr_cc_read_page_test 100 0.23
73 rdwr_cc_write_large_test 100 0.08
74 rdwr_cc_read_large_test 100 0.08
75 rdwr_cc_write_page_test 200 0.48
76 rdwr_cc_read_page_test 200 0.45
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.17
79 rdwr_cc_write_page_test 300 0.73
80 rdwr_cc_read_page_test 300 0.61
81 rdwr_cc_write_large_test 300 0.19
82 rdwr_cc_read_large_test 300 0.23
83 rdwr_cc_write_page_test 400 0.97
84 rdwr_cc_read_page_test 400 0.88
85 rdwr_cc_write_large_test 400 0.27
86 rdwr_cc_read_large_test 400 0.33
87 rdwr_cc_write_page_test 500 1.20
88 rdwr_cc_read_page_test 500 1.14
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.39
91 rdwr_nc_write_page_test 100 4.76
92 rdwr_nc_read_page_test 100 4.24
93 rdwr_nc_write_large_test 100 0.47
94 rdwr_nc_read_large_test 100 0.56
95 rdwr_nc_write_page_test 200 9.44
96 rdwr_nc_read_page_test 200 8.44
97 rdwr_nc_write_large_test 200 0.94
98 rdwr_nc_read_large_test 200 1.14
99 rdwr_nc_write_page_test 300 14.19
100 rdwr_nc_read_page_test 300 12.70
101 rdwr_nc_write_large_test 300 1.39
102 rdwr_nc_read_large_test 300 1.74
103 rdwr_nc_write_page_test 400 19.20
104 rdwr_nc_read_page_test 400 17.41
105 rdwr_nc_write_large_test 400 1.95
106 rdwr_nc_read_large_test 400 2.53
107 rdwr_nc_write_page_test 500 24.02
108 rdwr_nc_read_page_test 500 22.16
109 rdwr_nc_write_large_test 500 2.42
110 rdwr_nc_read_large_test 500 3.14
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.08
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.14
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.17
117 mmap_write_test 400 0.05
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.28

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.28
file_open_test,1000,0.22
file_overwrite_test,1000,0.33
file_attr_test,1000,0.20
file_list_test,1000,0.19
file_list_single_test,1000,0.22
file_list_none_test,1000,0.17
file_delete_test,1000,0.30
file_mkdir_test,1000,0.23
file_rmdir_test,1000,0.28
file_create_test,2000,0.64
file_open_test,2000,0.45
file_overwrite_test,2000,0.73
file_attr_test,2000,0.42
file_list_test,2000,0.39
file_list_single_test,2000,0.52
file_list_none_test,2000,0.38
file_delete_test,2000,0.62
file_mkdir_test,2000,0.47
file_rmdir_test,2000,0.56
file_create_test,3000,0.94
file_open_test,3000,0.70
file_overwrite_test,3000,1.12
file_attr_test,3000,0.66
file_list_test,3000,0.62
file_list_single_test,3000,0.83
file_list_none_test,3000,0.55
file_delete_test,3000,0.98
file_mkdir_test,3000,0.72
file_rmdir_test,3000,0.84
file_create_test,4000,1.22
file_open_test,4000,0.90
file_overwrite_test,4000,1.45
file_attr_test,4000,0.84
file_list_test,4000,0.84
file_list_single_test,4000,1.14
file_list_none_test,4000,0.73
file_delete_test,4000,1.26
file_mkdir_test,4000,0.97
file_rmdir_test,4000,1.20
file_create_test,5000,1.53
file_open_test,5000,1.09
file_overwrite_test,5000,1.75
file_attr_test,5000,1.02
file_list_test,5000,1.02
file_list_single_test,5000,1.41
file_list_none_test,5000,0.91
file_delete_test,5000,1.62
file_mkdir_test,5000,1.19
file_rmdir_test,5000,1.45
iter.file_open_test,10,1.47
iter.file_attr_test,10,1.34
iter.file_list_single_test,10,1.28
iter.file_list_none_test,10,1.16
iter.file_open_test,20,2.84
iter.file_attr_test,20,2.61
iter.file_list_single_test,20,2.52
iter.file_list_none_test,20,2.27
iter.file_open_test,30,4.22
iter.file_attr_test,30,3.91
iter.file_list_single_test,30,3.77
iter.file_list_none_test,30,3.50
iter.file_open_test,40,5.61
iter.file_attr_test,40,5.22
iter.file_list_single_test,40,5.09
iter.file_list_none_test,40,4.64
iter.file_open_test,50,7.00
iter.file_attr_test,50,6.42
iter.file_list_single_test,50,6.16
iter.file_list_none_test,50,5.66
rdwr_cc_write_page_test,100,0.23
rdwr_cc_read_page_test,100,0.23
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.06
rdwr_cc_write_page_test,200,0.44
rdwr_cc_read_page_test,200,0.42
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.12
rdwr_cc_write_page_test,300,0.66
rdwr_cc_read_page_test,300,0.59
rdwr_cc_write_large_test,300,0.20
rdwr_cc_read_large_test,300,0.17
rdwr_cc_write_page_test,400,0.88
rdwr_cc_read_page_test,400,0.77
rdwr_cc_write_large_test,400,0.27
rdwr_cc_read_large_test,400,0.20
rdwr_cc_write_page_test,500,1.09
rdwr_cc_read_page_test,500,0.97
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.25
rdwr_nc_write_page_test,100,2.61
rdwr_nc_read_page_test,100,2.41
rdwr_nc_write_large_test,100,0.25
rdwr_nc_read_large_test,100,0.25
rdwr_nc_write_page_test,200,5.22
rdwr_nc_read_page_test,200,4.81
rdwr_nc_write_large_test,200,0.48
rdwr_nc_read_large_test,200,0.47
rdwr_nc_write_page_test,300,7.95
rdwr_nc_read_page_test,300,7.08
rdwr_nc_write_large_test,300,0.72
rdwr_nc_read_large_test,300,0.70
rdwr_nc_write_page_test,400,10.38
rdwr_nc_read_page_test,400,9.25
rdwr_nc_write_large_test,400,0.98
rdwr_nc_read_large_test,400,0.94
rdwr_nc_write_page_test,500,13.05
rdwr_nc_read_page_test,500,11.56
rdwr_nc_write_large_test,500,1.23
rdwr_nc_read_large_test,500,1.23
mmap_write_test,100,0.01
mmap_read_test,100,0.06
mmap_write_test,200,0.03
mmap_read_test,200,0.12
mmap_write_test,300,0.05
mmap_read_test,300,0.17
mmap_write_test,400,0.06
mmap_read_test,400,0.22
mmap_write_test,500,0.06
mmap_read_test,500,0.28
1 file_create_test 1000 0.28
2 file_open_test 1000 0.22
3 file_overwrite_test 1000 0.33
4 file_attr_test 1000 0.20
5 file_list_test 1000 0.19
6 file_list_single_test 1000 0.22
7 file_list_none_test 1000 0.17
8 file_delete_test 1000 0.30
9 file_mkdir_test 1000 0.23
10 file_rmdir_test 1000 0.28
11 file_create_test 2000 0.64
12 file_open_test 2000 0.45
13 file_overwrite_test 2000 0.73
14 file_attr_test 2000 0.42
15 file_list_test 2000 0.39
16 file_list_single_test 2000 0.52
17 file_list_none_test 2000 0.38
18 file_delete_test 2000 0.62
19 file_mkdir_test 2000 0.47
20 file_rmdir_test 2000 0.56
21 file_create_test 3000 0.94
22 file_open_test 3000 0.70
23 file_overwrite_test 3000 1.12
24 file_attr_test 3000 0.66
25 file_list_test 3000 0.62
26 file_list_single_test 3000 0.83
27 file_list_none_test 3000 0.55
28 file_delete_test 3000 0.98
29 file_mkdir_test 3000 0.72
30 file_rmdir_test 3000 0.84
31 file_create_test 4000 1.22
32 file_open_test 4000 0.90
33 file_overwrite_test 4000 1.45
34 file_attr_test 4000 0.84
35 file_list_test 4000 0.84
36 file_list_single_test 4000 1.14
37 file_list_none_test 4000 0.73
38 file_delete_test 4000 1.26
39 file_mkdir_test 4000 0.97
40 file_rmdir_test 4000 1.20
41 file_create_test 5000 1.53
42 file_open_test 5000 1.09
43 file_overwrite_test 5000 1.75
44 file_attr_test 5000 1.02
45 file_list_test 5000 1.02
46 file_list_single_test 5000 1.41
47 file_list_none_test 5000 0.91
48 file_delete_test 5000 1.62
49 file_mkdir_test 5000 1.19
50 file_rmdir_test 5000 1.45
51 iter.file_open_test 10 1.47
52 iter.file_attr_test 10 1.34
53 iter.file_list_single_test 10 1.28
54 iter.file_list_none_test 10 1.16
55 iter.file_open_test 20 2.84
56 iter.file_attr_test 20 2.61
57 iter.file_list_single_test 20 2.52
58 iter.file_list_none_test 20 2.27
59 iter.file_open_test 30 4.22
60 iter.file_attr_test 30 3.91
61 iter.file_list_single_test 30 3.77
62 iter.file_list_none_test 30 3.50
63 iter.file_open_test 40 5.61
64 iter.file_attr_test 40 5.22
65 iter.file_list_single_test 40 5.09
66 iter.file_list_none_test 40 4.64
67 iter.file_open_test 50 7.00
68 iter.file_attr_test 50 6.42
69 iter.file_list_single_test 50 6.16
70 iter.file_list_none_test 50 5.66
71 rdwr_cc_write_page_test 100 0.23
72 rdwr_cc_read_page_test 100 0.23
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.06
75 rdwr_cc_write_page_test 200 0.44
76 rdwr_cc_read_page_test 200 0.42
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.12
79 rdwr_cc_write_page_test 300 0.66
80 rdwr_cc_read_page_test 300 0.59
81 rdwr_cc_write_large_test 300 0.20
82 rdwr_cc_read_large_test 300 0.17
83 rdwr_cc_write_page_test 400 0.88
84 rdwr_cc_read_page_test 400 0.77
85 rdwr_cc_write_large_test 400 0.27
86 rdwr_cc_read_large_test 400 0.20
87 rdwr_cc_write_page_test 500 1.09
88 rdwr_cc_read_page_test 500 0.97
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.25
91 rdwr_nc_write_page_test 100 2.61
92 rdwr_nc_read_page_test 100 2.41
93 rdwr_nc_write_large_test 100 0.25
94 rdwr_nc_read_large_test 100 0.25
95 rdwr_nc_write_page_test 200 5.22
96 rdwr_nc_read_page_test 200 4.81
97 rdwr_nc_write_large_test 200 0.48
98 rdwr_nc_read_large_test 200 0.47
99 rdwr_nc_write_page_test 300 7.95
100 rdwr_nc_read_page_test 300 7.08
101 rdwr_nc_write_large_test 300 0.72
102 rdwr_nc_read_large_test 300 0.70
103 rdwr_nc_write_page_test 400 10.38
104 rdwr_nc_read_page_test 400 9.25
105 rdwr_nc_write_large_test 400 0.98
106 rdwr_nc_read_large_test 400 0.94
107 rdwr_nc_write_page_test 500 13.05
108 rdwr_nc_read_page_test 500 11.56
109 rdwr_nc_write_large_test 500 1.23
110 rdwr_nc_read_large_test 500 1.23
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.06
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.12
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.17
117 mmap_write_test 400 0.06
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.28

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.30
file_open_test,1000,0.22
file_overwrite_test,1000,0.34
file_attr_test,1000,0.20
file_list_test,1000,0.19
file_list_single_test,1000,0.22
file_list_none_test,1000,0.17
file_delete_test,1000,0.31
file_mkdir_test,1000,0.22
file_rmdir_test,1000,0.27
file_create_test,2000,0.61
file_open_test,2000,0.44
file_overwrite_test,2000,0.69
file_attr_test,2000,0.44
file_list_test,2000,0.41
file_list_single_test,2000,0.53
file_list_none_test,2000,0.36
file_delete_test,2000,0.64
file_mkdir_test,2000,0.47
file_rmdir_test,2000,0.55
file_create_test,3000,0.97
file_open_test,3000,0.69
file_overwrite_test,3000,1.08
file_attr_test,3000,0.64
file_list_test,3000,0.64
file_list_single_test,3000,0.88
file_list_none_test,3000,0.56
file_delete_test,3000,0.97
file_mkdir_test,3000,0.73
file_rmdir_test,3000,0.80
file_create_test,4000,1.20
file_open_test,4000,0.91
file_overwrite_test,4000,1.49
file_attr_test,4000,0.83
file_list_test,4000,0.83
file_list_single_test,4000,1.19
file_list_none_test,4000,0.75
file_delete_test,4000,1.28
file_mkdir_test,4000,0.92
file_rmdir_test,4000,1.08
file_create_test,5000,1.44
file_open_test,5000,1.09
file_overwrite_test,5000,1.83
file_attr_test,5000,1.02
file_list_test,5000,1.03
file_list_single_test,5000,1.50
file_list_none_test,5000,0.94
file_delete_test,5000,1.58
file_mkdir_test,5000,1.12
file_rmdir_test,5000,1.42
iter.file_open_test,10,1.47
iter.file_attr_test,10,1.34
iter.file_list_single_test,10,1.31
iter.file_list_none_test,10,1.17
iter.file_open_test,20,2.84
iter.file_attr_test,20,2.61
iter.file_list_single_test,20,2.53
iter.file_list_none_test,20,2.31
iter.file_open_test,30,4.20
iter.file_attr_test,30,3.88
iter.file_list_single_test,30,3.78
iter.file_list_none_test,30,3.58
iter.file_open_test,40,5.59
iter.file_attr_test,40,5.12
iter.file_list_single_test,40,4.89
iter.file_list_none_test,40,4.62
iter.file_open_test,50,7.05
iter.file_attr_test,50,6.42
iter.file_list_single_test,50,6.22
iter.file_list_none_test,50,5.72
rdwr_cc_write_page_test,100,0.23
rdwr_cc_read_page_test,100,0.25
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.06
rdwr_cc_write_page_test,200,0.45
rdwr_cc_read_page_test,200,0.41
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.12
rdwr_cc_write_page_test,300,0.66
rdwr_cc_read_page_test,300,0.59
rdwr_cc_write_large_test,300,0.20
rdwr_cc_read_large_test,300,0.16
rdwr_cc_write_page_test,400,0.87
rdwr_cc_read_page_test,400,0.77
rdwr_cc_write_large_test,400,0.25
rdwr_cc_read_large_test,400,0.20
rdwr_cc_write_page_test,500,1.08
rdwr_cc_read_page_test,500,0.95
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.25
rdwr_nc_write_page_test,100,2.61
rdwr_nc_read_page_test,100,2.41
rdwr_nc_write_large_test,100,0.27
rdwr_nc_read_large_test,100,0.23
rdwr_nc_write_page_test,200,5.23
rdwr_nc_read_page_test,200,4.76
rdwr_nc_write_large_test,200,0.50
rdwr_nc_read_large_test,200,0.45
rdwr_nc_write_page_test,300,8.03
rdwr_nc_read_page_test,300,7.17
rdwr_nc_write_large_test,300,0.73
rdwr_nc_read_large_test,300,0.66
rdwr_nc_write_page_test,400,10.75
rdwr_nc_read_page_test,400,9.47
rdwr_nc_write_large_test,400,0.98
rdwr_nc_read_large_test,400,0.86
rdwr_nc_write_page_test,500,13.12
rdwr_nc_read_page_test,500,11.69
rdwr_nc_write_large_test,500,1.25
rdwr_nc_read_large_test,500,1.27
mmap_write_test,100,0.01
mmap_read_test,100,0.08
mmap_write_test,200,0.03
mmap_read_test,200,0.12
mmap_write_test,300,0.05
mmap_read_test,300,0.17
mmap_write_test,400,0.06
mmap_read_test,400,0.22
mmap_write_test,500,0.08
mmap_read_test,500,0.27
1 file_create_test 1000 0.30
2 file_open_test 1000 0.22
3 file_overwrite_test 1000 0.34
4 file_attr_test 1000 0.20
5 file_list_test 1000 0.19
6 file_list_single_test 1000 0.22
7 file_list_none_test 1000 0.17
8 file_delete_test 1000 0.31
9 file_mkdir_test 1000 0.22
10 file_rmdir_test 1000 0.27
11 file_create_test 2000 0.61
12 file_open_test 2000 0.44
13 file_overwrite_test 2000 0.69
14 file_attr_test 2000 0.44
15 file_list_test 2000 0.41
16 file_list_single_test 2000 0.53
17 file_list_none_test 2000 0.36
18 file_delete_test 2000 0.64
19 file_mkdir_test 2000 0.47
20 file_rmdir_test 2000 0.55
21 file_create_test 3000 0.97
22 file_open_test 3000 0.69
23 file_overwrite_test 3000 1.08
24 file_attr_test 3000 0.64
25 file_list_test 3000 0.64
26 file_list_single_test 3000 0.88
27 file_list_none_test 3000 0.56
28 file_delete_test 3000 0.97
29 file_mkdir_test 3000 0.73
30 file_rmdir_test 3000 0.80
31 file_create_test 4000 1.20
32 file_open_test 4000 0.91
33 file_overwrite_test 4000 1.49
34 file_attr_test 4000 0.83
35 file_list_test 4000 0.83
36 file_list_single_test 4000 1.19
37 file_list_none_test 4000 0.75
38 file_delete_test 4000 1.28
39 file_mkdir_test 4000 0.92
40 file_rmdir_test 4000 1.08
41 file_create_test 5000 1.44
42 file_open_test 5000 1.09
43 file_overwrite_test 5000 1.83
44 file_attr_test 5000 1.02
45 file_list_test 5000 1.03
46 file_list_single_test 5000 1.50
47 file_list_none_test 5000 0.94
48 file_delete_test 5000 1.58
49 file_mkdir_test 5000 1.12
50 file_rmdir_test 5000 1.42
51 iter.file_open_test 10 1.47
52 iter.file_attr_test 10 1.34
53 iter.file_list_single_test 10 1.31
54 iter.file_list_none_test 10 1.17
55 iter.file_open_test 20 2.84
56 iter.file_attr_test 20 2.61
57 iter.file_list_single_test 20 2.53
58 iter.file_list_none_test 20 2.31
59 iter.file_open_test 30 4.20
60 iter.file_attr_test 30 3.88
61 iter.file_list_single_test 30 3.78
62 iter.file_list_none_test 30 3.58
63 iter.file_open_test 40 5.59
64 iter.file_attr_test 40 5.12
65 iter.file_list_single_test 40 4.89
66 iter.file_list_none_test 40 4.62
67 iter.file_open_test 50 7.05
68 iter.file_attr_test 50 6.42
69 iter.file_list_single_test 50 6.22
70 iter.file_list_none_test 50 5.72
71 rdwr_cc_write_page_test 100 0.23
72 rdwr_cc_read_page_test 100 0.25
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.06
75 rdwr_cc_write_page_test 200 0.45
76 rdwr_cc_read_page_test 200 0.41
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.12
79 rdwr_cc_write_page_test 300 0.66
80 rdwr_cc_read_page_test 300 0.59
81 rdwr_cc_write_large_test 300 0.20
82 rdwr_cc_read_large_test 300 0.16
83 rdwr_cc_write_page_test 400 0.87
84 rdwr_cc_read_page_test 400 0.77
85 rdwr_cc_write_large_test 400 0.25
86 rdwr_cc_read_large_test 400 0.20
87 rdwr_cc_write_page_test 500 1.08
88 rdwr_cc_read_page_test 500 0.95
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.25
91 rdwr_nc_write_page_test 100 2.61
92 rdwr_nc_read_page_test 100 2.41
93 rdwr_nc_write_large_test 100 0.27
94 rdwr_nc_read_large_test 100 0.23
95 rdwr_nc_write_page_test 200 5.23
96 rdwr_nc_read_page_test 200 4.76
97 rdwr_nc_write_large_test 200 0.50
98 rdwr_nc_read_large_test 200 0.45
99 rdwr_nc_write_page_test 300 8.03
100 rdwr_nc_read_page_test 300 7.17
101 rdwr_nc_write_large_test 300 0.73
102 rdwr_nc_read_large_test 300 0.66
103 rdwr_nc_write_page_test 400 10.75
104 rdwr_nc_read_page_test 400 9.47
105 rdwr_nc_write_large_test 400 0.98
106 rdwr_nc_read_large_test 400 0.86
107 rdwr_nc_write_page_test 500 13.12
108 rdwr_nc_read_page_test 500 11.69
109 rdwr_nc_write_large_test 500 1.25
110 rdwr_nc_read_large_test 500 1.27
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.08
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.12
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.17
117 mmap_write_test 400 0.06
118 mmap_read_test 400 0.22
119 mmap_write_test 500 0.08
120 mmap_read_test 500 0.27

View File

@ -0,0 +1,120 @@
file_create_test,1000,0.28
file_open_test,1000,0.22
file_overwrite_test,1000,0.36
file_attr_test,1000,0.19
file_list_test,1000,0.17
file_list_single_test,1000,0.22
file_list_none_test,1000,0.19
file_delete_test,1000,0.31
file_mkdir_test,1000,0.23
file_rmdir_test,1000,0.28
file_create_test,2000,0.58
file_open_test,2000,0.52
file_overwrite_test,2000,0.84
file_attr_test,2000,0.52
file_list_test,2000,0.44
file_list_single_test,2000,0.56
file_list_none_test,2000,0.38
file_delete_test,2000,0.64
file_mkdir_test,2000,0.47
file_rmdir_test,2000,0.55
file_create_test,3000,0.92
file_open_test,3000,0.66
file_overwrite_test,3000,1.06
file_attr_test,3000,0.66
file_list_test,3000,0.64
file_list_single_test,3000,0.86
file_list_none_test,3000,0.56
file_delete_test,3000,1.00
file_mkdir_test,3000,0.77
file_rmdir_test,3000,0.86
file_create_test,4000,1.22
file_open_test,4000,0.89
file_overwrite_test,4000,1.44
file_attr_test,4000,0.81
file_list_test,4000,0.84
file_list_single_test,4000,1.12
file_list_none_test,4000,0.73
file_delete_test,4000,1.31
file_mkdir_test,4000,0.97
file_rmdir_test,4000,1.12
file_create_test,5000,1.53
file_open_test,5000,1.05
file_overwrite_test,5000,1.73
file_attr_test,5000,1.02
file_list_test,5000,1.03
file_list_single_test,5000,1.41
file_list_none_test,5000,0.94
file_delete_test,5000,1.61
file_mkdir_test,5000,1.20
file_rmdir_test,5000,1.36
iter.file_open_test,10,1.44
iter.file_attr_test,10,1.38
iter.file_list_single_test,10,1.26
iter.file_list_none_test,10,1.14
iter.file_open_test,20,2.89
iter.file_attr_test,20,2.61
iter.file_list_single_test,20,2.52
iter.file_list_none_test,20,2.45
iter.file_open_test,30,4.19
iter.file_attr_test,30,3.86
iter.file_list_single_test,30,3.77
iter.file_list_none_test,30,3.47
iter.file_open_test,40,5.64
iter.file_attr_test,40,5.17
iter.file_list_single_test,40,4.84
iter.file_list_none_test,40,4.55
iter.file_open_test,50,7.00
iter.file_attr_test,50,6.44
iter.file_list_single_test,50,6.12
iter.file_list_none_test,50,5.64
rdwr_cc_write_page_test,100,0.27
rdwr_cc_read_page_test,100,0.23
rdwr_cc_write_large_test,100,0.06
rdwr_cc_read_large_test,100,0.06
rdwr_cc_write_page_test,200,0.44
rdwr_cc_read_page_test,200,0.41
rdwr_cc_write_large_test,200,0.12
rdwr_cc_read_large_test,200,0.11
rdwr_cc_write_page_test,300,0.67
rdwr_cc_read_page_test,300,0.59
rdwr_cc_write_large_test,300,0.19
rdwr_cc_read_large_test,300,0.16
rdwr_cc_write_page_test,400,0.87
rdwr_cc_read_page_test,400,0.77
rdwr_cc_write_large_test,400,0.25
rdwr_cc_read_large_test,400,0.22
rdwr_cc_write_page_test,500,1.09
rdwr_cc_read_page_test,500,0.94
rdwr_cc_write_large_test,500,0.31
rdwr_cc_read_large_test,500,0.27
rdwr_nc_write_page_test,100,2.56
rdwr_nc_read_page_test,100,2.38
rdwr_nc_write_large_test,100,0.23
rdwr_nc_read_large_test,100,0.23
rdwr_nc_write_page_test,200,5.20
rdwr_nc_read_page_test,200,4.62
rdwr_nc_write_large_test,200,0.48
rdwr_nc_read_large_test,200,0.45
rdwr_nc_write_page_test,300,7.70
rdwr_nc_read_page_test,300,6.86
rdwr_nc_write_large_test,300,0.73
rdwr_nc_read_large_test,300,0.70
rdwr_nc_write_page_test,400,10.23
rdwr_nc_read_page_test,400,9.17
rdwr_nc_write_large_test,400,0.95
rdwr_nc_read_large_test,400,0.94
rdwr_nc_write_page_test,500,12.91
rdwr_nc_read_page_test,500,11.66
rdwr_nc_write_large_test,500,1.22
rdwr_nc_read_large_test,500,1.25
mmap_write_test,100,0.01
mmap_read_test,100,0.06
mmap_write_test,200,0.03
mmap_read_test,200,0.12
mmap_write_test,300,0.05
mmap_read_test,300,0.17
mmap_write_test,400,0.06
mmap_read_test,400,0.23
mmap_write_test,500,0.06
mmap_read_test,500,0.28
1 file_create_test 1000 0.28
2 file_open_test 1000 0.22
3 file_overwrite_test 1000 0.36
4 file_attr_test 1000 0.19
5 file_list_test 1000 0.17
6 file_list_single_test 1000 0.22
7 file_list_none_test 1000 0.19
8 file_delete_test 1000 0.31
9 file_mkdir_test 1000 0.23
10 file_rmdir_test 1000 0.28
11 file_create_test 2000 0.58
12 file_open_test 2000 0.52
13 file_overwrite_test 2000 0.84
14 file_attr_test 2000 0.52
15 file_list_test 2000 0.44
16 file_list_single_test 2000 0.56
17 file_list_none_test 2000 0.38
18 file_delete_test 2000 0.64
19 file_mkdir_test 2000 0.47
20 file_rmdir_test 2000 0.55
21 file_create_test 3000 0.92
22 file_open_test 3000 0.66
23 file_overwrite_test 3000 1.06
24 file_attr_test 3000 0.66
25 file_list_test 3000 0.64
26 file_list_single_test 3000 0.86
27 file_list_none_test 3000 0.56
28 file_delete_test 3000 1.00
29 file_mkdir_test 3000 0.77
30 file_rmdir_test 3000 0.86
31 file_create_test 4000 1.22
32 file_open_test 4000 0.89
33 file_overwrite_test 4000 1.44
34 file_attr_test 4000 0.81
35 file_list_test 4000 0.84
36 file_list_single_test 4000 1.12
37 file_list_none_test 4000 0.73
38 file_delete_test 4000 1.31
39 file_mkdir_test 4000 0.97
40 file_rmdir_test 4000 1.12
41 file_create_test 5000 1.53
42 file_open_test 5000 1.05
43 file_overwrite_test 5000 1.73
44 file_attr_test 5000 1.02
45 file_list_test 5000 1.03
46 file_list_single_test 5000 1.41
47 file_list_none_test 5000 0.94
48 file_delete_test 5000 1.61
49 file_mkdir_test 5000 1.20
50 file_rmdir_test 5000 1.36
51 iter.file_open_test 10 1.44
52 iter.file_attr_test 10 1.38
53 iter.file_list_single_test 10 1.26
54 iter.file_list_none_test 10 1.14
55 iter.file_open_test 20 2.89
56 iter.file_attr_test 20 2.61
57 iter.file_list_single_test 20 2.52
58 iter.file_list_none_test 20 2.45
59 iter.file_open_test 30 4.19
60 iter.file_attr_test 30 3.86
61 iter.file_list_single_test 30 3.77
62 iter.file_list_none_test 30 3.47
63 iter.file_open_test 40 5.64
64 iter.file_attr_test 40 5.17
65 iter.file_list_single_test 40 4.84
66 iter.file_list_none_test 40 4.55
67 iter.file_open_test 50 7.00
68 iter.file_attr_test 50 6.44
69 iter.file_list_single_test 50 6.12
70 iter.file_list_none_test 50 5.64
71 rdwr_cc_write_page_test 100 0.27
72 rdwr_cc_read_page_test 100 0.23
73 rdwr_cc_write_large_test 100 0.06
74 rdwr_cc_read_large_test 100 0.06
75 rdwr_cc_write_page_test 200 0.44
76 rdwr_cc_read_page_test 200 0.41
77 rdwr_cc_write_large_test 200 0.12
78 rdwr_cc_read_large_test 200 0.11
79 rdwr_cc_write_page_test 300 0.67
80 rdwr_cc_read_page_test 300 0.59
81 rdwr_cc_write_large_test 300 0.19
82 rdwr_cc_read_large_test 300 0.16
83 rdwr_cc_write_page_test 400 0.87
84 rdwr_cc_read_page_test 400 0.77
85 rdwr_cc_write_large_test 400 0.25
86 rdwr_cc_read_large_test 400 0.22
87 rdwr_cc_write_page_test 500 1.09
88 rdwr_cc_read_page_test 500 0.94
89 rdwr_cc_write_large_test 500 0.31
90 rdwr_cc_read_large_test 500 0.27
91 rdwr_nc_write_page_test 100 2.56
92 rdwr_nc_read_page_test 100 2.38
93 rdwr_nc_write_large_test 100 0.23
94 rdwr_nc_read_large_test 100 0.23
95 rdwr_nc_write_page_test 200 5.20
96 rdwr_nc_read_page_test 200 4.62
97 rdwr_nc_write_large_test 200 0.48
98 rdwr_nc_read_large_test 200 0.45
99 rdwr_nc_write_page_test 300 7.70
100 rdwr_nc_read_page_test 300 6.86
101 rdwr_nc_write_large_test 300 0.73
102 rdwr_nc_read_large_test 300 0.70
103 rdwr_nc_write_page_test 400 10.23
104 rdwr_nc_read_page_test 400 9.17
105 rdwr_nc_write_large_test 400 0.95
106 rdwr_nc_read_large_test 400 0.94
107 rdwr_nc_write_page_test 500 12.91
108 rdwr_nc_read_page_test 500 11.66
109 rdwr_nc_write_large_test 500 1.22
110 rdwr_nc_read_large_test 500 1.25
111 mmap_write_test 100 0.01
112 mmap_read_test 100 0.06
113 mmap_write_test 200 0.03
114 mmap_read_test 200 0.12
115 mmap_write_test 300 0.05
116 mmap_read_test 300 0.17
117 mmap_write_test 400 0.06
118 mmap_read_test 400 0.23
119 mmap_write_test 500 0.06
120 mmap_read_test 500 0.28

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,126 @@
# WinFsp Registry Settings
<details>
<summary>
📁 <code>HKLM\SYSTEM\CurrentControlSet\Services\WinFsp</code>
</summary>
<blockquote>
Stores information about the WinFsp file system driver as required by the Windows OS.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SYSTEM\CurrentControlSet\Services\WinFsp.Launcher</code>
</summary>
<blockquote>
Stores information about the WinFsp Launcher service as required by the Windows OS.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SYSTEM\CurrentControlSet\Services\WinFsp.Np</code>
</summary>
<blockquote>
Stores information about the WinFsp network provider as required by the Windows OS.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\WinFsp</code>
</summary>
<blockquote>
Stores information about the WinFsp event source as required by the Windows OS.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order</code>
</summary>
<blockquote>
Stores information about the WinFsp network provider as required by the Windows OS.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SOFTWARE\WinFsp</code>
</summary>
<blockquote>
Primary registry key used to store WinFsp settings. On a 64-bit system (x64 or ARM64) this key is stored in the 32-bit portion of the registry and its true location is `HKLM\SOFTWARE\WOW6432Node\WinFsp`.
* `InstallDir (REG_SZ)`: Contains the WinFsp installation directory.
* `DistinctPermsForSameOwnerGroup (REG_DWORD)`: Directs how WinFsp-FUSE should consider UNIX owner and group permissions in the case when the Windows owner and group SID are the same (for example, this can happen when someone uses a Microsoft account as their primary login). When this setting is 0 and the Windows owner and group SID are the same, WinFsp-FUSE combines the UNIX owner and group permissions (for example, user permission `rw-` and group permission `---` combine to `---`), which can result in inadvertent "access denied" errors. When this setting is 1 and even if the Windows owner and group SID are the same, WinFsp-FUSE looks at the UNIX owner permissions and the UNIX group permissions separately. The default value is 1 since v1.11B1 and was 0 in earlier versions.
* `MountBroadcastDriveChange (REG_DWORD)`: A value of 1 instructs WinFsp to broadcast an additional "drive change" message to all top-level windows during mounting and unmounting. The default value is 0. Normally the Windows infrastructure broadcasts a `WM_DEVICECHANGE` message whenever a drive gets added/removed. In some rare systems it is possible for this message to get lost or stalled. The workaround for these rare systems is to enable this registry setting, in which case WinFsp will broadcast the `WM_DEVICECHANGE` using a slightly different but more reliable method than the one Windows uses.
* `MountDoNotUseLauncher (REG_DWORD)`: A value of 1 disallows the use of the Launcher for drive mounting. The default value of 0 allows use of the Launcher for drive mounting when necessary. In general the Launcher is not necessary for mounting. However when running a file system in the Windows Service context (session 0) under an account that is not LocalSystem (e.g. `NT AUTHORITY\NETWORK SERVICE`), the Launcher is used to create global drives.
* `MountUseMountmgrFromFSD (REG_DWORD)`: A value of 1 instructs WinFsp to use the Mount Manager from the FSD (File System Driver) which runs in kernel mode. The default value of 0 instructs WinFsp to use the Mount Manager from the DLL which runs in user mode. Using the Mount Manager from user mode requires Administrator access and this setting allows a file system to circumvent the Administrator access requirement. This setting is not recommended for general use.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SOFTWARE\WinFsp\Services\:SERVICE</code>
</summary>
<blockquote>
Registry key used to store information about the WinFsp service with name `:SERVICE`. WinFsp services are user mode file systems controlled by the Launcher; for more information see the [Service Architecture](WinFsp-Service-Architecture.asciidoc) document. On a 64-bit system (x64 or ARM64) this key is stored in the 32-bit portion of the registry and its true location is `HKLM\SOFTWARE\WOW6432Node\WinFsp\Services\:SERVICE`.
* `Agent (REG_SZ)`: UNDOCUMENTED (see source code).
* `Executable (REG_SZ)`: Contains the path to the executable to use when launching the service.
* `CommandLine (REG_SZ)`: Contains the command line to use when launching the service.
* `WorkDirectory (REG_SZ)`: Contains the working directory to use when launching the service.
* `RunAs (REG_SZ)`: Controls the account used when launching the service. Possible values are `LocalSystem` (default), `LocalService`, `NetworkService` and `.` (dot). The `.` (dot) value means that the service should be launched as the account that is launching the file system (e.g. via `net use` or Explorer's "Map Network Drive").
* `Security (REG_SZ)`: Controls which users can launch the service.
* `AuthPackage (REG_SZ)`: UNDOCUMENTED (see source code).
* `Stderr (REG_SZ)`: Specifies a path that the Launcher will redirect service error output to.
* `JobControl (REG_DWORD)`: Controls whether the service is running in the same job as the Launcher. The default value is 1.
* `Credentials (REG_DWORD)`: Controls whether the file system requires credentials.
* `AuthPackageId (REG_DWORD)`: UNDOCUMENTED (see source code).
* `Recovery (REG_DWORD)`: A value of 1 instructs the Launcher to restart a service that has crashed. The default value is 0.
</blockquote>
</details>
<details>
<summary>
📁 <code>HKLM\SOFTWARE\WinFsp\Fsext</code>
</summary>
<blockquote>
Registry key used to store WinFsp fsext provider information. Fsext providers are kernel mode file systems that interface with WinFsp; for more information see the [Kernel Mode File Systems](WinFsp-Kernel-Mode-File-Systems.asciidoc) document. On a 64-bit system (x64 or ARM64) this key is stored in the 32-bit portion of the registry and its true location is `HKLM\SOFTWARE\WOW6432Node\WinFsp\Fsext`.
* `:CTLCODE (REG_SZ)`: The `:CTLCODE` name is the string representation of the fsext provider's transact code in `%08lx` format and the value is the provider's driver name.
</blockquote>
</details>

View File

@ -538,7 +538,8 @@ static NTSTATUS GetFileInfoInternal(HANDLE Handle, FSP_FSCTL_FILE_INFO *FileInfo
FileInfo->LastAccessTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastAccessTime)->QuadPart; FileInfo->LastAccessTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastAccessTime)->QuadPart;
FileInfo->LastWriteTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastWriteTime)->QuadPart; FileInfo->LastWriteTime = ((PLARGE_INTEGER)&ByHandleFileInfo.ftLastWriteTime)->QuadPart;
FileInfo->ChangeTime = FileInfo->LastWriteTime; FileInfo->ChangeTime = FileInfo->LastWriteTime;
FileInfo->IndexNumber = 0; FileInfo->IndexNumber =
((UINT64)ByHandleFileInfo.nFileIndexHigh << 32) | (UINT64)ByHandleFileInfo.nFileIndexLow;
FileInfo->HardLinks = 0; FileInfo->HardLinks = 0;
return STATUS_SUCCESS; return STATUS_SUCCESS;

View File

@ -0,0 +1,192 @@
= Performance Testing
:caption:
This document discusses performance testing for WinFsp. The goal of this performance testing is to discover optimization opportunities for WinFsp and compare its performance to that of NTFS and Dokany.
== Executive Summary
This performance testing shows that WinFsp has excellent performance in all tested scenarios. It outperforms NTFS in most scenarios (an unfair comparison as NTFS is a disk file system and WinFsp is tested with an in-memory file system). It also outperforms Dokany in all scenarios, often by an order of magnitude.
ifdef::env-browser[chart::bar[data-uri="WinFsp-Performance-Testing/file_tests.csv",file="WinFsp-Performance-Testing/file_tests.png",opt="y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_tests.png[]]
ifdef::env-browser[chart::bar[data-uri="WinFsp-Performance-Testing/rdwr_tests.csv",file="WinFsp-Performance-Testing/rdwr_tests.png",opt="y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_tests.png[]]
== Fsbench
All testing was performed using a new performance test suite developed as part of WinFsp, called https://github.com/winfsp/winfsp/blob/master/tst/fsbench/fsbench.c[fsbench]. Fsbench was developed because it allows the creation of tests that are important to file system developers; for example, it can answer questions of the type: "how long does it take to delete 1000 files" or "how long does it take to list a directory with 10000 files in it".
Fsbench is based on the https://github.com/winfsp/winfsp/tree/master/ext/tlib[tlib] library, originally from the *secfs* project. Tlib is usually used to develop regression test suites in C/C++, but can be also used to create performance tests.
Fsbench currently includes the following tests:
[width="100%",cols="20%,60%,20%",options="header"]
|===
|Test |Measures performance of |Parameters
|file_create_test |CreateFileW(CREATE_NEW) / CloseHandle |file count
|file_open_test |CreateFileW(OPEN_EXISTING) / CloseHandle |file count
|file_overwrite_test|CreateFileW(CREATE_ALWAYS) / CloseHandle with existing files|file count
|file_list_test |FindFirstFileW / FindNextFile / FindClose |iterations
|file_delete_test |DeleteFileW |file count
|file_mkdir_test |CreateDirectoryW |file count
|file_rmdir_test |RemoveDirectoryW |file count
|rdwr_cc_write_page_test |WriteFile (1 page; cached) |iterations
|rdwr_cc_read_page_test |ReadFile (1 page; cached) |iterations
|rdwr_nc_write_page_test |WriteFile (1 page; non-cached) |iterations
|rdwr_nc_read_page_test |ReadFile (1 page; non-cached) |iterations
|rdwr_cc_write_large_test |WriteFile (16 pages; cached) |iterations
|rdwr_cc_read_large_test |ReadFile (16 pages; cached) |iterations
|rdwr_nc_write_large_test |WriteFile (16 pages; non-cached) |iterations
|rdwr_nc_read_large_test |ReadFile (16 pages; non-cached) |iterations
|mmap_write_test |Memory mapped write test |iterations
|mmap_write_test |Memory mapped read test |iterations
|===
== Tested File Systems
=== NTFS
The comparison to NTFS is very important to establish a baseline. It is also very misleading because NTFS is a disk file system and MEMFS (either the WinFsp or Dokany variants) is an in memory file system. The tests will show that MEMFS is faster than NTFS. This should not be taken to mean that we are trying to make the (obvious) claim that an in memory file system is faster than a disk file system, but to show that the approach of writing a file system in user mode is a valid proposition and can be efficient.
=== WinFsp/MEMFS
MEMFS is the file system used to test WinFsp and shipped as a sample bundled with the WinFsp installer. MEMFS is a simple in memory file system and as such is very fast under most conditions. This is desirable because our goal with this performance testing is to measure the speed of the WinFsp system components rather the performance of a complex user mode file system. MEMFS has minimal overhead and is ideal for this purpose.
WinFsp/MEMFS can be run in different configurations, which enable or disable WinFsp caching features. The tested configurations were:
- An infinite FileInfoTimeout, which enables caching of metadata and data.
- A FileInfoTimeout of 1s (second), which enables caching of metadata but disables caching of data.
- A FileInfoTimeout of 0, which completely disables caching.
The WinFsp git commit at the time of testing was d804f5674d76f11ea86d14f4bcb1157e6e40e719.
=== Dokany/MEMFS
To achieve fairness when comparing Dokany to WinFsp the MEMFS file system has been ported to Dokany. Substantial care was taken to ensure that WinFsp/MEMFS and Dokany/MEMFS perform equally well, so that the performance of the Dokany FSD and user-mode components can be measured and compared accurately.
The Dokany/MEMFS project has its own https://github.com/billziss-gh/memfs-dokany[repository]. The project comes without a license, which means that it may not be used for any purpose other than as a reference.
The Dokany version used for testing was 1.0.1. The Dokany/MEMFS git commit was 27a678d7c0d5ee2fb3fb2ecc8e38210857ae941c.
== Test Environment
Tests were performed on an idle computer/VM. There was a reboot of both the computer and VM before each file system was tested. Each test was run twice and the smaller time value chosen. The assumption is that even in a seemingly idle desktop system there is some activity which will affect the results; the smaller value is the preferred one to use because it reflects the time when there is less or no other activity.
The test environment was as follows:
----
MacBook Pro (Retina, 13-inch, Early 2015)
3.1 GHz Intel Core i7
16 GB 1867 MHz DDR3
500 GB SSD
VirtualBox Version 5.0.20 r106931
1 CPU
4 GB RAM
80 GB Dynamically allocated differencing storage
Windows 10 (64-bit) Version 1511 (OS Build 10586.420)
----
== Test Results
In the graphs below we use consistent coloring to quickly identify a file system. Red is used for NTFS, yellow for WinFsp/MEMFS with a FileInfoTimeout of 0, green for WinFsp/MEMFS with a FileInfoTimeout of 1, light blue for WinFsp/MEMFS with an infinite FileInfoTimeout and deep blue for Dokany/MEMFS.
In all tests lower times are better (the file system is faster).
=== File Tests
These tests measure the performance of creating, opening, overwriting and listing files and directories.
==== file_create_test
This test measures the performance of CreateFileW(CREATE_NEW) / CloseHandle. WinFsp has the best performance here. Dokany follows and NTFS is last as it has to actually update its data structures on disk.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_create_test.csv",file="WinFsp-Performance-Testing/file_create_test.png",opt="x-label=file count,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_create_test.png[]]
==== file_open_test
This test measures the performance of CreateFileW(OPEN_EXISTING) / CloseHandle. WinFsp again has the best (although uneven) performance, followed by NTFS and then Dokany.
WinFsp appears to have very uneven performance here. In particular notice that opening 1000 files is slower than opening 2000 files, which makes no sense! I suspect that the test observes an initial acquisition of resouces when the test first starts, which is not necessary when the test runs for 2000 files at a later time. This uneven performance should probably be investigated in the future.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_open_test.csv",file="WinFsp-Performance-Testing/file_open_test.png",opt="x-label=file count,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_open_test.png[]]
==== file_overwrite_test
This test measures the performance of CreateFileW(CREATE_ALWAYS) / CloseHandle. WinFsp is fastest, followed by NTFS and then Dokany.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_overwrite_test.csv",file="WinFsp-Performance-Testing/file_overwrite_test.png",opt="x-label=file count,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_overwrite_test.png[]]
==== file_list_test
This test measures the performance of FindFirstFileW / FindNextFile / FindClose. NTFS wins this scenario, likely because it can satisfy the list operation from cache. WinFsp has overall good performance. Dokany appears to show slightly quadratic performance in this scenario.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_list_test.csv",file="WinFsp-Performance-Testing/file_list_test.png",opt="x-label=file count,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_list_test.png[]]
==== file_delete_test
This test measures the performance of DeleteFileW. WinFsp has the best performance, followed by Dokany and NTFS with very similar performance.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/file_delete_test.csv",file="WinFsp-Performance-Testing/file_delete_test.png",opt="x-label=file count,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/file_delete_test.png[]]
=== Read/Write Tests
These tests measure the performance of cached, non-cached and memory-mapped I/O.
==== rdwr_cc_write_page_test
This test measures the performance of cached WriteFile with 1 page writes. NTFS and WinFsp with an infinite FileInfoTimeout have the best performance, with a clear edge to NTFS (likely because of its use of FastIO, which WinFsp does not currently support). WinFsp with a FileInfoTimeout of 0 or 1 performance is next, because WinFsp does not use the NTOS Cache Manager in this scenario. Dokany performance is last.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_cc_write_page_test.csv",file="WinFsp-Performance-Testing/rdwr_cc_write_page_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_cc_write_page_test.png[]]
==== rdwr_cc_read_page_test
This test measures the performance of cached ReadFile with 1 page reads. The results here are very similar to the rdwr_cc_write_page_test case and similar comments apply.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_cc_read_page_test.csv",file="WinFsp-Performance-Testing/rdwr_cc_read_page_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_cc_read_page_test.png[]]
==== rdwr_nc_write_page_test
This test measures the performance of non-cached WriteFile with 1 page writes. WinFsp has the best performance, followed by Dokany. NTFS shows bad performance, which of course make sense as we are asking it to write all data to the disk.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_nc_write_page_test.csv",file="WinFsp-Performance-Testing/rdwr_nc_write_page_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_nc_write_page_test.png[]]
==== rdwr_nc_read_page_test
This test measures the performance of non-cached ReadFile with 1 page reads. The results here are very similar to the rdwr_nc_write_page_test case and similar comments apply.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/rdwr_nc_read_page_test.csv",file="WinFsp-Performance-Testing/rdwr_nc_read_page_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/rdwr_nc_read_page_test.png[]]
==== mmap_write_test
This test measures the performance of memory mapped writes. NTFS and WinFsp seem to have identical performance here, which actually makes sense because memory mapped I/O is effectively always cached and most of the actual I/O is done asynchronously by the system.
There are no results for Dokany as it seems to (still) not support memory mapped files:
----
Y:\>c:\Users\billziss\Projects\winfsp\build\VStudio\build\Release\fsbench-x64.exe --mmap=100 mmap*
mmap_write_test........................ KO
ASSERT(0 != Mapping) failed at fsbench.c:226:mmap_dotest
----
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/mmap_write_test.csv",file="WinFsp-Performance-Testing/mmap_write_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/mmap_write_test.png[]]
==== mmap_read_test
This test measures the performance of memory mapped reads. Again NTFS and WinFsp seem to have identical performance here.
There are no results for Dokany as it faces the same issue as with mmap_write_test.
ifdef::env-browser[chart::line[data-uri="WinFsp-Performance-Testing/mmap_read_test.csv",file="WinFsp-Performance-Testing/mmap_read_test.png",opt="x-label=iterations,y-label=time"]]
ifndef::env-browser[image::WinFsp-Performance-Testing/mmap_read_test.png[]]

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -48,25 +48,51 @@ void tlib_add_test_opt(const char *name, void (*fn)(void))
add_test_to_list(name, fn, 1, &test_tail); add_test_to_list(name, fn, 1, &test_tail);
} }
struct hook
{
void (*fn)(const char *name, void (*fn)(void), int v);
struct hook *next;
};
static struct hook hook_sentinel = { .next = &hook_sentinel };
static struct hook *hook_tail = &hook_sentinel;
static void add_hook_to_list(void (*fn)(void), struct hook **tail)
{
struct hook *hook = calloc(1, sizeof *hook);
hook->fn = fn;
hook->next = (*tail)->next;
(*tail)->next = hook;
(*tail) = hook;
}
void tlib_add_hook(void (*fn)(const char *name, void (*fn)(void), int v))
{
add_hook_to_list(fn, &hook_tail);
}
static FILE *tlib_out, *tlib_err; static FILE *tlib_out, *tlib_err;
static jmp_buf test_jmp_buf, *test_jmp; static jmp_buf test_jmp_buf, *test_jmp;
static char assert_buf[256]; static char assert_buf[256];
static void test_printf(const char *fmt, ...); static void test_printf(const char *fmt, ...);
static double run_test(struct test *test) static double run_test(struct test *test)
{ {
double res;
for (struct hook *hook = hook_tail->next->next; 0 != hook->fn; hook = hook->next)
hook->fn(test->name, test->fn, +1);
#if defined(_WIN64) || defined(_WIN32) #if defined(_WIN64) || defined(_WIN32)
#pragma comment(lib, "winmm.lib") #pragma comment(lib, "winmm.lib")
unsigned long __stdcall timeGetTime(void); unsigned long __stdcall timeGetTime(void);
unsigned long t0 = timeGetTime(); unsigned long t0 = timeGetTime();
test->fn(); test->fn();
unsigned long t1 = timeGetTime(); unsigned long t1 = timeGetTime();
return (t1 - t0) / 1000.0; res = (t1 - t0) / 1000.0;
#else #else
time_t t0 = time(0); time_t t0 = time(0);
test->fn(); test->fn();
time_t t1 = time(0); time_t t1 = time(0);
return difftime(t1, t0); res = difftime(t1, t0);
#endif #endif
for (struct hook *hook = hook_tail->next->next; 0 != hook->fn; hook = hook->next)
hook->fn(test->name, test->fn, -1);
return res;
} }
static void do_test_default(struct test *test, int testno) static void do_test_default(struct test *test, int testno)
{ {

View File

@ -65,6 +65,23 @@ void tlib_add_test_suite(const char *name, void (*fn)(void));
void tlib_add_test(const char *name, void (*fn)(void)); void tlib_add_test(const char *name, void (*fn)(void));
void tlib_add_test_opt(const char *name, void (*fn)(void)); void tlib_add_test_opt(const char *name, void (*fn)(void));
/**
* Register a test hook to be run before and after every test.
*
* Test hooks are functions with prototype
* <code>void testhook(const char *name, void (*fn)(void), int v)</code>.
* The parameter v specifies that a test is about to be executed (v is +1)
* or it was just executed (v is -1).
*/
#define TESTHOOK(fn)\
do\
{\
void fn(const char *name, void (*fn)(void), int v);\
tlib_add_hook(fn);\
} while (0)
void tlib_add_hook(void (*fn)(const char *name, void (*fn)(void), int v));
/** /**
* Printf function. * Printf function.
* *

View File

@ -94,6 +94,9 @@ extern "C" {
#define FSP_FUSE_NOTIFY_CHFLAGS 0x0080 #define FSP_FUSE_NOTIFY_CHFLAGS 0x0080
#define FSP_FUSE_NOTIFY_TRUNCATE 0x0100 #define FSP_FUSE_NOTIFY_TRUNCATE 0x0100
/* getpath extension */
#define FSP_FUSE_HAS_GETPATH 1
struct fuse_file_info struct fuse_file_info
{ {
int flags; int flags;

View File

@ -91,14 +91,20 @@ extern const __declspec(selectany) GUID FspFsvrtDeviceClassGuid =
/* fsctl device codes */ /* fsctl device codes */
#define FSP_FSCTL_MOUNTDEV \ #define FSP_FSCTL_MOUNTDEV \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'M', METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'M', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_MOUNTMGR \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'm', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_VOLUME_NAME \ #define FSP_FSCTL_VOLUME_NAME \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'N', METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'N', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_VOLUME_LIST \ #define FSP_FSCTL_VOLUME_LIST \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'L', METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'L', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_TRANSACT \ #define FSP_FSCTL_TRANSACT \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'T', METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'T', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_IOCTL_TRANSACT \
CTL_CODE(0x8000 | ('F'<<8) | 'W', 0x800 + 'T', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_TRANSACT_BATCH \ #define FSP_FSCTL_TRANSACT_BATCH \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 't', METHOD_OUT_DIRECT, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 't', METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
#define FSP_IOCTL_TRANSACT_BATCH \
CTL_CODE(0x8000 | ('F'<<8) | 'W', 0x800 + 't', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_STOP \ #define FSP_FSCTL_STOP \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'S', METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'S', METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSP_FSCTL_STOP0 \ #define FSP_FSCTL_STOP0 \
@ -109,6 +115,8 @@ extern const __declspec(selectany) GUID FspFsvrtDeviceClassGuid =
/* fsctl internal device codes (usable only in-kernel) */ /* fsctl internal device codes (usable only in-kernel) */
#define FSP_FSCTL_TRANSACT_INTERNAL \ #define FSP_FSCTL_TRANSACT_INTERNAL \
CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'I', METHOD_NEITHER, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0x800 + 'I', METHOD_NEITHER, FILE_ANY_ACCESS)
#define FSP_IOCTL_TRANSACT_INTERNAL \
CTL_CODE(0x8000 | ('F'<<8) | 'W', 0x800 + 'I', METHOD_BUFFERED, FILE_ANY_ACCESS)
/* fsvol device codes */ /* fsvol device codes */
#define FSP_FSCTL_QUERY_WINFSP \ #define FSP_FSCTL_QUERY_WINFSP \
@ -220,7 +228,7 @@ enum
UINT32 CasePreservedExtendedAttributes:1; /* preserve case of EA (default is UPPERCASE) */\ UINT32 CasePreservedExtendedAttributes:1; /* preserve case of EA (default is UPPERCASE) */\
UINT32 WslFeatures:1; /* support features required for WSLinux */\ UINT32 WslFeatures:1; /* support features required for WSLinux */\
UINT32 DirectoryMarkerAsNextOffset:1; /* directory marker is next offset instead of last name */\ UINT32 DirectoryMarkerAsNextOffset:1; /* directory marker is next offset instead of last name */\
UINT32 RejectIrpPriorToTransact0:1; /* reject IRP's prior to FspFsctlTransact with 0 buffers */\ UINT32 RejectIrpPriorToTransact0:1; /* DEPRECATED: reject IRP's prior to FspFsctlTransact0 */\
UINT32 SupportsPosixUnlinkRename:1; /* file system supports POSIX-style unlink and rename */\ UINT32 SupportsPosixUnlinkRename:1; /* file system supports POSIX-style unlink and rename */\
UINT32 PostDispositionWhenNecessaryOnly:1; /* post Disposition for dirs or READONLY attr check */\ UINT32 PostDispositionWhenNecessaryOnly:1; /* post Disposition for dirs or READONLY attr check */\
UINT32 KmReservedFlags:1;\ UINT32 KmReservedFlags:1;\
@ -673,6 +681,8 @@ FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath,
PHANDLE PVolumeHandle); PHANDLE PVolumeHandle);
FSP_API NTSTATUS FspFsctlMakeMountdev(HANDLE VolumeHandle, FSP_API NTSTATUS FspFsctlMakeMountdev(HANDLE VolumeHandle,
BOOLEAN Persistent, GUID *UniqueId); BOOLEAN Persistent, GUID *UniqueId);
FSP_API NTSTATUS FspFsctlUseMountmgr(HANDLE VolumeHandle,
PWSTR MountPoint);
FSP_API NTSTATUS FspFsctlTransact(HANDLE VolumeHandle, FSP_API NTSTATUS FspFsctlTransact(HANDLE VolumeHandle,
PVOID ResponseBuf, SIZE_T ResponseBufSize, PVOID ResponseBuf, SIZE_T ResponseBufSize,
PVOID RequestBuf, SIZE_T *PRequestBufSize, PVOID RequestBuf, SIZE_T *PRequestBufSize,

View File

@ -1835,6 +1835,7 @@ NTSTATUS FspAccessCheck(FSP_FILE_SYSTEM *FileSystem,
/* /*
* POSIX Interop * POSIX Interop
*/ */
FSP_API NTSTATUS FspPosixSetUidMap(UINT32 Uid[], PSID Sid[], ULONG Count);
FSP_API NTSTATUS FspPosixMapUidToSid(UINT32 Uid, PSID *PSid); FSP_API NTSTATUS FspPosixMapUidToSid(UINT32 Uid, PSID *PSid);
FSP_API NTSTATUS FspPosixMapSidToUid(PSID Sid, PUINT32 PUid); FSP_API NTSTATUS FspPosixMapSidToUid(PSID Sid, PUINT32 PUid);
FSP_API VOID FspDeleteSid(PSID Sid, NTSTATUS (*CreateFunc)()); FSP_API VOID FspDeleteSid(PSID Sid, NTSTATUS (*CreateFunc)());

View File

@ -20,871 +20,22 @@
*/ */
#include <dll/library.h> #include <dll/library.h>
#include <sddl.h>
#include <stdarg.h>
static HANDLE FspDebugLogHandle = INVALID_HANDLE_VALUE; #if !defined(NDEBUG)
ULONG DebugRandom(VOID)
FSP_API VOID FspDebugLogSetHandle(HANDLE Handle)
{ {
FspDebugLogHandle = Handle; static SRWLOCK SlimLock = SRWLOCK_INIT;
} static ULONG Seed = 1;
ULONG Result;
FSP_API VOID FspDebugLog(const char *format, ...)
{ AcquireSRWLockExclusive(&SlimLock);
char buf[1024];
/* DbgPrint has a 512 byte limit, but wvsprintf is only safe with a 1024 byte buffer */ /* see ucrt sources */
va_list ap; Seed = Seed * 214013 + 2531011;
va_start(ap, format); Result = (Seed >> 16) & 0x7fff;
wvsprintfA(buf, format, ap);
va_end(ap); ReleaseSRWLockExclusive(&SlimLock);
buf[sizeof buf - 1] = '\0';
if (INVALID_HANDLE_VALUE != FspDebugLogHandle) return Result;
{
DWORD bytes;
WriteFile(FspDebugLogHandle, buf, lstrlenA(buf), &bytes, 0);
}
else
OutputDebugStringA(buf);
}
FSP_API VOID FspDebugLogSD(const char *format, PSECURITY_DESCRIPTOR SecurityDescriptor)
{
char *Sddl;
if (0 == SecurityDescriptor)
FspDebugLog(format, "null security descriptor");
else if (ConvertSecurityDescriptorToStringSecurityDescriptorA(SecurityDescriptor,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0))
{
FspDebugLog(format, Sddl);
LocalFree(Sddl);
}
else
FspDebugLog(format, "invalid security descriptor");
}
FSP_API VOID FspDebugLogSid(const char *format, PSID Sid)
{
char *S;
if (0 == Sid)
FspDebugLog(format, "null SID");
else if (ConvertSidToStringSidA(Sid, &S))
{
FspDebugLog(format, S);
LocalFree(S);
}
else
FspDebugLog(format, "invalid SID");
}
FSP_API VOID FspDebugLogFT(const char *format, PFILETIME FileTime)
{
SYSTEMTIME SystemTime;
char buf[32];
if (FileTimeToSystemTime(FileTime, &SystemTime))
{
wsprintfA(buf, "%04hu-%02hu-%02huT%02hu:%02hu:%02hu.%03huZ",
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
SystemTime.wMilliseconds);
FspDebugLog(format, buf);
}
else
FspDebugLog(format, "invalid file time");
}
#define MAKE_UINT32_PAIR(v) \
((PLARGE_INTEGER)&(v))->HighPart, ((PLARGE_INTEGER)&(v))->LowPart
static const char *FspDebugLogDispositionString(UINT32 CreateOptions)
{
switch ((CreateOptions >> 24) & 0xff)
{
case FILE_CREATE:
return "FILE_CREATE";
case FILE_OPEN:
return "FILE_OPEN";
case FILE_OPEN_IF:
return "FILE_OPEN_IF";
case FILE_OVERWRITE:
return "FILE_OVERWRITE";
case FILE_SUPERSEDE:
return "FILE_SUPERSEDE";
case FILE_OVERWRITE_IF:
return "FILE_OVERWRITE_IF";
default:
return "INVALID";
}
}
static const char *FspDebugLogUserContextString(UINT64 UserContext, UINT64 UserContext2, char *Buf)
{
wsprintfA(Buf, 0 == UserContext2 ? "%p" : "%p:%p", (PVOID)UserContext, (PVOID)UserContext2);
return Buf;
}
static const char *FspDebugLogFileTimeString(UINT64 FileTime, char *Buf)
{
SYSTEMTIME SystemTime;
if (0 == FileTime)
lstrcpyA(Buf, "0");
else if (FileTimeToSystemTime((PFILETIME)&FileTime, &SystemTime))
{
wsprintfA(Buf, "%04hu-%02hu-%02huT%02hu:%02hu:%02hu.%03huZ",
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
SystemTime.wMilliseconds);
}
else
lstrcpyA(Buf, "INVALID");
return Buf;
}
static const char *FspDebugLogFileInfoString(FSP_FSCTL_FILE_INFO *FileInfo, char *Buf)
{
char CreationTimeBuf[32], LastAccessTimeBuf[32], LastWriteTimeBuf[32], ChangeTimeBuf[32];
wsprintfA(Buf,
"{"
"FileAttributes=%lx, "
"ReparseTag=%lx, "
"AllocationSize=%lx:%lx, "
"FileSize=%lx:%lx, "
"CreationTime=%s, "
"LastAccessTime=%s, "
"LastWriteTime=%s, "
"ChangeTime=%s, "
"IndexNumber=%lx:%lx"
"}",
FileInfo->FileAttributes,
FileInfo->ReparseTag,
MAKE_UINT32_PAIR(FileInfo->AllocationSize),
MAKE_UINT32_PAIR(FileInfo->FileSize),
FspDebugLogFileTimeString(FileInfo->CreationTime, CreationTimeBuf),
FspDebugLogFileTimeString(FileInfo->LastAccessTime, LastAccessTimeBuf),
FspDebugLogFileTimeString(FileInfo->LastWriteTime, LastWriteTimeBuf),
FspDebugLogFileTimeString(FileInfo->ChangeTime, ChangeTimeBuf),
MAKE_UINT32_PAIR(FileInfo->IndexNumber));
return Buf;
}
static const char *FspDebugLogVolumeInfoString(FSP_FSCTL_VOLUME_INFO *VolumeInfo, char *Buf)
{
wsprintfA(Buf,
"{"
"TotalSize=%lx:%lx, "
"FreeSize=%lx:%lx, "
"VolumeLabel=\"%.32S\""
"}",
MAKE_UINT32_PAIR(VolumeInfo->TotalSize),
MAKE_UINT32_PAIR(VolumeInfo->FreeSize),
&VolumeInfo->VolumeLabel);
return Buf;
}
static const char *FspDebugLogWideCharBufferString(PVOID WideCharBuf, ULONG Length, char *Buf)
{
WCHAR TempWideCharBuf[64 + 1];
if (Length > sizeof TempWideCharBuf - sizeof(WCHAR))
Length = sizeof TempWideCharBuf - sizeof(WCHAR);
memcpy(TempWideCharBuf, WideCharBuf, Length);
TempWideCharBuf[Length / sizeof(WCHAR)] = L'\0';
wsprintfA(Buf, "%.64S", TempWideCharBuf);
return Buf;
}
static const char *FspDebugLogReparseDataString(PVOID ReparseData0, char *Buf)
{
union
{
PREPARSE_DATA_BUFFER D;
PREPARSE_GUID_DATA_BUFFER G;
} ReparseData;
char SubstituteName[64 + 1], PrintName[64 + 1];
ReparseData.D = ReparseData0;
if (0 == ReparseData.D->ReparseDataLength)
wsprintfA(Buf,
"{"
"ReparseTag=%#lx, "
"ReparseDataLength=%hu"
"}",
ReparseData.D->ReparseTag, ReparseData.D->ReparseDataLength);
else if (IO_REPARSE_TAG_MOUNT_POINT == ReparseData.D->ReparseTag)
wsprintfA(Buf,
"{"
"ReparseTag=IO_REPARSE_TAG_MOUNT_POINT, "
"SubstituteName=\"%s\", "
"PrintName=\"%s\""
"}",
FspDebugLogWideCharBufferString(
ReparseData.D->MountPointReparseBuffer.PathBuffer +
ReparseData.D->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
ReparseData.D->MountPointReparseBuffer.SubstituteNameLength,
SubstituteName),
FspDebugLogWideCharBufferString(
ReparseData.D->MountPointReparseBuffer.PathBuffer +
ReparseData.D->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
ReparseData.D->MountPointReparseBuffer.PrintNameLength,
PrintName));
else if (IO_REPARSE_TAG_SYMLINK == ReparseData.D->ReparseTag)
wsprintfA(Buf,
"{"
"ReparseTag=IO_REPARSE_TAG_SYMLINK, "
"SubstituteName=\"%s\", "
"PrintName=\"%s\", "
"Flags=%u"
"}",
FspDebugLogWideCharBufferString(
ReparseData.D->SymbolicLinkReparseBuffer.PathBuffer +
ReparseData.D->SymbolicLinkReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
ReparseData.D->SymbolicLinkReparseBuffer.SubstituteNameLength,
SubstituteName),
FspDebugLogWideCharBufferString(
ReparseData.D->SymbolicLinkReparseBuffer.PathBuffer +
ReparseData.D->SymbolicLinkReparseBuffer.PrintNameOffset / sizeof(WCHAR),
ReparseData.D->SymbolicLinkReparseBuffer.PrintNameLength,
PrintName),
ReparseData.D->SymbolicLinkReparseBuffer.Flags);
else if (IsReparseTagMicrosoft(ReparseData.D->ReparseTag))
wsprintfA(Buf,
"{"
"ReparseTag=%#lx, "
"ReparseDataLength=%hu"
"}",
ReparseData.D->ReparseTag, ReparseData.D->ReparseDataLength);
else
#define Guid ReparseData.G->ReparseGuid
wsprintfA(Buf,
"{"
"ReparseTag=%#lx, "
"ReparseDataLength=%hu, "
"ReparseGuid={%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
"}",
ReparseData.G->ReparseTag, ReparseData.G->ReparseDataLength,
Guid.Data1, Guid.Data2, Guid.Data3,
Guid.Data4[0], Guid.Data4[1], Guid.Data4[2], Guid.Data4[3],
Guid.Data4[4], Guid.Data4[5], Guid.Data4[6], Guid.Data4[7]);
#undef Guid
return Buf;
}
static VOID FspDebugLogRequestVoid(FSP_FSCTL_TRANSACT_REQ *Request, const char *Name)
{
FspDebugLog("%S[TID=%04lx]: %p: >>%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint, Name);
}
static VOID FspDebugLogResponseStatus(FSP_FSCTL_TRANSACT_RSP *Response, const char *Name)
{
FspDebugLog("%S[TID=%04lx]: %p: <<%s IoStatus=%lx[%ld]\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint, Name,
Response->IoStatus.Status, Response->IoStatus.Information);
}
FSP_API VOID FspDebugLogRequest(FSP_FSCTL_TRANSACT_REQ *Request)
{
char UserContextBuf[40];
char CreationTimeBuf[32], LastAccessTimeBuf[32], LastWriteTimeBuf[32];
char InfoBuf[256];
char *Sddl = 0;
switch (Request->Kind)
{
case FspFsctlTransactReservedKind:
FspDebugLogRequestVoid(Request, "RESERVED");
break;
case FspFsctlTransactCreateKind:
if (0 != Request->Req.Create.SecurityDescriptor.Offset)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Request->Buffer + Request->Req.Create.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: >>Create [%c%c%c%c%c%c] \"%S\", "
"%s, CreateOptions=%lx, FileAttributes=%lx, Security=%s%s%s, "
"AllocationSize=%lx:%lx, "
"AccessToken=%p[PID=%lx], DesiredAccess=%lx, GrantedAccess=%lx, "
"ShareAccess=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Create.UserMode ? 'U' : 'K',
Request->Req.Create.HasTraversePrivilege ? 'T' : '-',
Request->Req.Create.HasBackupPrivilege ? 'B' : '-',
Request->Req.Create.HasRestorePrivilege ? 'R' : '-',
Request->Req.Create.OpenTargetDirectory ? 'D' : '-',
Request->Req.Create.CaseSensitive ? 'C' : '-',
(PWSTR)Request->Buffer,
FspDebugLogDispositionString(Request->Req.Create.CreateOptions),
Request->Req.Create.CreateOptions & 0xffffff,
Request->Req.Create.FileAttributes,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "",
MAKE_UINT32_PAIR(Request->Req.Create.AllocationSize),
FSP_FSCTL_TRANSACT_REQ_TOKEN_HANDLE(Request->Req.Create.AccessToken),
FSP_FSCTL_TRANSACT_REQ_TOKEN_PID(Request->Req.Create.AccessToken),
Request->Req.Create.DesiredAccess,
Request->Req.Create.GrantedAccess,
Request->Req.Create.ShareAccess);
LocalFree(Sddl);
break;
case FspFsctlTransactOverwriteKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Overwrite%s %s%S%s%s, "
"FileAttributes=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Overwrite.Supersede ? " [Supersede]" : "",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Overwrite.UserContext, Request->Req.Overwrite.UserContext2,
UserContextBuf),
Request->Req.Overwrite.FileAttributes);
break;
case FspFsctlTransactCleanupKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Cleanup%s %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Cleanup.Delete ? " [Delete]" : "",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Cleanup.UserContext, Request->Req.Cleanup.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactCloseKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Close %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Close.UserContext, Request->Req.Close.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactReadKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Read %s%S%s%s, "
"Address=%p, Offset=%lx:%lx, Length=%ld, Key=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Read.UserContext, Request->Req.Read.UserContext2,
UserContextBuf),
(PVOID)Request->Req.Read.Address,
MAKE_UINT32_PAIR(Request->Req.Read.Offset),
Request->Req.Read.Length,
Request->Req.Read.Key);
break;
case FspFsctlTransactWriteKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Write%s %s%S%s%s, "
"Address=%p, Offset=%lx:%lx, Length=%ld, Key=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Write.ConstrainedIo ? " [C]" : "",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Write.UserContext, Request->Req.Write.UserContext2,
UserContextBuf),
(PVOID)Request->Req.Write.Address,
MAKE_UINT32_PAIR(Request->Req.Write.Offset),
Request->Req.Write.Length,
Request->Req.Write.Key);
break;
case FspFsctlTransactQueryInformationKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QueryInformation %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QueryInformation.UserContext, Request->Req.QueryInformation.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactSetInformationKind:
switch (Request->Req.SetInformation.FileInformationClass)
{
case 4/*FileBasicInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Basic] %s%S%s%s, "
"FileAttributes=%lx, CreationTime=%s, LastAccessTime=%s, LastWriteTime=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
Request->Req.SetInformation.Info.Basic.FileAttributes,
FspDebugLogFileTimeString(Request->Req.SetInformation.Info.Basic.CreationTime,
CreationTimeBuf),
FspDebugLogFileTimeString(Request->Req.SetInformation.Info.Basic.LastAccessTime,
LastAccessTimeBuf),
FspDebugLogFileTimeString(Request->Req.SetInformation.Info.Basic.LastWriteTime,
LastWriteTimeBuf));
break;
case 19/*FileAllocationInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Allocation] %s%S%s%s, "
"AllocationSize=%lx:%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
MAKE_UINT32_PAIR(Request->Req.SetInformation.Info.Allocation.AllocationSize));
break;
case 20/*FileEndOfFileInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [EndOfFile] %s%S%s%s, "
"FileSize = %lx:%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
MAKE_UINT32_PAIR(Request->Req.SetInformation.Info.EndOfFile.FileSize));
break;
case 13/*FileDispositionInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Disposition] %s%S%s%s, "
"%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
Request->Req.SetInformation.Info.Disposition.Delete ? "Delete" : "Undelete");
break;
case 64/*FileDispositionInformationEx*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [DispositionEx] %s%S%s%s, "
"Flags=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
Request->Req.SetInformation.Info.DispositionEx.Flags);
break;
case 10/*FileRenameInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Rename] %s%S%s%s, "
"NewFileName=\"%S\", AccessToken=%p[PID=%lx]\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
(PWSTR)(Request->Buffer + Request->Req.SetInformation.Info.Rename.NewFileName.Offset),
FSP_FSCTL_TRANSACT_REQ_TOKEN_HANDLE(Request->Req.SetInformation.Info.Rename.AccessToken),
FSP_FSCTL_TRANSACT_REQ_TOKEN_PID(Request->Req.SetInformation.Info.Rename.AccessToken));
break;
case 65/*FileRenameInformationEx*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [RenameEx] %s%S%s%s, "
"NewFileName=\"%S\", AccessToken=%p[PID=%lx], Flags=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
(PWSTR)(Request->Buffer + Request->Req.SetInformation.Info.Rename.NewFileName.Offset),
FSP_FSCTL_TRANSACT_REQ_TOKEN_HANDLE(Request->Req.SetInformation.Info.Rename.AccessToken),
FSP_FSCTL_TRANSACT_REQ_TOKEN_PID(Request->Req.SetInformation.Info.Rename.AccessToken),
Request->Req.SetInformation.Info.RenameEx.Flags);
break;
default:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [INVALID] %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf));
break;
}
break;
case FspFsctlTransactQueryEaKind:
FspDebugLogRequestVoid(Request, "QUERYEA");
break;
case FspFsctlTransactSetEaKind:
FspDebugLogRequestVoid(Request, "SETEA");
break;
case FspFsctlTransactFlushBuffersKind:
FspDebugLog("%S[TID=%04lx]: %p: >>FlushBuffers %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FlushBuffers.UserContext, Request->Req.FlushBuffers.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactQueryVolumeInformationKind:
FspDebugLogRequestVoid(Request, "QueryVolumeInformation");
break;
case FspFsctlTransactSetVolumeInformationKind:
switch (Request->Req.SetVolumeInformation.FsInformationClass)
{
case 2/*FileFsLabelInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetVolumeInformation [FsLabel] "
"Label=\"%S\"\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
(PWSTR)Request->Buffer);
break;
default:
FspDebugLog("%S[TID=%04lx]: %p: >>SetVolumeInformation [INVALID]\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint);
break;
}
break;
case FspFsctlTransactQueryDirectoryKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QueryDirectory %s%S%s%s, "
"Address=%p, Length=%ld, Pattern=%s%S%s, Marker=%s%S%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QueryDirectory.UserContext, Request->Req.QueryDirectory.UserContext2,
UserContextBuf),
(PVOID)Request->Req.QueryDirectory.Address,
Request->Req.QueryDirectory.Length,
Request->Req.QueryDirectory.Pattern.Size ? "\"" : "",
Request->Req.QueryDirectory.Pattern.Size ?
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Pattern.Offset) : L"NULL",
Request->Req.QueryDirectory.Pattern.Size ? "\"" : "",
Request->Req.QueryDirectory.Marker.Size ? "\"" : "",
Request->Req.QueryDirectory.Marker.Size ?
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Marker.Offset) : L"NULL",
Request->Req.QueryDirectory.Marker.Size ? "\"" : "");
break;
case FspFsctlTransactFileSystemControlKind:
switch (Request->Req.FileSystemControl.FsControlCode)
{
case FSCTL_GET_REPARSE_POINT:
FspDebugLog("%S[TID=%04lx]: %p: >>FileSystemControl [FSCTL_GET_REPARSE_POINT] %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FileSystemControl.UserContext, Request->Req.FileSystemControl.UserContext2,
UserContextBuf));
break;
case FSCTL_SET_REPARSE_POINT:
case FSCTL_DELETE_REPARSE_POINT:
FspDebugLog("%S[TID=%04lx]: %p: >>FileSystemControl [%s] %s%S%s%s "
"ReparseData=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
FSCTL_SET_REPARSE_POINT == Request->Req.FileSystemControl.FsControlCode ?
"FSCTL_SET_REPARSE_POINT" : "FSCTL_DELETE_REPARSE_POINT",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FileSystemControl.UserContext, Request->Req.FileSystemControl.UserContext2,
UserContextBuf),
FspDebugLogReparseDataString(Request->Buffer + Request->Req.FileSystemControl.Buffer.Offset,
InfoBuf));
break;
default:
FspDebugLog("%S[TID=%04lx]: %p: >>FileSystemControl [INVALID] %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FileSystemControl.UserContext, Request->Req.FileSystemControl.UserContext2,
UserContextBuf));
break;
}
break;
case FspFsctlTransactDeviceControlKind:
FspDebugLogRequestVoid(Request, "DEVICECONTROL");
break;
case FspFsctlTransactShutdownKind:
FspDebugLogRequestVoid(Request, "SHUTDOWN");
break;
case FspFsctlTransactLockControlKind:
FspDebugLogRequestVoid(Request, "LOCKCONTROL");
break;
case FspFsctlTransactQuerySecurityKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QuerySecurity %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QuerySecurity.UserContext, Request->Req.QuerySecurity.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactSetSecurityKind:
if (0 != Request->Req.SetSecurity.SecurityDescriptor.Size)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Request->Buffer + Request->Req.SetSecurity.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: >>SetSecurity %s%S%s%s, "
"SecurityInformation=%lx, Security=%s%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetSecurity.UserContext, Request->Req.SetSecurity.UserContext2,
UserContextBuf),
Request->Req.SetSecurity.SecurityInformation,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "");
LocalFree(Sddl);
break;
case FspFsctlTransactQueryStreamInformationKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QueryStreamInformation %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QueryStreamInformation.UserContext, Request->Req.QueryStreamInformation.UserContext2,
UserContextBuf));
break;
default:
FspDebugLogRequestVoid(Request, "INVALID");
break;
}
}
FSP_API VOID FspDebugLogResponse(FSP_FSCTL_TRANSACT_RSP *Response)
{
if (STATUS_PENDING == Response->IoStatus.Status)
return;
char UserContextBuf[40];
char InfoBuf[256];
char *Sddl = 0;
switch (Response->Kind)
{
case FspFsctlTransactReservedKind:
FspDebugLogResponseStatus(Response, "RESERVED");
break;
case FspFsctlTransactCreateKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "Create");
else if (STATUS_REPARSE == Response->IoStatus.Status)
{
if (0/*IO_REPARSE*/ == Response->IoStatus.Information)
FspDebugLog("%S[TID=%04lx]: %p: <<Create IoStatus=%lx[%ld] "
"Reparse.FileName=\"%s\"\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogWideCharBufferString(
Response->Buffer + Response->Rsp.Create.Reparse.Buffer.Offset,
Response->Rsp.Create.Reparse.Buffer.Size,
InfoBuf));
else if (1/*IO_REMOUNT*/ == Response->IoStatus.Information)
FspDebugLogResponseStatus(Response, "Create");
else
FspDebugLog("%S[TID=%04lx]: %p: <<Create IoStatus=%lx[%ld] "
"Reparse.Data=\"%s\"\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogReparseDataString(
Response->Buffer + Response->Rsp.Create.Reparse.Buffer.Offset,
InfoBuf));
}
else
FspDebugLog("%S[TID=%04lx]: %p: <<Create IoStatus=%lx[%ld] "
"UserContext=%s, GrantedAccess=%lx, FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogUserContextString(
Response->Rsp.Create.Opened.UserContext, Response->Rsp.Create.Opened.UserContext2,
UserContextBuf),
Response->Rsp.Create.Opened.GrantedAccess,
FspDebugLogFileInfoString(&Response->Rsp.Create.Opened.FileInfo, InfoBuf));
break;
case FspFsctlTransactOverwriteKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "Overwrite");
else
FspDebugLog("%S[TID=%04lx]: %p: <<Overwrite IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.Overwrite.FileInfo, InfoBuf));
break;
case FspFsctlTransactCleanupKind:
FspDebugLogResponseStatus(Response, "Cleanup");
break;
case FspFsctlTransactCloseKind:
FspDebugLogResponseStatus(Response, "Close");
break;
case FspFsctlTransactReadKind:
FspDebugLogResponseStatus(Response, "Read");
break;
case FspFsctlTransactWriteKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "Write");
else
FspDebugLog("%S[TID=%04lx]: %p: <<Write IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.Write.FileInfo, InfoBuf));
break;
case FspFsctlTransactQueryInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "QueryInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<QueryInformation IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.QueryInformation.FileInfo, InfoBuf));
break;
case FspFsctlTransactSetInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "SetInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<SetInformation IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.SetInformation.FileInfo, InfoBuf));
break;
case FspFsctlTransactQueryEaKind:
FspDebugLogResponseStatus(Response, "QUERYEA");
break;
case FspFsctlTransactSetEaKind:
FspDebugLogResponseStatus(Response, "SETEA");
break;
case FspFsctlTransactFlushBuffersKind:
FspDebugLogResponseStatus(Response, "FlushBuffers");
break;
case FspFsctlTransactQueryVolumeInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "QueryVolumeInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<QueryVolumeInformation IoStatus=%lx[%ld] "
"VolumeInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogVolumeInfoString(&Response->Rsp.QueryVolumeInformation.VolumeInfo, InfoBuf));
break;
case FspFsctlTransactSetVolumeInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "SetVolumeInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<SetVolumeInformation IoStatus=%lx[%ld] "
"VolumeInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogVolumeInfoString(&Response->Rsp.SetVolumeInformation.VolumeInfo, InfoBuf));
break;
case FspFsctlTransactQueryDirectoryKind:
FspDebugLogResponseStatus(Response, "QueryDirectory");
break;
case FspFsctlTransactFileSystemControlKind:
if (!NT_SUCCESS(Response->IoStatus.Status) ||
0 == Response->Rsp.FileSystemControl.Buffer.Size)
FspDebugLogResponseStatus(Response, "FileSystemControl");
else
FspDebugLog("%S[TID=%04lx]: %p: <<FileSystemControl IoStatus=%lx[%ld] "
"ReparseData=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogReparseDataString(Response->Buffer + Response->Rsp.FileSystemControl.Buffer.Offset,
InfoBuf));
break;
case FspFsctlTransactDeviceControlKind:
FspDebugLogResponseStatus(Response, "DEVICECONTROL");
break;
case FspFsctlTransactShutdownKind:
FspDebugLogResponseStatus(Response, "SHUTDOWN");
break;
case FspFsctlTransactLockControlKind:
FspDebugLogResponseStatus(Response, "LOCKCONTROL");
break;
case FspFsctlTransactQuerySecurityKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "QuerySecurity");
else
{
if (0 != Response->Rsp.QuerySecurity.SecurityDescriptor.Size)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Response->Buffer + Response->Rsp.QuerySecurity.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: <<QuerySecurity IoStatus=%lx[%ld] "
"Security=%s%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "");
LocalFree(Sddl);
}
break;
case FspFsctlTransactSetSecurityKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "SetSecurity");
else
{
if (0 != Response->Rsp.SetSecurity.SecurityDescriptor.Size)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Response->Buffer + Response->Rsp.SetSecurity.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: <<SetSecurity IoStatus=%lx[%ld] "
"Security=%s%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "");
LocalFree(Sddl);
}
break;
case FspFsctlTransactQueryStreamInformationKind:
FspDebugLogResponseStatus(Response, "QueryStreamInformation");
break;
default:
FspDebugLogResponseStatus(Response, "INVALID");
break;
}
} }
#endif

890
src/dll/debuglog.c Normal file
View File

@ -0,0 +1,890 @@
/**
* @file dll/debuglog.c
*
* @copyright 2015-2022 Bill Zissimopoulos
*/
/*
* This file is part of WinFsp.
*
* You can redistribute it and/or modify it under the terms of the GNU
* General Public License version 3 as published by the Free Software
* Foundation.
*
* Licensees holding a valid commercial license may use this software
* in accordance with the commercial license agreement provided in
* conjunction with the software. The terms and conditions of any such
* commercial license agreement shall govern, supersede, and render
* ineffective any application of the GPLv3 license to this software,
* notwithstanding of any reference thereto in the software or
* associated repository.
*/
#include <dll/library.h>
#include <sddl.h>
#include <stdarg.h>
static HANDLE FspDebugLogHandle = INVALID_HANDLE_VALUE;
FSP_API VOID FspDebugLogSetHandle(HANDLE Handle)
{
FspDebugLogHandle = Handle;
}
FSP_API VOID FspDebugLog(const char *format, ...)
{
char buf[1024];
/* DbgPrint has a 512 byte limit, but wvsprintf is only safe with a 1024 byte buffer */
va_list ap;
va_start(ap, format);
wvsprintfA(buf, format, ap);
va_end(ap);
buf[sizeof buf - 1] = '\0';
if (INVALID_HANDLE_VALUE != FspDebugLogHandle)
{
DWORD bytes;
WriteFile(FspDebugLogHandle, buf, lstrlenA(buf), &bytes, 0);
}
else
OutputDebugStringA(buf);
}
FSP_API VOID FspDebugLogSD(const char *format, PSECURITY_DESCRIPTOR SecurityDescriptor)
{
char *Sddl;
if (0 == SecurityDescriptor)
FspDebugLog(format, "null security descriptor");
else if (ConvertSecurityDescriptorToStringSecurityDescriptorA(SecurityDescriptor,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0))
{
FspDebugLog(format, Sddl);
LocalFree(Sddl);
}
else
FspDebugLog(format, "invalid security descriptor");
}
FSP_API VOID FspDebugLogSid(const char *format, PSID Sid)
{
char *S;
if (0 == Sid)
FspDebugLog(format, "null SID");
else if (ConvertSidToStringSidA(Sid, &S))
{
FspDebugLog(format, S);
LocalFree(S);
}
else
FspDebugLog(format, "invalid SID");
}
FSP_API VOID FspDebugLogFT(const char *format, PFILETIME FileTime)
{
SYSTEMTIME SystemTime;
char buf[32];
if (FileTimeToSystemTime(FileTime, &SystemTime))
{
wsprintfA(buf, "%04hu-%02hu-%02huT%02hu:%02hu:%02hu.%03huZ",
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
SystemTime.wMilliseconds);
FspDebugLog(format, buf);
}
else
FspDebugLog(format, "invalid file time");
}
#define MAKE_UINT32_PAIR(v) \
((PLARGE_INTEGER)&(v))->HighPart, ((PLARGE_INTEGER)&(v))->LowPart
static const char *FspDebugLogDispositionString(UINT32 CreateOptions)
{
switch ((CreateOptions >> 24) & 0xff)
{
case FILE_CREATE:
return "FILE_CREATE";
case FILE_OPEN:
return "FILE_OPEN";
case FILE_OPEN_IF:
return "FILE_OPEN_IF";
case FILE_OVERWRITE:
return "FILE_OVERWRITE";
case FILE_SUPERSEDE:
return "FILE_SUPERSEDE";
case FILE_OVERWRITE_IF:
return "FILE_OVERWRITE_IF";
default:
return "INVALID";
}
}
static const char *FspDebugLogUserContextString(UINT64 UserContext, UINT64 UserContext2, char *Buf)
{
wsprintfA(Buf, 0 == UserContext2 ? "%p" : "%p:%p", (PVOID)UserContext, (PVOID)UserContext2);
return Buf;
}
static const char *FspDebugLogFileTimeString(UINT64 FileTime, char *Buf)
{
SYSTEMTIME SystemTime;
if (0 == FileTime)
lstrcpyA(Buf, "0");
else if (FileTimeToSystemTime((PFILETIME)&FileTime, &SystemTime))
{
wsprintfA(Buf, "%04hu-%02hu-%02huT%02hu:%02hu:%02hu.%03huZ",
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
SystemTime.wMilliseconds);
}
else
lstrcpyA(Buf, "INVALID");
return Buf;
}
static const char *FspDebugLogFileInfoString(FSP_FSCTL_FILE_INFO *FileInfo, char *Buf)
{
char CreationTimeBuf[32], LastAccessTimeBuf[32], LastWriteTimeBuf[32], ChangeTimeBuf[32];
wsprintfA(Buf,
"{"
"FileAttributes=%lx, "
"ReparseTag=%lx, "
"AllocationSize=%lx:%lx, "
"FileSize=%lx:%lx, "
"CreationTime=%s, "
"LastAccessTime=%s, "
"LastWriteTime=%s, "
"ChangeTime=%s, "
"IndexNumber=%lx:%lx"
"}",
FileInfo->FileAttributes,
FileInfo->ReparseTag,
MAKE_UINT32_PAIR(FileInfo->AllocationSize),
MAKE_UINT32_PAIR(FileInfo->FileSize),
FspDebugLogFileTimeString(FileInfo->CreationTime, CreationTimeBuf),
FspDebugLogFileTimeString(FileInfo->LastAccessTime, LastAccessTimeBuf),
FspDebugLogFileTimeString(FileInfo->LastWriteTime, LastWriteTimeBuf),
FspDebugLogFileTimeString(FileInfo->ChangeTime, ChangeTimeBuf),
MAKE_UINT32_PAIR(FileInfo->IndexNumber));
return Buf;
}
static const char *FspDebugLogVolumeInfoString(FSP_FSCTL_VOLUME_INFO *VolumeInfo, char *Buf)
{
wsprintfA(Buf,
"{"
"TotalSize=%lx:%lx, "
"FreeSize=%lx:%lx, "
"VolumeLabel=\"%.32S\""
"}",
MAKE_UINT32_PAIR(VolumeInfo->TotalSize),
MAKE_UINT32_PAIR(VolumeInfo->FreeSize),
&VolumeInfo->VolumeLabel);
return Buf;
}
static const char *FspDebugLogWideCharBufferString(PVOID WideCharBuf, ULONG Length, char *Buf)
{
WCHAR TempWideCharBuf[64 + 1];
if (Length > sizeof TempWideCharBuf - sizeof(WCHAR))
Length = sizeof TempWideCharBuf - sizeof(WCHAR);
memcpy(TempWideCharBuf, WideCharBuf, Length);
TempWideCharBuf[Length / sizeof(WCHAR)] = L'\0';
wsprintfA(Buf, "%.64S", TempWideCharBuf);
return Buf;
}
static const char *FspDebugLogReparseDataString(PVOID ReparseData0, char *Buf)
{
union
{
PREPARSE_DATA_BUFFER D;
PREPARSE_GUID_DATA_BUFFER G;
} ReparseData;
char SubstituteName[64 + 1], PrintName[64 + 1];
ReparseData.D = ReparseData0;
if (0 == ReparseData.D->ReparseDataLength)
wsprintfA(Buf,
"{"
"ReparseTag=%#lx, "
"ReparseDataLength=%hu"
"}",
ReparseData.D->ReparseTag, ReparseData.D->ReparseDataLength);
else if (IO_REPARSE_TAG_MOUNT_POINT == ReparseData.D->ReparseTag)
wsprintfA(Buf,
"{"
"ReparseTag=IO_REPARSE_TAG_MOUNT_POINT, "
"SubstituteName=\"%s\", "
"PrintName=\"%s\""
"}",
FspDebugLogWideCharBufferString(
ReparseData.D->MountPointReparseBuffer.PathBuffer +
ReparseData.D->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
ReparseData.D->MountPointReparseBuffer.SubstituteNameLength,
SubstituteName),
FspDebugLogWideCharBufferString(
ReparseData.D->MountPointReparseBuffer.PathBuffer +
ReparseData.D->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
ReparseData.D->MountPointReparseBuffer.PrintNameLength,
PrintName));
else if (IO_REPARSE_TAG_SYMLINK == ReparseData.D->ReparseTag)
wsprintfA(Buf,
"{"
"ReparseTag=IO_REPARSE_TAG_SYMLINK, "
"SubstituteName=\"%s\", "
"PrintName=\"%s\", "
"Flags=%u"
"}",
FspDebugLogWideCharBufferString(
ReparseData.D->SymbolicLinkReparseBuffer.PathBuffer +
ReparseData.D->SymbolicLinkReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
ReparseData.D->SymbolicLinkReparseBuffer.SubstituteNameLength,
SubstituteName),
FspDebugLogWideCharBufferString(
ReparseData.D->SymbolicLinkReparseBuffer.PathBuffer +
ReparseData.D->SymbolicLinkReparseBuffer.PrintNameOffset / sizeof(WCHAR),
ReparseData.D->SymbolicLinkReparseBuffer.PrintNameLength,
PrintName),
ReparseData.D->SymbolicLinkReparseBuffer.Flags);
else if (IsReparseTagMicrosoft(ReparseData.D->ReparseTag))
wsprintfA(Buf,
"{"
"ReparseTag=%#lx, "
"ReparseDataLength=%hu"
"}",
ReparseData.D->ReparseTag, ReparseData.D->ReparseDataLength);
else
#define Guid ReparseData.G->ReparseGuid
wsprintfA(Buf,
"{"
"ReparseTag=%#lx, "
"ReparseDataLength=%hu, "
"ReparseGuid={%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
"}",
ReparseData.G->ReparseTag, ReparseData.G->ReparseDataLength,
Guid.Data1, Guid.Data2, Guid.Data3,
Guid.Data4[0], Guid.Data4[1], Guid.Data4[2], Guid.Data4[3],
Guid.Data4[4], Guid.Data4[5], Guid.Data4[6], Guid.Data4[7]);
#undef Guid
return Buf;
}
static VOID FspDebugLogRequestVoid(FSP_FSCTL_TRANSACT_REQ *Request, const char *Name)
{
FspDebugLog("%S[TID=%04lx]: %p: >>%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint, Name);
}
static VOID FspDebugLogResponseStatus(FSP_FSCTL_TRANSACT_RSP *Response, const char *Name)
{
FspDebugLog("%S[TID=%04lx]: %p: <<%s IoStatus=%lx[%ld]\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint, Name,
Response->IoStatus.Status, Response->IoStatus.Information);
}
FSP_API VOID FspDebugLogRequest(FSP_FSCTL_TRANSACT_REQ *Request)
{
char UserContextBuf[40];
char CreationTimeBuf[32], LastAccessTimeBuf[32], LastWriteTimeBuf[32];
char InfoBuf[256];
char *Sddl = 0;
switch (Request->Kind)
{
case FspFsctlTransactReservedKind:
FspDebugLogRequestVoid(Request, "RESERVED");
break;
case FspFsctlTransactCreateKind:
if (0 != Request->Req.Create.SecurityDescriptor.Offset)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Request->Buffer + Request->Req.Create.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: >>Create [%c%c%c%c%c%c] \"%S\", "
"%s, CreateOptions=%lx, FileAttributes=%lx, Security=%s%s%s, "
"AllocationSize=%lx:%lx, "
"AccessToken=%p[PID=%lx], DesiredAccess=%lx, GrantedAccess=%lx, "
"ShareAccess=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Create.UserMode ? 'U' : 'K',
Request->Req.Create.HasTraversePrivilege ? 'T' : '-',
Request->Req.Create.HasBackupPrivilege ? 'B' : '-',
Request->Req.Create.HasRestorePrivilege ? 'R' : '-',
Request->Req.Create.OpenTargetDirectory ? 'D' : '-',
Request->Req.Create.CaseSensitive ? 'C' : '-',
(PWSTR)Request->Buffer,
FspDebugLogDispositionString(Request->Req.Create.CreateOptions),
Request->Req.Create.CreateOptions & 0xffffff,
Request->Req.Create.FileAttributes,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "",
MAKE_UINT32_PAIR(Request->Req.Create.AllocationSize),
FSP_FSCTL_TRANSACT_REQ_TOKEN_HANDLE(Request->Req.Create.AccessToken),
FSP_FSCTL_TRANSACT_REQ_TOKEN_PID(Request->Req.Create.AccessToken),
Request->Req.Create.DesiredAccess,
Request->Req.Create.GrantedAccess,
Request->Req.Create.ShareAccess);
LocalFree(Sddl);
break;
case FspFsctlTransactOverwriteKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Overwrite%s %s%S%s%s, "
"FileAttributes=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Overwrite.Supersede ? " [Supersede]" : "",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Overwrite.UserContext, Request->Req.Overwrite.UserContext2,
UserContextBuf),
Request->Req.Overwrite.FileAttributes);
break;
case FspFsctlTransactCleanupKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Cleanup%s %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Cleanup.Delete ? " [Delete]" : "",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Cleanup.UserContext, Request->Req.Cleanup.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactCloseKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Close %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Close.UserContext, Request->Req.Close.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactReadKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Read %s%S%s%s, "
"Address=%p, Offset=%lx:%lx, Length=%ld, Key=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Read.UserContext, Request->Req.Read.UserContext2,
UserContextBuf),
(PVOID)Request->Req.Read.Address,
MAKE_UINT32_PAIR(Request->Req.Read.Offset),
Request->Req.Read.Length,
Request->Req.Read.Key);
break;
case FspFsctlTransactWriteKind:
FspDebugLog("%S[TID=%04lx]: %p: >>Write%s %s%S%s%s, "
"Address=%p, Offset=%lx:%lx, Length=%ld, Key=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->Req.Write.ConstrainedIo ? " [C]" : "",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.Write.UserContext, Request->Req.Write.UserContext2,
UserContextBuf),
(PVOID)Request->Req.Write.Address,
MAKE_UINT32_PAIR(Request->Req.Write.Offset),
Request->Req.Write.Length,
Request->Req.Write.Key);
break;
case FspFsctlTransactQueryInformationKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QueryInformation %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QueryInformation.UserContext, Request->Req.QueryInformation.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactSetInformationKind:
switch (Request->Req.SetInformation.FileInformationClass)
{
case 4/*FileBasicInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Basic] %s%S%s%s, "
"FileAttributes=%lx, CreationTime=%s, LastAccessTime=%s, LastWriteTime=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
Request->Req.SetInformation.Info.Basic.FileAttributes,
FspDebugLogFileTimeString(Request->Req.SetInformation.Info.Basic.CreationTime,
CreationTimeBuf),
FspDebugLogFileTimeString(Request->Req.SetInformation.Info.Basic.LastAccessTime,
LastAccessTimeBuf),
FspDebugLogFileTimeString(Request->Req.SetInformation.Info.Basic.LastWriteTime,
LastWriteTimeBuf));
break;
case 19/*FileAllocationInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Allocation] %s%S%s%s, "
"AllocationSize=%lx:%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
MAKE_UINT32_PAIR(Request->Req.SetInformation.Info.Allocation.AllocationSize));
break;
case 20/*FileEndOfFileInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [EndOfFile] %s%S%s%s, "
"FileSize = %lx:%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
MAKE_UINT32_PAIR(Request->Req.SetInformation.Info.EndOfFile.FileSize));
break;
case 13/*FileDispositionInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Disposition] %s%S%s%s, "
"%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
Request->Req.SetInformation.Info.Disposition.Delete ? "Delete" : "Undelete");
break;
case 64/*FileDispositionInformationEx*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [DispositionEx] %s%S%s%s, "
"Flags=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
Request->Req.SetInformation.Info.DispositionEx.Flags);
break;
case 10/*FileRenameInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [Rename] %s%S%s%s, "
"NewFileName=\"%S\", AccessToken=%p[PID=%lx]\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
(PWSTR)(Request->Buffer + Request->Req.SetInformation.Info.Rename.NewFileName.Offset),
FSP_FSCTL_TRANSACT_REQ_TOKEN_HANDLE(Request->Req.SetInformation.Info.Rename.AccessToken),
FSP_FSCTL_TRANSACT_REQ_TOKEN_PID(Request->Req.SetInformation.Info.Rename.AccessToken));
break;
case 65/*FileRenameInformationEx*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [RenameEx] %s%S%s%s, "
"NewFileName=\"%S\", AccessToken=%p[PID=%lx], Flags=%lx\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf),
(PWSTR)(Request->Buffer + Request->Req.SetInformation.Info.Rename.NewFileName.Offset),
FSP_FSCTL_TRANSACT_REQ_TOKEN_HANDLE(Request->Req.SetInformation.Info.Rename.AccessToken),
FSP_FSCTL_TRANSACT_REQ_TOKEN_PID(Request->Req.SetInformation.Info.Rename.AccessToken),
Request->Req.SetInformation.Info.RenameEx.Flags);
break;
default:
FspDebugLog("%S[TID=%04lx]: %p: >>SetInformation [INVALID] %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetInformation.UserContext, Request->Req.SetInformation.UserContext2,
UserContextBuf));
break;
}
break;
case FspFsctlTransactQueryEaKind:
FspDebugLogRequestVoid(Request, "QUERYEA");
break;
case FspFsctlTransactSetEaKind:
FspDebugLogRequestVoid(Request, "SETEA");
break;
case FspFsctlTransactFlushBuffersKind:
FspDebugLog("%S[TID=%04lx]: %p: >>FlushBuffers %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FlushBuffers.UserContext, Request->Req.FlushBuffers.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactQueryVolumeInformationKind:
FspDebugLogRequestVoid(Request, "QueryVolumeInformation");
break;
case FspFsctlTransactSetVolumeInformationKind:
switch (Request->Req.SetVolumeInformation.FsInformationClass)
{
case 2/*FileFsLabelInformation*/:
FspDebugLog("%S[TID=%04lx]: %p: >>SetVolumeInformation [FsLabel] "
"Label=\"%S\"\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
(PWSTR)Request->Buffer);
break;
default:
FspDebugLog("%S[TID=%04lx]: %p: >>SetVolumeInformation [INVALID]\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint);
break;
}
break;
case FspFsctlTransactQueryDirectoryKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QueryDirectory %s%S%s%s, "
"Address=%p, Length=%ld, Pattern=%s%S%s, Marker=%s%S%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QueryDirectory.UserContext, Request->Req.QueryDirectory.UserContext2,
UserContextBuf),
(PVOID)Request->Req.QueryDirectory.Address,
Request->Req.QueryDirectory.Length,
Request->Req.QueryDirectory.Pattern.Size ? "\"" : "",
Request->Req.QueryDirectory.Pattern.Size ?
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Pattern.Offset) : L"NULL",
Request->Req.QueryDirectory.Pattern.Size ? "\"" : "",
Request->Req.QueryDirectory.Marker.Size ? "\"" : "",
Request->Req.QueryDirectory.Marker.Size ?
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Marker.Offset) : L"NULL",
Request->Req.QueryDirectory.Marker.Size ? "\"" : "");
break;
case FspFsctlTransactFileSystemControlKind:
switch (Request->Req.FileSystemControl.FsControlCode)
{
case FSCTL_GET_REPARSE_POINT:
FspDebugLog("%S[TID=%04lx]: %p: >>FileSystemControl [FSCTL_GET_REPARSE_POINT] %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FileSystemControl.UserContext, Request->Req.FileSystemControl.UserContext2,
UserContextBuf));
break;
case FSCTL_SET_REPARSE_POINT:
case FSCTL_DELETE_REPARSE_POINT:
FspDebugLog("%S[TID=%04lx]: %p: >>FileSystemControl [%s] %s%S%s%s "
"ReparseData=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
FSCTL_SET_REPARSE_POINT == Request->Req.FileSystemControl.FsControlCode ?
"FSCTL_SET_REPARSE_POINT" : "FSCTL_DELETE_REPARSE_POINT",
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FileSystemControl.UserContext, Request->Req.FileSystemControl.UserContext2,
UserContextBuf),
FspDebugLogReparseDataString(Request->Buffer + Request->Req.FileSystemControl.Buffer.Offset,
InfoBuf));
break;
default:
FspDebugLog("%S[TID=%04lx]: %p: >>FileSystemControl [INVALID] %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.FileSystemControl.UserContext, Request->Req.FileSystemControl.UserContext2,
UserContextBuf));
break;
}
break;
case FspFsctlTransactDeviceControlKind:
FspDebugLogRequestVoid(Request, "DEVICECONTROL");
break;
case FspFsctlTransactShutdownKind:
FspDebugLogRequestVoid(Request, "SHUTDOWN");
break;
case FspFsctlTransactLockControlKind:
FspDebugLogRequestVoid(Request, "LOCKCONTROL");
break;
case FspFsctlTransactQuerySecurityKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QuerySecurity %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QuerySecurity.UserContext, Request->Req.QuerySecurity.UserContext2,
UserContextBuf));
break;
case FspFsctlTransactSetSecurityKind:
if (0 != Request->Req.SetSecurity.SecurityDescriptor.Size)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Request->Buffer + Request->Req.SetSecurity.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: >>SetSecurity %s%S%s%s, "
"SecurityInformation=%lx, Security=%s%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.SetSecurity.UserContext, Request->Req.SetSecurity.UserContext2,
UserContextBuf),
Request->Req.SetSecurity.SecurityInformation,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "");
LocalFree(Sddl);
break;
case FspFsctlTransactQueryStreamInformationKind:
FspDebugLog("%S[TID=%04lx]: %p: >>QueryStreamInformation %s%S%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Request->Hint,
Request->FileName.Size ? "\"" : "",
Request->FileName.Size ? (PWSTR)Request->Buffer : L"",
Request->FileName.Size ? "\", " : "",
FspDebugLogUserContextString(
Request->Req.QueryStreamInformation.UserContext, Request->Req.QueryStreamInformation.UserContext2,
UserContextBuf));
break;
default:
FspDebugLogRequestVoid(Request, "INVALID");
break;
}
}
FSP_API VOID FspDebugLogResponse(FSP_FSCTL_TRANSACT_RSP *Response)
{
if (STATUS_PENDING == Response->IoStatus.Status)
return;
char UserContextBuf[40];
char InfoBuf[256];
char *Sddl = 0;
switch (Response->Kind)
{
case FspFsctlTransactReservedKind:
FspDebugLogResponseStatus(Response, "RESERVED");
break;
case FspFsctlTransactCreateKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "Create");
else if (STATUS_REPARSE == Response->IoStatus.Status)
{
if (0/*IO_REPARSE*/ == Response->IoStatus.Information)
FspDebugLog("%S[TID=%04lx]: %p: <<Create IoStatus=%lx[%ld] "
"Reparse.FileName=\"%s\"\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogWideCharBufferString(
Response->Buffer + Response->Rsp.Create.Reparse.Buffer.Offset,
Response->Rsp.Create.Reparse.Buffer.Size,
InfoBuf));
else if (1/*IO_REMOUNT*/ == Response->IoStatus.Information)
FspDebugLogResponseStatus(Response, "Create");
else
FspDebugLog("%S[TID=%04lx]: %p: <<Create IoStatus=%lx[%ld] "
"Reparse.Data=\"%s\"\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogReparseDataString(
Response->Buffer + Response->Rsp.Create.Reparse.Buffer.Offset,
InfoBuf));
}
else
FspDebugLog("%S[TID=%04lx]: %p: <<Create IoStatus=%lx[%ld] "
"UserContext=%s, GrantedAccess=%lx, FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogUserContextString(
Response->Rsp.Create.Opened.UserContext, Response->Rsp.Create.Opened.UserContext2,
UserContextBuf),
Response->Rsp.Create.Opened.GrantedAccess,
FspDebugLogFileInfoString(&Response->Rsp.Create.Opened.FileInfo, InfoBuf));
break;
case FspFsctlTransactOverwriteKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "Overwrite");
else
FspDebugLog("%S[TID=%04lx]: %p: <<Overwrite IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.Overwrite.FileInfo, InfoBuf));
break;
case FspFsctlTransactCleanupKind:
FspDebugLogResponseStatus(Response, "Cleanup");
break;
case FspFsctlTransactCloseKind:
FspDebugLogResponseStatus(Response, "Close");
break;
case FspFsctlTransactReadKind:
FspDebugLogResponseStatus(Response, "Read");
break;
case FspFsctlTransactWriteKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "Write");
else
FspDebugLog("%S[TID=%04lx]: %p: <<Write IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.Write.FileInfo, InfoBuf));
break;
case FspFsctlTransactQueryInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "QueryInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<QueryInformation IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.QueryInformation.FileInfo, InfoBuf));
break;
case FspFsctlTransactSetInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "SetInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<SetInformation IoStatus=%lx[%ld] "
"FileInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogFileInfoString(&Response->Rsp.SetInformation.FileInfo, InfoBuf));
break;
case FspFsctlTransactQueryEaKind:
FspDebugLogResponseStatus(Response, "QUERYEA");
break;
case FspFsctlTransactSetEaKind:
FspDebugLogResponseStatus(Response, "SETEA");
break;
case FspFsctlTransactFlushBuffersKind:
FspDebugLogResponseStatus(Response, "FlushBuffers");
break;
case FspFsctlTransactQueryVolumeInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "QueryVolumeInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<QueryVolumeInformation IoStatus=%lx[%ld] "
"VolumeInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogVolumeInfoString(&Response->Rsp.QueryVolumeInformation.VolumeInfo, InfoBuf));
break;
case FspFsctlTransactSetVolumeInformationKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "SetVolumeInformation");
else
FspDebugLog("%S[TID=%04lx]: %p: <<SetVolumeInformation IoStatus=%lx[%ld] "
"VolumeInfo=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogVolumeInfoString(&Response->Rsp.SetVolumeInformation.VolumeInfo, InfoBuf));
break;
case FspFsctlTransactQueryDirectoryKind:
FspDebugLogResponseStatus(Response, "QueryDirectory");
break;
case FspFsctlTransactFileSystemControlKind:
if (!NT_SUCCESS(Response->IoStatus.Status) ||
0 == Response->Rsp.FileSystemControl.Buffer.Size)
FspDebugLogResponseStatus(Response, "FileSystemControl");
else
FspDebugLog("%S[TID=%04lx]: %p: <<FileSystemControl IoStatus=%lx[%ld] "
"ReparseData=%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
FspDebugLogReparseDataString(Response->Buffer + Response->Rsp.FileSystemControl.Buffer.Offset,
InfoBuf));
break;
case FspFsctlTransactDeviceControlKind:
FspDebugLogResponseStatus(Response, "DEVICECONTROL");
break;
case FspFsctlTransactShutdownKind:
FspDebugLogResponseStatus(Response, "SHUTDOWN");
break;
case FspFsctlTransactLockControlKind:
FspDebugLogResponseStatus(Response, "LOCKCONTROL");
break;
case FspFsctlTransactQuerySecurityKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "QuerySecurity");
else
{
if (0 != Response->Rsp.QuerySecurity.SecurityDescriptor.Size)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Response->Buffer + Response->Rsp.QuerySecurity.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: <<QuerySecurity IoStatus=%lx[%ld] "
"Security=%s%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "");
LocalFree(Sddl);
}
break;
case FspFsctlTransactSetSecurityKind:
if (!NT_SUCCESS(Response->IoStatus.Status))
FspDebugLogResponseStatus(Response, "SetSecurity");
else
{
if (0 != Response->Rsp.SetSecurity.SecurityDescriptor.Size)
ConvertSecurityDescriptorToStringSecurityDescriptorA(
Response->Buffer + Response->Rsp.SetSecurity.SecurityDescriptor.Offset,
SDDL_REVISION_1,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION,
&Sddl, 0);
FspDebugLog("%S[TID=%04lx]: %p: <<SetSecurity IoStatus=%lx[%ld] "
"Security=%s%s%s\n",
FspDiagIdent(), GetCurrentThreadId(), (PVOID)Response->Hint,
Response->IoStatus.Status, Response->IoStatus.Information,
Sddl ? "\"" : "",
Sddl ? Sddl : "NULL",
Sddl ? "\"" : "");
LocalFree(Sddl);
}
break;
case FspFsctlTransactQueryStreamInformationKind:
FspDebugLogResponseStatus(Response, "QueryStreamInformation");
break;
default:
FspDebugLogResponseStatus(Response, "INVALID");
break;
}
}

View File

@ -100,9 +100,11 @@ NTSTATUS FspEventLogRegister(VOID)
WCHAR Path[MAX_PATH]; WCHAR Path[MAX_PATH];
DWORD RegResult, DwordValue; DWORD RegResult, DwordValue;
HKEY RegKey; HKEY RegKey;
NTSTATUS Result;
if (0 == GetModuleFileNameW(DllInstance, Path, MAX_PATH)) Result = FspGetModuleFileName(DllInstance, Path, MAX_PATH, L"" MyEventLogRegisterPath);
return FspNtStatusFromWin32(GetLastError()); if (!NT_SUCCESS(Result))
return Result;
RegResult = RegCreateKeyExW( RegResult = RegCreateKeyExW(
HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\" FSP_EVENTLOG_NAME, HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\" FSP_EVENTLOG_NAME,

View File

@ -26,6 +26,12 @@
#define PREFIXW L"" FSP_FSCTL_VOLUME_PARAMS_PREFIX #define PREFIXW L"" FSP_FSCTL_VOLUME_PARAMS_PREFIX
#define PREFIXW_SIZE (sizeof PREFIXW - sizeof(WCHAR)) #define PREFIXW_SIZE (sizeof PREFIXW - sizeof(WCHAR))
static INIT_ONCE FspFsctlServiceVersionInitOnce = INIT_ONCE_STATIC_INIT;
static ULONG FspFsctlServiceVersionValue;
static DWORD FspFsctlTransactCode = FSP_FSCTL_TRANSACT;
static DWORD FspFsctlTransactBatchCode = FSP_FSCTL_TRANSACT_BATCH;
static VOID FspFsctlServiceVersion(PUINT32 PVersion);
static NTSTATUS FspFsctlStartService(VOID); static NTSTATUS FspFsctlStartService(VOID);
FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath, FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath,
@ -76,6 +82,9 @@ FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath,
if (!NT_SUCCESS(Result)) if (!NT_SUCCESS(Result))
return Result; return Result;
/* initialize FspFsctlTransactCode */
FspFsctlServiceVersion(0);
VolumeHandle = CreateFileW(DevicePathBuf, VolumeHandle = CreateFileW(DevicePathBuf,
0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
if (INVALID_HANDLE_VALUE == VolumeHandle) if (INVALID_HANDLE_VALUE == VolumeHandle)
@ -121,12 +130,29 @@ FSP_API NTSTATUS FspFsctlMakeMountdev(HANDLE VolumeHandle,
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
FSP_API NTSTATUS FspFsctlUseMountmgr(HANDLE VolumeHandle,
PWSTR MountPoint)
{
DWORD Bytes;
Bytes = 0 != MountPoint ? lstrlenW(MountPoint) * sizeof(WCHAR) : 0;
if (!DeviceIoControl(VolumeHandle,
FSP_FSCTL_MOUNTMGR,
MountPoint, Bytes, 0, 0,
&Bytes, 0))
return FspNtStatusFromWin32(GetLastError());
return STATUS_SUCCESS;
}
FSP_API NTSTATUS FspFsctlTransact(HANDLE VolumeHandle, FSP_API NTSTATUS FspFsctlTransact(HANDLE VolumeHandle,
PVOID ResponseBuf, SIZE_T ResponseBufSize, PVOID ResponseBuf, SIZE_T ResponseBufSize,
PVOID RequestBuf, SIZE_T *PRequestBufSize, PVOID RequestBuf, SIZE_T *PRequestBufSize,
BOOLEAN Batch) BOOLEAN Batch)
{ {
NTSTATUS Result = STATUS_SUCCESS; NTSTATUS Result = STATUS_SUCCESS;
DWORD ControlCode;
DWORD Bytes = 0; DWORD Bytes = 0;
if (0 != PRequestBufSize) if (0 != PRequestBufSize)
@ -135,8 +161,18 @@ FSP_API NTSTATUS FspFsctlTransact(HANDLE VolumeHandle,
*PRequestBufSize = 0; *PRequestBufSize = 0;
} }
/*
* During file system volume creation FspFsctlCreateVolume called FspFsctlServiceVersion
* which examined the version of the driver in use and initialized the variables
* FspFsctlTransactCode and FspFsctlTransactBatchCode with either the new
* FSP_IOCTL_TRANSACT* codes or the old FSP_FSCTL_TRANSACT* codes.
*/
ControlCode = Batch ?
(DEBUGTEST(50) ? FspFsctlTransactBatchCode : FSP_FSCTL_TRANSACT_BATCH) :
(DEBUGTEST(50) ? FspFsctlTransactCode : FSP_FSCTL_TRANSACT);
if (!DeviceIoControl(VolumeHandle, if (!DeviceIoControl(VolumeHandle,
Batch ? FSP_FSCTL_TRANSACT_BATCH : FSP_FSCTL_TRANSACT, ControlCode,
ResponseBuf, (DWORD)ResponseBufSize, RequestBuf, Bytes, ResponseBuf, (DWORD)ResponseBufSize, RequestBuf, Bytes,
&Bytes, 0)) &Bytes, 0))
{ {
@ -262,6 +298,79 @@ FSP_API NTSTATUS FspFsctlPreflight(PWSTR DevicePath)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static BOOL WINAPI FspFsctlServiceVersionInitialize(
PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context)
{
PWSTR DriverName = L"" FSP_FSCTL_DRIVER_NAME;
PWSTR ModuleFileName;
SC_HANDLE ScmHandle = 0;
SC_HANDLE SvcHandle = 0;
QUERY_SERVICE_CONFIGW *ServiceConfig = 0;
DWORD Size;
ScmHandle = OpenSCManagerW(0, 0, 0);
if (0 == ScmHandle)
goto exit;
SvcHandle = OpenServiceW(ScmHandle, DriverName, SERVICE_QUERY_CONFIG);
if (0 == SvcHandle)
goto exit;
if (QueryServiceConfig(SvcHandle, 0, 0, &Size) ||
ERROR_INSUFFICIENT_BUFFER != GetLastError())
goto exit;
ServiceConfig = MemAlloc(Size);
if (0 == ServiceConfig)
goto exit;
if (!QueryServiceConfig(SvcHandle, ServiceConfig, Size, &Size))
goto exit;
ModuleFileName = ServiceConfig->lpBinaryPathName;
if (L'\\' == ModuleFileName[0] &&
L'?' == ModuleFileName[1] &&
L'?' == ModuleFileName[2] &&
L'\\' == ModuleFileName[3])
{
if (L'U' == ModuleFileName[4] &&
L'N' == ModuleFileName[5] &&
L'C' == ModuleFileName[6] &&
L'\\' == ModuleFileName[7])
{
ModuleFileName[6] = L'\\';
ModuleFileName = ModuleFileName + 6;
}
else
ModuleFileName = ModuleFileName + 4;
}
FspGetModuleVersion(ModuleFileName, &FspFsctlServiceVersionValue);
if (0x0001000b /*v1.11*/ <= FspFsctlServiceVersionValue)
{
FspFsctlTransactCode = FSP_IOCTL_TRANSACT;
FspFsctlTransactBatchCode = FSP_IOCTL_TRANSACT_BATCH;
}
exit:
MemFree(ServiceConfig);
if (0 != SvcHandle)
CloseServiceHandle(SvcHandle);
if (0 != ScmHandle)
CloseServiceHandle(ScmHandle);
return TRUE;
}
static VOID FspFsctlServiceVersion(PUINT32 PVersion)
{
InitOnceExecuteOnce(&FspFsctlServiceVersionInitOnce, FspFsctlServiceVersionInitialize, 0, 0);
if (0 != PVersion)
*PVersion = FspFsctlServiceVersionValue;
}
static NTSTATUS FspFsctlStartService(VOID) static NTSTATUS FspFsctlStartService(VOID)
{ {
static SRWLOCK Lock = SRWLOCK_INIT; static SRWLOCK Lock = SRWLOCK_INIT;
@ -475,8 +584,9 @@ NTSTATUS FspFsctlRegister(VOID)
SERVICE_DESCRIPTION ServiceDescription; SERVICE_DESCRIPTION ServiceDescription;
NTSTATUS Result; NTSTATUS Result;
if (0 == GetModuleFileNameW(DllInstance, DriverPath, MAX_PATH)) Result = FspGetModuleFileName(DllInstance, DriverPath, MAX_PATH, L"" MyFsctlRegisterPath);
return FspNtStatusFromWin32(GetLastError()); if (!NT_SUCCESS(Result))
return Result;
Size = lstrlenW(DriverPath); Size = lstrlenW(DriverPath);
if (4 < Size && if (4 < Size &&
@ -490,6 +600,14 @@ NTSTATUS FspFsctlRegister(VOID)
DriverPath[Size - 2] = L'y'; DriverPath[Size - 2] = L'y';
DriverPath[Size - 1] = L's'; DriverPath[Size - 1] = L's';
} }
else if (4 < Size &&
(L'.' == DriverPath[Size - 4]) &&
(L'S' == DriverPath[Size - 3] || L's' == DriverPath[Size - 3]) &&
(L'Y' == DriverPath[Size - 2] || L'y' == DriverPath[Size - 2]) &&
(L'S' == DriverPath[Size - 1] || L's' == DriverPath[Size - 1]) &&
(L'\0' == DriverPath[Size]))
{
}
else else
/* should not happen! */ /* should not happen! */
return STATUS_NO_SUCH_DEVICE; return STATUS_NO_SUCH_DEVICE;

View File

@ -82,6 +82,8 @@ static struct fuse_opt fsp_fuse_core_opts[] =
FUSE_OPT_KEY("fstypename=", 'F'), FUSE_OPT_KEY("fstypename=", 'F'),
FUSE_OPT_KEY("volname=", 'v'), FUSE_OPT_KEY("volname=", 'v'),
FUSE_OPT_KEY("uidmap=", 'm'),
FSP_FUSE_CORE_OPT("SectorSize=%hu", VolumeParams.SectorSize, 4096), FSP_FUSE_CORE_OPT("SectorSize=%hu", VolumeParams.SectorSize, 4096),
FSP_FUSE_CORE_OPT("SectorsPerAllocationUnit=%hu", VolumeParams.SectorsPerAllocationUnit, 1), FSP_FUSE_CORE_OPT("SectorsPerAllocationUnit=%hu", VolumeParams.SectorsPerAllocationUnit, 1),
FSP_FUSE_CORE_OPT("MaxComponentLength=%hu", VolumeParams.MaxComponentLength, 0), FSP_FUSE_CORE_OPT("MaxComponentLength=%hu", VolumeParams.MaxComponentLength, 0),
@ -178,7 +180,7 @@ FSP_FUSE_API struct fuse_chan *fsp_fuse_mount(struct fsp_fuse_env *env,
const char *mountpoint, struct fuse_args *args) const char *mountpoint, struct fuse_args *args)
{ {
struct fuse_chan *ch = 0; struct fuse_chan *ch = 0;
WCHAR TempMountPointBuf[MAX_PATH], MountPointBuf[MAX_PATH]; WCHAR TempMountPointBuf[MAX_PATH], MountPointBuf[MAX_PATH + 4];
int Size; int Size;
if (0 == mountpoint || '\0' == mountpoint[0] || if (0 == mountpoint || '\0' == mountpoint[0] ||
@ -210,6 +212,33 @@ FSP_FUSE_API struct fuse_chan *fsp_fuse_mount(struct fsp_fuse_env *env,
MountPointBuf[6] = '\0'; MountPointBuf[6] = '\0';
Size = 7 * sizeof(WCHAR); Size = 7 * sizeof(WCHAR);
} }
else if (
(
'\\' == mountpoint[0] &&
'\\' == mountpoint[1] &&
('?' == mountpoint[2] || '.' == mountpoint[2]) &&
'\\' == mountpoint[3]
) &&
(
('A' <= mountpoint[4] && mountpoint[4] <= 'Z') ||
('a' <= mountpoint[4] && mountpoint[4] <= 'z')
) &&
':' == mountpoint[5] && '\\' == mountpoint[6])
{
MountPointBuf[0] = '\\';
MountPointBuf[1] = '\\';
MountPointBuf[2] = mountpoint[2];
MountPointBuf[3] = '\\';
Size = 0;
if (0 != MultiByteToWideChar(CP_UTF8, 0, mountpoint + 4, -1, TempMountPointBuf, MAX_PATH))
Size = GetFullPathNameW(TempMountPointBuf, MAX_PATH, MountPointBuf + 4, 0);
if (0 == Size || MAX_PATH <= Size)
goto fail;
Size = (Size + 4 + 1) * sizeof(WCHAR);
}
else if ( else if (
( (
('A' <= mountpoint[0] && mountpoint[0] <= 'Z') || ('A' <= mountpoint[0] && mountpoint[0] <= 'Z') ||
@ -293,43 +322,241 @@ static int fsp_fuse_sddl_to_security(const char *Sddl, PUINT8 Security, PULONG P
return res; return res;
} }
static int fsp_fuse_username_to_uid(const char *username, int *puid) static int fsp_fuse_tokenuser_to_sid(HANDLE Token, PSID Sid, PULONG PSidSize)
{
union
{
TOKEN_USER V;
UINT8 B[128];
} InfoBuf;
PTOKEN_USER InfoPtr = &InfoBuf.V;
DWORD Size;
int res = -1;
if (!GetTokenInformation(Token, TokenUser, InfoPtr, sizeof InfoBuf, &Size))
{
if (ERROR_INSUFFICIENT_BUFFER != GetLastError())
goto exit;
InfoPtr = MemAlloc(Size);
if (0 == InfoPtr)
goto exit;
if (!GetTokenInformation(Token, TokenUser, InfoPtr, Size, &Size))
goto exit;
}
Size = GetLengthSid(InfoPtr->User.Sid);
if (*PSidSize >= Size)
{
memcpy(Sid, InfoPtr->User.Sid, Size);
*PSidSize = Size;
res = 0;
}
exit:
if (InfoPtr != &InfoBuf.V)
MemFree(InfoPtr);
return res;
}
static int fsp_fuse_tokenuser_is_azuread(HANDLE Token)
{ {
union union
{ {
SID V; SID V;
UINT8 B[SECURITY_MAX_SID_SIZE]; UINT8 B[SECURITY_MAX_SID_SIZE];
} SidBuf; } SidBuf;
ULONG Size;
PSID Sid = &SidBuf.V;
BYTE Count, Authority;
UINT32 SubAuthority0;
Size = sizeof SidBuf;
if (-1 == fsp_fuse_tokenuser_to_sid(Token, &SidBuf.V, &Size))
return 0;
Count = *GetSidSubAuthorityCount(Sid);
Authority = GetSidIdentifierAuthority(Sid)->Value[5];
SubAuthority0 = 2 <= Count ? *GetSidSubAuthority(Sid, 0) : 0;
return 12 == Authority && 1 == SubAuthority0;
}
static int fsp_fuse_username_to_sid(const char *UserName, PSID Sid, PULONG PSidSize)
{
union
{
SID V;
UINT8 B[SECURITY_MAX_SID_SIZE];
} SidBuf;
PSID SidPtr = &SidBuf.V;
char Name[256], Domn[256]; char Name[256], Domn[256];
DWORD SidSize, NameSize, DomnSize; DWORD Size, NameSize, DomnSize;
SID_NAME_USE Use; SID_NAME_USE Use;
UINT32 Uid; int res = -1;
NTSTATUS Result;
*puid = 0; if ('S' == UserName[0] && '-' == UserName[1] && '1' == UserName[2] && '-' == UserName[3])
{
NameSize = lstrlenA(username) + 1; if (!ConvertStringSidToSidA(UserName, &SidPtr))
goto exit;
}
else
{
NameSize = lstrlenA(UserName) + 1;
if (sizeof Name / sizeof Name[0] < NameSize) if (sizeof Name / sizeof Name[0] < NameSize)
return -1; goto exit;
memcpy(Name, username, NameSize); memcpy(Name, UserName, NameSize);
for (PSTR P = Name, EndP = P + NameSize; EndP > P; P++) for (PSTR P = Name, EndP = P + NameSize; EndP > P; P++)
if ('+' == *P) if ('+' == *P)
*P = '\\'; *P = '\\';
SidSize = sizeof SidBuf; Size = sizeof SidBuf;
DomnSize = sizeof Domn / sizeof Domn[0]; DomnSize = sizeof Domn / sizeof Domn[0];
if (!LookupAccountNameA(0, Name, &SidBuf, &SidSize, Domn, &DomnSize, &Use)) if (!LookupAccountNameA(0, Name, SidPtr, &Size, Domn, &DomnSize, &Use))
goto exit;
}
Size = GetLengthSid(SidPtr);
if (*PSidSize >= Size)
{
memcpy(Sid, SidPtr, Size);
*PSidSize = Size;
res = 0;
}
exit:
if (SidPtr != &SidBuf.V)
LocalFree(SidPtr);
return res;
}
static int fsp_fuse_username_to_uid(const char *UserName, int *PUid)
{
union
{
SID V;
UINT8 B[SECURITY_MAX_SID_SIZE];
} SidBuf;
ULONG SidSize;
UINT32 Uid;
NTSTATUS Result;
*PUid = 0;
SidSize = sizeof SidBuf;
if (-1 == fsp_fuse_username_to_sid(UserName, &SidBuf.V, &SidSize))
return -1; return -1;
Result = FspPosixMapSidToUid(&SidBuf, &Uid); Result = FspPosixMapSidToUid(&SidBuf.V, &Uid);
if (!NT_SUCCESS(Result)) if (!NT_SUCCESS(Result))
return -1; return -1;
*puid = Uid; *PUid = Uid;
return 0; return 0;
} }
static int fsp_fuse_set_uidmap(const char *Spec)
{
char Buf[1024], *P = Buf, *UidP, *UserP, C;
int Len;
UINT32 Uid[8];
PSID Sid[8];
union
{
SID V;
UINT8 B[SECURITY_MAX_SID_SIZE];
} SidBuf[8];
ULONG SidSize;
ULONG Count;
NTSTATUS Result;
int res = -1;
Len = lstrlenA(Spec);
if (sizeof Buf <= Len)
return -1;
memcpy(Buf, Spec, Len + 1);
Count = 0;
for (;;)
{
if (sizeof Uid / sizeof Uid[0] <= Count)
{
/* out of space */
goto exit;
}
UidP = P;
for (; '\0' != (C = *P) && ';' != C && ':' != C; P++)
;
*P = '\0';
if (UidP == P)
break;
Uid[Count] = strtouint(UidP, 0, 10, 0);
if (0 == Uid[Count])
{
/* invalid uid */
goto exit;
}
UserP = 0;
if (':' == C)
{
UserP = ++P;
for (; '\0' != (C = *P) && ';' != C; P++)
;
*P = '\0';
}
if (0 != UserP && '\0' != *UserP)
{
SidSize = sizeof SidBuf[Count];
if (-1 == fsp_fuse_username_to_sid(UserP, &SidBuf[Count].V, &SidSize))
{
/* invalid SID */
goto exit;
}
Sid[Count] = &SidBuf[Count].V;
}
else
{
HANDLE Token;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token))
{
SidSize = sizeof SidBuf[Count];
if (-1 == fsp_fuse_tokenuser_to_sid(Token, &SidBuf[Count].V, &SidSize))
{
/* invalid SID */
CloseHandle(Token);
goto exit;
}
CloseHandle(Token);
Sid[Count] = &SidBuf[Count].V;
}
}
Count++;
if ('\0' == C)
break;
P++;
}
Result = FspPosixSetUidMap(Uid, Sid, Count);
res = NT_SUCCESS(Result) ? 0 : -1;
exit:
return res;
}
static int fsp_fuse_utf8towcs_trunc( static int fsp_fuse_utf8towcs_trunc(
const char *Str, int StrLen, const char *Str, int StrLen,
PWSTR Wcs, int WcsLen) PWSTR Wcs, int WcsLen)
@ -424,6 +651,7 @@ static int fsp_fuse_core_opt_proc(void *opt_data0, const char *arg, int key,
" -o KeepFileCache do not discard cache when files are closed\n" " -o KeepFileCache do not discard cache when files are closed\n"
" -o LegacyUnlinkRename do not support new POSIX unlink/rename\n" " -o LegacyUnlinkRename do not support new POSIX unlink/rename\n"
" -o ThreadCount number of file system dispatcher threads\n" " -o ThreadCount number of file system dispatcher threads\n"
" -o uidmap=UID:SID[;...] explicit UID <-> SID map (max 8 entries)\n"
); );
opt_data->help = 1; opt_data->help = 1;
return 1; return 1;
@ -531,6 +759,14 @@ static int fsp_fuse_core_opt_proc(void *opt_data0, const char *arg, int key,
if (0 == opt_data->VolumeLabelLength) if (0 == opt_data->VolumeLabelLength)
return -1; return -1;
return 0; return 0;
case 'm':
arg += sizeof "uidmap=" - 1;
if (-1 == fsp_fuse_set_uidmap(arg))
{
opt_data->set_uidmap = -1;
return -1;
}
return 0;
} }
} }
@ -579,6 +815,11 @@ FSP_FUSE_API struct fuse *fsp_fuse_new(struct fsp_fuse_env *env,
ErrorMessage = L": invalid user or group name."; ErrorMessage = L": invalid user or group name.";
goto fail; goto fail;
} }
else if (-1 == opt_data.set_uidmap)
{
ErrorMessage = L": invalid uidmap.";
goto fail;
}
return 0; return 0;
} }
if (opt_data.help) if (opt_data.help)
@ -601,6 +842,10 @@ FSP_FUSE_API struct fuse *fsp_fuse_new(struct fsp_fuse_env *env,
if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token)) if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token))
{ {
/* if an AzureAD user and no uidmap specified, set a default uidmap that matches Cygwin */
if (!opt_data.set_uidmap && fsp_fuse_tokenuser_is_azuread(Token))
fsp_fuse_set_uidmap("4096:");
fsp_fuse_get_token_uidgid(Token, TokenUser, fsp_fuse_get_token_uidgid(Token, TokenUser,
opt_data.set_uid && -1 == opt_data.uid ? &opt_data.uid : 0, opt_data.set_uid && -1 == opt_data.uid ? &opt_data.uid : 0,
opt_data.set_gid && -1 == opt_data.gid ? &opt_data.gid : 0); opt_data.set_gid && -1 == opt_data.gid ? &opt_data.gid : 0);

View File

@ -1028,7 +1028,7 @@ static NTSTATUS fsp_fuse_intf_Create(FSP_FILE_SYSTEM *FileSystem,
{ {
Result = FspFileSystemEnumerateEa(FileSystem, Result = FspFileSystemEnumerateEa(FileSystem,
fsp_fuse_intf_SetEaEntry, contexthdr->PosixPath, ExtraBuffer, ExtraLength); fsp_fuse_intf_SetEaEntry, contexthdr->PosixPath, ExtraBuffer, ExtraLength);
if (!NT_SUCCESS(Result)) if (!NT_SUCCESS(Result) && STATUS_INVALID_DEVICE_REQUEST != Result)
goto exit; goto exit;
} }
else else
@ -1256,7 +1256,7 @@ static NTSTATUS fsp_fuse_intf_Overwrite(FSP_FILE_SYSTEM *FileSystem,
Result = FspFileSystemEnumerateEa(FileSystem, Result = FspFileSystemEnumerateEa(FileSystem,
fsp_fuse_intf_SetEaEntry, filedesc->PosixPath, Ea, EaLength); fsp_fuse_intf_SetEaEntry, filedesc->PosixPath, Ea, EaLength);
if (!NT_SUCCESS(Result)) if (!NT_SUCCESS(Result) && STATUS_INVALID_DEVICE_REQUEST != Result)
return Result; return Result;
} }

Some files were not shown because too many files have changed in this diff Show More