hammer2 - Implement and test first SPAN message transaction.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 13 Jun 2012 05:46:13 +0000 (22:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 13 Jun 2012 05:46:13 +0000 (22:46 -0700)
commit9b8b748f5ae6af42fcdda02fba2b052633d7dfac
treeaff759473f234b7eaa317f3bf3632f499367b323
parent26bf1a3684f1458a52caf29eaa96eba1f99c1703
hammer2 - Implement and test first SPAN message transaction.

* The hammer2 VFS now sends a dummy SPAN message to the hammer2 service
  daemon.  SPANs are used to register capabilities (primarily PFS services
  and PFS consumers).  SPAN messages are left as open transactions for the
  duration of the link and/or when the graph changes (mainly a spanning
  tree mechanic that will be coded as a function of the hammer2 service
  daemon in userland.

* Basic open transaction and simple reply message tested.  Use a dummy
  message for testing.

* hammer2_msg_write() detects CREATE, allocates state, and assigns a
  msgid.  state allocation moved out of hammer2_state_msgtx() and
  into hammer2_msg_write() so we can calculate the proper CRCs.

* Fixed a couple of expected bugs.  The userland code was swapping
  msg_hdr.source and msg_hdr.target in the reply, but I adjusted the
  message spec to NOT do that (meaning any message routing has to select
  {source} or {target} based on whether the REPLY bit is set or not.

* Memory seems to get cleaned up properly, so far.
13 files changed:
sbin/hammer2/cmd_service.c
sbin/hammer2/crypto.c
sbin/hammer2/hammer2.h
sbin/hammer2/main.c
sbin/hammer2/msg.c
sys/vfs/hammer2/DESIGN
sys/vfs/hammer2/Makefile
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_disk.h
sys/vfs/hammer2/hammer2_msg.c
sys/vfs/hammer2/hammer2_msgops.c [new file with mode: 0644]
sys/vfs/hammer2/hammer2_network.h
sys/vfs/hammer2/hammer2_vfsops.c