On Thu, May 8, 2008 at 2:46 AM, Amit Singh <[EMAIL PROTECTED]> wrote: > > Instead of the Objective-C based LoopbackFS, try the fusexmp_fh > example (the "original" C-based loopback file system for MacFUSE) from > the user-space library. You can mount it as follows: > > $ mkdir /tmp/dir > $ mkdir /Volumes/loop > $ ./fusexmp_fh /Volumes/loop -omodules=subdir,subdir=/tmp/dir > > This will remount /tmp/dir on /Volumes/loop. Now see what happens with > your xattr experiments. You can comment out the following code from > fusexmp_fh.c to make it use ._ files instead of native xattrs: > > #ifdef HAVE_SETXATTR > .setxattr = xmp_setxattr, > .getxattr = xmp_getxattr, > .listxattr = xmp_listxattr, > .removexattr = xmp_removexattr, > #endif > > The reason I tell you to do this is because the behavior of fusexmp_fh > most closely reflects the state of the MacFUSE API. I see that you are > using the Objective-C bindings, but it's still helpful to know what > fusexmp_fh does. > > To compile fusexmp_fh, you can check out the entire MacFUSE source > tree, say, under /work. Then you do the following: > > $ cd /work/macfuse/ > $ ./tools/build_lib.sh > ... > > Once it finishes, you should have a build of the user-space library > under /tmp/fuse-2.7.3 (that is, current version). You can find the > compiled example as /tmp/fuse-2.7.3/example/fusexmp_fh.
I've confirmed that it works fine with fusexmp_fh, so it is not a problem there. I think I've tracked what it is. Until I figure out the "proper" solution, I'd like you to try a workaround and let me know if this fixes the problem for you. You mentioned that your file system doesn't implement extended attributes, but try adding only this one xattr related delegate method: - (BOOL)setExtendedAttribute:(NSString *)name ofItemAtPath:(NSString *)path value:(NSData *)value position:(off_t)position options:(int)options error:(NSError **)error { *error = [NSError errorWithDomain:NSPOSIXErrorDomain code:ENOSYS userInfo:nil]; return NO; } That explicitly reports that setxattr is not implemented. The current GMUserFileSystem code prefers to use ENOTSUP for various reasons but it will honor your error code if you implement the delegate method. Let me know if it works! ted > > Amit > > > > On May 8, 12:56 am, freeridecoding <[EMAIL PROTECTED]> wrote: > > Hi! > > > > Thanks for your quick replies. > > I can confirm that using the new LoopBack example and the new MacFUSE > > version > > now fixes the issue - when xattrs are supported in the implementing > > fs. > > > > However - If xattr implementation methods are removed (and AppleDouble > > files should be created), > > the created AppleDouble file is still damaged and of size 128kb. > > Unfortunately for me I need to solve it in that way because I need the > > AppleDouble files. > > > > What I have learned from your comments to my questions in another > > thread, > > if the fs does not implement xattrs, the kernel itself initiates the > > creation of AppleDouble files. > > In my understanding this would mean that the kernel subsequently > > calles the filesystems open, write and probably read etc. for the > > AppleDouble file. > > If MacFUSE does not interfere here I do not understand why the > > position attribute would have an influence for that case. > > (wouldn´t the Finder just create and read AppleDouble filechunks?) > > > > Does this mean that I still have no chance getting this to work on the > > implementation side if I need to use AppleDouble files? > > > > Thanks for your time, > > Thomas > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---