Skip to content

Commit

Permalink
OpenZFS 9321 - arc_loan_compressed_buf() can increment arc_loaned_byt…
Browse files Browse the repository at this point in the history
…es by the wrong value

Authored by: Allan Jude <allanjude@freebsd.org>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Garrett D'Amore <garrett@damore.org>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/9321
OpenZFS-commit: openzfs/openzfs@92b05f3a18
Closes #7333
  • Loading branch information
allanjude authored and behlendorf committed Mar 27, 2018
1 parent 9ea6c3d commit 5152a74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2919,7 +2919,7 @@ arc_loan_buf(spa_t *spa, boolean_t is_metadata, int size)
arc_buf_t *buf = arc_alloc_buf(spa, arc_onloan_tag,
is_metadata ? ARC_BUFC_METADATA : ARC_BUFC_DATA, size);

arc_loaned_bytes_update(size);
arc_loaned_bytes_update(arc_buf_size(buf));

return (buf);
}
Expand All @@ -2931,7 +2931,7 @@ arc_loan_compressed_buf(spa_t *spa, uint64_t psize, uint64_t lsize,
arc_buf_t *buf = arc_alloc_compressed_buf(spa, arc_onloan_tag,
psize, lsize, compression_type);

arc_loaned_bytes_update(psize);
arc_loaned_bytes_update(arc_buf_size(buf));

return (buf);
}
Expand Down

0 comments on commit 5152a74

Please sign in to comment.