diff options
author | Martin Natano <natano@cvs.openbsd.org> | 2016-08-15 07:39:47 +0000 |
---|---|---|
committer | Martin Natano <natano@cvs.openbsd.org> | 2016-08-15 07:39:47 +0000 |
commit | 290c66dc50dfdba827f9fa0700dbac65a1f2ad34 (patch) | |
tree | e06d89823a157f145053b048a74f78a5b6cf7f3f /sys/miscfs | |
parent | 0215bf0ae9a29084fd5e4fbbacdd0da00d0344a4 (diff) |
Neuter fuse_vptofh() and fuse_fhtovp(). I implemented those functions
under the assumption, that fuse_vget() has reasonable semantics, while
this is not the case. fusefs_vget() only functions correctly, if the
file in questions has recently been accessed and is still in the vnode
cache of the userspace daemon associated with the mount point.
As a matter of fact the fuse api doesn't feature a reasonable way to map
inode numbers to a handle at all (see struct fuse_operations).
ok guenther
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/fuse/fuse_vfsops.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c index 162860c2067..9780f0760f1 100644 --- a/sys/miscfs/fuse/fuse_vfsops.c +++ b/sys/miscfs/fuse/fuse_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vfsops.c,v 1.25 2016/08/13 11:42:46 natano Exp $ */ +/* $OpenBSD: fuse_vfsops.c,v 1.26 2016/08/15 07:39:46 natano Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -300,28 +300,13 @@ retry: int fusefs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) { - struct ufid *ufhp; - - ufhp = (struct ufid *)fhp; - if (ufhp->ufid_len != sizeof(struct ufid) || - ufhp->ufid_ino < FUSE_ROOTINO) - return (ESTALE); - - return (VFS_VGET(mp, ufhp->ufid_ino, vpp)); + return (EINVAL); } int fusefs_vptofh(struct vnode *vp, struct fid *fhp) { - struct fusefs_node *ip; - struct ufid *ufhp; - - ip = VTOI(vp); - ufhp = (struct ufid *)fhp; - ufhp->ufid_len = sizeof(struct ufid); - ufhp->ufid_ino = ip->ufs_ino.i_number; - - return (0); + return (EINVAL); } int |