# StrataFS

> Peios kernel stratafs documentation.

All of StrataFS as one markdown file: [/kernel/internals/stratafs/print.md](/kernel/internals/stratafs/print.md)

## Start here

- [Overview](/kernel/internals/stratafs/start-here/overview.md): stratafs presents an ordered set of existing directories as one tree — where it sits, the model it follows, and what it delegates.
- [The Origin Attribute](/kernel/internals/stratafs/start-here/the-origin-attribute.md): The one synthetic extended attribute that reveals which stratum provided a merged path — its value, constraints and access rules.
- [Failure Modes](/kernel/internals/stratafs/start-here/failure-modes.md): Every condition under which a stratafs operation fails and the error it produces, from mount time through resolution and mutation.
- [Generated constants](/kernel/internals/stratafs/start-here/generated-constants.md): Every stratafs constant — filesystem identity, stratum flags, extended attributes, copy-up and staging markers — generated from the source.

## Security

- [Security](/kernel/internals/stratafs/security/overview.md): Find the Peios kernel articles about security.
- [KACS admission and object phases](/kernel/internals/stratafs/security/kacs-admission-and-object-phases.md): KACS admission and object phases: behaviour and implementation of the Peios kernel.
- [Copy-up descriptors](/kernel/internals/stratafs/security/copy-up-descriptors.md): Copy-up descriptors: behaviour and implementation of the Peios kernel.
- [Access Check Delegation](/kernel/internals/stratafs/security/access-check-delegation.md): stratafs stores no descriptors and allocates its inodes bare — who performs which access check, and when.
- [Checks on Merged Directories](/kernel/internals/stratafs/security/checks-on-merged-directories.md): An operation on a merged directory is checked against every participating directory — including where the create stratum's directory does not exist.
- [Mount Policy](/kernel/internals/stratafs/security/mount-policy.md): Every stratafs mount carries the FACS policy class that denies access to an object with no readable descriptor, and what follows from that.
- [Audit](/kernel/internals/stratafs/security/audit.md): The two stratafs events recorded because the information cannot be recovered afterwards — plus two gaps and what is not audited at all.

## Mutation

- [Mutation](/kernel/internals/stratafs/mutation/overview.md): Find the Peios kernel articles about mutation.
- [Deferred deletion](/kernel/internals/stratafs/mutation/deferred-deletion.md): Deferred deletion: behaviour and implementation of the Peios kernel.
- [Write Routing](/kernel/internals/stratafs/mutation/write-routing.md): Which single stratum a modification is performed against, when that decision is made, and what shared writable mappings do to it.
- [Copy-Up](/kernel/internals/stratafs/mutation/copy-up.md): Replicating an object from its provider into the create stratum — parents, what is replicated, staging and atomicity.
- [Creation](/kernel/internals/stratafs/mutation/creation.md): Creation: behaviour and implementation of the Peios kernel.
- [Removal](/kernel/internals/stratafs/mutation/removal.md): stratafs has no whiteouts, so removal can only remove an entry that is really there — and what removal therefore never does.
- [Rename](/kernel/internals/stratafs/mutation/rename.md): Rename both removes and creates, so the source is bound by the removal constraint — atomic replacement, flags and RENAME_NOREPLACE ordering.
- [Links](/kernel/internals/stratafs/mutation/links.md): Hard links within one mount, linking an unnamed file, and how symbolic links are created.
- [Locking](/kernel/internals/stratafs/mutation/locking.md): Advisory locks across a stack of independently writable directories — the rule, a changing provider, the retired provider, and leases.
- [Durability and Accounting](/kernel/internals/stratafs/mutation/durability-and-accounting.md): stratafs holds no storage, so durability and accounting belong to the providers — except where a merged directory needs a rule of its own.

## Strata and mounting

- [Strata and mounting](/kernel/internals/stratafs/strata-and-mounting/overview.md): Find the Peios kernel articles about strata and mounting.
- [The Stratum Stack](/kernel/internals/stratafs/strata-and-mounting/the-stratum-stack.md): A mount is its stratum stack — an ordered, non-empty list fixed for the mount's life — plus the resolution context and the create stratum.
- [Mount Admission](/kernel/internals/stratafs/strata-and-mounting/mount-admission.md): What a caller must be entitled to and what a configuration must satisfy — evaluation order, loop detection, and mount immutability.
- [Absent Strata](/kernel/internals/stratafs/strata-and-mounting/absent-strata.md): A stratum's directory may not exist — what happens while it is absent, and what appearing, disappearing and reappearing do.

## Name resolution

- [Name resolution](/kernel/internals/stratafs/name-resolution/overview.md): Find the Peios kernel articles about name resolution.
- [Lookup and type conflicts](/kernel/internals/stratafs/name-resolution/lookup-and-type-conflicts.md): Resolving one name in one directory — the provider, ancestors, independence from the caller, and staging entries.
- [Directory Merge](/kernel/internals/stratafs/name-resolution/directory-merge.md): When lower strata hold the same name as a directory the result is a merged directory — participation, its create stratum, and symlinks.
- [Enumeration](/kernel/internals/stratafs/name-resolution/enumeration.md): The union of names across participating strata, each appearing once — captured at open, with consistency and position rules.

## Coherency

- [Coherency](/kernel/internals/stratafs/coherency/overview.md): Find the Peios kernel articles about coherency.
- [Model and revalidation](/kernel/internals/stratafs/coherency/model-and-revalidation.md): Strata change underneath stratafs without telling it — what can change a resolution, and the guarantee that survives it.
- [Inode Identity and Lifecycle](/kernel/internals/stratafs/coherency/inode-identity-and-lifecycle.md): stratafs allocates its own inodes standing for provider objects — the identity it reports, the mount root, and what a provider change does.
