HAMMER VFS - vfs.hammer.double_buffer adjustments
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 20 Jan 2011 04:30:15 +0000 (20:30 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 20 Jan 2011 04:30:15 +0000 (20:30 -0800)
* Do not try to use the (currently broken) _vnode_validate() to
  validate de-dup data when double_buffer is turned on.  Use the
  device buffer cache instead.

sys/vfs/hammer/hammer_dedup.c

index 3baf203..a6dadbe 100644 (file)
@@ -410,7 +410,9 @@ hammer_dedup_validate(hammer_dedup_cache_t dcp, int zone, int bytes,
         * device-based buffer (for large-zone data blocks it will
         * generate a separate read).
         */
-       if (_vnode_validate(dcp, data, &error)) {
+       if (hammer_double_buffer) {
+               error = 1;
+       } else if (_vnode_validate(dcp, data, &error)) {
                hammer_live_dedup_vnode_bcmps++;
                return (1);
        } else {