summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/flags.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-07-17 23:20:44 +0000
committergVisor bot <gvisor-bot@google.com>2019-07-17 23:20:44 +0000
commit9f4e682c1c3b4061308f82f3d9e01de0778d111a (patch)
treee96e4f291fa9c0814053983570511790084437e1 /pkg/sentry/fs/flags.go
parent85f25d97ff2a21e74052168f05f70b891bd912df (diff)
parent6f7e2bb388cb29a355dece8921671c0085f53ea9 (diff)
Merge 6f7e2bb3 (automated)
Diffstat (limited to 'pkg/sentry/fs/flags.go')
-rw-r--r--pkg/sentry/fs/flags.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/sentry/fs/flags.go b/pkg/sentry/fs/flags.go
index 1278f9c78..0fab876a9 100644
--- a/pkg/sentry/fs/flags.go
+++ b/pkg/sentry/fs/flags.go
@@ -28,7 +28,11 @@ type FileFlags struct {
// NonBlocking indicates that I/O should not block.
NonBlocking bool
- // Sync indicates that any writes should be synchronous.
+ // DSync indicates that each write will flush data and metadata required to
+ // read the file's contents.
+ DSync bool
+
+ // Sync indicates that each write will flush data and all file metadata.
Sync bool
// Append indicates this file is append only.
@@ -96,6 +100,9 @@ func (f FileFlags) ToLinux() (mask uint) {
if f.NonBlocking {
mask |= linux.O_NONBLOCK
}
+ if f.DSync {
+ mask |= linux.O_DSYNC
+ }
if f.Sync {
mask |= linux.O_SYNC
}