summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9
AgeCommit message (Collapse)Author
2020-08-11Merge release-20200804.0-63-g49947d2eb (automated)gVisor bot
2020-08-11Eliminate one allocation per send/recv for non-flipcall transport.Fazlul Shahriar
Ported from https://github.com/hugelgupf/p9/pull/44. name old time/op new time/op delta SendRecvLegacy-6 61.5µs ± 6% 60.1µs ±11% ~ (p=0.063 n=9+9) SendRecv-6 40.7µs ± 2% 39.8µs ± 5% -2.27% (p=0.035 n=10+10) name old alloc/op new alloc/op delta SendRecvLegacy-6 769B ± 0% 705B ± 0% -8.37% (p=0.000 n=8+10) SendRecv-6 320B ± 0% 256B ± 0% -20.00% (p=0.000 n=10+10) name old allocs/op new allocs/op delta SendRecvLegacy-6 25.0 ± 0% 23.0 ± 0% -8.00% (p=0.000 n=10+10) SendRecv-6 14.0 ± 0% 12.0 ± 0% -14.29% (p=0.000 n=10+10) PiperOrigin-RevId: 326127979
2020-07-24Merge release-20200622.1-212-gbcbcaa67a (automated)gVisor bot
2020-07-21p9: fix `registry.get` ob1 bugSevki
2020-07-01Merge release-20200622.1-52-g6a90c88b9 (automated)gVisor bot
2020-07-01Port fallocate to VFS2.Zach Koopmans
PiperOrigin-RevId: 319283715
2020-06-10Merge release-20200522.0-118-gfadbfd83d (automated)gVisor bot
2020-06-10Include panic message in logMichael Pratt
PiperOrigin-RevId: 315745386
2020-05-27Merge release-20200518.0-45-g0bc022b7 (automated)gVisor bot
2020-04-10Merge release-20200323.0-123-g8bb8027 (automated)gVisor bot
2020-04-10Return EIO from p9 if sending/receiving fails.Dean Deng
Continues the modifications in cl/272963663. This prevents non-syscall errors from being propogated to kernel/task_syscall.go:ExtractErrno(), which causes a sentry panic. PiperOrigin-RevId: 305913127
2020-04-09Merge release-20200323.0-105-g2b4687a (automated)gVisor bot
2020-04-09Handle os.LinkError in p9/handlers.go.Dean Deng
PiperOrigin-RevId: 305721329
2020-04-07Merge release-20200323.0-77-g51e461c (automated)gVisor bot
2020-04-06Add concurrency guarantees to p9 extended attribute methods.Dean Deng
PiperOrigin-RevId: 305171772
2020-04-03Merge release-20200323.0-63-gd151693 (automated)gVisor bot
2020-04-02Avoid sending a partial dirent when the Rreaddir response exceeds message limit.Uros Prestor
PiperOrigin-RevId: 304542967
2020-02-14Merge release-20200211.0-19-g50c4931 (automated)gVisor bot
2020-02-14Un-export p9 message encode/decode functions.gVisor bot
These are not used outside of the p9 package. PiperOrigin-RevId: 295200052
2020-02-07Merge release-20200127.0-99-g17b9f5e (automated)gVisor bot
2020-02-07Support listxattr and removexattr syscalls.Dean Deng
Note that these are only implemented for tmpfs, and other impls will still return EOPNOTSUPP. PiperOrigin-RevId: 293899385
2020-02-06Merge release-20200127.0-86-g5ff7808 (automated)gVisor bot
2020-02-06Move p9.pool to a separate packageAndrei Vagin
PiperOrigin-RevId: 293617493
2020-02-06Merge release-20200127.0-85-g1b6a12a (automated)gVisor bot
2020-01-27Standardize on tools directory.Adin Scannell
PiperOrigin-RevId: 291745021
2020-01-16Merge release-20200115.0-15-g1e7f0c8 (automated)gVisor bot
2020-01-16Bump p9 version, adding corresponding checks to client_file.go.Dean Deng
PiperOrigin-RevId: 290145451
2020-01-16Merge release-20200115.0-9-g07f2584 (automated)gVisor bot
2020-01-16Plumb getting/setting xattrs through InodeOperations and 9p gofer interfaces.Dean Deng
There was a very bare get/setxattr in the InodeOperations interface. Add context.Context to both, size to getxattr, and flags to setxattr. Note that extended attributes are passed around as strings in this implementation, so size is automatically encoded into the value. Size is added in getxattr so that implementations can return ERANGE if a value is larger than can fit in the user-allocated buffer. This prevents us from unnecessarily passing around an arbitrarily large xattr when the user buffer is actually too small. Don't use the existing xattrwalk and xattrcreate messages and define our own, mainly for the sake of simplicity. Extended attributes will be implemented in future commits. PiperOrigin-RevId: 290121300
2020-01-10Merge release-20191213.0-96-g27500d5 (automated)gVisor bot
2020-01-09New sync package.Ian Gudger
* Rename syncutil to sync. * Add aliases to sync types. * Replace existing usage of standard library sync package. This will make it easier to swap out synchronization primitives. For example, this will allow us to use primitives from github.com/sasha-s/go-deadlock to check for lock ordering violations. Updates #1472 PiperOrigin-RevId: 289033387
2019-12-17Merge release-20191210.0-35-g0881abd (automated)gVisor bot
2019-12-16Remove useless comments from p9/handlers.go.Nicolas Lacasse
These comments provided nothing, and have been copy-pasted into all implementations. The code is clear without them. I considered also removing the "handle implements handler.handle" comments, but will let those stay for now. PiperOrigin-RevId: 285876428
2019-11-20Merge release-20191114.0-16-g012102e (automated)gVisor bot
2019-11-20Pass OpenTruncate to gofer in Open call when opening file with O_TRUNC.Nicolas Lacasse
Note that the Sentry still calls Truncate() on the file before calling Open. A new p9 version check was added to ensure that the p9 server can handle the the OpenTruncate flag. If not, then the flag is stripped before sending. PiperOrigin-RevId: 281609112
2019-11-15Merge release-20191104.0-46-g76039f8 (automated)gVisor bot
2019-11-15Do not set finalizer on p9.ClientFile.Jamie Liu
Aside from the performance hit, there is no guarantee that p9.ClientFile's finalizer runs before the associated p9.Client is closed. PiperOrigin-RevId: 280702509
2019-11-07Merge release-20190806.1-377-gf8ffadd (automated)gVisor bot
2019-11-06Add p9.OpenTruncate.Jamie Liu
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-01Merge release-20190806.1-360-g5694bd0 (automated)gVisor bot
2019-11-01Don't log "p9.channel.service: flipcall connection shutdown".Jamie Liu
This gets quite spammy, especially in tests. PiperOrigin-RevId: 277970468
2019-10-29Merge release-20190806.1-336-g8b04e2d (automated)gVisor bot
2019-10-28Cast the Stat_t.Nlink to uint64 on arm64.Haibo Xu
Since the syscall.Stat_t.Nlink is defined as different types on amd64 and arm64(uint64 and uint32 respectively), we need to cast them to a unified uint64 type in gVisor code. Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I7542b99b195c708f3fc49b1cbe6adebdd2f6e96b
2019-10-04Merge release-20190806.1-238-gb941e35 (automated)gVisor bot
2019-10-04Return EIO from p9 if flipcall.Endpoint.Connect() fails.Jamie Liu
Also ensure that all flipcall transport errors not returned by p9 (converted to EIO by the client, or dropped on the floor by channel server goroutines) are logged. PiperOrigin-RevId: 272963663
2019-09-23Add test for concurrent reads and writes.Adin Scannell
PiperOrigin-RevId: 270789146
2019-09-20Merge release-20190806.1-164-g002f1d4 (automated)gVisor bot
2019-09-19Fix p9 integration of flipcall.Jamie Liu
- Do not call Rread.SetPayload(flipcall packet window) in p9.channel.recv(). - Ignore EINTR from ppoll() in p9.Client.watch(). - Clean up handling of client socket FD lifetimes so that p9.Client.watch() never ppoll()s a closed FD. - Make p9test.Harness.Finish() call clientSocket.Shutdown() instead of clientSocket.Close() for the same reason. - Rework channel reuse to avoid leaking channels in the following case (suppose we have two channels): sendRecvChannel len(channels) == 2 => idx = 1 inuse[1] = ch0 sendRecvChannel len(channels) == 1 => idx = 0 inuse[0] = ch1 inuse[1] = nil sendRecvChannel len(channels) == 1 => idx = 0 inuse[0] = ch0 inuse[0] = nil inuse[0] == nil => ch0 leaked - Avoid deadlocking p9.Client.watch() by calling channelsWg.Wait() without holding channelsMu. - Bump p9test:client_test size to medium. PiperOrigin-RevId: 270200314
2019-09-13Merge release-20190806.1-143-ga8834fc (automated)gVisor bot
2019-09-12Update p9 to support flipcall.Adin Scannell
PiperOrigin-RevId: 268845090