1 .\" $NetBSD: vattr.9,v 1.13 2010/01/08 00:45:50 pooka Exp $
3 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Gregory McGarry.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
41 .Fn vattr_null "struct vattr *vap"
43 Vnode attributes describe attributes of a file or directory including
44 file permissions, owner, group, size, access time and modification time.
46 A vnode attribute has the following structure:
50 enum vtype va_type; /* vnode type (for create) */
51 mode_t va_mode; /* files access mode and type */
52 nlink_t va_nlink; /* number of references to file */
53 uid_t va_uid; /* owner user id */
54 gid_t va_gid; /* owner group id */
55 dev_t va_fsid; /* file system id (dev for now) */
56 ino_t va_fileid; /* file id */
57 u_quad_t va_size; /* file size in bytes */
58 long va_blocksize; /* blocksize preferred for i/o */
59 struct timespec va_atime; /* time of last access */
60 struct timespec va_mtime; /* time of last modification */
61 struct timespec va_ctime; /* time file changed */
62 struct timespec va_birthtime; /* time file created */
63 u_long va_gen; /* generation number of file */
64 u_long va_flags; /* flags defined for file */
65 dev_t va_rdev; /* device the special file represents */
66 u_quad_t va_bytes; /* bytes of disk space held by file */
67 u_quad_t va_filerev; /* file modification number */
68 u_int va_vaflags; /* operations flags, see below */
69 long va_spare; /* remain quad aligned */
73 A field value of VNOVAL represents a field whose value is unavailable
74 or which is not to be changed.
79 .Bl -tag -offset indent -width VA_UTIMES_NULL -compact
81 utimes argument was NULL
83 exclusive create request
86 Vnode attributes for a file are set by the vnode operation
88 Vnode attributes for a file are retrieved by the vnode operation
90 For more information on vnode operations see
93 .Bl -tag -width compact
94 .It Fn vattr_null "vap"
95 Set vnode attributes in
100 This section describes places within the
102 source tree where actual code implementing or using the vnode
103 attributes can be found.
104 All pathnames are relative to
109 .Pa sys/kern/vfs_subr.c .