Project

General

Profile

Actions

Bug #12095

closed

Don't call sizeof on void

Added by Jerry Jelinek almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

This is a port from OpenZFS of commit:

511fce6b1f Don't call sizeof on void

This is generally not a very interesting fix, except for one critical change to the recent range tree memory improvements (4d7988d605 11971 Reduce loaded range tree memory usage). The following OpenZFS change from commit 511fce6b1f is important.
--- a/module/zfs/dsl_scan.c
+++ b/module/zfs/dsl_scan.c
@@ -1244,7 +1244,7 @@ dsl_scan_should_clear(dsl_scan_t *scn)
                if (queue != NULL) {
                        /* # extents in exts_by_size = # in exts_by_addr */
                        mused += zfs_btree_numnodes(&queue->q_exts_by_size) *
-                           sizeof (range_seg_t) + queue->q_sio_memused;
+                           sizeof (range_seg_gap_t) + queue->q_sio_memused;
                }
                mutex_exit(&tvd->vdev_scan_io_queue_lock);
        }

Actions

Also available in: Atom PDF