Date: Wed, 8 Mar 2017 13:40:25 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r314911 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201703081340.v28DePhN064176@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Andriy Gapon <avg@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703081340.v28DePhN064176>