Skip to content

Commit 83c538e

Browse files
tranji-cloudgvisor-bot
authored andcommitted
Hard links Support Phase 1: Gofer Client dentry/inode refactor
This commit does the following: - Decouples dentry fields and the file's metadata (inode fields) - Embeds the inode pointer into dentry struct {} - Removed impl from dentry struct {} and extended inode struct with back-end implementation - Refactor Gofer client fs to access the newly created inode pointer - Refactor dentry_impl.go to inode_impl.go - Refactor {directfs/lisafs}_dentry to {directfs/lisafs}_inode PiperOrigin-RevId: 750748327
1 parent f2d2ff7 commit 83c538e

File tree

18 files changed

+1626
-1480
lines changed

18 files changed

+1626
-1480
lines changed

pkg/sentry/fsimpl/gofer/BUILD

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ package(default_applicable_licenses = ["//:license"])
55

66
licenses(["notice"])
77

8+
go_template_instance(
9+
name = "inode_refs",
10+
out = "inode_refs.go",
11+
package = "gofer",
12+
prefix = "inode",
13+
template = "//pkg/refs:refs_template",
14+
types = {
15+
"T": "inode",
16+
},
17+
)
18+
819
go_template_instance(
920
name = "string_list",
1021
out = "string_list.go",
@@ -56,16 +67,17 @@ go_template_instance(
5667
go_library(
5768
name = "gofer",
5869
srcs = [
59-
"dentry_impl.go",
6070
"dentry_list.go",
61-
"directfs_dentry.go",
71+
"directfs_inode.go",
6272
"directory.go",
6373
"filesystem.go",
6474
"fstree.go",
6575
"gofer.go",
6676
"handle.go",
6777
"host_named_pipe.go",
68-
"lisafs_dentry.go",
78+
"inode_impl.go",
79+
"inode_refs.go",
80+
"lisafs_inode.go",
6981
"regular_file.go",
7082
"revalidate.go",
7183
"save_restore.go",
@@ -112,6 +124,7 @@ go_library(
112124
"//pkg/sentry/socket/unix/transport",
113125
"//pkg/sentry/usage",
114126
"//pkg/sentry/vfs",
127+
"//pkg/sentry/vfs/memxattr",
115128
"//pkg/sync",
116129
"//pkg/syserr",
117130
"//pkg/unet",

0 commit comments

Comments
 (0)