|
|
| version 1.9, 2004/03/01 06:33:22 | version 1.10, 2004/04/21 16:55:09 |
|---|---|
| Line 230 static int null_unlock(struct vop_unlock | Line 230 static int null_unlock(struct vop_unlock |
| * to determine what implementation of the op should be invoked | * to determine what implementation of the op should be invoked |
| * - all mapped vnodes are of our vnode-type (NEEDSWORK: | * - all mapped vnodes are of our vnode-type (NEEDSWORK: |
| * problems on rmdir'ing mount points and renaming?) | * problems on rmdir'ing mount points and renaming?) |
| * | |
| * null_bypass(struct vnodeop_desc *a_desc, ...) | |
| */ | */ |
| int | int |
| null_bypass(ap) | null_bypass(struct vop_generic_args *ap) |
| struct vop_generic_args /* { | |
| struct vnodeop_desc *a_desc; | |
| <other random data follows, presumably> | |
| } */ *ap; | |
| { | { |
| register struct vnode **this_vp_p; | register struct vnode **this_vp_p; |
| int error; | int error; |
| Line 352 null_bypass(ap) | Line 350 null_bypass(ap) |
| * We have to carry on the locking protocol on the null layer vnodes | * We have to carry on the locking protocol on the null layer vnodes |
| * as we progress through the tree. We also have to enforce read-only | * as we progress through the tree. We also have to enforce read-only |
| * if this layer is mounted read-only. | * if this layer is mounted read-only. |
| * | |
| * null_lookup(struct vnode *a_dvp, struct vnode **a_vpp, | |
| * struct componentname *a_cnp) | |
| */ | */ |
| static int | static int |
| null_lookup(ap) | null_lookup(struct vop_lookup_args *ap) |
| struct vop_lookup_args /* { | |
| struct vnode * a_dvp; | |
| struct vnode ** a_vpp; | |
| struct componentname * a_cnp; | |
| } */ *ap; | |
| { | { |
| struct componentname *cnp = ap->a_cnp; | struct componentname *cnp = ap->a_cnp; |
| struct vnode *dvp = ap->a_dvp; | struct vnode *dvp = ap->a_dvp; |
| Line 405 null_lookup(ap) | Line 401 null_lookup(ap) |
| /* | /* |
| * Setattr call. Disallow write attempts if the layer is mounted read-only. | * Setattr call. Disallow write attempts if the layer is mounted read-only. |
| * | |
| * null_setattr(struct vnodeop_desc *a_desc, struct vnode *a_vp, | |
| * struct vattr *a_vap, struct ucred *a_cred, | |
| * struct thread *a_td) | |
| */ | */ |
| int | int |
| null_setattr(ap) | null_setattr(struct vop_setattr_args *ap) |
| struct vop_setattr_args /* { | |
| struct vnodeop_desc *a_desc; | |
| struct vnode *a_vp; | |
| struct vattr *a_vap; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| struct vattr *vap = ap->a_vap; | struct vattr *vap = ap->a_vap; |
| Line 452 null_setattr(ap) | Line 445 null_setattr(ap) |
| /* | /* |
| * We handle getattr only to change the fsid. | * We handle getattr only to change the fsid. |
| * | |
| * null_getattr(struct vnode *a_vp, struct vattr *a_vap, struct ucred *a_cred, | |
| * struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_getattr(ap) | null_getattr(struct vop_getattr_args *ap) |
| struct vop_getattr_args /* { | |
| struct vnode *a_vp; | |
| struct vattr *a_vap; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| int error; | int error; |
| Line 473 null_getattr(ap) | Line 463 null_getattr(ap) |
| /* | /* |
| * Handle to disallow write access if mounted read-only. | * Handle to disallow write access if mounted read-only. |
| * | |
| * null_access(struct vnode *a_vp, int a_mode, struct ucred *a_cred, | |
| * struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_access(ap) | null_access(struct vop_access_args *ap) |
| struct vop_access_args /* { | |
| struct vnode *a_vp; | |
| int a_mode; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| mode_t mode = ap->a_mode; | mode_t mode = ap->a_mode; |
| Line 508 null_access(ap) | Line 495 null_access(ap) |
| /* | /* |
| * We must handle open to be able to catch MNT_NODEV and friends. | * We must handle open to be able to catch MNT_NODEV and friends. |
| * | |
| * null_open(struct vnode *a_vp, int a_mode, struct ucred *a_cred, | |
| * struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_open(ap) | null_open(struct vop_open_args *ap) |
| struct vop_open_args /* { | |
| struct vnode *a_vp; | |
| int a_mode; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| struct vnode *lvp = NULLVPTOLOWERVP(ap->a_vp); | struct vnode *lvp = NULLVPTOLOWERVP(ap->a_vp); |
| Line 532 null_open(ap) | Line 516 null_open(ap) |
| * We handle this to eliminate null FS to lower FS | * We handle this to eliminate null FS to lower FS |
| * file moving. Don't know why we don't allow this, | * file moving. Don't know why we don't allow this, |
| * possibly we should. | * possibly we should. |
| * | |
| * null_rename(struct vnode *a_fdvp, struct vnode *a_fvp, | |
| * struct componentname *a_fcnp, struct vnode *a_tdvp, | |
| * struct vnode *a_tvp, struct componentname *a_tcnp) | |
| */ | */ |
| static int | static int |
| null_rename(ap) | null_rename(struct vop_rename_args *ap) |
| struct vop_rename_args /* { | |
| struct vnode *a_fdvp; | |
| struct vnode *a_fvp; | |
| struct componentname *a_fcnp; | |
| struct vnode *a_tdvp; | |
| struct vnode *a_tvp; | |
| struct componentname *a_tcnp; | |
| } */ *ap; | |
| { | { |
| struct vnode *tdvp = ap->a_tdvp; | struct vnode *tdvp = ap->a_tdvp; |
| struct vnode *fvp = ap->a_fvp; | struct vnode *fvp = ap->a_fvp; |
| Line 570 null_rename(ap) | Line 550 null_rename(ap) |
| * We need to process our own vnode lock and then clear the | * We need to process our own vnode lock and then clear the |
| * interlock flag as it applies only to our vnode, not the | * interlock flag as it applies only to our vnode, not the |
| * vnodes below us on the stack. | * vnodes below us on the stack. |
| * | |
| * null_lock(struct vnode *a_vp, lwkt_tokref_t a_vlock, int a_flags, | |
| * struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_lock(ap) | null_lock(struct vop_lock_args *ap) |
| struct vop_lock_args /* { | |
| struct vnode *a_vp; | |
| lwkt_tokref_t a_vlock; | |
| int a_flags; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| int flags = ap->a_flags; | int flags = ap->a_flags; |
| Line 647 null_lock(ap) | Line 624 null_lock(ap) |
| * We need to process our own vnode unlock and then clear the | * We need to process our own vnode unlock and then clear the |
| * interlock flag as it applies only to our vnode, not the | * interlock flag as it applies only to our vnode, not the |
| * vnodes below us on the stack. | * vnodes below us on the stack. |
| * | |
| * null_unlock(struct vnode *a_vp, lwkt_tokref_t a_vlock, int a_flags, | |
| * struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_unlock(ap) | null_unlock(struct vop_unlock_args *ap) |
| struct vop_unlock_args /* { | |
| struct vnode *a_vp; | |
| lwkt_tokref_t a_vlock; | |
| int a_flags; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| int flags = ap->a_flags; | int flags = ap->a_flags; |
| Line 685 null_unlock(ap) | Line 659 null_unlock(ap) |
| return (lockmgr(&np->null_lock, flags | LK_RELEASE, ap->a_vlock, ap->a_td)); | return (lockmgr(&np->null_lock, flags | LK_RELEASE, ap->a_vlock, ap->a_td)); |
| } | } |
| /* | |
| * null_islocked(struct vnode *a_vp, struct thread *a_td) | |
| */ | |
| static int | static int |
| null_islocked(ap) | null_islocked(struct vop_islocked_args *ap) |
| struct vop_islocked_args /* { | |
| struct vnode *a_vp; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| Line 704 null_islocked(ap) | Line 677 null_islocked(ap) |
| * There is no way to tell that someone issued remove/rmdir operation | * There is no way to tell that someone issued remove/rmdir operation |
| * on the underlying filesystem. For now we just have to release lowevrp | * on the underlying filesystem. For now we just have to release lowevrp |
| * as soon as possible. | * as soon as possible. |
| * | |
| * null_inactive(struct vnode *a_vp, struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_inactive(ap) | null_inactive(struct vop_inactive_args *ap) |
| struct vop_inactive_args /* { | |
| struct vnode *a_vp; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| struct null_node *xp = VTONULL(vp); | struct null_node *xp = VTONULL(vp); |
| Line 740 null_inactive(ap) | Line 711 null_inactive(ap) |
| /* | /* |
| * We can free memory in null_inactive, but we do this | * We can free memory in null_inactive, but we do this |
| * here. (Possible to guard vp->v_data to point somewhere) | * here. (Possible to guard vp->v_data to point somewhere) |
| * | |
| * null_reclaim(struct vnode *a_vp, struct thread *a_td) | |
| */ | */ |
| static int | static int |
| null_reclaim(ap) | null_reclaim(struct vop_reclaim_args *ap) |
| struct vop_reclaim_args /* { | |
| struct vnode *a_vp; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| void *vdata = vp->v_data; | void *vdata = vp->v_data; |
| Line 757 null_reclaim(ap) | Line 726 null_reclaim(ap) |
| return (0); | return (0); |
| } | } |
| /* | |
| * null_print(struct vnode *a_vp) | |
| */ | |
| static int | static int |
| null_print(ap) | null_print(struct vop_print_args *ap) |
| struct vop_print_args /* { | |
| struct vnode *a_vp; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| Line 779 null_print(ap) | Line 748 null_print(ap) |
| /* | /* |
| * Let an underlying filesystem do the work | * Let an underlying filesystem do the work |
| * | |
| * null_createvobject(struct vnode *vp, struct ucred *cred, struct proc *p) | |
| */ | */ |
| static int | static int |
| null_createvobject(ap) | null_createvobject(struct vop_createvobject_args *ap) |
| struct vop_createvobject_args /* { | |
| struct vnode *vp; | |
| struct ucred *cred; | |
| struct proc *p; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| struct vnode *lowervp = VTONULL(vp) ? NULLVPTOLOWERVP(vp) : NULL; | struct vnode *lowervp = VTONULL(vp) ? NULLVPTOLOWERVP(vp) : NULL; |
| Line 803 null_createvobject(ap) | Line 769 null_createvobject(ap) |
| /* | /* |
| * We have nothing to destroy and this operation shouldn't be bypassed. | * We have nothing to destroy and this operation shouldn't be bypassed. |
| * | |
| * null_destroyvobject(struct vnode *vp) | |
| */ | */ |
| static int | static int |
| null_destroyvobject(ap) | null_destroyvobject(struct vop_destroyvobject_args *ap) |
| struct vop_destroyvobject_args /* { | |
| struct vnode *vp; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| Line 816 null_destroyvobject(ap) | Line 781 null_destroyvobject(ap) |
| return (0); | return (0); |
| } | } |
| /* | |
| * null_getvobject(struct vnode *vp, struct vm_object **objpp) | |
| */ | |
| static int | static int |
| null_getvobject(ap) | null_getvobject(struct vop_getvobject_args *ap) |
| struct vop_getvobject_args /* { | |
| struct vnode *vp; | |
| struct vm_object **objpp; | |
| } */ *ap; | |
| { | { |
| struct vnode *lvp = NULLVPTOLOWERVP(ap->a_vp); | struct vnode *lvp = NULLVPTOLOWERVP(ap->a_vp); |