diff options
author | Brian Behlendorf <[email protected]> | 2015-10-13 09:17:01 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-10-13 09:23:35 -0700 |
commit | 935434ef01fc067f3b4bc26be6378f8f1d89734a (patch) | |
tree | 25c48a9adc667244544c5b176b34b20d082607fc /module | |
parent | 8f90f7372a1b456ec6ede5e5464ffa23273a7a99 (diff) |
Fix 'arc_c < arc_c_min' panic
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 <[email protected]>
Issue #3904
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/arc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index b759e6483..fa1434e16 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -3757,7 +3757,8 @@ arc_adapt(int bytes, arc_state_t *state) * 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) |