Major continuing work on jscan, the userland backend for the journaling
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 5 Jul 2005 00:26:03 +0000 (00:26 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 5 Jul 2005 00:26:03 +0000 (00:26 +0000)
commit712e03b015ebcc05ff92d5102abb8bad7ba85969
tree54e3a236554dfb3cf4fd38d8b45ab506e30fe115
parentb7ef558f23808190b9c35ed1ea3c36b71e2b68b2
Major continuing work on jscan, the userland backend for the journaling
system.

* Fix bugs in the stream demultiplexing code.  Only the first stream header
  is supposed to be passed to the virtualized stream code.  We were passing
  the stream header and trailer for each meta record and the extra meta-data
  really confused the virtualized stream scanning code.

* Add support for unknown nesting record sizes.  This occurs when the
  nesting record in the virtual stream is too large to fit in the kernel's
  in-memory journal FIFO.  This allows us to arbitrarily push and pop
  elements of a transaction without having to know the size of the completed
  transaction in advance.

* Use a 64 bit integer to calculate the completed transaction size.  Note
  however that currently the stream reconstruction code uses malloc so
  there are serious limits to what it can reconstruct.

* Implement (partial) support for mirroring.  Only basic file and directory
  creation, write, remove, and rename is currently decoded.

The TODO list is long and varied.  We need to use mmap() instead of malloc()
to reference journal data.  We need to finish implementing mirror mode.  We
need a catch-up or restart mode for the mirror.  We need raw journal data
logging, we need stream ackknowledgements, and a thousand other things.

This example will maintain a mirror of /usr in /usr_mirror in real time.
Again, remember that there is a lot more work to do.... the mirroring isn't
perfect by a long shot.  We don't do symlinks for example, yet, and there
are many other issues.

    # Warning: do not ^Z mountctl!
    cpdup /usr /usr_mirror
    cd /usr_mirror
    mountctl -a /usr:test | jscan -m stdin
    [does not return]
    [to terminate, type 'mountctl -d test' in another shell window]
sbin/jscan/Makefile
sbin/jscan/dump_debug.c
sbin/jscan/dump_mirror.c [new file with mode: 0644]
sbin/jscan/jattr.h [copied from sbin/jscan/jscan.c with 55% similarity]
sbin/jscan/jfile.c
sbin/jscan/jscan.8
sbin/jscan/jscan.c
sbin/jscan/jscan.h
sbin/jscan/jstream.c
sbin/jscan/subs.c