null_vnops.c (30434) | null_vnops.c (30636) |
---|---|
1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * John Heidemann of the UCLA Ficus project. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 23 unchanged lines hidden (view full) --- 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)null_vnops.c 8.6 (Berkeley) 5/27/95 37 * 38 * Ancestors: 39 * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 | 1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * John Heidemann of the UCLA Ficus project. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 23 unchanged lines hidden (view full) --- 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)null_vnops.c 8.6 (Berkeley) 5/27/95 37 * 38 * Ancestors: 39 * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 |
40 * $Id: null_vnops.c,v 1.23 1997/10/15 09:21:07 phk Exp $ | 40 * $Id: null_vnops.c,v 1.24 1997/10/15 10:04:31 phk Exp $ |
41 * ...and... 42 * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project 43 * | 41 * ...and... 42 * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project 43 * |
44 * $Id: null_vnops.c,v 1.23 1997/10/15 09:21:07 phk Exp $ | 44 * $Id: null_vnops.c,v 1.24 1997/10/15 10:04:31 phk Exp $ |
45 */ 46 47/* 48 * Null Layer 49 * 50 * (See mount_null(8) for more information.) 51 * 52 * The null layer duplicates a portion of the file system --- 475 unchanged lines hidden (view full) --- 528 529static int 530null_inactive(ap) 531 struct vop_inactive_args /* { 532 struct vnode *a_vp; 533 struct proc *a_p; 534 } */ *ap; 535{ | 45 */ 46 47/* 48 * Null Layer 49 * 50 * (See mount_null(8) for more information.) 51 * 52 * The null layer duplicates a portion of the file system --- 475 unchanged lines hidden (view full) --- 528 529static int 530null_inactive(ap) 531 struct vop_inactive_args /* { 532 struct vnode *a_vp; 533 struct proc *a_p; 534 } */ *ap; 535{ |
536 struct vnode *vp = ap->a_vp; 537 struct null_node *xp = VTONULL(vp); 538 struct vnode *lowervp = xp->null_lowervp; |
|
536 /* 537 * Do nothing (and _don't_ bypass). 538 * Wait to vrele lowervp until reclaim, 539 * so that until then our null_node is in the 540 * cache and reusable. | 539 /* 540 * Do nothing (and _don't_ bypass). 541 * Wait to vrele lowervp until reclaim, 542 * so that until then our null_node is in the 543 * cache and reusable. |
544 * We still have to tell the lower layer the vnode 545 * is now inactive though. |
|
541 * 542 * NEEDSWORK: Someday, consider inactive'ing 543 * the lowervp and then trying to reactivate it 544 * with capabilities (v_id) 545 * like they do in the name lookup cache code. 546 * That's too much work for now. 547 */ | 546 * 547 * NEEDSWORK: Someday, consider inactive'ing 548 * the lowervp and then trying to reactivate it 549 * with capabilities (v_id) 550 * like they do in the name lookup cache code. 551 * That's too much work for now. 552 */ |
553 VOP_INACTIVE(lowervp, ap->a_p); |
|
548 VOP_UNLOCK(ap->a_vp, 0, ap->a_p); 549 return (0); 550} 551 552static int 553null_reclaim(ap) 554 struct vop_reclaim_args /* { 555 struct vnode *a_vp; --- 104 unchanged lines hidden --- | 554 VOP_UNLOCK(ap->a_vp, 0, ap->a_p); 555 return (0); 556} 557 558static int 559null_reclaim(ap) 560 struct vop_reclaim_args /* { 561 struct vnode *a_vp; --- 104 unchanged lines hidden --- |