Closed GoogleCodeExporter closed 9 years ago
Disk image mounting has changed in certain ways (some of them subtle) in
Leopard. One
difference is in the use of a user-space helper process for attachment, as
opposed to
handling the image directly in the kernel through the IOHDIXController kernel
extension. The entire disk image mounting paraphernalia is closed source, so
it's
hard to debug, analyze, understand.
Try forcing the sparse image to be handled in-kernel and see if that works.
Here's how:
If you try mounting, say, /Volumes/temp/foo.sparseimage from the command line
through
the "open" command, I'm assuming you'll run into the error that you mention.
$ cd /Volumes/temp/
$ open foo.sparseimage
# error?
You can use the com_apple_hdid_kernel environment variable to force in-kernel
attachment.
$ cd /Volumes/temp/
$ com_apple_hdid_kernel=1 open foo.sparseimage
# does it work now?
Original comment by si...@gmail.com
on 21 Nov 2007 at 8:00
Yup, that totally worked. Is there any way to force Finder/Path Finder to mount
in
this fashion?
Totally not a defect anymore, thanks!
Original comment by RubinSta...@gmail.com
on 21 Nov 2007 at 8:47
> Totally not a defect anymore, thanks!
It is, actually, something that requires a fix on the MacFUSE kernel side. You
shouldn't have to force Finder etc. and it should "just work." If you want to
help me
test the fix, try the following:
1. Mount with and additional mount-time argument "-oblocksize=512". See if it
works
without any magic environment variables. This isn't the real fix though--you
shouldn't have to force block size to 512.
2. If you are willing and able to compile MacFUSE from source (it's pretty
straightforward -- see the HOWTO), you can try the real fix to see if my
understanding of your issue is correct. In
macfuse/core/10.5/fusefs/fuse_vfsops.c,
add the following lines after line 437 (immediately before the line that says
"vfs_setfsprivate(mp, data);":
{
struct vfsioattr ioattr;
vfs_ioattr(mp, &ioattr);
ioattr.io_devblocksize = data->blocksize;
vfs_setioattr(mp, &ioattr);
}
Original comment by si...@gmail.com
on 22 Nov 2007 at 3:20
Fixed in the source tree.
Original comment by si...@gmail.com
on 22 Nov 2007 at 7:18
Original issue reported on code.google.com by
RubinSta...@gmail.com
on 21 Nov 2007 at 4:43