hammer2 - Flesh out span code, API cleanups
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 4 Aug 2012 22:11:40 +0000 (15:11 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 4 Aug 2012 22:11:40 +0000 (15:11 -0700)
commit8c280d5da131165da872c3aadf5397c4a3b3cc6b
treeb05388ff7da8b9b8ad4317dd97a825dbfc141bd4
parentfc422eb712fd32ebe00de91b349528208b1e5225
hammer2 - Flesh out span code, API cleanups

* Cleanup the transactional APIs and add a few functions to help with
  simple (error code only) message replies.

* Better message protocol layering for both the kernel and userland code.

* Kernel now opens a LNK_CONN transaction which will enable the SPAN
  protocol on the link and also serve to install a PFS filter (which is
  not yet implemented).

  Upon success the kernel then initiates the SPAN.

  Basically for the kernel:

send LNK_CONN
wait for streaming reply (transaction remains open on both sides)
send LNK_SPAN

TODO: Receive/track LNK_SPANs, each representing a virtual circuit.

TODO: Track LNK_SPANs that match our PFS.

TODO: Issue higher level protocol transaction messages over these
      circuits based on VNOPS, caching, mirroring, etc.
      (transactional failures can occur when the LNK_SPAN state
      changes, forcing a retry, etc).

* Userland now accepts the LNK_CONN and uses the open transaction to
  install tracking structures for those connections participating in
  the SPAN protocol.

* Userland now installs tracking structures for received SPAN messages.

* Start fleshing out the userland side of the SPAN relay/transmit code.
  This will involve yet more structures to track which SPANs are being
  relayed over each connection, so changes can be propagated (not yet
  implemented).

  For userland the TODO is very large so no point iterating it here.

* Kernel now accepts DBG_SHELL replies (basically debug output messages)
  and will kprintf() them.  DBG_SHELL commands not yet accepted by the
  kernel.
20 files changed:
sbin/hammer2/Makefile
sbin/hammer2/cmd_debug.c
sbin/hammer2/cmd_pfs.c
sbin/hammer2/cmd_service.c
sbin/hammer2/hammer2.h
sbin/hammer2/msg.c
sbin/hammer2/msg_lnk.c [new file with mode: 0644]
sbin/hammer2/network.h
sbin/hammer2/subs.c
sbin/newfs_hammer2/newfs_hammer2.c
sys/vfs/hammer2/TODO
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_disk.h
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_ioctl.h
sys/vfs/hammer2/hammer2_msg.c
sys/vfs/hammer2/hammer2_msgops.c
sys/vfs/hammer2/hammer2_network.h
sys/vfs/hammer2/hammer2_vfsops.c