goofys
goofys copied to clipboard
Improvement request: set op.Handle as point to FileHandle/DirHandle
Now op.Handle
is fuseops.HandleID
which needs map HandleID to FileHandle by fs.fileHandles
ro by fs.dirHandles
to DirHandle.
If set op.Handle
(uint64) as pointer to FileHandle or DirHandle, the map can be omitted, especially the lock for accessing fs.fileHandles
and fs.dirHandles
can be omitted, especially for frequently Read and Write, the mutex lock is racing and expensive.
The fuse kernel protocol provides handle
is for userspace to relate kernel object and userspace object, set it as a pointer is the most efficient way.