git: HAMMER - Add version 3 meta-data features

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Oct 14 11:56:39 PDT 2009


commit 83f2a3aae851887c1143dd5174eade5b66682dce
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Oct 14 11:44:59 2009 -0700

    HAMMER - Add version 3 meta-data features
    
    * These features are available for filesystem version 3.  Version 2 may be upgraded
      to version 3 in-place.  These features are not usable until you upgrade.
    
    * Definitively store snapshots in filesystem meta-data.  Softlinks still
      work.  The new snapshot directives (snap, snaplo, snapq, etc) also allow
      you to specify up to a 64-character note for each snapshot you create.
      The snapls directive may be used to list all snapshots stored in meta-data.
    
      'hammer cleanup' will move all softlink-based snapshots residing in the
      <fs>/snapshots directory to meta-data when it next snapshots the filesystem
      (within a day of upgrading, usually).   The snapshot softlinks are left intact.
    
      Storing snapshot information in meta-data means that accidental wipes of
      your <fs>/snapshots directory will NOT cause later hammer cleanup runs to
      destroy your snapshots!  The meta-data snapshots are also removed if you
      do a prune-everything, or through normal pruning expirations, and thus
      'hammer snapls' will definitively list your valid snapshots.
    
      This feature also means that you can obtain a definitive list of snapshots
      available on mirroring slaves.
    
    * Definitively store the hammer cleanup configuration file in filesystem meta-data.
      This meta-data is not mirrored.  'hammer cleanup' will move <fs>/snapshots/config
      to the new meta-data config and deletes <fs>/snapshots/config after you've upgraded
      the filesystem.  You can edit the configuration with the 'viconfig' directive.
    
    * The HAMMER utility has new directives:  snap, snaplo, snapq, snaprm, snapls,
      config, and viconfig.
    
    * WARNING!  Filesystems mounted 'nohistory' and files chflagged similarly do not
      have snapshots, but the hammer utility still allows the directives to be run.
      This is a bug that needs to be fixed.

Summary of changes:
 sbin/hammer/Makefile                |    3 +-
 sbin/hammer/cmd_cleanup.c           |  412 ++++++++++++++++++++++++++++++-----
 sbin/hammer/cmd_config.c            |  230 +++++++++++++++++++
 sbin/hammer/cmd_snapshot.c          |  388 ++++++++++++++++++++++++++++++++-
 sbin/hammer/cmd_softprune.c         |  152 +++++++++++--
 sbin/hammer/cmd_version.c           |   19 ++-
 sbin/hammer/hammer.8                |   53 +++++
 sbin/hammer/hammer.c                |   43 ++++
 sbin/hammer/hammer.h                |    5 +
 sys/vfs/hammer/hammer.h             |    9 +-
 sys/vfs/hammer/hammer_disk.h        |   38 +++-
 sys/vfs/hammer/hammer_ioctl.c       |  374 +++++++++++++++++++++++++++++++-
 sys/vfs/hammer/hammer_ioctl.h       |   50 ++++-
 sys/vfs/hammer/hammer_mirror.c      |   64 +++++-
 sys/vfs/hammer/hammer_object.c      |  187 ++++++++++++++++-
 sys/vfs/hammer/hammer_ondisk.c      |    2 +
 sys/vfs/hammer/hammer_reblock.c     |    4 +-
 sys/vfs/hammer/hammer_transaction.c |    9 +-
 sys/vfs/hammer/hammer_vfsops.c      |    1 +
 19 files changed, 1940 insertions(+), 103 deletions(-)
 create mode 100644 sbin/hammer/cmd_config.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/83f2a3aae851887c1143dd5174eade5b66682dce


-- 
DragonFly BSD source repository





More information about the Commits mailing list