-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentry Virtual Filesystem v2 (VFS2) #1035
Comments
This is required to test filesystems with a non-trivial implementation of FilesystemImpl.Release(). Propagation isn't handled yet, and umount isn't yet plumbed out to VirtualFilesystem.UmountAt(), but otherwise the implementation of umount is believed to be correct. - Move entering mountTable.seq writer critical sections to callers of mountTable.{insert,remove}Seqed. This is required since umount(2) must ensure that no new references are taken on the candidate mount after checking that it isn't busy, which is only possible by entering a vfs.mountTable.seq writer critical section before the check and remaining in it until after VFS.umountRecursiveLocked() is complete. (Linux does the same thing: fs/namespace.c:do_umount() => lock_mount_hash(), fs/pnode.c:propagate_mount_busy(), umount_tree(), unlock_mount_hash().) - It's not possible for dentry deletion to umount while only holding VFS.mountMu for reading, but it's also very unappealing to hold VFS.mountMu exclusively around e.g. gofer unlink RPCs. Introduce dentry.mu to avoid these problems. This means that VFS.mountMu is never acquired for reading, so change it to a sync.Mutex. Updates #1035 PiperOrigin-RevId: 277607680
It was calling Dentry.InsertChild with the dentry's mutex already locked. Updates #1035 PiperOrigin-RevId: 286962742
Updates #1035 PiperOrigin-RevId: 293037526
Updates #1035 PiperOrigin-RevId: 293194631
Updates #1035 PiperOrigin-RevId: 298371120
Updates #1035 PiperOrigin-RevId: 301255357
Updates #1035 PiperOrigin-RevId: 342168926
VFS2 is feature complete. Vast majority of tests were converted to run with VFS2 enabled and they are all passing. We're starting to enable VFS2 internally at Google and will flip the default to VFS2 once we have soaked it in production for some time. We recommend everyone to start running with the |
@fvoznika Is VFS2 ready to be the default? The last update was almost a year ago. |
Yes, it's ready to be the default. We're just waiting for a few internal users to enable it before we flip the flag. But everyone is encouraged to run with |
Updates #1035 PiperOrigin-RevId: 403219644
Updates #1035 PiperOrigin-RevId: 403237718
Updates #1035 PiperOrigin-RevId: 404017795
Updates #1035 PiperOrigin-RevId: 404043283
Updates #1035 PiperOrigin-RevId: 404072231
When file corruption is detected, report vfs.ErrCorruption to distinguish corruption error from other restore errors. Updates #1035 PiperOrigin-RevId: 404402516
This change enables VFS2 by default. VFS2 is much faster than the previous implementation and it's also more compatible. VFS1 is no longer supported and will be deleted from the code. Use `--vfs2=false` if you need to disable it. Make sure to report a bug if you have the need to disable VFS2 or something is not working for you. Closes #1035 PiperOrigin-RevId: 404404173
When file corruption is detected, report vfs.ErrCorruption to distinguish corruption error from other restore errors. Updates #1035 PiperOrigin-RevId: 404588445
There are TODOs still referencing this issue:
Search TODO |
Current VFS implementation in the Sentry has performance shortcomings with regarding to the number of operations that need to be performed for path walks. This is especially noticeable when using gofer mounted filesystems, where the round trip cost for each operation is aggravated by the RPC and scheduling costs.
VFS2 addresses this by delegating path resolution to the filesystem, making it possible to send a single RPC for each syscall operation, instead of one RPC per path component in the operation. For example,
stat(/foo/bar/goo)
generates at least 3 RPC round trips to the gofer (foo
,bar
,goo
), while VFS2 makes only 1.VFS2 also allows for the implementation of recursive bind mounts, which would require a major refactoring with the current implementation.
The text was updated successfully, but these errors were encountered: