summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/file_description.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-07-01 13:13:04 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-01 13:14:44 -0700
commit6a90c88b97481a6d81b05f09d5c8ed7158225dd5 (patch)
treee22db333e636d2dae96bcbf4f36d48eb81df3d0d /pkg/sentry/vfs/file_description.go
parent68e1c870d3ef5db71226927aee703f2fba61cab7 (diff)
Port fallocate to VFS2.
PiperOrigin-RevId: 319283715
Diffstat (limited to 'pkg/sentry/vfs/file_description.go')
-rw-r--r--pkg/sentry/vfs/file_description.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/file_description.go b/pkg/sentry/vfs/file_description.go
index eb5dfd7e2..0c42574db 100644
--- a/pkg/sentry/vfs/file_description.go
+++ b/pkg/sentry/vfs/file_description.go
@@ -354,6 +354,10 @@ type FileDescriptionImpl interface {
// represented by the FileDescription.
StatFS(ctx context.Context) (linux.Statfs, error)
+ // Allocate grows file represented by FileDescription to offset + length bytes.
+ // Only mode == 0 is supported currently.
+ Allocate(ctx context.Context, mode, offset, length uint64) error
+
// waiter.Waitable methods may be used to poll for I/O events.
waiter.Waitable