Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit aa1f740

Browse files
avg-Iahrens
authored andcommitted
7867 ARC space accounting leak
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Closes #300
1 parent 4d519e7 commit aa1f740

File tree

1 file changed

+6
-0
lines changed
  • usr/src/uts/common/fs/zfs

1 file changed

+6
-0
lines changed

usr/src/uts/common/fs/zfs/arc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,6 +2587,12 @@ arc_hdr_free_on_write(arc_buf_hdr_t *hdr)
25872587
size, hdr);
25882588
}
25892589
(void) refcount_remove_many(&state->arcs_size, size, hdr);
2590+
if (type == ARC_BUFC_METADATA) {
2591+
arc_space_return(size, ARC_SPACE_META);
2592+
} else {
2593+
ASSERT(type == ARC_BUFC_DATA);
2594+
arc_space_return(size, ARC_SPACE_DATA);
2595+
}
25902596

25912597
l2arc_free_data_on_write(hdr->b_l1hdr.b_pdata, size, type);
25922598
}

0 commit comments

Comments
 (0)