# Requirement change

Somebody filled the whole tree with one enormous file and now everyone else is out of room.
**We need to be able to cap how much a directory, and everything under it, is allowed to hold.**

Concretely:

- Give any directory a byte limit for its entire subtree — every file underneath it, at any
  depth, counts against that directory's limit, not just its immediate contents.
- Writing a file (whether it's brand new or replacing one that's already there) must be refused
  if it would push any enclosing directory's total past its limit — the nearest one with a limit
  set, or the root, or several at once if more than one ancestor has a limit.
- A directory with no limit set behaves exactly as it does today — unconstrained.
- Setting a limit lower than what's already stored there is allowed. It doesn't delete anything
  or fail; it just means nothing more fits until something is removed or the limit is raised.
- A file's size, for this purpose, is the length of its content. Directories themselves take up
  no space of their own.

Nothing else changes — this only affects whether a write is accepted, not any of the other
operations.
