7.0-BETA4 - witness_warn on boot

mikej at paymentallianceintl.com mikej at paymentallianceintl.com
Sun Dec 16 04:58:21 PST 2007


This simple patch should fix it.  This code path is pretty rare, though, 
I'm frankly shocked that you're running into it.

--- cam_xpt.c   20 Oct 2007 23:23:12 -0000      1.191
+++ cam_xpt.c   16 Dec 2007 07:46:22 -0000
@@ -3862,6 +3862,7 @@
                                                    &work_ccb->ccb_h,
                                                    xpt_links.stqe);

+                               mtx_unlock(&xsoftc.xpt_lock);
                                 continue;
                         } else {
                                 /*

Scott

The patch failed:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- cam_xpt.c   20 Oct 2007 23:23:12 -0000      1.191
|+++ cam_xpt.c   16 Dec 2007 07:46:22 -0000
--------------------------
Patching file cam_xpt.c using Plan A...
Hunk #1 failed at 3862.
1 out of 1 hunks failed--saving rejects to cam_xpt.c.rej
Done

(cam_xpt.c.reg)
***************
*** 3862,3867 ****
                                                     &work_ccb->ccb_h,
                                                     xpt_links.stqe);

                                  continue;
                          } else {
                                  /*
--- 3862,3868 ----
                                                     &work_ccb->ccb_h,
                                                     xpt_links.stqe);

+                                mtx_unlock(&xsoftc.xpt_lock);
                                  continue;
                          } else {
                                  /*



However, I manually modified cam_xpt.c like this and now the kernel boots and all seems well!

                                STAILQ_INSERT_TAIL(&xsoftc.highpowerq,
                                                   &work_ccb->ccb_h,
                                                   xpt_links.stqe);
                                mtx_unlock(&xsoftc.xpt_lock);
                                continue;
                        } else {
                                /*
                                 * Consume a high power slot while
                                 * this ccb runs.
                                 */

Thanks.

--mikej


More information about the freebsd-current mailing list