p A vnode attribute has the following structure:
p d -literal struct vattr { enum vtype va_type; /* vnode type (for create) */ mode_t va_mode; /* files access mode and type */ nlink_t va_nlink; /* number of references to file */ uid_t va_uid; /* owner user id */ gid_t va_gid; /* owner group id */ dev_t va_fsid; /* file system id (dev for now) */ ino_t va_fileid; /* file id */ u_quad_t va_size; /* file size in bytes */ long va_blocksize; /* blocksize preferred for i/o */ struct timespec va_atime; /* time of last access */ struct timespec va_mtime; /* time of last modification */ struct timespec va_ctime; /* time file changed */ struct timespec va_birthtime; /* time file created */ u_long va_gen; /* generation number of file */ u_long va_flags; /* flags defined for file */ dev_t va_rdev; /* device the special file represents */ u_quad_t va_bytes; /* bytes of disk space held by file */ u_quad_t va_filerev; /* file modification number */ u_int va_vaflags; /* operations flags, see below */ long va_spare; /* remain quad aligned */ }; .Ed
p A field value of VNOVAL represents a field whose value is unavailable or which is not to be changed. Valid flag values for .Em va_flags are:
p l -tag -offset indent -width VA_UTIMES_NULL -compact t VA_UTIMES_NULL utimes argument was NULL t VA_EXCLUSIVE exclusive create request .El
p Vnode attributes for a file are set by the vnode operation .Xr VOP_SETATTR 9 . Vnode attributes for a file are retrieved by the vnode operation .Xr VOP_GETATTR 9 . For more information on vnode operations see .Xr vnodeops 9 . .Sh FUNCTIONS l -tag -width compact t Fn vattr_null "vap" Set vnode attributes in .Fa vap to VNOVAL. .El .Sh CODE REFERENCES This section describes places within the .Nx source tree where actual code implementing or using the vnode attributes can be found. All pathnames are relative to
p .Fn vattr_null is implemented in
a sys/kern/vfs_subr.c . .Sh SEE ALSO .Xr intro 9 , .Xr vfs 9 , .Xr vnode 9 , .Xr vnodeops 9