summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/mount_unsafe.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-14 21:44:54 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-14 21:44:54 +0000
commit554d094fa3665815d8582f5cb1e5a68fd41b5ea1 (patch)
treea3af4032f5f12d84c5be5310115a2f968989882c /pkg/sentry/vfs/mount_unsafe.go
parentd266dd12b9c9fa6c691a43fef3b63e37bd649dc6 (diff)
parente4c7f3e6f6c19f3259820a4c41b69e85c0454379 (diff)
Merge release-20200211.0-20-ge4c7f3e (automated)
Diffstat (limited to 'pkg/sentry/vfs/mount_unsafe.go')
-rwxr-xr-xpkg/sentry/vfs/mount_unsafe.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/sentry/vfs/mount_unsafe.go b/pkg/sentry/vfs/mount_unsafe.go
index bd90d36c4..1fe766a44 100755
--- a/pkg/sentry/vfs/mount_unsafe.go
+++ b/pkg/sentry/vfs/mount_unsafe.go
@@ -64,6 +64,8 @@ func (mnt *Mount) storeKey(vd VirtualDentry) {
// (provided mutation is sufficiently uncommon).
//
// mountTable.Init() must be called on new mountTables before use.
+//
+// +stateify savable
type mountTable struct {
// mountTable is implemented as a seqcount-protected hash table that
// resolves collisions with linear probing, featuring Robin Hood insertion
@@ -75,8 +77,8 @@ type mountTable struct {
// intrinsics and inline assembly, limiting the performance of this
// approach.)
- seq sync.SeqCount
- seed uint32 // for hashing keys
+ seq sync.SeqCount `state:"nosave"`
+ seed uint32 // for hashing keys
// size holds both length (number of elements) and capacity (number of
// slots): capacity is stored as its base-2 log (referred to as order) in
@@ -89,7 +91,7 @@ type mountTable struct {
// length and cap in separate uint32s) for ~free.
size uint64
- slots unsafe.Pointer // []mountSlot; never nil after Init
+ slots unsafe.Pointer `state:"nosave"` // []mountSlot; never nil after Init
}
type mountSlot struct {