-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Establish lock ordering for vfs.FilesystemImpl.PrependPath.
- Add fspath.Builder.Unprepend(), and make Builder.Prepend*() return the number of bytes prepended to make the former usable. This allows genericfstree.PrependPath() to discard prepended bytes and retry when a race with rename is detected. - Add type parameter Filesystem to vfs/genericfstree, which is required to provide `renameSeq sync.SeqCount`. - Modify genericfstree.PrependPath() and genericfstree.IsDescendant() to use renameSeq to ensure atomicity. For callers of genericfstree.PrependPath(), this means that FSImpl locks no longer need to be held during the call. For callers of genericfstree.IsDescendant(), this means that IsDescendant() now has the same atomicity as Linux's fs/dcache.c:is_subdir(), so remove documentation warnings about its non-atomicity. PiperOrigin-RevId: 696273175
- Loading branch information
1 parent
4f92c28
commit db54edd
Showing
32 changed files
with
355 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.