Skip to content

Fix dmu_zfetch stream's element type #1946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Fix dmu_zfetch stream's element type #1946

wants to merge 1 commit into from

Conversation

shenyan1
Copy link
Contributor

dmu_zfetch organize streams with list, not avl_node_t. The reason it works well is zfs's list convert avl_node* to list*,so no warning happened.

dmu_zfetch organize streams with list,not avl_node_t. The reason it works well is zfs's list convert avl_node* to list*,so no warning happened.
unya pushed a commit to unya/zfs that referenced this pull request Dec 13, 2013
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 <[email protected]>
Closes openzfs#1946
ryao pushed a commit to ryao/zfs that referenced this pull request Apr 9, 2014
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 <[email protected]>
Closes openzfs#1946
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant