9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: [9fans] ftpfs bug
Date: Wed, 25 Aug 2004 17:29:57 +0100	[thread overview]
Message-ID: <aee9645dc20ddefc190b82ad38844302@vitanuova.com> (raw)
In-Reply-To: <6667e8d6d26adf997f815e3bd4325d25@quintile.net>

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 <u.h>
#include <libc.h>
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...



  parent reply	other threads:[~2004-08-25 16:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25 12:57 [9fans] venti score types Steve Simon
2004-08-25 16:28 ` Russ Cox
2004-08-25 16:29 ` rog [this message]
2004-09-02  9:07 ` Heiko Dudzus
2004-09-02 10:52   ` Steve Simon
2004-09-02 11:09     ` Fco. J. Ballesteros
2004-09-02 13:20     ` Heiko Dudzus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aee9645dc20ddefc190b82ad38844302@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).