It's not clear which "fuse docs" you're referring to. "fuse" is
ambiguous. Lets talk about how MacFUSE works in this regard.
User-filesystem-provided st_dev field of the stat structure is indeed
ignored by design (of MacFUSE and OS X). By default, MacFUSE asks the
kernel to give it a new "fsid" (file system ID) at mount time.
Subsequently, a component of this fsid is reported as the st_dev field
in a stat(2) call. MacFUSE (or any other OS X file system) doesn't get
to populate the st_dev field arbitrarily.
If you want more control and want your user file system to have a
consistent (persistent across mounts) st_dev, you need to use the
'fsid' mount-time MacFUSE argument. "-o fsid=123" will result in an
st_dev of { 255, 123 }. This is the only way for a MacFUSE file system
to affect st_dev. This is normally neither necessary nor advised--if
you specify an fsid that's already in use, the mount will be denied.
Amit
On Jan 5, 10:43 am, Paul Phillips <[email protected]> wrote:
> I am experiencing apparently non-deterministic behavior when using open (the
> command line program) on a directory
> in my fuse filesystem. Sometimes it works as expected, launching a finder
> window with the directory contents.
> Other times it does something nutty, which I eventually figured out was it
> trying to open whatever has the same
> inode number on the actual root filesystem. So for instance I type "open
> /mnt/images" and it launches 0xED
> because both have inode 28 on their respective filesystems. I haven't
> spotted a pattern as to when it does the
> right vs. wrong thing.
>
> My impression from the fuse docs is that st_dev (which I'm pretty sure is the
> struct stat field at issue here) is
> ignored if you set it from a fuse filesystem. Is this a bug in my code,
> something I'm neglecting which is leading
> to probably uninitialized memory being used? Or is it a bug elsewhere? Any
> tips appreciated.
>
> --
> Paul Phillips | It's not enough to bash in heads - you've got to
> Apatheist | bash in minds.
> Empiricist | -- Capt Hammer
> up hill, pi pals! |----------*http://www.improving.org/paulp/*----------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---