FSA: Make removal of files compatible with file locking #30909
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removing a file requires acquiring a write lock at the URL.
The lock is released once the operation completes.
remove() requires acquiring an exclusive lock at the URL.
For the sake of backwards compatibility, removeEntry() only requires
acquiring a shared lock. This means that you cannot remove a file with
an open access handle, but you CAN remove a file with open writables.
Removal of directories is not yet compatible with file locking.
Bug: 1114923, 1254078
Change-Id: I1eee08deaff9508e3c90d78ae35b2c181bb18122
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3174315
Commit-Queue: Austin Sullivan <asully@chromium.org>
Auto-Submit: Austin Sullivan <asully@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#926938}