[roll] Roll fuchsia [fxfs] refactor open count flushing logic

Simplify the logic around flushing the file when the open count drops to
zero. We now subtract the open count immediately, and then purge if
required, and then, if we need to flush, only flush once.

The previous iteration of this function had a bug where dirty pages past
the end of the file would cause an infinite loop of tasks to be spawned,
holding active guards, which both actively consumed a core with the
spawning activities, and prevented filesystem shutdown.

It's not clear what race condition in the starnix tests caused this
particular issue to be hit, but it is pretty easy to replicate by
writing directly into the backing vmo of a file beyond it's truncated
size. A test with this behavior is added to guard against regressions.

Original-Fixed: b/318434279
Original-Fixed: b/319348464
Multiply: starnix_host_benchmark_e2e_boot
Test: fx test fxfs-platform-test
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/984112
Original-Revision: 0b113fc581cba813ab4f8be08da9b02b86d01214
GitOrigin-RevId: f6878f3dde5e46427d35a4b6055c0a2219df4d29
Change-Id: Idbbe5af6e3b6cdd304936f1812f8759c7ce048ed
1 file changed
tree: 18ebceeb9933fcda32bb6afae4c15831c382d81a
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
  14. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.