[fvm] Add oldest_revision to FVM header.

This implements the policy in //src/storage/docs/versioning.md for
tracking the oldest revision of the software that has touched the data.
The current revision is set to 1 so we can differentiate headers
produced before this change. The format is unchanged and is
backwards-compatible with old versions of the driver.

The existing "version" field is renamed "format_version" to align with
the document's terminology but its meaning and binary representation is
unchanged.

Update FVM driver test to write a real FVM header to the udnerlying fake
block device and initialize the FVM driver like it would be in normal
operation. This allows removing some test only code, allows testing of
Load(), and makes the tests generally more realistic.

Adds tests for oldest_revision updates.

Bug: 62594

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