HAMMER 60I/Many: Mirroring
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 9 Jul 2008 10:29:20 +0000 (10:29 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 9 Jul 2008 10:29:20 +0000 (10:29 +0000)
commitea434b6fa505f0bbc28650a41494dea1ee26dd28
treea7d49f53d253321671c8f961c150484cea15029d
parent80b8dd9b813083362d42dc3c62d7bd586028951d
HAMMER 60I/Many: Mirroring

* Flesh out the mirroring code a lot.  It is now 90% done.

* Change the way PFS's are managed.  The PFS management structure is no
  longer associated with the PFS root inode.  Instead all PFS management
  structures, for all PFSs, are associated with the master root inode.

  This allows a mirroring slave to also mirror the root inode itself.

* Remove the directory localization hacks used to link a PFS to its parent.
  PFS's are no longer linked to their parent.  Instead, a special
  @@PFS softlink is created.

* The master/slave mode must now be selected when a PFS is created and
  cannot be changed.

* PFSs are accessed via a special @@PFS softlink created in the parent
  directory.  HAMMER manipulates this special softlink in the readlink()
  command and returns a longer form to the kernel which changes whenever
  the snapshot TID changes.

  This allows updates to slave PFSs by mirroring commands to not create
  stale system caches.  Every time you CD through the special softlink
  you get the most recent completed snapshot of the PFS.

* Userland now manipulates PFS ids as a simple integer in the range 0-65535.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_reblock.c
sys/vfs/hammer/hammer_subs.c
sys/vfs/hammer/hammer_vnops.c