dll,fuse: allow dir buffer entry invalidation

The FUSE implementation of ReadDirectory issues readdir followed
by a slew of getattr. In the current implementation if a getattr fails
the whole readdir operation fails.

This commit adds the ability to invalidate individual entries in the
directory buffer. Entries for which getattr fails are now marked invalid
rather than fail the overall ReadDirectory operation.

See #292
This commit is contained in:
Bill Zissimopoulos
2020-04-13 15:52:03 -07:00
parent 42fd57904a
commit b4c39f656c
4 changed files with 79 additions and 7 deletions

View File

@ -1866,7 +1866,8 @@ static NTSTATUS fsp_fuse_intf_FixDirInfo(FSP_FILE_SYSTEM *FileSystem,
Result = fsp_fuse_intf_GetFileInfoEx(FileSystem, PosixPath, 0,
&Uid, &Gid, &Mode, &DirInfo->FileInfo);
if (!NT_SUCCESS(Result))
goto exit;
/* mark the directory buffer entry as invalid */
*Index = FspFileSystemDirectoryBufferEntryInvalid;
if (0 != PosixPathEnd)
*PosixPathEnd = SavedPathChar;