diff options
author | Serapheim Dimitropoulos <[email protected]> | 2019-01-31 09:16:39 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-01-31 09:16:39 -0800 |
commit | 7558997d2f808368867ca7e5234e5793446e8f3f (patch) | |
tree | 614b9c030c4bd3542a0a97051b515d17789b49bc /contrib | |
parent | 2747f599ff322ddafbfef79813e63624d04fb7aa (diff) |
vs_alloc can underflow in L2ARC vdevs
The current L2 ARC device code consistently uses psize to
increment vs_alloc but varies between psize and lsize when
decrementing it. The result of this behavior is that
vs_alloc can be decremented more that it is incremented
and underflow. This patch changes the code so asize is
used anywhere.
In addition, it ensures that vs_alloc gets incremented by
the L2 ARC device code as buffers are written and not at
the end of the l2arc_write_buffers() routine. The latter
(and old) way would temporarily underflow vs_alloc as
buffers that were just written, would be destroyed while
l2arc_write_buffers() was still looping.
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes #8298
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions