diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-29 19:51:42 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-29 19:51:42 +0000 |
commit | 69ab6277c5d906f1677578ad9248819ed183e3ba (patch) | |
tree | aa4ce4881c409875f9be703802eb90dcc5284132 /pkg/sentry/vfs/file_description.go | |
parent | 045f2be4aa71bf88b0d83caeef7a60dae6df3b0b (diff) | |
parent | 148fda60e8dee29f2df85e3104e3d5de1a225bcf (diff) |
Merge release-20200127.0-30-g148fda6 (automated)
Diffstat (limited to 'pkg/sentry/vfs/file_description.go')
-rwxr-xr-x | pkg/sentry/vfs/file_description.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/pkg/sentry/vfs/file_description.go b/pkg/sentry/vfs/file_description.go index badacb55e..5bac660c7 100755 --- a/pkg/sentry/vfs/file_description.go +++ b/pkg/sentry/vfs/file_description.go @@ -20,6 +20,7 @@ import ( "gvisor.dev/gvisor/pkg/abi/linux" "gvisor.dev/gvisor/pkg/context" "gvisor.dev/gvisor/pkg/sentry/arch" + "gvisor.dev/gvisor/pkg/sentry/fs/lock" "gvisor.dev/gvisor/pkg/sentry/kernel/auth" "gvisor.dev/gvisor/pkg/sentry/memmap" "gvisor.dev/gvisor/pkg/sync" @@ -393,7 +394,25 @@ type FileDescriptionImpl interface { // Removexattr removes the given extended attribute from the file. Removexattr(ctx context.Context, name string) error - // TODO: file locking + // LockBSD tries to acquire a BSD-style advisory file lock. + // + // TODO(gvisor.dev/issue/1480): BSD-style file locking + LockBSD(ctx context.Context, uid lock.UniqueID, t lock.LockType, block lock.Blocker) error + + // LockBSD releases a BSD-style advisory file lock. + // + // TODO(gvisor.dev/issue/1480): BSD-style file locking + UnlockBSD(ctx context.Context, uid lock.UniqueID) error + + // LockPOSIX tries to acquire a POSIX-style advisory file lock. + // + // TODO(gvisor.dev/issue/1480): POSIX-style file locking + LockPOSIX(ctx context.Context, uid lock.UniqueID, t lock.LockType, rng lock.LockRange, block lock.Blocker) error + + // UnlockPOSIX releases a POSIX-style advisory file lock. + // + // TODO(gvisor.dev/issue/1480): POSIX-style file locking + UnlockPOSIX(ctx context.Context, uid lock.UniqueID, rng lock.LockRange) error } // Dirent holds the information contained in struct linux_dirent64. |