jacobsa / fuse

A Go package for implementing a FUSE file system.
Apache License 2.0
478 stars 106 forks source link

Writing offset is not in sequential order #125

Closed ShuranZhang closed 1 year ago

ShuranZhang commented 2 years ago

Hi, When I tries to write some large data, I have noticed that sometimes the writing offset is not in sequential order. I know that libfuse has async reading feature. Is writing also async with FUSE? And is there a similar way for us to disable the async writing and make the writing offset in order each time? I am writing toward cloud storage so out of order writing will cause inconsistency for my case.

Thank you!

kpjensen commented 1 year ago

You may need to disable writeback caching in the mount config to ensure writes arrive in sequential order.

For example: https://github.com/jacobsa/fuse/blob/c4197873da0d92256fb05610fc65cf1c7b50aa84/samples/mount_memfs/mount.go#L54-L57

ShuranZhang commented 1 year ago

Thanks for the advice!