Documentation/filesystems/coda.rst
Source file repositories/reference/linux-study-clean/Documentation/filesystems/coda.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/filesystems/coda.rst- Extension
.rst- Size
- 44464 bytes
- Lines
- 1671
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct inputArgsstruct outputArgsstruct CodaCredstruct coda_timespecstruct coda_vattrstruct ViceIoctlstruct cfs_root_outstruct cfs_lookup_instruct cfs_lookup_outstruct cfs_getattr_instruct cfs_getattr_outstruct cfs_setattr_instruct cfs_access_instruct cfs_create_instruct cfs_create_outstruct cfs_mkdir_instruct cfs_mkdir_outstruct cfs_link_instruct cfs_symlink_instruct cfs_remove_instruct cfs_rmdir_instruct cfs_readlink_instruct cfs_readlink_outstruct cfs_open_instruct cfs_open_outstruct cfs_close_instruct cfs_ioctl_instruct cfs_ioctl_outstruct cfs_rename_instruct cfs_readdir_instruct cfs_readdir_outstruct cfs_vget_instruct cfs_vget_outstruct cfs_fsync_instruct cfs_inactive_instruct cfs_rdwr_instruct cfs_rdwr_outstruct ody_mount_instruct ody_mount_outstruct cfs_purgeuser_outstruct cfs_zapfile_outstruct cfs_zapdir_outstruct cfs_zapvnode_outstruct cfs_purgefid_outstruct cfs_replace_out
Annotated Snippet
struct inputArgs {
u_long opcode;
u_long unique; /* Keep multiple outstanding msgs distinct */
u_short pid; /* Common to all */
u_short pgid; /* Common to all */
struct CodaCred cred; /* Common to all */
<union "in" of call dependent parts of inputArgs>
};
struct outputArgs {
u_long opcode;
u_long unique; /* Keep multiple outstanding msgs distinct */
u_long result;
<union "out" of call dependent parts of inputArgs>
};
Before going on let us elucidate the role of the various fields. The
inputArgs start with the opcode which defines the type of service
requested from Venus. There are approximately 30 upcalls at present
which we will discuss. The unique field labels the inputArg with a
unique number which will identify the message uniquely. A process and
process group id are passed. Finally the credentials of the caller
are included.
Before delving into the specific calls we need to discuss a variety of
data structures shared by the kernel and Venus.
4.1. Data structures shared by the kernel and Venus
----------------------------------------------------
The CodaCred structure defines a variety of user and group ids as
they are set for the calling process. The vuid_t and vgid_t are 32 bit
unsigned integers. It also defines group membership in an array. On
Unix the CodaCred has proven sufficient to implement good security
semantics for Coda but the structure may have to undergo modification
for the Windows environment when these mature::
struct CodaCred {
vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, effective, set, fs uid */
vgid_t cr_gid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */
vgid_t cr_groups[NGROUPS]; /* Group membership for caller */
};
.. Note::
It is questionable if we need CodaCreds in Venus. Finally Venus
doesn't know about groups, although it does create files with the
default uid/gid. Perhaps the list of group membership is superfluous.
The next item is the fundamental identifier used to identify Coda
files, the ViceFid. A fid of a file uniquely defines a file or
directory in the Coda filesystem within a cell [1]_::
typedef struct ViceFid {
VolumeId Volume;
VnodeId Vnode;
Unique_t Unique;
} ViceFid;
.. [1] A cell is agroup of Coda servers acting under the aegis of a single
Annotation
- Detected declarations: `struct inputArgs`, `struct outputArgs`, `struct CodaCred`, `struct coda_timespec`, `struct coda_vattr`, `struct ViceIoctl`, `struct cfs_root_out`, `struct cfs_lookup_in`, `struct cfs_lookup_out`, `struct cfs_getattr_in`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
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.