Skip to content

safe-fs: quota delta misses growth through hard-linked file aliases #604

Description

@kamilio

Separate concrete finding from the #579/#603 review; not included in the symlink-referent fix.

Minimal in-memory reproduction through withFileSystemQuota(raw, {maxBytes:128}):

await quota.writeFile("/a", new Uint8Array(1));
await quota.link("/a", "/b");
await quota.writeFile("/a", new Uint8Array(100));

Both entries now report size100 (same inode), so the wrappers existing namespace-based usedBytes census reports200 while the configured ceiling is128. The admission delta only accounts for one entry. This is a logical namespace-accounting inconsistency, NOT evidence of200 physical bytes or duplicated backing storage. Define and preserve the intended hard-link accounting domain, then validate writes/appends/truncation and provider identity/unknown-identity behavior before changing code. The current small reproduction was executed without external filesystem writes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions