Please realize that your "UDF Volume" is *not* a UDF volume--it's a
MacFUSE volume. It's also not a disk-based file system (like it would
be in the case of an in-kernel UDF driver)--it's a MacFUSE file
system. This is *really* critical to understand. As far as MacFUSE is
concerned, the file system's "backing store" is a program in user
space. MacFUSE doesn't really care if the actual data is coming from a
"real" disk node or from elsewhere.

In the Mac OS X kernel, what's reported as st_dev is the va_fsid vnode
attribute. In the case of a real disk-based file system (like HFS+),
the file system would arrange for va_fsid to be set to the underlying
device number (a dev_t composed from major and minor numbers). When
you do a stat, you get this value back in st_dev. This is not the case
with MacFUSE. As I said above, MacFUSE doesn't care where the user-
space file system stores its data. MacFUSE sets va_fsid to an
automatically generated value (that's guarded against clashes). This
value is unrelated to the block device your user-space file system
might be using.

Contrary to what you might expect, it's neither straightforward nor
desirable to have a real block device show up in a MacFUSE volume's
st_dev. A Mac OS X file system is either block-device based or isn't--
several things differ between the two, including the argument
structure used in the mount system call. MacFUSE, by design, is *not*
block-device based. Forcibly stashing a specific st_dev value isn't
safe either. You could seriously confuse things like Disk Utility.app.
Besides, there are no provisions to stop a user from specifying an
st_dev value that happens to be the same as that of the root volume,
etc.

Finally, the purpose of "-ofsname=/dev/diskN" is *not* to set up
st_dev "properly". It's purpose is to merely specify the string that
should be reported as the f_mntfromname field of the statfs structure.

It's not that I'm totally oblivious to why you'd want what you were
expecting. It just doesn't work that way. I could, in theory, add an
argument that would let you specify an st_dev value (or, if fsname
happens to be of the form /dev/diskN, take the st_dev value from
there, but as I alluded to above, it wouldn't be without caveats/
dangers).

Amit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"macfuse-devel" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to