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) MFC after: 2 weeks
This commit is contained in:
parent
dafe370206
commit
970ba4b3da
@ -5232,7 +5232,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.
|
||||
|
Loading…
Reference in New Issue
Block a user