On Oct 30, 2007, at 10:16 PM, Paul Marks wrote:
>
> Yes, I did run into bugs like the ones you describe.
>
> To make sure DiskArbitration clients (most notably, the Finder)
> receive only one notification, it's best to pass "-o noping_diskarb"
> if you're creating a filesystem bundle that's already invoked by
> DiskArbitration. In my later code, I checked the MacFUSE version and
> only added "-o noping_diskarb" for the versions that supported it.
In my case, adding "-o noping_diskarb" doesn't seem to help.
Just to see if this might be a latency issue, I added the following
in mount_fusefs.c, around the call to mount(...)
> syslog(LOG_ERR, "About to Mount FS. Sleeping.");
> sleep(5);
> syslog(LOG_ERR, "About to Mount FS. Continuing.");
>
> /* Finally! */
> result = mount(MACFUSE_FS_TYPE, mntpath, mntflags, (void *)&args);
>
> syslog(LOG_ERR, "Mounted FS. Sleeping.");
> sleep(5);
> syslog(LOG_ERR, "Mounted FS. Continuing.");
Sure enough, the disk appeared event occurred before mount was called.
My interpretation is that the disk arbitration framework doesn't
block waiting for the volume to be mounted before generating disk
appeared events.
Then, when Finder goes to create an icon for the volume, it fails
because the mount point doesn't exist yet.
I really don't have any good ideas on how to fix this. Any
suggestions are welcome.
At this point, I have two workarounds for getting the Finder to show
the volume's icon.
1) Relaunch Finder using the "Force Quit Applications" dialog.
2) Use terminal to "open /Volumes", and then click on the /Volumes
window in Finder.
>
> As for the volume not unmounting properly, that came about when I
> started optimizing ntfs-3g. I would ask ntfs-3g to mount /dev/rdisk*
> devices, since they performed better with the patches, but
> DiskArbitration was expecting to see /dev/disk* in the f_mntfromname
> field of statfs structures. As noted in my documentation,
> DiskArbitration will always ask for you to mount the /dev/disk*
> variant. So, to fix that problem, I started sending the "-o fsname="
> option to cause /dev/disk* to appear in statfs() calls, while still
> having ntfs-3g access the /dev/rdisk* device.
>
> Once I fixed the disparity between the expected and mounted devices
> (as seen by statfs calls), the problem went away. I don't know if
> this is the same problem you're seeing, but it sounds similar.
>
Up until today, I had been using only the /dev/disk* path for I/O to
my disk. Changing the filesystem to use /dev/rdisk* for I/O (while
maintaining /dev/disk* in f_mntfromname) didn't change my behavior.
Once I have a Finder icon for the volume, and ask Finder to eject it,
it works partially.
The disk ejects. The volume's desktop icon disappears.
What doesn't work is that the volume's sidebar icon remains (but is
unusable) in every window that has a sidebar, and the mount point (/
Volumes/{volname}) is not deleted.
I've checked my userspace code to see what errors are reported during
the eject. This is all I found.
> Oct 31 16:24:52 The-Dark-Side mount_SAI_udf[1769]: leaving
> fuse_volume_getattr /.TemporaryItems : -2
> Oct 31 16:24:53 The-Dark-Side KernelEventAgent[29]: tid 00000000
> received unknown event (48)
I would expect the first - .TemporaryItems indeed does not exist.
I don't understand the second, but it's probably related, as it
doesn't occur when ejecting HFS volumes.
> If that doesn't help, let me know, and I'll see if I can think of
> anything else.
>
> Cheers!
> - Paul Marks
>
Thanks for your time,
Ron Aldrich
Software Architects, Inc.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---