summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-03-17 17:48:19 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-03-17 17:48:19 +0100
commita2be120ea93ae67447315da268fa336650cd5149 (patch)
tree22600abe7e401e4856f0342ce9ab7749db46c8d3 /sys/src/cmd/cp.c
parent5aaa7240a20f34d319bee496005e2136040b8f5c (diff)
abandon streaming experiment
for queue like non-seekable files, it is impossible to implement an exportfs because one has to run the kernels devtab read() and write() in separate processes, and that makes it impossible to maintain 9p message order as the scheduler can come in and randomly schedule one process before another. so as soon as we have a transition from 9p -> syscalls, we'r screwed. i currently see just two possibilities: - introduce special file type like QTSEQ with strictly ordered i/o semantics - fix all fileservers and exportfs to only do one outstanding i/o to QTSEQ files which means maintaining a queue per fid this doesnt propagate. so exporting slow 9p mount again will be limited again by latency of the inner mount. other option: - return offset in Rread, so client can bring responses back into order. this requires changing all fileservers and drivers to maintain such an per fid offset and change the protocol to include it in the response, and also pass it to userspace (new syscalls or pass it in TOS) this only works for read pipelining, write is still screwed. both options suck. -- cinap
Diffstat (limited to 'sys/src/cmd/cp.c')
-rw-r--r--sys/src/cmd/cp.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sys/src/cmd/cp.c b/sys/src/cmd/cp.c
index 88eaead4f..341d32c14 100644
--- a/sys/src/cmd/cp.c
+++ b/sys/src/cmd/cp.c
@@ -127,19 +127,6 @@ copy(char *from, char *to, int todir)
if(buflen <= 0)
buflen = DEFB;
- if(dirb->length/2 > buflen){
- char nam[32];
-
- snprint(nam, sizeof nam, "/fd/%dstream", fdf);
- fds = open(nam, OREAD);
- if(fds >= 0){
- close(fdf);
- fdf = fds;
- }
- snprint(nam, sizeof nam, "/fd/%dstream", fdt);
- fds = open(nam, OWRITE);
- }
-
if(copy1(fdf, fds < 0 ? fdt : fds, from, to)==0){
if(fds >= 0 && write(fds, "", 0) < 0){
fprint(2, "cp: error writing %s: %r\n", to);