[fxfs] Rework metadata space reservations

This includes:

 1. Switch to having just a single reservation for all metadata.

 2. Metadata space either needs to be reserved up-front or it can be
    borrowed.  When it is borrowed, we have to keep track of it so that
    upon remount, we can set up reservations correctly.

 3. Separate out the overwrite mode so that it has its own method that
    doesn't take a transaction.  This avoids locking issues (which
    allows us to just use Transaction::commit() in the journal) and
    makes clear that overwrite involves no metadata changes.

 4. Rename TreeSeal and TreeCompact to be BeginFlush and EndFlush as that
    now more correctly indicates what is happening.

 5. Tracking the dependencies on the journal needs to be done whilst
    under transaction locks and we can use BeginFlush and EndFlush for
    that, which obviates the need for ObjectSync, so it is gone.

Change-Id: I84ef7981e1055c1893e0b0fefc579c7f86123115
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/540065
Reviewed-by: James Sullivan <jfsulliv@google.com>
Commit-Queue: Chris Suter <csuter@google.com>
18 files changed
tree: ae265c12d17b6f82ec3d765302380dc4fb75c548
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. README.md
  30. 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.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.