No, it's not known to work (yet). It needs some more plumbing that I
haven't gotten around to.

There are no vnodes on Linux, and I don't know what fuse_invalidate()
did, so this is not a rewrite of it, but it may very well be that
fuse_invalidate() did something similar. I meant to support a few
ioctls in MacFUSE to allow out-of-band manipulation of some in-kernel
state. In this case, the manipulation is purging of the unified buffer
cache for that vnode along with purging of the relevant attribute
cache entry.

Note that the ioctls are separate from this function, which is merely
supposed to be a convenience wrapper for one particular ioctl()
invocation.

Amit

On Feb 13, 8:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Is this function known to work?  It seems like a rewrite of the now-
> obsolete fuse.c/fuse_invalidate() and appears to try and flush entries
> from the vnode cache, among other effects, but when I call it with a
> valid path, like "/", I get a segmentation fault.  Here's my code
> (using python bindings):
>
> <code>
> // python function
> def purgeName(path):
>     return FusePurgeName(path)
>
> // C function
> static PyObject *
> FusePurgeName(PyObject *self, PyObject *args)
> {
>         char *path;
>         PyObject *ret;
>         int err;
>
>         PyArg_ParseTuple(args, "s", &path);
>         printf("%s\n", path);
>         err = fuse_purge_path_np(path);
> // segmentation fault before it returns
>         printf("%i\n", err);
>         ret = Py_BuildValue("i", err);
>         return(ret);}
>
> </code>
>
> I'm admittedly rusty with C, so I could be passing the path string
> incorrectly, but the printf looks correct, and PyArg_ParseTuple is
> guaranteed to null-terminate any strings.
>
> If I set path to "" or NULL, the behavior is correct (i.e., it returns
> with an errno).   Any idea why it faults when I pass it a path string?
--~--~---------~--~----~------------~-------~--~----~
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