From fbbb4c3de1386cdad79dee1dec2576224c2c5ec9 Mon Sep 17 00:00:00 2001 From: ethan Date: Tue, 23 Dec 2025 17:05:48 +0800 Subject: [PATCH 1/2] dll: add fuse directio flag support --- src/dll/fuse/fuse_intf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dll/fuse/fuse_intf.c b/src/dll/fuse/fuse_intf.c index 227281f7..67d195c0 100644 --- a/src/dll/fuse/fuse_intf.c +++ b/src/dll/fuse/fuse_intf.c @@ -1046,13 +1046,15 @@ static NTSTATUS fsp_fuse_intf_Create(FSP_FILE_SYSTEM *FileSystem, goto exit; /* - * Ignore fuse_file_info::direct_io, fuse_file_info::keep_cache. + * Ignore fuse_file_info::keep_cache. * NOTE: Originally WinFsp did not support disabling the cache manager * for an individual file. This is now possible and we should revisit. * * Ignore fuse_file_info::nonseekable. */ + FspFileSystemGetOperationContext()->Response->Rsp.Create.Opened.DisableCache = fi.direct_io; + *PFileDesc = filedesc; memcpy(FileInfo, &FileInfoBuf, sizeof FileInfoBuf); @@ -1191,13 +1193,15 @@ static NTSTATUS fsp_fuse_intf_Open(FSP_FILE_SYSTEM *FileSystem, goto exit; /* - * Ignore fuse_file_info::direct_io, fuse_file_info::keep_cache. + * Ignore fuse_file_info::keep_cache. * NOTE: Originally WinFsp did not support disabling the cache manager * for an individual file. This is now possible and we should revisit. * * Ignore fuse_file_info::nonseekable. */ + FspFileSystemGetOperationContext()->Response->Rsp.Create.Opened.DisableCache = fi.direct_io; + *PFileDesc = filedesc; memcpy(FileInfo, &FileInfoBuf, sizeof FileInfoBuf); From ccd75d7c47d6d3a7d8b74a0db7fe280731c2013d Mon Sep 17 00:00:00 2001 From: ethan Date: Wed, 24 Dec 2025 09:28:37 +0800 Subject: [PATCH 2/2] remove outdated comments --- src/dll/fuse/fuse_intf.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/dll/fuse/fuse_intf.c b/src/dll/fuse/fuse_intf.c index 67d195c0..8c1ee3d2 100644 --- a/src/dll/fuse/fuse_intf.c +++ b/src/dll/fuse/fuse_intf.c @@ -1047,9 +1047,6 @@ static NTSTATUS fsp_fuse_intf_Create(FSP_FILE_SYSTEM *FileSystem, /* * Ignore fuse_file_info::keep_cache. - * NOTE: Originally WinFsp did not support disabling the cache manager - * for an individual file. This is now possible and we should revisit. - * * Ignore fuse_file_info::nonseekable. */ @@ -1194,9 +1191,6 @@ static NTSTATUS fsp_fuse_intf_Open(FSP_FILE_SYSTEM *FileSystem, /* * Ignore fuse_file_info::keep_cache. - * NOTE: Originally WinFsp did not support disabling the cache manager - * for an individual file. This is now possible and we should revisit. - * * Ignore fuse_file_info::nonseekable. */