gvisor/pkg/p9
Jamie Liu f8ffadddb3 Add p9.OpenTruncate.
This is required to implement O_TRUNC correctly on filesystems backed by
gofers.

9P2000.L: "lopen prepares fid for file I/O. flags contains Linux open(2) flags
bits, e.g. O_RDONLY, O_RDWR, O_WRONLY."

open(2): "The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR. ... In addition, zero or more file creation
flags and file status flags can be bitwise-or'd in flags."

The reference 9P2000.L implementation also appears to expect arbitrary flags,
not just access modes, in Tlopen.flags:
https://github.com/chaos/diod/blob/master/diod/ops.c#L703

PiperOrigin-RevId: 278972683
2019-11-06 17:11:58 -08:00
..
p9test Add test for concurrent reads and writes. 2019-09-23 16:44:30 -07:00
BUILD Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
buffer.go Reduce memory allocations on serving path 2019-04-29 15:33:47 -07:00
buffer_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
client.go Return EIO from p9 if flipcall.Endpoint.Connect() fails. 2019-10-04 14:56:53 -07:00
client_file.go Update canonical repository. 2019-06-13 16:50:15 -07:00
client_test.go Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
file.go Add p9.OpenTruncate. 2019-11-06 17:11:58 -08:00
handlers.go Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
messages.go Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
messages_test.go Forward named pipe creation to the gofer 2019-05-20 16:53:08 -07:00
p9.go Add p9.OpenTruncate. 2019-11-06 17:11:58 -08:00
p9_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
path_tree.go Remove O(n) lookup on unlink/rename 2019-06-21 16:27:26 -07:00
pool.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
pool_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00
server.go Don't log "p9.channel.service: flipcall connection shutdown". 2019-11-01 11:45:02 -07:00
transport.go Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
transport_flipcall.go Return EIO from p9 if flipcall.Endpoint.Connect() fails. 2019-10-04 14:56:53 -07:00
transport_test.go Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
version.go Update p9 to support flipcall. 2019-09-12 23:37:31 -07:00
version_test.go Change copyright notice to "The gVisor Authors" 2019-04-29 14:26:23 -07:00