hammer2 - flush sequencing part 3 - add snapshots
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 8 May 2013 02:32:04 +0000 (19:32 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 8 May 2013 02:36:47 +0000 (19:36 -0700)
commita864c5d920f8c54e27c4b873076d859138af21a0
treee7abce64f209edcfcec3d23d37d5a6c690d8dae6
parent7ecf7fbc35668236e7194fd5631f720ad12fb3a6
hammer2 - flush sequencing part 3 - add snapshots

* Basic snapshot creation currently uses a duplicate/create sequence
  to duplicate the directory being snapshotted, with caveats listed in
  the TODO.

  Snapshotting the mount point works as expected though work needs to be
  done on the flushing.  Snapshotting a subdirectory works with some
  issues (hardlinks which span above the parent directory will not be
  snapshotted).

* Add the PFS_SNAPSHOT ioctl for writable snapshot creation.

* Adjust the PFS_GET ioctl to support retrieval of the PFS specific to
  the file descriptor.

* Implement PFS deletion and augment the unlink code to allow non-empty
  snapshots to be deleted.

* Add restricted flushing to support flushing the snapshot concurrent to
  modifying operations occurring during the snapshot flush.  Untested.
sys/vfs/hammer2/TODO
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_disk.h
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_ioctl.h
sys/vfs/hammer2/hammer2_vfsops.c