cgofuse: Can't set direct_io for open files
This is very related to #5 but a different need!
I’d like to be able to set direct_io on certain files. In particular I’d like to be able to set it on files where rclone doesn’t know the length in advance (eg Google docs files).
Rclone reports the length of these files as 0 and without this flag 0 bytes is all that can be read. However setting this flag allows the files to be read even though their size reads as 0.
I imaging this is how the files in /proc are implemented which all have 0 size but you can still cat them.
This works very well with linux allowing these strange 0 size files to function a bit better.
It looks like OSXFUSE supports this too (well that is the mount option - I imagine the Open option is supported too).
Is this something which can be done in Windows file systems?
To implement this it would need the interface changing to the Open and Create calls. If you wanted to be 100% compatible then this could return a specific errc meaning everything OK but set the direct io flag. Or we could make an extended Open call which is used in preference over Open.
I’d be happy to help with this if you think it is a good idea.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (6 by maintainers)
@ncw thanks. I am closing this and will follow up with a new release shortly.