Skip to content

Commit

Permalink
OpenZFS 7867 - ARC space accounting leak
Browse files Browse the repository at this point in the history
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Dan Kimmel <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Tim Chase <[email protected]>
Ported-by: Brian Behlendorf <[email protected]>

OpenZFS-issue: https://www.illumos.org/issues/7867
OpenZFS-commit: openzfs/openzfs@aa1f740d
Closes openzfs#5874
  • Loading branch information
avg-I authored and behlendorf committed Mar 8, 2017
1 parent db4ed56 commit 423e7b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,12 @@ arc_hdr_free_on_write(arc_buf_hdr_t *hdr)
size, hdr);
}
(void) refcount_remove_many(&state->arcs_size, size, hdr);
if (type == ARC_BUFC_METADATA) {
arc_space_return(size, ARC_SPACE_META);
} else {
ASSERT(type == ARC_BUFC_DATA);
arc_space_return(size, ARC_SPACE_DATA);
}

l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd, size, type);
}
Expand Down

0 comments on commit 423e7b6

Please sign in to comment.