[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] Question about fuse kernel module implementation
From:       Nikolaus Rath <Nikolaus () rath ! org>
Date:       2022-11-15 10:33:52
Message-ID: 87h6z0tskv.fsf () vostro ! rath ! org
[Download RAW message or body]

On Nov 14 2022, Vadim Lebedev <vadiml1024@gmail.com> wrote:
> I wonder how FUSE avoids infinite recursion in some cases.
> For example here:
> https://github.com/libfuse/libfuse/blob/085cbab117b72df8da113a46d9ec9ba64ca301c6/example/passthrough_fh.c#L116
>  
> The execution arrived here because sume usermode app  did
> **opendir("/somedir")***
> and now usermode fuse server does the  **exact same opendir call**....
> One would expect that this will eventually provoke recursive call to the
> same **xmp_opendir** function.
> But it does not happens? Can somebody explain this please?

It's not the same call. FUSE processes opendir() for a directory underneath
the FUSE mountpoint. When the FUSE daemon itself calls opendir(), it
does so for a directory outside the mountpoint.

(Unless you mount the directory over itself, in which case you will
indeed get a deadlock or infinite recursion).


Best,
-Nikolaus

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

              »Time flies like an arrow, fruit flies like a Banana. «


-- 
fuse-devel mailing list
To unsubscribe or subscribe, visit \
https://lists.sourceforge.net/lists/listinfo/fuse-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic