| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: vnode.9,v 1.53 2011/06/14 00:56:02 rmind Exp $ | | 1 | .\" $NetBSD: vnode.9,v 1.54 2011/06/14 07:49:09 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Gregory McGarry. | | 7 | .\" by Gregory McGarry. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -588,31 +588,35 @@ An error is returned if the file system | | | @@ -588,31 +588,35 @@ An error is returned if the file system |
588 | .Pp | | 588 | .Pp |
589 | The argument | | 589 | The argument |
590 | .Fa tag | | 590 | .Fa tag |
591 | is the vnode tag assigned to | | 591 | is the vnode tag assigned to |
592 | .Fa *vpp-\*[Gt]v_tag . | | 592 | .Fa *vpp-\*[Gt]v_tag . |
593 | The argument | | 593 | The argument |
594 | .Fa vops | | 594 | .Fa vops |
595 | is the vnode operations vector of the file system requesting the new | | 595 | is the vnode operations vector of the file system requesting the new |
596 | vnode. | | 596 | vnode. |
597 | If a vnode is successfully retrieved zero is returned, otherwise an | | 597 | If a vnode is successfully retrieved zero is returned, otherwise an |
598 | appropriate error code is returned. | | 598 | appropriate error code is returned. |
599 | If | | 599 | If |
600 | .Fa slock | | 600 | .Fa slock |
601 | is not NULL, it specifies the lock to share for | | 601 | is not |
| | | 602 | .Dv NULL , |
| | | 603 | it specifies the lock to share for |
602 | .Em v_interlock . | | 604 | .Em v_interlock . |
603 | The reference will be held on the lock and sharing noted. | | 605 | The reference will be held on the lock and sharing noted. |
604 | Reference will be released and lock unshared when the vnode gets recycled. | | 606 | Reference will be released and lock unshared when the vnode gets recycled. |
605 | If NULL (regular case), vnode will use its own interlock. | | 607 | If |
| | | 608 | .Dv NULL |
| | | 609 | (regular case), vnode will use its own interlock. |
606 | .It Fn ungetnewvnode "vp" | | 610 | .It Fn ungetnewvnode "vp" |
607 | Undo the operation of | | 611 | Undo the operation of |
608 | .Fn getnewvnode . | | 612 | .Fn getnewvnode . |
609 | The argument | | 613 | The argument |
610 | .Fa vp | | 614 | .Fa vp |
611 | is the vnode to return to the freelist. | | 615 | is the vnode to return to the freelist. |
612 | This function is needed for | | 616 | This function is needed for |
613 | .Xr VFS_VGET 9 | | 617 | .Xr VFS_VGET 9 |
614 | which may need to push back a vnode in case of a locking race | | 618 | which may need to push back a vnode in case of a locking race |
615 | condition. | | 619 | condition. |
616 | .It Fn vrecycle "vp" "inter_lkp" "l" | | 620 | .It Fn vrecycle "vp" "inter_lkp" "l" |
617 | Recycle the unused vnode | | 621 | Recycle the unused vnode |
618 | .Fa vp | | 622 | .Fa vp |
| @@ -622,27 +626,29 @@ is a null operation if the reference cou | | | @@ -622,27 +626,29 @@ is a null operation if the reference cou |
622 | .It Fn vgone "vp" | | 626 | .It Fn vgone "vp" |
623 | Eliminate all activity associated with the unlocked vnode | | 627 | Eliminate all activity associated with the unlocked vnode |
624 | .Fa vp | | 628 | .Fa vp |
625 | in preparation for recycling. | | 629 | in preparation for recycling. |
626 | .It Fn vgonel "vp" "p" | | 630 | .It Fn vgonel "vp" "p" |
627 | Eliminate all activity associated with the locked vnode | | 631 | Eliminate all activity associated with the locked vnode |
628 | .Fa vp | | 632 | .Fa vp |
629 | in preparation for recycling. | | 633 | in preparation for recycling. |
630 | .It Fn vflush "mp" "skipvp" "flags" | | 634 | .It Fn vflush "mp" "skipvp" "flags" |
631 | Remove any vnodes in the vnode table belonging to mount point | | 635 | Remove any vnodes in the vnode table belonging to mount point |
632 | .Fa mp . | | 636 | .Fa mp . |
633 | If | | 637 | If |
634 | .Fa skipvp | | 638 | .Fa skipvp |
635 | is not NULL it is exempt from being flushed. | | 639 | is not |
| | | 640 | .Dv NULL |
| | | 641 | it is exempt from being flushed. |
636 | The argument | | 642 | The argument |
637 | .Fa flags | | 643 | .Fa flags |
638 | is a set of flags modifying the operation of | | 644 | is a set of flags modifying the operation of |
639 | .Fn vflush . | | 645 | .Fn vflush . |
640 | If FORCECLOSE is not specified, there should not be any active vnodes and | | 646 | If FORCECLOSE is not specified, there should not be any active vnodes and |
641 | the error | | 647 | the error |
642 | .Er EBUSY | | 648 | .Er EBUSY |
643 | is returned if any are found (this is a user error, not a system error). | | 649 | is returned if any are found (this is a user error, not a system error). |
644 | If FORCECLOSE is specified, active vnodes that are found are detached. | | 650 | If FORCECLOSE is specified, active vnodes that are found are detached. |
645 | If WRITECLOSE is set, only flush out regular file vnodes open for | | 651 | If WRITECLOSE is set, only flush out regular file vnodes open for |
646 | writing. | | 652 | writing. |
647 | SKIPSYSTEM causes any vnodes marked V_SYSTEM to be skipped. | | 653 | SKIPSYSTEM causes any vnodes marked V_SYSTEM to be skipped. |
648 | .It Fn vaccess "type" "file_mode" "uid" "gid" "acc_mode" "cred" | | 654 | .It Fn vaccess "type" "file_mode" "uid" "gid" "acc_mode" "cred" |