hammer2 - Wire-up the kernel<->userland messaging pipe
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Jun 2012 05:03:48 +0000 (22:03 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Jun 2012 05:03:48 +0000 (22:03 -0700)
commitbfc3a7b1a6cc1c380d88b1a095076132618294d7
tree391724db81c56cf82fd8ad53d0c3762af986dc8b
parent921f5a3f384eea2309f6e19f791ab970e5808d83
hammer2 - Wire-up the kernel<->userland messaging pipe

This commit starts coding up the cluster controller messaging
infrastructure.  The cluster controller is a userland program
typically running on the same machine (but doesn't have to be).

The controller will be able to act in several capacities ranging
from simple remote mounts with no local storage to mirroring setups,
master/slave setups, and ultimately quorum setups.  Since communication
is over a socket it will eventually be possible to implement a
diskless hammer2 root mount without the need for a local controller.

The VFS only talks over one socket, so in quorum or multi-connection
setups the local cluster controller will deal with the complexity of
managing multiple connections and the hammer2 VFS messaging interface
remains simple.

The hammer2 VFS will also use this interface to request cache state
grants and, being a two-way protocol, the other end can request cache
state invalidations or downgrades.

* hammer2_mount now starts 'hammer2 service', connects to it via a socket,
  and passes the socket descriptor to the mount().

* The hammer2 VFS now refs the passed-in file pointer and starts a reader
  and writer thread to manage it.  The code does not yet process actual
  messages.
sbin/mount_hammer2/mount_hammer2.c
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_mount.h
sys/vfs/hammer2/hammer2_vfsops.c