[fdio][ns] Reimplement local filesystem in safe C++

- Fix incorrect accounting of namespace refcounting (debug asserts
revealed that in the previous implementation, the refcount commonly
became negative). Utilize fbl::RefPtr to to automatically track
references.
- Alter API of |fdio_ns_destroy| to free the namespace when all strong
references go out of scope. All (known) clients within Fuchsia have
ignored the "in-use" error, which would have caused leaks.
- Alter API of |fdio_ns_bind| to close the supplied handle on failure.
- Encapsulate and isolate logic for local vnodes, connections, and
filesystems into distinct classes. Minimize surface area between
"safe C++" API and "raw C" API.
- Add reference counting to local vnodes, which will safely permit
usage of their remote objects, even if the node is unlinked.
- Reimplement "flat namespace" exporting logic to track a prefix string
in a single StringBuffer, populated once. This version is more
efficient, as it does not require re-constructing the path back to root
when each remote node is encountered.
- Add multiple tests for exporting, shadowing, re-binding, destruction, etc.

TEST=Multiple tests added in /boot/sys/namespace-test

Change-Id: I5f908e3837061c352dc4b749dd6892015e8a2969
14 files changed
tree: aecd1ab18c127a19c48749d414d6df0ccc983475
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. garnet/
  7. peridot/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. zircon/
  13. .clang-format
  14. .dir-locals.el
  15. .gitattributes
  16. .gitignore
  17. AUTHORS
  18. CODE_OF_CONDUCT.md
  19. CONTRIBUTING.md
  20. LICENSE
  21. OWNERS
  22. PATENTS
  23. README.md
  24. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See the documentation.