[BACK]Return to puffs_vfsops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / fs / puffs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/fs/puffs/puffs_vfsops.c between version 1.32 and 1.33

version 1.32, 2007/03/29 16:30:07 version 1.33, 2007/04/11 21:03:05
Line 390  puffs_root(struct mount *mp, struct vnod
Line 390  puffs_root(struct mount *mp, struct vnod
 }  }
   
 int  int
 puffs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg, struct lwp *l)  
 {  
   
         return EOPNOTSUPP;  
 }  
   
 int  
 puffs_statvfs(struct mount *mp, struct statvfs *sbp, struct lwp *l)  puffs_statvfs(struct mount *mp, struct statvfs *sbp, struct lwp *l)
 {  {
         struct puffs_vfsreq_statvfs *statvfs_arg; /* too big for stack */          struct puffs_vfsreq_statvfs *statvfs_arg; /* too big for stack */
Line 572  puffs_sync(struct mount *mp, int waitfor
Line 565  puffs_sync(struct mount *mp, int waitfor
 }  }
   
 int  int
 puffs_vget(struct mount *mp, ino_t ino, struct vnode **vpp)  puffs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)
 {  {
           struct puffs_mount *pmp = MPTOPUFFSMP(mp);
           struct vnode *vp;
           int error;
   
         return EOPNOTSUPP;          PUFFS_VFSREQ(fhtonode);
 }  
   
 #if 0          if ((pmp->pmp_flags & PUFFS_KFLAG_CANEXPORT) == 0)
 /*ARGSUSED*/                  return EOPNOTSUPP;
 int  
 puffs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)  
 {  
   
         return EOPNOTSUPP;          if (fhp->fid_len < PUFFS_FHSIZE + 4)
                   return EINVAL;
   
           fhtonode_arg.pvfsr_dsize = PUFFS_FHSIZE;
           memcpy(fhtonode_arg.pvfsr_data, fhp->fid_data, PUFFS_FHSIZE);
   
           error = puffs_vfstouser(pmp, PUFFS_VFS_FHTOVP,
               &fhtonode_arg, sizeof(fhtonode_arg));
           if (error)
                   return error;
   
           vp = puffs_pnode2vnode(pmp, fhtonode_arg.pvfsr_fhcookie, 1);
           DPRINTF(("puffs_fhtovp: got cookie %p, existing vnode %p\n",
               fhtonode_arg.pvfsr_fhcookie, vp));
           if (!vp) {
                   error = puffs_getvnode(mp, fhtonode_arg.pvfsr_fhcookie,
                       fhtonode_arg.pvfsr_vtype, fhtonode_arg.pvfsr_size,
                       fhtonode_arg.pvfsr_rdev, &vp);
                   if (error)
                           return error;
                   vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
           }
   
           *vpp = vp;
           return 0;
 }  }
   
 /*ARGSUSED*/  
 int  int
 puffs_vptofh(struct vnode *vp, struct fid *fhp)  puffs_vptofh(struct vnode *vp, struct fid *fhp, size_t *fh_size)
 {  {
           struct puffs_mount *pmp = MPTOPUFFSMP(vp->v_mount);
           int error;
   
         return EOPNOTSUPP;          PUFFS_VFSREQ(nodetofh);
   
           if ((pmp->pmp_flags & PUFFS_KFLAG_CANEXPORT) == 0)
                   return EOPNOTSUPP;
   
           if (*fh_size < PUFFS_FHSIZE + 4) {
                   *fh_size = PUFFS_FHSIZE + 4;
                   return E2BIG;
           }
           *fh_size = PUFFS_FHSIZE + 4;
   
           nodetofh_arg.pvfsr_fhcookie = VPTOPNC(vp);
           nodetofh_arg.pvfsr_dsize = PUFFS_FHSIZE;
   
           error = puffs_vfstouser(pmp, PUFFS_VFS_VPTOFH,
               &nodetofh_arg, sizeof(nodetofh_arg));
           if (error)
                   return error;
   
           fhp->fid_len = PUFFS_FHSIZE + 4;
           memcpy(fhp->fid_data,
               nodetofh_arg.pvfsr_data, PUFFS_FHSIZE);
   
           return 0;
 }  }
 #endif  
   
 void  void
 puffs_init()  puffs_init()
Line 684  struct vfsops puffs_vfsops = {
Line 723  struct vfsops puffs_vfsops = {
         puffs_start,            /* start        */          puffs_start,            /* start        */
         puffs_unmount,          /* unmount      */          puffs_unmount,          /* unmount      */
         puffs_root,             /* root         */          puffs_root,             /* root         */
         puffs_quotactl,         /* quotactl     */          (void *)eopnotsupp,     /* quotactl     */
         puffs_statvfs,          /* statvfs      */          puffs_statvfs,          /* statvfs      */
         puffs_sync,             /* sync         */          puffs_sync,             /* sync         */
         puffs_vget,             /* vget         */          (void *)eopnotsupp,     /* vget         */
         (void *)eopnotsupp,     /* fhtovp       */          puffs_fhtovp,           /* fhtovp       */
         (void *)eopnotsupp,     /* vptofh       */          puffs_vptofh,           /* vptofh       */
         puffs_init,             /* init         */          puffs_init,             /* init         */
         NULL,                   /* reinit       */          NULL,                   /* reinit       */
         puffs_done,             /* done         */          puffs_done,             /* done         */

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

CVSweb <webmaster@jp.NetBSD.org>