Fix zstream_t incorrect type
The DMU zfetch code organizes streams with lists not avl trees. A avl_node_t was mistakenly used for a list_node_t in the zstream_t type. This is incorrect (but harmless) and when unnoticed because: 1) The list functions explicitly cast the value preventing a warning, 2) sizeof(avl_node_t) >= sizeof(list_node_t) so no overrun occurs, and 3) The calculated offset is the same regardless of the type. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1946
This commit is contained in:
parent
be5db977ea
commit
5cb65efe2c
|
@ -50,7 +50,7 @@ typedef struct zstream {
|
||||||
uint64_t zst_cap; /* prefetch limit (cap), in blocks */
|
uint64_t zst_cap; /* prefetch limit (cap), in blocks */
|
||||||
kmutex_t zst_lock; /* protects stream */
|
kmutex_t zst_lock; /* protects stream */
|
||||||
clock_t zst_last; /* lbolt of last prefetch */
|
clock_t zst_last; /* lbolt of last prefetch */
|
||||||
avl_node_t zst_node; /* embed avl node here */
|
list_node_t zst_node; /* next zstream here */
|
||||||
} zstream_t;
|
} zstream_t;
|
||||||
|
|
||||||
typedef struct zfetch {
|
typedef struct zfetch {
|
||||||
|
|
Loading…
Reference in New Issue