jacobsa / fuse

A Go package for implementing a FUSE file system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Writing offset is not in sequential order

ShuranZhang opened this issue · comments

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!

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

For example:

cfg := &fuse.MountConfig{
// Disable writeback caching so that pid is always available in OpContext
DisableWritebackCaching: true,
}

Thanks for the advice!