summaryrefslogtreecommitdiff
path: root/sys/man/2/chacha
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-01-12 20:13:20 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2017-01-12 20:13:20 +0100
commit47f07b2669e74eb957db56befa2237df5afa8474 (patch)
tree63239fa5b8ff90cae4c817111465b2ea2180d0c3 /sys/man/2/chacha
parent4aeefba6811e57afe04a909fe147a29bb419d06b (diff)
kernel: make the mntcache robust against fileserver like fossil that do not change the qid.vers on wstat
introducing new ctrunc() function that invalidates any caches for the passed in chan, invoked when handling wstat with a specified file length or on file creation/truncation. test program to reproduce the problem: #include <u.h> #include <libc.h> #include <libsec.h> void main(int argc, char *argv[]) { int fd; Dir *d, nd; fd = create("xxx", ORDWR, 0666); write(fd, "1234", 4); d = dirstat("xxx"); assert(d->length == 4); nulldir(&nd); nd.length = 0; dirwstat("xxx", &nd); d = dirstat("xxx"); assert(d->length == 0); fd = open("xxx", OREAD); assert(read(fd, (void*)&d, 4) == 0); }
Diffstat (limited to 'sys/man/2/chacha')
0 files changed, 0 insertions, 0 deletions