git: hammer - Fix filesystem selection path bug in cleanup directive
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Aug 15 01:03:28 PDT 2013
commit eb5751f677b7e7206a65a83b5fcf401a3ad378f8
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Aug 15 00:57:53 2013 -0700
hammer - Fix filesystem selection path bug in cleanup directive
* When being asked to cleanup a hammer filesystem, hammer checks the
/var/hammer/<filesystem>/ directory for manual snapshots and is able
to extract the target filesystem from the softlinks it finds.
If no softlinks are found hammer incorrectly calls 'hammer prune'
with the /var/hammer/* path instead of the target filesystem path
which causes the prune code to prune the wrong filesystem.
* Issue only happened when snapshots were disabled but snapshot aging
was being enforced. e.g. in the hammer config for the filesystem,
something like 'snapshots 0d 60d'. This feature tends to be used
only on slaves that are the target of a mirror-stream backup.
Other combinations will either have created snapshot softlinks
in /var/hammer/* or would have disabled snapshots entirely (which
causes a prune-everything to happen and doesn't have the bug).
Summary of changes:
sbin/hammer/cmd_cleanup.c | 26 +++++++++++++++++++++-----
sbin/hammer/cmd_softprune.c | 14 +-------------
sbin/hammer/hammer.h | 12 ++++++++++++
3 files changed, 34 insertions(+), 18 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/eb5751f677b7e7206a65a83b5fcf401a3ad378f8
--
DragonFly BSD source repository
More information about the Commits
mailing list