MFV r314911: 7867 ARC space accounting leak
authoravg <avg@FreeBSD.org>
Wed, 8 Mar 2017 13:52:45 +0000 (13:52 +0000)
committeravg <avg@FreeBSD.org>
Wed, 8 Mar 2017 13:52:45 +0000 (13:52 +0000)
commit79968be53edef32c92183bd923f4e4ca6c3c5f8a
tree0abcf752c2b4a3cffcb3ea3315be1cf80a347e41
parentc74c0ede5a30a98f35c7bef9b32006dc4fd75c66
MFV r314911: 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>

MFC after: 10 days
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c