HAMMER Utilities: scan feedback
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 10 May 2008 22:56:37 +0000 (22:56 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 10 May 2008 22:56:37 +0000 (22:56 +0000)
* Add support for and report the number of records scanned by the pruning
  code

sbin/hammer/cmd_prune.c
sys/vfs/hammer/hammer_ioctl.c

index 8e82ca5..bf05abd 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sbin/hammer/Attic/cmd_prune.c,v 1.7 2008/05/10 17:54:59 dillon Exp $
+ * $DragonFly: src/sbin/hammer/Attic/cmd_prune.c,v 1.8 2008/05/10 22:56:37 dillon Exp $
  */
 
 #include "hammer.h"
@@ -111,8 +111,10 @@ hammer_cmd_prune(char **av, int ac)
        close(fd);
        if (LinkPath)
                hammer_prune_create_links(filesystem, &prune);
-       printf("Pruned %lld records (%lld directory entries) and %lld bytes\n",
+       printf("Pruned %lld/%lld records (%lld directory entries) "
+              "and %lld bytes\n",
                prune.stat_rawrecords,
+               prune.stat_scanrecords,
                prune.stat_dirrecords,
                prune.stat_bytes
        );
index 3d4c082..9fc9353 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/vfs/hammer/hammer_ioctl.c,v 1.13 2008/05/10 20:07:14 dillon Exp $
+ * $DragonFly: src/sys/vfs/hammer/hammer_ioctl.c,v 1.14 2008/05/10 22:56:36 dillon Exp $
  */
 
 #include "hammer.h"
@@ -188,6 +188,7 @@ retry:
                                        elm->base.obj_id, elm->base.key);
                        }
                }
+               ++prune->stat_scanrecords;
 
                /*
                 * Bad hack for now, don't blow out the kernel's buffer