From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Date: Wed, 25 Aug 2004 17:29:57 +0100 From: rog@vitanuova.com In-Reply-To: <6667e8d6d26adf997f815e3bd4325d25@quintile.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] ftpfs bug Topicbox-Message-UUID: d98fa75a-eacd-11e9-9e20-41e7f4b1d025 ftpfs has an annoying little bug. actually it has at least two, one of which is trivial, and i've just submitted a patch. the other is shown up by this program: #include #include void main(void) { int fd; fd = create("/n/ftp/blah", OWRITE, 0666); if(fd == -1) print("create: %r\n"); else if(dirfstat(fd) == nil) print("fstat: %r\n"); } not only does the fstat fail, but the failed fstat somehow causes the newly created file to escape the cache - it only shows up when reconnected to the ftp site. the above isn't a problem usually, except that inside inferno, (and exportfs too) a newly created file is fstat()ed to find out its new qid. this means that cp somefile /n/ftp gets: cp: can't create /n/ftp/somefile: file does not exist except the file does exist, and shows up next time (zero length, of course). is anyone out there familiar with ftpfs? i've no time for fixing anything right now, but this might turn out to be a really trivial change...