Commit
d962d5d didn't quite properly resolve the HDR_L2ONLY_SIZE
accounting. Accounting is now performed only in the constructor
and destructor which is a nice simplification. It should have
been removed the from create and destroy functions. This brings
up back in sync with upstream.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3533
list_remove(&dev->l2ad_buflist, hdr);
- arc_space_return(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS);
-
/*
* We don't want to leak the b_tmp_cdata buffer that was
* allocated in l2arc_write_buffers()
* Create and add a new L2ARC header.
*/
hdr->b_l2hdr.b_dev = dev;
- arc_space_consume(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS);
hdr->b_flags |= ARC_FLAG_L2_WRITING;
/*
* Temporarily stash the data buffer in b_tmp_cdata.