9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Colin DeVilbiss" <cdevilbiss@gmail.com>
To: 9fans@cse.psu.edu
Subject: [9fans] Re: 9pfuse-mounted files don't "work" (Mac OS X on Power)
Date: Thu, 22 Mar 2007 13:13:18 -0600	[thread overview]
Message-ID: <6ec892cd0703221213j785f9e22vd722659bf84f7133@mail.gmail.com> (raw)
In-Reply-To: <6ec892cd0703220440l704b71a5i78842b636657dd1f@mail.gmail.com>

On 3/22/07, Colin DeVilbiss <cdevilbiss@gmail.com> wrote:
> This was silently dropped the first time.

As was mentioned off-list, this was wrong; sorry for the noise.

I made an interactive test that let me independently open, read, and
close the file.  Opening the file generated all of the traffic I
expected, but a subsequent read didn't drive any traffic to 9pfuse.

After I saw that, I implemented an accurate length for the rules file
in src/cmd/plumb/fsys.c:/^dostat (using printrules and strlen), and
reads started working.

On a whim, I just went back and changed the code to set the length to
1 for rules and 0 for everything else, after which "cat" and "head"
worked, but things like "tail" and "less" behaved rather badly.

MacFUSE must be making decisions about the "actual" filesize based on
the stat value, and changing the behavior of read() accordingly.

Makes me wonder how any other "I'm not sure how big this really is"
virtual filesystems handle this in MacFUSE...or maybe all of the
existing successful ones are just "passthrough" types that have
accurate file sizes because the data's already built somewhere with
the size available.

If anyone else has already gone down this path, I wouldn't mind
hearing about it, on-list or off.

Colin DeVilbiss


  reply	other threads:[~2007-03-22 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22  3:59 [9fans] " Colin DeVilbiss
2007-03-22 11:40 ` [9fans] Fwd: " Colin DeVilbiss
2007-03-22 19:13   ` Colin DeVilbiss [this message]
2007-03-22 19:17     ` [9fans] " Francisco J Ballesteros
2007-03-22 19:54     ` Kris Maglione
2007-03-22 20:48       ` W B Hacker
2007-03-22 21:16         ` Colin DeVilbiss
2007-03-22 21:25           ` W B Hacker
2007-03-27 12:41 ` [9fans] " Russ Cox

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=6ec892cd0703221213j785f9e22vd722659bf84f7133@mail.gmail.com \
    --to=cdevilbiss@gmail.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).