[cap-talk] plash (or bash) and undo/redo
David-Sarah Hopwood
david-sarah at jacaranda.org
Thu Apr 9 22:13:46 EDT 2009
John Carlson wrote:
> Since plash replaces glibc with it's own version of glibc to run
> programs, wouldn't it be possible to add undo, redo, commit, and
> rollback commands to plash? I know it would be hard (but not
> impossible) to undo/redo networking commands, but it seems like you
> could undo/redo a lot of file system stuff. For writes, you would do
> a read first, and store the underlying data being written in an undo
> object. For reads, you could reset the file pointer backwards. You'd
> have to figure out the opposite of the fcntl and ioctl stuff. And
> opens might have to store file system contents for undo as well.
> tells would keep where they tell'ed from.
>
> Is this an impossible task, or can we take a hint from the application
> side that such things are possible, and should be attempted?
It's not an impossible task, but it is a very considerable amount of work,
to put it mildly.
There are existing (experimental) transactional/snapshotting filesystems
that work on Linux, for example Btrfs [*]. It might be a better use of time
and resources, and a better layering of the resulting system, to simply
use such a filesystem "underneath" Plash rather than to attempt to
implement this functionality as part of Plash.
[*] Disclaimer: I do not know much about the design or current status of
Btrfs.
--
David-Sarah Hopwood ⚥
More information about the cap-talk
mailing list