dmsg - refactor cluster and pfs identifiers
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 27 Mar 2015 03:05:51 +0000 (20:05 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 27 Mar 2015 03:05:51 +0000 (20:05 -0700)
commit7750fd726d0264283608ff21d8a003fb8d7da03b
treecf26f0a859d8a9863d2237f7e26a13172c76e2c1
parentaacadd1aea49341bfe0e3908a247c6c39ba9bc0c
dmsg - refactor cluster and pfs identifiers

Cleanup loose ends in the CONN/SPAN messages that prior work has exposed.
DMSG now uses LNK_SPAN exclusively in its graph algorithms, so LNK_CONN
has a different meaning than it used to.

* Change the way cl_id and fs_id work.  Rename cl_id and most cluster fields
  as 'peer' identification fields.

  Reduce complexity and confusion by removing pfs_type and pfs_fsid from
  LNK_CONN.  Also remove pfs_mask and fs_label.  Change cl_label to
  peer_label.  peer_label is now always a human-readonable string identifier
  for the socket connection and no longer performs any connection filtering.
  This allows it to be passed in LNK_SPANs to make the trees more
  human-readable when dumped.

* A LNK_CONN identifies the peer and not necessarily any particular cluster.
  Note that the peer_id in a LNK_CONN is a filter request, not an
  advertisement.

* Make peer_label more meaningful by incorporating the hostname (needs more
  work).

* Rename filesystem identifiers as 'pfs' identifiers.  A LNK_SPAN identifies
  a particular PFS.  Note that the peer_id in a LNK_SPAN is part of the PFS
  { cluster_id, pfs_id } advertisement.

* Pad some in-memory structures for natural alignment (it's a general rule
  for all hammer2 structures, even in-memory structures when appropriate).
14 files changed:
lib/libdmsg/dmsg.h
lib/libdmsg/msg_lnk.c
lib/libdmsg/service.c
lib/libdmsg/subs.c
sbin/hammer2/cmd_pfs.c
sbin/hammer2/main.c
sbin/hammer2/subs.c
sys/dev/disk/xdisk/xdisk.c
sys/kern/subr_diskiocom.c
sys/sys/dmsg.h
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_cluster.c
sys/vfs/hammer2/hammer2_disk.h
sys/vfs/hammer2/hammer2_iocom.c