diff options
author | delphij <delphij@FreeBSD.org> | 2014-10-16 22:12:23 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-10-16 22:12:23 +0000 |
commit | 9f9b89ac402e2d98eb758e222c198822f3e159e2 (patch) | |
tree | 24aa16cf97d0b94fd6299f4e37594d10fef1161a /sys | |
parent | 9ea3e686268d309beb7761505ed662a69dc424b5 (diff) | |
download | FreeBSD-src-9f9b89ac402e2d98eb758e222c198822f3e159e2.zip FreeBSD-src-9f9b89ac402e2d98eb758e222c198822f3e159e2.tar.gz |
MFV r273060:
Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.
Obtained from: FreeNAS (issue #6239)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c index aedb5a1..afbc6f9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -5228,7 +5228,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz, ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. |