Hangs !!! Accessing fuse filesystem in Windows through Samba
realrichardsharpe at gmail.com
Mon Mar 2 09:00:47 MST 2015
On Mon, Mar 2, 2015 at 7:34 AM, Raj Kumar Sanpui
<raj.kumar.sanpui at gmail.com> wrote:
> We are accessing a fuse filesystem in Windows through Samba.
> There are 2 category of files in fuse filesystem, local and remote (Data
> Center). If the file is in remote, fuse downloads it internally when open(
> ) syscall is invoked by the filesystem - at which stage open( ) waits or
> blocks till the complete file is downloaded - At this stage we see, the
> Samba share becomes unresponsive and hangs.
> However, if some other user tries the same fuse mount from a Samba share in
> different machine it works.
> Why does this happen, is it due to the single threaded nature of Samba? Is
> there any workaround for this?
Samba used event processing (tevent) not threads.
It is hard for open to be async, and Samba expects open to not take a
lot of time.
As Miklos suggested you can return early in Open in the case that the
file is remote and delay on the read/write requests, although you
might have to enable AIO as well.
Cloud gateways have a similar problem although some of them solve it
by getting the metadata as quickly as they can so they can respond
quickly to requests to open files that exist but for which the data is
not local yet.
More information about the samba-technical