svn commit: r314911 - vendor-sys/illumos/dist/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Wed Mar 8 13:40:26 UTC 2017
Author: avg
Date: Wed Mar 8 13:40:24 2017
New Revision: 314911
URL: https://svnweb.freebsd.org/changeset/base/314911
Log:
7867 ARC space accounting leak
illumos/illumos-gate at 6de76ce2a90f54fecb0dba46dca08c99cef7aa08
https://github.com/illumos/illumos-gate/commit/6de76ce2a90f54fecb0dba46dca08c99cef7aa08
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 at delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel at delphix.com>
Approved by: Dan McDonald <danmcd at omniti.com>
Author: Andriy Gapon <avg at FreeBSD.org>
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Mar 8 13:39:22 2017 (r314910)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Wed Mar 8 13:40:24 2017 (r314911)
@@ -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);
}
More information about the svn-src-vendor
mailing list