Copy-on-write for develop

Jameson "Chema" Quinn jquinn at cs.oberlin.edu
Sat Jan 5 16:57:24 EST 2008


>
>
> Jameson "Chema" Quinn wrote:
> > Does anyone know if it is possible for Sugar to support something like
> > this? That is, if it there's any way - either file-system-native or
> > through some strap-on - to safely hand a link to a process so that
> > (either magically or manually) it can replace the link with a local copy
> > if needed, but it CANNOT modify the original file?
>
> In the interest of simplicity, why not just use UNIX permissions and
> simple
> editor logic?
>
> The activity's files are all read-only to non-root.  Just read them into
> the
> editor.  If the user makes a change, save it as a new file, with
> appropriate
> permissions.
>
> - --Ben


This is one option. The problem is that the activity could depend on having
the right file names. So to do this, I think I'd have to make a copy of the
directory structure filled with activity-owned symbolic links, to be able to
delete and overwrite with the local copy. Some activities would probably
break even then, too, because of the difference between symbolic and hard
links.

Obviously, whatever I do in this direction is going to need special logic in
the activity isolation and the datastore, to allow Develop to get at
multiple files in funny places in the datastore, and to store in the
datastore some kind of 'key' to resume work on these files later.

In other words, this is a tough problem and I'll probably be bugging the
list dozens of times before all's done. I understand that this first issue
has workarounds, but if there's some way to get direct COWLB power in JFFS2,
that would help keep things simpler.

Jameson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20080105/5fa3dc8d/attachment.html>


More information about the Devel mailing list