One thing you should know is that although MacFUSE is multithreaded
(and many operations can be in flight, each running in its own
thread), it is *currently not reentrant* for any given file system
object. That is, for a single given file, operations are serialized by
the kernel. For different files, operations can run in parallel. So,
if you block in write(), say, for file "foo", then until that call
finishes, subsequent operations on "foo" will have to wait. In
particular, if you are in "foo"'s parent directory, an "ls -l" could
block because it could cause a getattr() to be performed on "foo".
(Just an "ls" would not block because it only does a readdir() on the
parent.) And actually, "ls -l" would want to do listxattr()/getxattr()
too.

I suspect this is what you are seeing.

This is a limitation of the current implementation. The limitation can
be removed by implementing a finer grained locking model in the
MacFUSE kernel extension. Even allowing getattr(), listxattr(), and
getxattr() to proceed for a file in the face of another blocked call
should make it much nicer for your scenario.

Hopefully I'll get around to implementing the aforementioned locking
at some point. It's on my TODO list, but it's quite a bit of work.

Amit

On Aug 25, 6:49 pm, Daniel Benamy <[EMAIL PROTECTED]> wrote:
> I've got a fuse file system which sometimes intentionally blocks
> requests. It works with fuse on linux which spawns new threads for
> each request and is happy to leave some hanging around for a while and
> process other requests. But when I run it with macfuse, its acting as
> though when one request blocks, the whole thing gets stuck. Is this
> intentional? Is there any way around it? I did a bit of searching on
> the web and skimmed the code and I haven't found anything about this.
> Thanks a lot,
> Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"macfuse-devel" group.
To post to this group, send email to macfuse-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/macfuse-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to