From: nf2 <nf...@sc...> - 2007-11-25 03:36:29
|
Miklos Szeredi wrote: >> i don't understand how a client application hanging in close() can send >> an interrupt to FUSE. >> >> i think the "old buffered writing" should be completely removed, and >> only streaming writes continued with APPE >> > > Yeah, APPE is good, because unlike REST, it should be supported on all > servers. The only problem is if the file is extended or truncated on > the remote end, because then APPE may do the wrong thing. But perhaps > we can live with this. > i have implemented APPE with checking the size of the written file in flush() to see if the file has not been messed up. > >> or REST after a premature flush() should be used (because the >> premature flush might also occur in very big files). >> > > In theory it might. In practice, I don't know. > > Miklos > premature flush() calls seem to happen quite often. for instance when nautilus copies a file. but with APPE it works. the problem is that many text editors like gedit save files with open(O_RDWR) instead of open(O_WRONLY), and without buffering files it's hard to deal with that case. because i think file buffering should be removed, i would like to understand why they save with open(O_RDWR). actually, i believe only the cases where a file is created or truncated to zero before writing can be handled with FTP properly. norbert |