diff --git a/inc/winfsp/fsctl.h b/inc/winfsp/fsctl.h index f5d7293a..905d182c 100644 --- a/inc/winfsp/fsctl.h +++ b/inc/winfsp/fsctl.h @@ -228,7 +228,7 @@ enum UINT32 CasePreservedExtendedAttributes:1; /* preserve case of EA (default is UPPERCASE) */\ UINT32 WslFeatures:1; /* support features required for WSLinux */\ 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 PostDispositionWhenNecessaryOnly:1; /* post Disposition for dirs or READONLY attr check */\ UINT32 KmReservedFlags:1;\ diff --git a/src/sys/volume.c b/src/sys/volume.c index f5a177fb..8bea3c3c 100644 --- a/src/sys/volume.c +++ b/src/sys/volume.c @@ -249,6 +249,11 @@ static NTSTATUS FspVolumeCreateNoLock( VolumeParams.AlwaysUseDoubleBuffering = 1; #endif + /* + * Hardcode the RejectIrpPriorToTransact0 = 1 setting. + */ + VolumeParams.RejectIrpPriorToTransact0 = 1; + /* load any fsext provider */ if (0 != VolumeParams.FsextControlCode) { diff --git a/tst/winfsp-tests/memfs-test.c b/tst/winfsp-tests/memfs-test.c index 343685ac..9246cf96 100644 --- a/tst/winfsp-tests/memfs-test.c +++ b/tst/winfsp-tests/memfs-test.c @@ -67,6 +67,9 @@ void *memfs_start_ex(ULONG Flags, ULONG FileInfoTimeout) Result = MemfsStart(Memfs); ASSERT(NT_SUCCESS(Result)); + Result = FspFsctlTransact(MemfsFileSystem(Memfs)->VolumeHandle, 0, 0, 0, 0, FALSE); + ASSERT(NT_SUCCESS(Result)); + memfs_running = 1; memfs_handle = MemfsFileSystem(Memfs)->VolumeHandle;