Strictly enforce keeping 'arc_c >= arc_c_min'. The ASSERTs are
left in place to catch this in a debug build but logic has been
added to gracefully handle in a production build.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3904
* If we're within (2 * maxblocksize) bytes of the target
* cache size, increment the target cache size
*/
- VERIFY3U(arc_c, >=, 2ULL << SPA_MAXBLOCKSHIFT);
+ ASSERT3U(arc_c, >=, 2ULL << SPA_MAXBLOCKSHIFT);
+ arc_c = MAX(arc_c, 2ULL << SPA_MAXBLOCKSHIFT);
if (arc_size >= arc_c - (2ULL << SPA_MAXBLOCKSHIFT)) {
atomic_add_64(&arc_c, (int64_t)bytes);
if (arc_c > arc_c_max)