VATTR(9)
π VATTR(9) β vnode attributes π
Okay so this is the Kernel Developer's Manual page for VATTR(9), bestie, and it's literally all about vnode attributes. We're covering vattr and vattr_null. No cap. β¨
π NAME π
vattr, vattr_null β vnode attributes π¦
β¨ SYNOPSIS β¨
Include these, exactly:
#include <sys/param.h>
#include <sys/vnode.h>
void
vattr_null(struct vattr *vap);
π¦ DESCRIPTION π¦
Vnode attributes describe attributes of a file or directory, including file permissions, owner, group, size, access time and modification time. It's giving file metadata central, honestly.
A vnode attribute has the following structure:
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 */
};
A field value of VNOVAL represents a field whose value is unavailable or which is not to be changed. Important vibe check: valid flag values for va_flags are:
VA_UTIMES_NULLβ utimes argument wasNULLVA_EXCLUSIVEβ exclusive create request
Vnode attributes for a file are set by the vnode operation VOP_SETATTR(9). Vnode attributes for a file are retrieved by the vnode operation VOP_GETATTR(9). For more information on vnode operations see vnodeops(9). π«Ά
π FUNCTIONS π
vattr_null(vap)β set vnode attributes invaptoVNOVAL.
π CODE REFERENCES π
vattr_null() is implemented in sys/kern/vfs_subr.c. Iconic. π
π SEE ALSO π
Signed with sparkles by Debian, dated January 8, 2010 β VATTR(9) out. π β¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2001 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms