From: Han-Wen N. <ha...@gm...> - 2012-06-12 15:14:46
|
[+list] On Tue, Jun 12, 2012 at 10:44 AM, Jay Booth <jay...@gm...> wrote: > Hi, I noticed that your go-fuse package, in the RawFileSystem interface, has > a few differences with the fuse.h fuse_operations. It seems for several > operations (getAttr for one), you're not taking a path and instead looking > up iNodes based on the raw.InHeader.NodeId. This seems to be the case in a > few other places. In fuse.h, however, every operation supplies a file path > and I don't even see . > > I'm working on a networked filesystem where I want the kernel's idea of > inodes to be completely divorced from mine, and I'd like the kernel to talk > to my filesystem primarily around the idea of file names, while I'll work > out the versioning and the data on my end of it. So I'm going to throw > together an alternate RawFileSystem that provides filenames for every > function call, like the functions in fuse.h. > > Two questions: > > 1) Am I crazy? Should I be working by passing inodes back and forth to the > kernel rather than wanting to work with filenames? See https://github.com/hanwen/go-fuse/blob/master/fuse/api.go#L80 That said, if possible you should avoid this, and use NodeFileSystem instead. https://github.com/hanwen/go-fuse/blob/master/fuse/api.go#L15 ; it is hard to get posix semantics right with path based filenames. I wonder how you managed to only see RawFileSystem; where did you start looking for examples/documentation? -- Han-Wen Nienhuys - ha...@xs... - http://www.xs4all.nl/~hanwen |