hammer2 - Config notifications, cleanup HAMMER2 VFS API
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 11 Aug 2012 03:46:51 +0000 (20:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 11 Aug 2012 03:46:51 +0000 (20:46 -0700)
commit1a34728c11e151b7dd897784899b5a763b3b8fe8
tree7727ffd7c121083046e8a5a7286d559b966cf0cc
parentaa95b3ccc0efdb4cb497db6f9f907bf1d9f30182
hammer2 - Config notifications, cleanup HAMMER2 VFS API

* A hammer2 volume has a PERSISTENT table of 256 entries in the media
  volume header for specifying how the cluster connects together.  Various
  hammer2 directives can list, add, or remove entries from this table.

  This table will be used for several different aspects of the filesystem
  and one of them is to tell the userland hammer2 service daemon what
  other machines to connect to.  That is, we want the cluster configuration
  to be persistently stored as part of a HAMMER2 filesystem.

* Add a notification message from the kernel to the daemon whenever this
  table id modified.  The kernel will also spam the contents of the table
  to the daemon when it first connects to the daemon.

  The service daemon tracks the table and will connect to (or disconnect
  from) the listed targets in real time.  In addition, the service daemon
  will retry a failed connection (or failed DNS lookup) forever as long
  as the entry is intact.  The idea being that a machine in the cluster
  will recover once transitory failures are resolved.

  This is a bit messy at the moment as two pthreads have to be created for
  each connection... one to handle connect, disconnect, and retry operations
  and the other to handle the actual message stream over the connection.

* Clean up the HAMMER2 VFS code's messaging APIs a bit, bringing them
  closer to the hammer2 userland APIs (though of course there will
  always be major differences).

* Adjust the hammer2 VFS to try to clean up open transactional states
  when a socket failure occurs before proceeding with a umount, so the
  related functional states can be triggered and cleaned up.

* Added an ioctl to reconnect a hammer2 mount to the userland hammer2
  service daemon (not yet used).  This will allow us to kill and restart
  the daemon and have it recover the communications pipes between itself
  and the HAMMER2 mounts in the kernel.
sbin/hammer2/cmd_remote.c
sbin/hammer2/msg.c
sbin/hammer2/msg_lnk.c
sbin/hammer2/network.h
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_ioctl.h
sys/vfs/hammer2/hammer2_msg.c
sys/vfs/hammer2/hammer2_network.h
sys/vfs/hammer2/hammer2_vfsops.c