Commit 1f31ba1
Hard links Support Phase 1: Gofer Client dentry/inode refactor
- **Decoupled dentry and inode**: Cleanly separated dentry fields from the
file's actual metadata (permissions, size, etc.), now residing in the inode.
- **Dentry now holds inode pointer**: The dentry struct embeds a pointer to
the shared inode, reflecting the many-to-one relationship of hard links.
- **impl logic moved to inode**: The backend-specific logic (LISA FS
vs. Direct FS) is no longer part of the dentry struct. Instead, the
inode struct
is extended to handle these implementations.
- **Refactored Gofer client fs**: Updated the Gofer client filesystem logic
to work with the new dentry -> inode pointer structure.
- **Renamed files**: dentry_impl.go becomes inode_impl.go, and
{directfs/lisafs}_dentry.go are now {directfs/lisafs}_inode.go to match the
new design.
- **Disabled Save/Restore in link::IsSameFile**: Disabled save/restore in
this specific check due to complexities in maintaining inode consistency
across save/restore cycles. See comment in link.cc:45 for details.
- **New Link Tests**:
- HardLinkChangeMode: Verifies hard link behavior, including mode changes
across save/restore.
PiperOrigin-RevId: 7937419891 parent a9049fb commit 1f31ba1
File tree
20 files changed
+2077
-1895
lines changed- pkg/sentry/fsimpl/gofer
- test
- syscalls
- linux
- util
20 files changed
+2077
-1895
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
8 | 19 | | |
9 | 20 | | |
10 | 21 | | |
| |||
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
59 | | - | |
60 | 70 | | |
61 | | - | |
| 71 | + | |
62 | 72 | | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
| |||
0 commit comments