7867 ARC space accounting leak
illumos/illumos-gate@6de76ce2a9
6de76ce2a9
https://www.illumos.org/issues/7867
It seems that in the case where arc_hdr_free_pdata() sees HDR_L2_WRITING() we
would fail to update the ARC space statistics.
In the normal case those statistics are updated in arc_free_data_buf(). But in
the arc_hdr_free_on_write() path we don't do that.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andriy Gapon <avg@FreeBSD.org>
This commit is contained in:
parent
f1a99e4268
commit
b060bbc16a
@ -2323,6 +2323,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_data_on_write(hdr->b_l1hdr.b_pdata, size, type);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user