include/uapi/linux/coda.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/coda.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/coda.h- Extension
.h- Size
- 18393 bytes
- Lines
- 762
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sys/types.hsys/time.hlinux/time.h
Detected Declarations
struct venus_direntstruct CodaFidstruct coda_timespecstruct coda_vattrstruct coda_statfsstruct coda_in_hdrstruct coda_out_hdrstruct coda_root_outstruct coda_root_instruct coda_open_instruct coda_open_outstruct coda_store_instruct coda_store_outstruct coda_release_instruct coda_release_outstruct coda_close_instruct coda_close_outstruct coda_ioctl_instruct coda_ioctl_outstruct coda_getattr_instruct coda_getattr_outstruct coda_setattr_instruct coda_setattr_outstruct coda_access_instruct coda_access_outstruct coda_lookup_instruct coda_lookup_outstruct coda_create_instruct coda_create_outstruct coda_remove_instruct coda_remove_outstruct coda_link_instruct coda_link_outstruct coda_rename_instruct coda_rename_outstruct coda_mkdir_instruct coda_mkdir_outstruct coda_rmdir_instruct coda_rmdir_outstruct coda_symlink_instruct coda_symlink_outstruct coda_readlink_instruct coda_readlink_outstruct coda_fsync_instruct coda_fsync_outstruct coda_vget_instruct coda_vget_outstruct coda_purgeuser_out
Annotated Snippet
struct venus_dirent {
u_int32_t d_fileno; /* file number of entry */
u_int16_t d_reclen; /* length of this record */
u_int8_t d_type; /* file type, see below */
u_int8_t d_namlen; /* length of string in d_name */
char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */
};
#undef DIRSIZ
#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + \
(((dp)->d_namlen+1 + 3) &~ 3))
/*
* File types
*/
#define CDT_UNKNOWN 0
#define CDT_FIFO 1
#define CDT_CHR 2
#define CDT_DIR 4
#define CDT_BLK 6
#define CDT_REG 8
#define CDT_LNK 10
#define CDT_SOCK 12
#define CDT_WHT 14
/*
* Convert between stat structure types and directory types.
*/
#define IFTOCDT(mode) (((mode) & 0170000) >> 12)
#define CDTTOIF(dirtype) ((dirtype) << 12)
#endif
#ifndef _VUID_T_
#define _VUID_T_
typedef u_int32_t vuid_t;
typedef u_int32_t vgid_t;
#endif /*_VUID_T_ */
struct CodaFid {
u_int32_t opaque[4];
};
#define coda_f2i(fid)\
(fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
#ifndef _VENUS_VATTR_T_
#define _VENUS_VATTR_T_
/*
* Vnode types. VNON means no type.
*/
enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
struct coda_timespec {
int64_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
struct coda_vattr {
long va_type; /* vnode type (for create) */
u_short va_mode; /* files access mode and type */
short va_nlink; /* number of references to file */
vuid_t va_uid; /* owner user id */
vgid_t va_gid; /* owner group id */
long va_fileid; /* file id */
u_quad_t va_size; /* file size in bytes */
long va_blocksize; /* blocksize preferred for i/o */
struct coda_timespec va_atime; /* time of last access */
struct coda_timespec va_mtime; /* time of last modification */
struct coda_timespec va_ctime; /* time file changed */
u_long va_gen; /* generation number of file */
u_long va_flags; /* flags defined for file */
cdev_t va_rdev; /* device special file represents */
u_quad_t va_bytes; /* bytes of disk space held by file */
u_quad_t va_filerev; /* file modification number */
};
#endif
/* structure used by CODA_STATFS for getting cache information from venus */
struct coda_statfs {
int32_t f_blocks;
int32_t f_bfree;
int32_t f_bavail;
int32_t f_files;
int32_t f_ffree;
};
/*
* Kernel <--> Venus communications.
*/
Annotation
- Immediate include surface: `sys/types.h`, `sys/time.h`, `linux/time.h`.
- Detected declarations: `struct venus_dirent`, `struct CodaFid`, `struct coda_timespec`, `struct coda_vattr`, `struct coda_statfs`, `struct coda_in_hdr`, `struct coda_out_hdr`, `struct coda_root_out`, `struct coda_root_in`, `struct coda_open_in`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.