goofys icon indicating copy to clipboard operation
goofys copied to clipboard

Improvement request: set op.Handle as point to FileHandle/DirHandle

Open rockeet opened this issue 5 months ago • 0 comments

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.

rockeet avatar Jan 13 '24 08:01 rockeet