summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9
AgeCommit message (Collapse)Author
2020-09-02Merge release-20200818.0-105-g37a217aca (automated)gVisor bot
2020-09-01Implement setattr+clunk in 9PFabricio Voznika
This is to cover the common pattern: open->read/write->close, where SetAttr needs to be called to update atime/mtime before the file is closed. Benchmark results: BM_OpenReadClose/10240 CPU setattr+clunk: 63783 ns VFS2: 68109 ns VFS1: 72507 ns Updates #1198 PiperOrigin-RevId: 329628461
2020-08-19Merge release-20200810.0-63-g3fd4b83fa (automated)gVisor bot
2020-08-19Remove use of channels from p9.connState legacy transport.Jamie Liu
- Remove sendDone, which currently does nothing whatsoever (errors sent to the channel are completely unused). Instead, have request handlers log errors they get from p9.send() inline. - Replace recvOkay and recvDone with recvMu/recvIdle/recvShutdown. In addition to being slightly clearer (IMO), this eliminates the p9.connState.service() goroutine, significantly reducing the overhead involved in passing connection receive access between goroutines (from buffered chan send/recv + unbuffered chan send/recv to just a mutex unlock/lock). PiperOrigin-RevId: 327476755
2020-08-18Merge release-20200810.0-49-gb3141b680 (automated)gVisor bot
2020-08-18Wait for all p9 handlers to complete before server shutdown.Jamie Liu
... including those invoked via flipcall. PiperOrigin-RevId: 327283194
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