9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Matthew Weigel <mcweigel@cs.cmu.edu>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Persistent cache for cfs
Date: Wed, 16 May 2001 08:43:23 +0000	[thread overview]
Message-ID: <9dshfp$3cu$1@cantaloupe.srv.cs.cmu.edu> (raw)
In-Reply-To: <20010512130225.4B64F199E1@mail.cse.psu.edu>

This is my first message here, so bear with me.  I don't run Plan 9 for
lack of hardware, but I worked on Steve Wynne's systems a little.

<9fans@cse.psu.edu> wrote:

>What plan 9 could use is a stash, something that stores files
>you accessed recently, perhaps picking them up lazily.  That way,
>you could disconnect and keep working.  You'ld still need a
>local file system like Unix's root file system because you need
>some guaranteed files, or you could just provide a set of files
>that the stash absolutely has to have, in addition to what it
>caches.  It would be a nice and useful project for someone to
>do.  There was a lot of good work some years ago at Columbia
>and other places.  No idea where it went.

I've been looking at this the last few days, and it seems to me that a
nice way to do this would be stacked on top of kfs and fs.  A system
could be installed onto local disk, and all 'required' files could thus
be ensured to be local.

If my understanding is correct, stashfs could have visible to itself
(or to two cooperating processes, rather, similarly to with Russ Cox's
rot13fs) both the fs file tree and the kfs file tree, and the 'upper
layer' would show the fs version if connected, and the kfs version if
disconnected; for special cases such as files that were edited both
locally and on the fs while the client was disconnected could be
presented as file.kfs-<modification-date> and
file.fs-<modification-date>, so that the user could see both and decide
what to do.

A simple configuration file could tell stashfs which hierarchies should
be completely pulled in (such as a home directory, or the directory of
your current projects), and which could not.  Before copying a file to
the local stash, it could check for sufficient disk space, and if not
available, begin deleting least recently modified stashed files first.

It should be possible, I think, to have multiple kfs instances serving
files from multiple local partitions, right?  It seems that it would be
much simpler to specify a maximum stash size, and/or have multiple
stashes, by creating a partition for each stash.  Additionally, if it's
left completely up to stashfs to set up the kfs and fs namespaces
itself, you could avoid potential weird areas like a client process
being able to see the fs or kfs namespace without translation (I'm not
entirely clear on whether this would be possible or not).

If my understanding looks correct to people, and there aren't issues
I'm forgetting to consider, I could begin trying to write this based on
Russ Cox's rot13fs.  It would be an interesting exercise to see how
close I can get without being able to test anything :)
-- 
 Matthew Weigel
 Research Systems Programmer
 mcweigel+@cs.cmu.edu


  parent reply	other threads:[~2001-05-16  8:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-12 13:02 presotto
2001-05-12 17:35 ` Fariborz 'Skip' Tavakkolian
2001-05-16  8:43 ` Matthew Weigel [this message]
2001-05-18  8:35   ` Douglas A. Gwyn
2001-05-18 14:50     ` Douglas A. Gwyn
2001-05-21  8:39     ` Matthew Weigel
2001-05-21 14:26       ` Ronald G Minnich
  -- strict thread matches above, loose matches on Subject: below --
2001-05-12  4:26 Fariborz 'Skip' Tavakkolian

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='9dshfp$3cu$1@cantaloupe.srv.cs.cmu.edu' \
    --to=mcweigel@cs.cmu.edu \
    --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).