]> granicus.if.org Git - zfs/commitdiff
Illumos 6293 - ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 11 Jan 2016 21:52:17 +0000 (13:52 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 11 Jan 2016 22:10:31 +0000 (14:10 -0800)
6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

References:
  https://www.illumos.org/issues/6293
  https://github.com/illumos/illumos-gate/commit/8fe00bf

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/arc.c

index 0741633696b24266a2d52c8c8309ad2cc77ffecd..c3d88679f86c967f1a7775bb7619ebd9ddf4a9b1 100644 (file)
@@ -5343,8 +5343,18 @@ arc_init(void)
        arc_need_free = 0;
 #endif
 
-       /* Set min cache to allow safe operation of arc_adapt() */
+       /*
+        * In userland, there's only the memory pressure that we artificially
+        * create (see arc_available_memory()).  Don't let arc_c get too
+        * small, because it can cause transactions to be larger than
+        * arc_c, causing arc_tempreserve_space() to fail.
+        */
+#ifndef        _KERNEL
+       arc_c_min = arc_c_max / 2;
+#else
        arc_c_min = 2ULL << SPA_MAXBLOCKSHIFT;
+#endif
+
        /* Set max to 1/2 of all memory */
        arc_c_max = allmem / 2;